Re: [PATCH RFC v3 7/8] tun: enable gso over UDP tunnel support.
From: Jason Wang <hidden>
Date: 2025-06-17 02:56:31
On Mon, Jun 16, 2025 at 6:43 PM Paolo Abeni [off-list ref] wrote:
On 6/16/25 12:17 PM, Paolo Abeni wrote:quoted
Anyhow I now see that keeping the UDP GSO related fields offset constant regardless of VIRTIO_NET_F_HASH_REPORT would remove some ambiguity from the relevant control path. I think/hope we are still on time to update the specification clarifying that, but I'm hesitant to take that path due to the additional (hopefully small) overhead for the data path - and process overhead TBH. On the flip (positive) side such action will decouple more this series from the HASH_REPORT support.Whoops, I did not noticed: https://lore.kernel.org/virtio-comment/20250401195655.486230-1-kshankar@marvell.com/ (local) (virtio-spec commit 8d76f64d2198b34046fbedc3c835a6f75336a440 and specifically: """ When calculating the size of \field{struct virtio_net_hdr}, the driver MUST consider all the fields inclusive up to \field{padding_reserved_2} // ... i.e. 24 bytes if VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO is negotiated or up to \field{padding_reserved} """ that is, UDP related fields are always in a fixed position, regardless of VIRTIO_NET_F_HASH_REPORT (and other previous discussion not captured in the spec clearly enough).
This is why I feel strange when reading the patches. Everything would be simplified if the offset is fixed.
TL;DR: please scratch my previous comment above, I'll update the patches accordingly (fixed UDP GSO field offset). /P
Thanks