πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #13631

Re: [PATCH net v2 2/3] virtio_net: Disable AF_XDP pools on queues above curr_queue_pairs

#13631
From: Haishuang Yan
Date: Tue, 10 Nov 2026 11:20
39 lines
10615 bytes
On Mon, Nov 09, 2026 at 12:34:55PM +0000, netdev-bot+sashiko@kernel.org wrote:
> [Severity: Low]
>
> Is explicit XDP removal followed by closing the socket the only trigger?
>
> Ordinary netdev unregistration looks like it ends in the same failed
> disable. Examples are virtio-net hot-unplug, driver unbind and module
> unload.

[ ... ]

> The new max_queue_pairs bound fixes this path as well. The commit message
> only hints at it with "Removing XDP must not fail". Could the message
> also mention the unregister path?

Yes. Unbinding the device from virtio_net with XDP attached and a
socket bound to an XDP queue gives "Failed to disable zero-copy!"
without this patch and no warning with it. I'll mention that path in
the changelog.

> [Severity: Medium]
>
> How does this wider qid range interact with the restore fallback that a
> later patch in this series adds to this function?

[ ... ]

> Does this leak the xsk_dma_map, its dma_pages array and the DMA or IOMMU
> mappings of the umem pages?

It does, but only together with the restore fallback of patch 3, which
looks the pool up with xsk_get_pool_from_qid(). Patch 3 has other
problems for pools above curr_queue_pairs too, so I'll drop it from the
series and resend patches 1 and 2 as v3. The reworked patch 3 will keep
track of the pools in the driver instead of looking them up by queue
id.

pw-bot: cr
Technical Details
Message-ID: <20261110112049.11228-1-yanhaishuang@cmss.chinamobile.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359814-linux-kernel-netdev=dewy.ru
References: <20261108193845.73621-1-yanhaishuang@cmss.chinamobile.com> <20261108193845.73621-3-yanhaishuang@cmss.chinamobile.com> <179422769501.994134.8613940611095428101@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359814-linux-kernel-netdev=dewy.ru
From: yanhaishuang@cmss.chinamobile.com (Haishuang Yan)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 2/3] virtio_net: Disable AF_XDP pools on queues above curr_queue_pairs
Date: Tue, 10 Nov 2026 20:20:47 +0900
Organization: Usenet Network
Message-ID: <20261110112049.11228-1-yanhaishuang@cmss.chinamobile.com>
References: <20261108193845.73621-1-yanhaishuang@cmss.chinamobile.com> <20261108193845.73621-3-yanhaishuang@cmss.chinamobile.com> <179422769501.994134.8613940611095428101@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="513454"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:MlFLhs5y6snDnMJJk41k0ZEAe1o= sha256:tcmAB3sOuJgLMW7Zq+5s9FvjuCP4RYwRQHoTfLq1dWM=
	sha1:XMNIg/O3tak72slCaffoyvclmPE= sha256:nPQjnjT9k1Cn1KAqap4guwok8NA+Syh0PCpAr22MQiA=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id F2CB6113A27; Tue, 10 Nov 2026 06:35:43 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.749
X-Spam-Status: No, score=-2.749 tagged_above=-9999 required=6.31
	tests=[DATE_IN_FUTURE_06_12=0.001, DCC_REPUT_70_89=0.1,
	DKIM_INVALID=0.1, DKIM_SIGNED=0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key)
	reason="fail (body has been altered)" header.d=cmss.chinamobile.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id O3iIlF890hyd;
	Tue, 10 Nov 2026 06:35:39 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-359814-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 83933113A17; Tue, 10 Nov 2026 06:35:29 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id A491435064; Tue, 10 Nov 2026 03:21:13 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794280871;
	b=BE9HIqKvNvSJPfVwjebEDi5d3crxhU86XFz6krHpswS5uXppW7uTDgj7B60SbEERF4I/
	 ne6ghgUE+O2bxq3Tk0BAi5Uy7tsIQn9kAOM2DRr05kkuVBb9LgImBRbGN4v69kc3muTWq
	 vtvnFdFgGvjbJo/Vgrmph4a7JLJboThAl+c+l7O6Uo75DVRJh/+KeYxJPnBaSx2JEkaNa
	 91+PKOtzNB2QeKgnl5uUYul5Sp3j6n3lcw6AJ+AY0cQO51v7jnIMOLLaKqW3uDL0v0CfR
	 /H/g73TWoXPxE5qo7WYRM5csE/SVb3harzQbAfHqkR7bY3+/uEZ9ZqncxfeYyYiKs7Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794280871;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo:
	 X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:
	 Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=QQYq9UN0ymiPTQymz+UkJfbvfMGgvjzLlUXXSTgUt70=;
	b=aoX3oBy8OYsNFsu/fsbX/91RxuA1LO2yqMxCEQXeEcOO31LFDxFdnJ65FF4i+gBgWQRi
	 zKSRKLV5b5Fr/PfAcdbHJaAV9Jzuy7cfN4rjdACNkRHChr9KGNi9VD3cwavGV/2R9/kD6
	 YF7dvv5Cbsuc6yiYCedHgqFvoSK1rSs6ZfYqxD+e3BS18tmSp0h2VuvCYu/2DA0fMb2XQ
	 L7NwRgaYWwhx06xXhPau/LpNbcCambSWm44tXoJUS5kwI22BThxyTfVR7Wv/EafLjj981
	 nJfhwQklR9soNlNL/0PYxJPob6n+vlxB62n8jcB86r8PME0unshVj9ZaLh7a7SvUNqA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=qlMRuqXO;
	dmarc=pass header.from=cmss.chinamobile.com;
	spf=pass smtp.mailfrom=cmss.chinamobile.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 02F14606A337;
	Tue, 10 Nov 2026 03:21:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=qlMRuqXO
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794280865;
	b=b0BqThgGKj6Obyxbk+BFdy5N2sUQR3e1O6YbWiag20IXMKDIwWdP0KHFOzI8id3jlOz9
	 yQdmjYxsP8CeKERId10MEvVPtSkZmsTSeD7cM7GghPBm53YkK8GA+uve1z3iUsp9i6Vw1
	 i2fZPml+9UV0DL4GmLLFmFW88zrShQcsSz88cmiBbNFUMDarc4GMWsuW81MZ3gE488dpR
	 ujNlR1byOcnJXsTwWtJ7qlE4rXwPreEh4h/wss/NrSNKarN1iI4okCf+aBu9XLRe1GeyU
	 BSfTweugehpPGFrYD06qpmMXR1Ly1UiH6Nytu+vM1UJlgUGaQq94LLW56EgfhCc5boQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794280865;
	h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:
	 X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From:
	 To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 MIME-Version:Content-Transfer-Encoding;
	bh=QQYq9UN0ymiPTQymz+UkJfbvfMGgvjzLlUXXSTgUt70=;
	b=i/rR7iy4obOrMRDa+8EBFsqnevI9hU6Gx/yOKFJlrosbURoe7enQd+5ZeSiU7R6zfz2v
	 XXT7Aj3jmbYgYYoRG/dkDbBrZ1SMYsx7G9XYyBbUzel2yeKVCGPgz/2h03CYYiQpZNr4f
	 2zjykN7/Jo3Yy4oGcpCSZIqQnOc4WlHpau6whTZ8ToJAQjSHdfNHzeLkfY75ueEk9hDKn
	 YZebTfHc1y4b3/oxu3R/EwT6Z5kuV5XrH9qWi9E1qbkZPk+riE+GCi6IIYPSaQ2AYZd1v
	 pSHm97D/TZe2eedVQwToOU2vO6VCHsWdQwlUfJ0/a8l+OIQcp3qMg8Vk6YJEh6pNS6Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=cmss.chinamobile.com;
	spf=pass smtp.mailfrom=cmss.chinamobile.com;
	dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=qlMRuqXO;
	arc=none smtp.remote-ip=111.22.67.139
X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id B061F606A321;
	Tue, 10 Nov 2026 03:21:02 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B061F606A321
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=cmss.chinamobile.com; s=default; l=0;
	h=from:subject:message-id:to:cc:mime-version;
	bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=;
	b=qlMRuqXOptJ17RYY0rNr1Zu1onjRr4pOhvNzWXVzO9BuNvGV02fm6fIyIZZ07tk3vzT6P3Ya2TwSX
	 Qd4w/O1w8SMEe+ZOAcf48R7Pz+QnaVwb7A4Ah825mv/AvJVAcWE+yl4khh+ajWBcgEwd+puhP6nufW
	 b9wDq3w4+FxWfSzM=
X-RM-TagInfo: emlType=0                                       
X-RM-SPAM-FLAG: 00000000
X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87])
	by rmmx-syy-dmz-app05-12005 (RichMail) with SMTP id 2ee56af28d9b55e-c7ab6;
	Tue, 10 Nov 2026 11:21:00 +0800 (CST)
X-RM-TRANSID: 2ee56af28d9b55e-c7ab6
X-RM-TagInfo: emlType=0                                       
X-RM-SPAM-FLAG: 00000000
X-Received: from openEuler-24.03.03 (unknown[74.82.203.40])
	by rmsmtp-syy-appsvr08-12008 (RichMail) with SMTP id 2ee86af28d91c9a-a496c;
	Tue, 10 Nov 2026 11:21:00 +0800 (CST)
X-RM-TRANSID: 2ee86af28d91c9a-a496c
X-Cc: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>,
	Eugenio PΓ©rez <eperezma@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	netdev@vger.kernel.org,
	virtualization@lists.linux.dev,
	bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.43.0
X-In-Reply-To: <179422769501.994134.8613940611095428101@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list