Re: [PATCH net-next] tun: use xdp_get_frame_len()
From: Jesper Dangaard Brouer
Date: Thu May 08 2025 - 11:07:48 EST
On 08/05/2025 16.24, Jon Kohler wrote:
On May 8, 2025, at 10:16 AM, Jesper Dangaard Brouer <hawk@xxxxxxxxxx> 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.
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?
--Jesper
[1]
https://elixir.bootlin.com/linux/v6.15-rc5/source/drivers/net/virtio_net.c#L2570-L2573