Article View: linux.kernel.netdev
Article #13614Re: [PATCH net v2 3/3] virtio_net: Keep AF_XDP zero-copy pools bound across suspend
From: Haishuang Yan
Date: Tue, 10 Nov 2026 11:21
Date: Tue, 10 Nov 2026 11:21
39 lines
11130 bytes
11130 bytes
On Mon, Nov 09, 2026 at 12:34:56PM +0000, netdev-bot+sashiko@kernel.org wrote: > - [High] virtnet_xsk_pools_release() unmaps the DMA of a zero-copy pool > sitting at a qid >= curr_queue_pairs (left there by removing XDP), but… > - [Medium] When virtnet_xsk_pool_attach() fails on restore, the pool > stays DMA mapped while rq->xsk_pool stays NULL. > - [Medium] If virtnet_xsk_pool_attach() fails during restore, > virtnet_xsk_pools_attach() only logs netdev_warn() and the resume… > - [Medium] virtnet_xsk_pools_release() is a new writer of AF_XDP driver > state (rq->xsk_pool, sq->xsk_pool, rq->xsk_buffs, sq->xsk_hdr) that… > > Pre-existing issues: > - [High] This problem wasn't introduced by this patch, but it defeats the > patch's cleanup model on the failed-restore path. Thanks, these all hold. sashiko-bot raised the same points in its review of this patch. The High one and the first Medium have the same cause: once the queues are freed on freeze, the patch finds a pool again only through xsk_get_pool_from_qid(), which depends on the current queue counts. A pool on a queue above curr_queue_pairs can then be unmapped on freeze and bound again unmapped later, or not found when it has to be unmapped. The second Medium is right as well: when the attach fails, the socket stays bound but gets no traffic and no error. And the release on freeze runs without RTNL, unlike every other writer of that state. The failed-restore issue is older, as noted: after a failed virtnet_restore_up(), vi->rq and vi->sq are freed while the netdev stays registered, and virtnet_close() uses them too. I'd rather keep that separate. I'll drop this patch from the series, resend patches 1 and 2 as v3, and rework it to keep track of the pools in the driver across suspend instead of looking them up by queue id. pw-bot: cr
Technical Details
Message-ID:
<20261110112114.11278-1-yanhaishuang@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359815-linux-kernel-netdev=dewy.ruReferences:
<20261108193845.73621-1-yanhaishuang@cmss.chinamobile.com> <20261108193845.73621-4-yanhaishuang@cmss.chinamobile.com> <179422769660.994134.7551261891585249565@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359815-linux-kernel-netdev=dewy.ru From: yanhaishuang@cmss.chinamobile.com (Haishuang Yan) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2 3/3] virtio_net: Keep AF_XDP zero-copy pools bound across suspend Date: Tue, 10 Nov 2026 20:21:13 +0900 Organization: Usenet Network Message-ID: <20261110112114.11278-1-yanhaishuang@cmss.chinamobile.com> References: <20261108193845.73621-1-yanhaishuang@cmss.chinamobile.com> <20261108193845.73621-4-yanhaishuang@cmss.chinamobile.com> <179422769660.994134.7551261891585249565@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="511342"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Pw01D70QzDY6lSG0BeqPrLkjS94= sha256:Vfo5pNSoOj6u1abTgZY7dEJtq7U0/BqW9G90GernhjM= sha1:bV4pJqQ+dGPUoByrtLAHgd/v8HY= sha256:gJBepNFJEPiFU2YjoZ9VMTHRlDrMxkYnI692OzYIIcs= 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 AED55113993; Tue, 10 Nov 2026 06:25:11 +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 aN8wbyh2EXq8; Tue, 10 Nov 2026 06:25:03 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-359815-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 547231139DE; Tue, 10 Nov 2026 06:24:52 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id ADAF03B7E8; Tue, 10 Nov 2026 03:21:44 +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=1794280900; b=gEv4aETcZs/veeAQbWfoZ5iAYG3eBzOfps3/BYs3aJzM/Y+dD28+P1p21UKrSx5MwMfn alb0CrKteZKSFjkLgzkpInJ927jufqN9dSh7js4imgyi4nU6YYWuB/PV1A+D2u7bAxGkf StSSt8bzQ9z1ixyjhLPwiFAsrwFc0KzExofdr1+Xe8eLe9TwKsD9MXlRaHIxgdzpd9Nao ptWdEcESO4S5ykyHKn/nNT+rAp4kpkdlRZ7w5nonOlt07PbItvnlH4RZYgLjCG2Hdw+Er FMOVnJ1pRo/kNxZDwdzS4Y8WiCe7oMfKWJ80y5PCCHXXqe6IE+U/KvUYwI/Ow9fLCpw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794280900; 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-Type:Content-Transfer-Encoding; bh=Iu/jo1GP6S2hOnbceCXpLkMdW9l1lBuKE6wK4rMGL7s=; b=tbxXQWlXlw4Yr9FAkJy1WM2OUVI+qk34+7Nyd29yksPBmiYd1q6OaNWp3DVB5mkD6xzX DBibZnn0YVJAJzePJnOmWKg6H/hyZb4G/ial0uggAbA/IQvJTfJXwO9ylTDm2yogLIRhK 9ev9CDJm4AKZS2gtZFaDRthzRnekKUFiu4Fbf24X6ADJDAxmYVTflQmchAF+KUOnTJHoa uZlqWhDZR7UXLekmYyn4o+jkqMnX0ldOEWdFUbnfVTlqjqSwbrbl/j41nmmN0gThPBBPu +5TGV6RueLGdGdyh+lMD+0gfvaNocmvPUvgDhhXz8nBqRT+f289Asnhvq3V+LkSZ2Uw== 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=vtyrBxX3; 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 96CBF606A335; Tue, 10 Nov 2026 03:21:40 +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=vtyrBxX3 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.151 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794280884; b=YHrSmJkEumF+9+JOVyM46PSK3p3WiZ5QUOxyq93MJBka8ns7xrpa+V6TCyDNg3+HQYLa n78vuHNt4TRtVqEQj1yT3kEIiYX0KyCYtj9rZRT0pbCZBVf7UAcGvElqfV3qxvlvMB+8T aZr72FAEVsWeK0EYp4NRs4ILIWYSEG9xjrbik6ztG10ZvhcMAcpUUNgCfucZKAl0Q60Zt HYTyNhCVwgez7MAnFf7f8+9KyYOyS9Cc6RYqaEnSSG5KcXBZ0s1smFaBdTL9KsLPA9qHV jIFxuVfQIJyLNjaSZQUW3jgurcd4wJCqeGt3zbcwIvvoFATrkKA9TtVh8P89X0PwAdA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794280884; 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-Type:Content-Transfer-Encoding; bh=Iu/jo1GP6S2hOnbceCXpLkMdW9l1lBuKE6wK4rMGL7s=; b=qO9j0yWNrPaKNOzEmRrLDmpcwEu7K2G0UlXnFC+wfDfjDw4ISpVYf1XNZqWkE5GzYs7R znkn+JbNeffYVu1SY+Y3emyexTfxe8ukt4qeWwsWshsb4fBYhL7gvCd7O+6iaR5gye4tO FvYZLtzpHHV6el+kn45E/G33LAtEZIzq2XUB8iQWUkXZIHh5k33nXFrXTPxW+NRxmM3mD 59s4bbf0TMpLJmcspjeIfgWXtRkZYK6C6TihgNChoT0DR1raEu+RMcw3mdn987t5qxFi/ bSkJKxTRtSC5sF9f+QebvnFH47W5vdyFbEZcOrBV9yRpNR3OgQ1U7mBPTHXjj6l1NSA== 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=vtyrBxX3; arc=none smtp.remote-ip=111.22.67.151 X-Received: from cmccmta8.chinamobile.com (cmccmta8.chinamobile.com [111.22.67.151]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFAC4606A32E; Tue, 10 Nov 2026 03:21:22 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EFAC4606A32E 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=vtyrBxX3nBUcwHfcB5JBkuwv5gtB/DTRDFKTqGUq6Gu/IU7LYPokXEW3Gb1RVDuuA+2LtkbJ2kDw6 w810ovi1LNhJlyje+jiO3TbThnEeQB0gHwDlukhHm0dpTD8bjy4U7p2oLtL73uyj7OkSFz2BKm7NXa lqh1xjS0I6WonSuI= 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-app06-12006 (RichMail) with SMTP id 2ee66af28db102b-96bbc; Tue, 10 Nov 2026 11:21:21 +0800 (CST) X-RM-TRANSID: 2ee66af28db102b-96bbc 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 2ee86af28daaccd-a499f; Tue, 10 Nov 2026 11:21:21 +0800 (CST) X-RM-TRANSID: 2ee86af28daaccd-a499f 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: <179422769660.994134.7551261891585249565@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