Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1104676ybd; Wed, 26 Jun 2019 11:15:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMOmtvFxk48RnsaSoWp3vZXoH0uHYNe8sfxzuGIqgESTXQG6AhkhkJyfaxAgIRDOT8K4SA X-Received: by 2002:a17:90a:2666:: with SMTP id l93mr517908pje.16.1561572947374; Wed, 26 Jun 2019 11:15:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561572947; cv=none; d=google.com; s=arc-20160816; b=D8f4J6G10wY4HpWgWJPaRFehSQtFYkLj18dcVBvJ/Mv7GSYSDPGdds7cwzG9py92tL iUSPPvzjP3306K152g+MROfI1jk+VpCVCB3Zlvmd/Kqnd9gQo1Bmft78hCdE7hY+sO0I Z6ow4M8vxa9VbDCIcfXdVmardb9j/+TPdYTY7ul/YOMv9Bv8y0bz7u4VMRPQ8TFPmamn XZn02N2dtLdjSkWtcZzlMft7oYBBVqmRF1r87dVWxJhjQUV/lVAiCeB9iI+vr7trwNrV aqLzFknk2IocKk0268JkD0TBJfPUFOUzqSeaR7KDNfFVqMq1ZqiKYuGSGq9iEv0kD2G9 RPTA== 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=SAjVXWVU+wN/bLQEdEYQ4VStpx/WPHw7CzyrLqzCoig=; b=Ytyfe4hqaxHPDGxOd1XnYzWGP/Qf+fdCWfbdXpo5y53WNYoQYcCX4a2Ap5bqMNY/wB Za9a8KPWZotMtdujdsaX2kfE6hb4bkA95maSivAnwCdgvPZJNdF6P0oaA6pctqxbCumJ gVlcUDF4VCae/SoyRYxrsX1KclWEJpyP6IuBjwD6wfd9WXwHpIFGtcgvbzFYr21rFQD/ Lb0WgauQMKqzdgk5drD0Lgz5dxqdAyLh7fSii6iHMjq1DhwWYlCQXhPnLVL4qjNRY1Ko G22orOQ4dbINInmo6uNnIRJ2uaVdL5+SxLn7URYwekJ2Btkq2AnlQ/h3YJZzevCu+M73 ja0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Bisy1OAY; 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 3si2912968pff.172.2019.06.26.11.15.30; Wed, 26 Jun 2019 11:15:47 -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=Bisy1OAY; 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 S1726381AbfFZSPY (ORCPT + 99 others); Wed, 26 Jun 2019 14:15:24 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:47141 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbfFZSPY (ORCPT ); Wed, 26 Jun 2019 14:15:24 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190626181522euoutp01ceea69eb533df2a00e2211888b003ff4~r0kyv81li0221802218euoutp01a for ; Wed, 26 Jun 2019 18:15:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190626181522euoutp01ceea69eb533df2a00e2211888b003ff4~r0kyv81li0221802218euoutp01a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1561572922; bh=SAjVXWVU+wN/bLQEdEYQ4VStpx/WPHw7CzyrLqzCoig=; h=From:To:Cc:Subject:Date:References:From; b=Bisy1OAYnpfhKL11dIJlF085onDtBeX46jzjM2sCApKz4pXBhOS0jP9+eMuCcSJ6k /KsfOzdD4nAgbTm0tPTF8RdbbaA7m1Ckf63ZHuywYmKZrC/wmR8QFYEXWPUpM+ub6b 5R4SM7pRNd3/nfTF8g8V612+VvqwflLMPCdoUaoc= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190626181521eucas1p2ba4b961787a9c429885d8bb3ffa158c8~r0kxclAcY3035230352eucas1p2S; Wed, 26 Jun 2019 18:15:21 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id CE.BB.04298.836B31D5; Wed, 26 Jun 2019 19:15:20 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190626181520eucas1p1817d31d958b8755600f0745e92edef5a~r0kwrobEp2194821948eucas1p1U; Wed, 26 Jun 2019 18:15:20 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190626181520eusmtrp2264b0ed253ef69b9931615ce8127cb08~r0kwdkFar2043720437eusmtrp2L; Wed, 26 Jun 2019 18:15:20 +0000 (GMT) X-AuditID: cbfec7f2-f13ff700000010ca-3c-5d13b638801e Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 7D.34.04140.836B31D5; Wed, 26 Jun 2019 19:15:20 +0100 (BST) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190626181519eusmtip2d493497d0d5fa4fc1a0b7c5c29712618~r0kvu_NFz0894308943eusmtip2D; Wed, 26 Jun 2019 18:15:19 +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 v4 0/2] xdp: fix hang while unregistering device bound to xdp socket Date: Wed, 26 Jun 2019 21:15:13 +0300 Message-Id: <20190626181515.1640-1-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0WSbUhTYRTHe3a3u6u1uk7R0yaKU0ElNakPF5VqYDD6ZI4gJstuedGRm7r5 mlCrRE2pRViiCJqSr2RmQ91QyWGaZhrmB400XwqnoplmKTNt80769jv/F87h4SEwYQlPRKg0 GYxWQ6dIcFdue//2SCjV7q48uVMRRe0UtCJqo28Ap2qf/caoytF8LjVeuM2n+q35OGVuKceo T+ZKnGqwvLNr1Z5Uh6EHnTssMzZOcmSmiim+rLZrkSMrnhjDZGUls5jsobEJyTbafGL5Ctfo RCZFlcVow89cdU1++lme9grPWdra5OjRArcYuRBAnob5ykZeMXIlhGQDgumFeufwC4Hp4w+c HTYQ3DVX8Q4q95cLcAcLyXoEY3OX2NAWguH+L/sGTp6AoeY+5GAPUgQ/Ozv4jhBGlmNgnC/d X+5OKmBYX4E5mEsGgnlqju9gARkJq7VNOLvNF5pb32COMpA2HKwvTBzWiIE+g4XPsjssDRid 7A17pipn5jZ8zV9EbLkIQZll12mcBePyiL1A2E8KhpfmcFaWwve3E/sykEdhYsXNIWN2fNxe hrGyAIoKhGw6AGy99RjLIphc3XBeIIM73TVc9oGU0Fk3ij9CPhX/d1Uj1IS8mEydOonRRWiY 7DAdrdZlapLCrqeq25D9i7zfHV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A4siU+76VPRJPzEV8+aqPRzF/sb+ ccDHqXanFnI+X63EUpyRaKjFXFScCAAneowpdAIAAA== X-CMS-MailID: 20190626181520eucas1p1817d31d958b8755600f0745e92edef5a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190626181520eucas1p1817d31d958b8755600f0745e92edef5a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190626181520eucas1p1817d31d958b8755600f0745e92edef5a References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 27 +++++++------ net/xdp/xdp_umem.h | 1 + net/xdp/xsk.c | 88 ++++++++++++++++++++++++++++++++++++------ 4 files changed, 99 insertions(+), 22 deletions(-) -- 2.17.1