From: Jakub Kicinski <kuba@kernel.org>
To: Xiong Weimin <xiongweimin@kylinos.cn>
Cc: netdev@vger.kernel.org, "Michael S . Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowangio@gmail.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 2/2] virtio_net: refuse XDP queue shrink while AF_XDP is bound
Date: Wed, 12 Aug 2026 18:49:04 -0700 [thread overview]
Message-ID: <20260812184904.50dda8ac@kernel.org> (raw)
In-Reply-To: <20260807013220.2130441-2-xiongweimin@kylinos.cn>
On Fri, 7 Aug 2026 09:32:20 +0800 Xiong Weimin wrote:
> virtnet_xdp_set() can lower curr_queue_pairs when an XDP program is
> detached. Unlike ethtool channel updates, that path does not check for
> AF_XDP zero-copy pools on the queues being dropped. A pool can remain
> bound on a qid that is no longer covered by curr_queue_pairs, which
> breaks later unbind and can leave stale rq/sq->xsk_pool pointers.
>
> Refuse the shrink with -EBUSY while any AF_XDP pool is still bound on a
> queue that would become inactive.
This is really odd. The extra XDP queues should not be visible to the
stack and therefore to AF_XDP. AF_XDP and XDP only share the name for
"marketing reasons", they are distinct things.
We should try to prevent this oddity and prevent the XDP queues from
being exposed to the stack. let's see if anyone complains.
The patch as posted is only going to create problems further down the
line, the stack assumes that XDP detach can never fail.
prev parent reply other threads:[~2026-08-13 1:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 1:32 [PATCH net v2 1/2] virtio_net: fix AF_XDP pool disable after queue shrink Xiong Weimin
2026-08-07 1:32 ` [PATCH net v2 2/2] virtio_net: refuse XDP queue shrink while AF_XDP is bound Xiong Weimin
2026-08-13 1:49 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260812184904.50dda8ac@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=jasowangio@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xiongweimin@kylinos.cn \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.