RE: [PATCH v11 3/4] virtio-net: define UDP tunnel segmentation offload feature

Parav Pandit
2025-01-19T08:06:07Z

Hi Paolo, Michael,

> From: Paolo Abeni <pabeni@redhat.com>
> Sent: Wednesday, November 27, 2024 3:07 PM
>
>
> +\item[VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO (46)] Driver can receive
> GSO
> +packets
> + carried by a UDP tunnel.
> +
> +\item[VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO (48)] Device can receive
> GSO
> +packets
> + carried by a UDP tunnel.

Feature bits 42 to 49 are not applicable to device specific type. They are reserved.
Please see the note.

Current spec description is:

0 to 23, and 50 to 127 Feature bits for the specific device type
24 to 41 Feature bits reserved for extensions to the queue and feature negotiation mechanisms, see 6
42 to 49, and 128 and above Feature bits reserved for future extensions.

So 2 bits of these patch and of patch 4, 46 to 49 to be shifted to bits 65 to 68.

Or an alternative would be to amend,

Bits 46 to 127 for specific device type,
And 42 to 45 and 128 reserved for future extensions.

Michael,
Please let me know so that I can have the follow up patch to this one as voting is started.
And the fix is required for it.

Is there any historic reason for 42-49 as reserved, or it can be used as proposed in this patch?
If it was only kept as elastic buffer for device generic, and device type to grow it is probably ok.
Using 46 to 49 has small advantage to reuse in the offloads bit as below.
Please confirm.

> @@ -1862,6 +2068,7 @@ \subsubsection{Control
> Virtqueue}\label{sec:Device Types / Network Device / Devi
> #define VIRTIO_NET_F_GUEST_TSO6 8
> #define VIRTIO_NET_F_GUEST_ECN 9
> #define VIRTIO_NET_F_GUEST_UFO 10
> +#define VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO 46
> #define VIRTIO_NET_F_GUEST_USO4 54
> #define VIRTIO_NET_F_GUEST_USO6 55