Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1886821ybd; Thu, 27 Jun 2019 03:16:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwg0qiuARk6rTiCv3Uubb28jgOnJLPoo5uzOLPdkJ9+UaZiR+jWBtpDlNZrXoMCiqNb+Fnh X-Received: by 2002:a63:1316:: with SMTP id i22mr3190353pgl.274.1561630619544; Thu, 27 Jun 2019 03:16:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561630619; cv=none; d=google.com; s=arc-20160816; b=P7PR/qoX7jNrr6MlSmF6d3QdAEvJ4KhKla2rs2sebjP3T8/NFkRC5/2Hbj3RVecH1K zI4a0NZqGF+rBYX99sggq8ET27GJq58bordXDBC8J2xT1pLLauWzSnwgmhzWxfIajJgx bNQLYEXxjdalL6lzDi0YoFREFcLai3dQTa4nl3B5dAeLm4tgnIz7+Bg/U6L3ldgScpUu AOIa3KPJ1PQsbz7JKxf/cEtKJNZIntI3d/JfFqJilVsnuRsY1nHIQqBQt1WynRK/T0mR L3ovbfWNWbvNc3NWiF9hyWs6aGruLF79jn4Y+qWqoCH6ZZNyPEqzEpiyQcMs/KCTbPBH ioeQ== 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=bxFnqa+gaX8KmJ5gHPf/pUQVZxLmoOj5+HSflVCgAGs=; b=DAzZLykX6jpEW3WgbEo84lSae/ZtzPLTtWousnxR70j+uE39ApMfYRwi7u2mq2o2YS MGTOfr1To8QuGCBUxd3RD+bzyWSjShSQJBP0ydggGN5FRgy2LS4kghekYe6Lo1iVBkpN 7YkXYgRGp8MRS/yQ7/BNkTMjqm8SJw03akuj0EUfNsL3+yIcF0rHNMdlzxRJY3t8qH/A CL1hGWcx/0d63m0jHq3WQwG1A5z8D5u6wKFbXw72dWX6xzKiuBmVfFQDPb2E2EwlY/bw KbD9CMCpT8WWghmA7amGdW3YvruUxiC2+iF5kIkVB/bNWNpaYHmHE52MN9fd/EuVIKDf kC5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=e9EAO+mr; 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 x4si4980994pju.0.2019.06.27.03.16.42; Thu, 27 Jun 2019 03:16:59 -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=e9EAO+mr; 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 S1726465AbfF0KPi (ORCPT + 99 others); Thu, 27 Jun 2019 06:15:38 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:32873 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726308AbfF0KPi (ORCPT ); Thu, 27 Jun 2019 06:15:38 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190627101536euoutp02afbc9bb8e0a0af047ba8c61f68d358e1~sBrMMPIHe2317823178euoutp02a for ; Thu, 27 Jun 2019 10:15:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190627101536euoutp02afbc9bb8e0a0af047ba8c61f68d358e1~sBrMMPIHe2317823178euoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1561630536; bh=bxFnqa+gaX8KmJ5gHPf/pUQVZxLmoOj5+HSflVCgAGs=; h=From:To:Cc:Subject:Date:References:From; b=e9EAO+mreRXgTRtmJmTUZFf6WvCCpBB9XBIQgtI+zSFMhir4Qe9UBmWIJPDvNMmWH 5nXKtYlBIO2LUxQQ8CRRyOzLq4/f9jAS3lAPKMQfgcxul0mzSABjsgL/KYZcQXZFIn +E8dYZDqCEm6Mxx6V9K0p8HCTYPkdqC71dRM+qP4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190627101535eucas1p1f06095434888e38115ff6854ffe74c70~sBrLRFIBf1062510625eucas1p1w; Thu, 27 Jun 2019 10:15:35 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 14.5C.04325.747941D5; Thu, 27 Jun 2019 11:15:35 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190627101535eucas1p27da11c25b0e15474e4c957053de139d9~sBrKmEPvo2154921549eucas1p2y; Thu, 27 Jun 2019 10:15:35 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190627101534eusmtrp21aac3f20f0c9fc6301a40ab5de83a046~sBrKX_EFP2684426844eusmtrp2Z; Thu, 27 Jun 2019 10:15:34 +0000 (GMT) X-AuditID: cbfec7f5-b8fff700000010e5-7e-5d1497474dd6 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 76.3E.04140.647941D5; Thu, 27 Jun 2019 11:15:34 +0100 (BST) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190627101534eusmtip11973e4335bb9d20dd7726864d937381a~sBrJp3Mb-0975409754eusmtip1D; Thu, 27 Jun 2019 10:15:34 +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 v5 0/2] xdp: fix hang while unregistering device bound to xdp socket Date: Thu, 27 Jun 2019 13:15:27 +0300 Message-Id: <20190627101529.11234-1-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42LZduznOV336SKxBu86VSz+tG1gtPh85Dib xeKF35gt5pxvYbG40v6T3eLYixY2i13rZjJbXN41h81ixaETQLEFYhbb+/cxOnB7bFl5k8lj 56y77B6L97xk8ui6cYnZY3r3Q2aPvi2rGD0+b5ILYI/isklJzcksSy3St0vgymjYe5ex4A1b xaX2jWwNjBNYuxg5OSQETCQm7Z/H0sXIxSEksIJR4sv+2ewQzhdGibbzz1ghnM+MEqsaX7LA tPSdWM8GkVjOKPHr4B+oqh+MEn86FoANZhPQkTi1+ggjiC0iICXxccd2sLnMAjOZJbY8ngI2 SlggSuJ3xwIwm0VAVeL6yy1gNq+AtcSd5iNMEOvkJVZvOMAM0iwh8JtN4vKcrcwQCReJ2e2b oWxhiVfHt7BD2DIS/3fOh2qul7jf8pIRormDUWL6oX9QCXuJLa/PATVwAJ2kKbF+lz5E2FHi /uwfzCBhCQE+iRtvBUHCzEDmpG3TocK8Eh1tQhDVKhK/Dy6HukBK4ua7z1AXeEisa9wFZgsJ xEpsbNrOPoFRbhbCrgWMjKsYxVNLi3PTU4uN81LL9YoTc4tL89L1kvNzNzECE8npf8e/7mDc 9yfpEKMAB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vGPjDhLzsobZyOmXJRKfbx498RjlwyXzUyQKT+Wae9S ka4bFRnoy22lEeinxFKckWioxVxUnAgAFa49QXUCAAA= X-CMS-MailID: 20190627101535eucas1p27da11c25b0e15474e4c957053de139d9 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190627101535eucas1p27da11c25b0e15474e4c957053de139d9 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190627101535eucas1p27da11c25b0e15474e4c957053de139d9 References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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