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-10 20:37:52
Also in: bpf, lkml, stable, virtualization

On Tue, 10 Jun 2025 22:18:32 +0700 Bui Quang Minh wrote:
quoted
quoted
Furthermore, we are in the zerocopy so we cannot linearize by
allocating a large enough buffer to cover the whole frame then copy the
frame data to it. That's not zerocopy anymore. Also, XDP socket zerocopy
receive has assumption that the packet it receives must from the umem
pool. AFAIK, the generic XDP path is for copy mode only.  
Generic XDP == do_xdp_generic(), here I think you mean the normal XDP
patch in the virtio driver? If so then no, XDP is very much not
expected to copy each frame before processing.  
Yes, I mean generic XDP = do_xdp_generic(). I mean that we can linearize 
the frame if needed (like in netif_skb_check_for_xdp()) in copy mode for 
XDP socket but not in zerocopy mode.
Okay, I meant the copies in the driver - virtio calls
xdp_linearize_page() in a few places, for normal XDP.
quoted
This is only slightly related to you patch but while we talk about
multi-buf - in the netdev CI the test which sends ping while XDP
multi-buf program is attached is really flaky :(
https://netdev.bots.linux.dev/contest.html?executor=vmksft-drv-hw&test=ping-py.ping-test-xdp-native-mb&ld-cases=1  
metal-drv-hw means the NETIF is the real NIC, right?
The "metal" in the name refers to the AWS instance type that hosts 
the runner. The test runs in a VM over virtio, more details:
https://github.com/linux-netdev/nipa/wiki/Running-driver-tests-on-virtio
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help