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: <70BE9E9A-7BD2-4B79-B3A0-E32BA25D4992@nutanix.com>
Date: Thu, 8 May 2025 15:26:07 +0000
From: Jon Kohler <jon@...anix.com>
To: Jesper Dangaard Brouer <hawk@...nel.org>
CC: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        Jason Wang
	<jasowang@...hat.com>, Andrew Lunn <andrew+netdev@...n.ch>,
        "David S. Miller"
	<davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Alexei Starovoitov
	<ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        John Fastabend
	<john.fastabend@...il.com>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>
Subject: Re: [PATCH net-next] tun: use xdp_get_frame_len()



> On May 8, 2025, at 11:04 AM, Jesper Dangaard Brouer <hawk@...nel.org> wrote:
> 
> 
> On 08/05/2025 16.24, Jon Kohler wrote:
>>> On May 8, 2025, at 10:16 AM, Jesper Dangaard Brouer <hawk@...nel.org> wrote:
>>> 
> [...]
>>> 
>>> AFAICR there is also some dual packet handling code path for XDP in
>>> vhost_net/tun.  I'm also willing to take the paper-cut, for cleaning
>>> that up.
>>> 
>>> --Jesper
>> When you say dual packet handling, what are you referring to specifically?
> 
> The important part of the sentence was *code path*, as in multiple code path for packets.

Ah right, sorry coffee hadn’t kicked in, apologies for the trickery!

> 
> You tricked me into looking up the code for you...
> 
> It was in drivers/net/virtio_net.c where function receive_buf() calls[1]
> three different functions based on different checks.  Some cases support
> XDP and others don't.  I though you talked about this in another thread?

I was talking about the vhost/net side, not the virtio_net side. In vhost net.c
there is roughly the same thing though, where < PAGE_SIZE uses xdp_buff
as a means-to-an-end for batching, either to be dispatched as proper XDP
or just flipping to SKB and the traditional net stack.

Anything above PAGE_SIZE takes a wildly different, non-batched path. That’s
what I’m actively working through now.

The series I’m working on aims to unify that handling again, but will see if it
blows up in my face or not.

> 
> --Jesper
> 
> [1] https://elixir.bootlin.com/linux/v6.15-rc5/source/drivers/net/virtio_net.c#L2570-L2573
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ