lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250610133750.7c43e634@kernel.org>
Date: Tue, 10 Jun 2025 13:37:50 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Bui Quang Minh <minhquangbui99@...il.com>
Cc: Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, "Michael S.
 Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>, Xuan Zhuo
 <xuanzhuo@...ux.alibaba.com>, Eugenio Pérez
 <eperezma@...hat.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Alexei
 Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
 Jesper Dangaard Brouer <hawk@...nel.org>, John Fastabend
 <john.fastabend@...il.com>, virtualization@...ts.linux.dev,
 linux-kernel@...r.kernel.org, bpf@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in
 zerocopy

On Tue, 10 Jun 2025 22:18:32 +0700 Bui Quang Minh wrote:
> >> 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.

> > 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ