Thread (15 messages) 15 messages, 6 authors, 2025-06-13

Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-06-05 14:48:12
Also in: bpf, lkml, stable, virtualization

On Thu, 5 Jun 2025 21:33:26 +0700 Bui Quang Minh wrote:
On 6/5/25 18:03, Paolo Abeni wrote:
quoted
On 6/3/25 5:06 PM, Bui Quang Minh wrote:  
quoted
In virtio-net, we have not yet supported multi-buffer XDP packet in
zerocopy mode when there is a binding XDP program. However, in that
case, when receiving multi-buffer XDP packet, we skip the XDP program
and return XDP_PASS. As a result, the packet is passed to normal network
stack which is an incorrect behavior.  
Why? AFAICS the multi-buffer mode depends on features negotiation, which
is not controlled by the VM user.

Let's suppose the user wants to attach an XDP program to do some per
packet stats accounting. That suddenly would cause drop packets
depending on conditions not controlled by the (guest) user. It looks
wrong to me.  
But currently, if a multi-buffer packet arrives, it will not go through 
XDP program so it doesn't increase the stats but still goes to network 
stack. So I think it's not a correct behavior.
Sounds fair, but at a glance the normal XDP path seems to be trying to
linearize the frame. Can we not try to flatten the frame here?
If it's simply to long for the chunk size that's a frame length error,
right?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help