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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL+tcoCu=7MFm9kioQnQmAQYkqbC_PNr-j3UyVEqyxhe7T2Fig@mail.gmail.com>
Date: Thu, 30 Oct 2025 19:17:27 +0800
From: Jason Xing <kerneljasonxing@...il.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: Paolo Abeni <pabeni@...hat.com>, davem@...emloft.net, edumazet@...gle.com, 
	kuba@...nel.org, bjorn@...nel.org, magnus.karlsson@...el.com, 
	maciej.fijalkowski@...el.com, jonathan.lemon@...il.com, sdf@...ichev.me, 
	ast@...nel.org, daniel@...earbox.net, hawk@...nel.org, 
	john.fastabend@...il.com, joe@...a.to, willemdebruijn.kernel@...il.com, 
	bpf@...r.kernel.org, netdev@...r.kernel.org, 
	Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next v2] xsk: add indirect call for xsk_destruct_skb

On Thu, Oct 30, 2025 at 7:00 PM Alexander Lobakin
<aleksander.lobakin@...el.com> wrote:
>
> From: Paolo Abeni <pabeni@...hat.com>
> Date: Thu, 30 Oct 2025 11:15:18 +0100
>
> > On 10/26/25 3:58 PM, Jason Xing wrote:
> >> From: Jason Xing <kernelxing@...cent.com>
> >>
> >> Since Eric proposed an idea about adding indirect call for UDP and
> >
> > Minor nit:                          ^^^^^^
> >
> > either 'remove an indirect call' or 'adding indirect call wrappers'
> >
> >> managed to see a huge improvement[1], the same situation can also be
> >> applied in xsk scenario.
> >>
> >> This patch adds an indirect call for xsk and helps current copy mode
> >> improve the performance by around 1% stably which was observed with
> >> IXGBE at 10Gb/sec loaded.
> >
> > If I follow the conversation correctly, Jakub's concern is mostly about
> > this change affecting only the copy mode.
> >
> > Out of sheer ignorance on my side is not clear how frequent that
> > scenario is. AFAICS, applications could always do zero-copy with proper
> > setup, am I correct?!?
>
> It is correct only when the target driver implements zero-copy
> driver-side XSk. While it's true for modern Ethernet drivers for real
> NICs, "virtual" drivers like virtio-net, veth etc. usually don't have it.
> It's not as common usecase as using XSk on real NICs, but still valid
> and widely used.
> For example, virtio-net has a shortcut where it can send XSk skbs
> without copying everything from the userspace (the no-linear-head mode),
> so there generic XSk mode is way faster there than usually.
>
> Also worth noting that there were attempts to introduce driver-side XSk
> zerocopy for virtio-net (and probably veth, I don't remember) on LKML,
> but haven't been upstreamed yet.

Thanks for the added context. One minor thing I need to say is that
virtio_net has zc mode but it requires the host to support a series of
features which means at a hyperscaler it's really hard to ask hosts to
upgrade their kernels and on the contrary it's effortless to upgrade
VMs. Indeed, veth doesn't have zc mode.

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ