Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3008713ybd; Fri, 28 Jun 2019 01:04:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJOmnz+7YK6B0MifzHYNqgRP8PYzmmvt8oMTL0JjqYVAfd43hPndzE+sjAyS6zctebVeCS X-Received: by 2002:a17:902:6a85:: with SMTP id n5mr9305396plk.73.1561709076587; Fri, 28 Jun 2019 01:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561709076; cv=none; d=google.com; s=arc-20160816; b=FzEqF9Oy3UdAjA6Ikwi4fhgAYBehq2htPotHCic5yleiTOY+ecaOXHd/Ku8PxpgO9I 5Iz9grGdfxVW4Xezx6b1n8sDBlRE+licnGRXtB+AsLjIRHBkR2AvkKJrXke6CPG63XYe wZIZCDw7yL9ZrnrOsS1IFSHMX52LtTVtomQahHWj+Dt+M56KwG41msNdHBIpQ1lwy4RZ uZOj3hEB1Lo4HS3SYZua7GugdlBfze30o5XiWh/cR8R2VYzKUA6gAy04c2XV4KeFbYqK HxZ5y5CoAqXpmOJ8HRF7Q/k6XhjMX2RTXncgjBLf+RUtaodmARkGsKJrcOvsRtqOEb/X JeaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=htDwnlFffhxBEvi8+xBRx4sQ66noavvKHXBdcxpj0oE=; b=QArGqvlHEf4WfQkRbFi7ZrU9yWxJuWtnRfLlF6XT7GIAPzoVzt3ImP0K1xUlZ4QeLg 8EUIejq14Z/lDTqqFC5sWDtIeefiEiC8WiH8nbkjyWwx5Y6E+aFjwLuDtoXjKF6SSOn3 h6agMcoVrBPex1gHAKv626YRnRSgbp9PVhFg34ndaFushH3VqUDqlzIWk86/o4Y24R3u +YOnhaKljnI0AFb72p2g6ws3IahJ1u7tVEBRuhPkvV0KRYbLrLQcG72q+MR1e2Rbco/5 35Dtq+XSmf6ziKR/spN8S98tZ1OwKx3N01ubKb6jnOj6zgTcILr0YsL+1Wl9CInixnVG gtig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Pddsr2r8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i198si1754977pfe.228.2019.06.28.01.04.20; Fri, 28 Jun 2019 01:04:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Pddsr2r8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726667AbfF1IER (ORCPT + 99 others); Fri, 28 Jun 2019 04:04:17 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:46164 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbfF1IEQ (ORCPT ); Fri, 28 Jun 2019 04:04:16 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190628080415euoutp02e601e44e129257f3d2076fc44310d6bb~sThyTx1_81372213722euoutp02b for ; Fri, 28 Jun 2019 08:04:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190628080415euoutp02e601e44e129257f3d2076fc44310d6bb~sThyTx1_81372213722euoutp02b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1561709055; bh=htDwnlFffhxBEvi8+xBRx4sQ66noavvKHXBdcxpj0oE=; h=From:To:Cc:Subject:Date:References:From; b=Pddsr2r8tzeZLDWy3mzk9x4ogEV9SU4EjXIA6fr7ZU8tdmrgqmbRofKitW9kt/Lwn tdzAoazMO5PeykB++U9fkOPbndsCveDwcqo5dD6ED0/yu+4d8+sYmIRbtlQIfviIy/ qoLSLWEr+oofbsg6K9eohjiAoaOt9HLa4wxBp0Ss= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190628080414eucas1p177132201f2e18478fa8c7eee5cad0236~sThxmNMqC1746317463eucas1p1p; Fri, 28 Jun 2019 08:04:14 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 61.8E.04298.EF9C51D5; Fri, 28 Jun 2019 09:04:14 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190628080413eucas1p13f3400f657b4827414737af42f02a57b~sThwqRHhx0956609566eucas1p1u; Fri, 28 Jun 2019 08:04:13 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190628080413eusmtrp1e13deb5ff2bc58387fa51528ec2cfce4~sThwcK1Pb2367323673eusmtrp1U; Fri, 28 Jun 2019 08:04:13 +0000 (GMT) X-AuditID: cbfec7f2-f13ff700000010ca-e9-5d15c9fe74f1 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 87.10.04140.DF9C51D5; Fri, 28 Jun 2019 09:04:13 +0100 (BST) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190628080412eusmtip189a4ddd4e3bb6ce2297a10e4e641928c~sThvrvVfh2337623376eusmtip1h; Fri, 28 Jun 2019 08:04:12 +0000 (GMT) From: Ilya Maximets To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, xdp-newbies@vger.kernel.org, "David S. Miller" , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Magnus Karlsson , Jonathan Lemon , Jakub Kicinski , Daniel Borkmann , Ilya Maximets Subject: [PATCH bpf v6 0/2] xdp: fix hang while unregistering device bound to xdp socket Date: Fri, 28 Jun 2019 11:04:05 +0300 Message-Id: <20190628080407.30354-1-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTYRjG+3a2neNldZy31yVqQ/8oygtEHSjMIOxQQSqYoFmtPKikU3a8 FyQhpitT1FgTE8tK3eYlGV5WSA5vKSzUIA28VEJeULOVzhRpx6P03+99nue98PERmLRYJCOS lRmMSqlIkYsdhe39G5Zj2x/c44MnityprcJWRFl7B8RU3fM1jKr+WCCkPj3YwKn+uQIxZWrW YtSYqVpMNZgH7VqtB9VR2o3CnGhj44SA7qqaxOm6d/MCWj0+itGah18x+rFRh2hrm08EHut4 OoFJSc5iVEGhNxyTbBubePoLPKfZWCbIR0aRGjkQQB6HZaterEaOhJRsQLAwMyfii98IGk0j SI0Ie2FF0JKw19C7uiXgWErWI7AYcvm8DUGFYQ1xhpg8CkP63h12I2Ww2tmBcyGM1GJg/F4p 5AxXMhYma76JORaSAVC52IZzLCFPwTNLJc5v8wV963uMawZyUwwzr7U4dxGQ58Bgy+YzrrAw YNzNe8NwxSMhz/dgumAe8b1FCDTmbQFvnAHjomVnDkYehhZTEC+fBU1TP+LH74fxJRdOxuxY 3q7BeFkCRYVSPu0Pmz31GM8ymFi27l5Aw9TgU8S/TzwMroxgZcin6v+uWoR0yJPJZFMTGTZE yWQHsopUNlOZGHgrLbUN2T/I8Pb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jSuXNN+5POPL/DsTw47f3+I+Na1u4sf9O4LYtbY437vw I6bLPD1WUEPH201SiaU4I9FQi7moOBEAMN6RiHUCAAA= X-CMS-MailID: 20190628080413eucas1p13f3400f657b4827414737af42f02a57b X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190628080413eucas1p13f3400f657b4827414737af42f02a57b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190628080413eucas1p13f3400f657b4827414737af42f02a57b References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Version 6: * Better names for socket state. Version 5: * Fixed incorrect handling of rtnl_lock. Version 4: * 'xdp_umem_clear_dev' exposed to be used while unregistering. * Added XDP socket state to track if resources already unbinded. * Splitted in two fixes. Version 3: * Declaration lines ordered from longest to shortest. * Checking of event type moved to the top to avoid unnecessary locking. Version 2: * Completely re-implemented using netdev event handler. Ilya Maximets (2): xdp: hold device for umem regardless of zero-copy mode xdp: fix hang while unregistering device bound to xdp socket include/net/xdp_sock.h | 5 +++ net/xdp/xdp_umem.c | 21 +++++----- net/xdp/xdp_umem.h | 1 + net/xdp/xsk.c | 87 ++++++++++++++++++++++++++++++++++++------ 4 files changed, 93 insertions(+), 21 deletions(-) -- 2.17.1