[PATCH] virtio-net: Advertise UDP tunnel GSO support by default

Paolo Abeni posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/9c500fbcd2cf29afd1826b1ac906f9d5beac3601.1760104079.git.pabeni@redhat.com
Maintainers: Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>
hw/core/machine.c   | 4 ++++
hw/net/virtio-net.c | 8 ++++----
2 files changed, 8 insertions(+), 4 deletions(-)
[PATCH] virtio-net: Advertise UDP tunnel GSO support by default
Posted by Paolo Abeni 1 month ago
Allow bidirection aggregated traffic for UDP encapsulated flows.

Add the needed compatibility entries to avoid migration issues
vs older QEMU instances.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 hw/core/machine.c   | 4 ++++
 hw/net/virtio-net.c | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index 681adbb7ac..0cd44a95b6 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -40,6 +40,10 @@
 
 GlobalProperty hw_compat_10_1[] = {
     { TYPE_ACPI_GED, "x-has-hest-addr", "false" },
+    { TYPE_VIRTIO_NET, "host_tunnel", "off"},
+    { TYPE_VIRTIO_NET, "host_tunnel_csum", "off"},
+    { TYPE_VIRTIO_NET, "guest_tunnel", "off"},
+    { TYPE_VIRTIO_NET, "guest_tunnel_csum", "off"},
 };
 const size_t hw_compat_10_1_len = G_N_ELEMENTS(hw_compat_10_1);
 
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 33116712eb..d8f5c5b81d 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -4300,19 +4300,19 @@ static const Property virtio_net_properties[] = {
     VIRTIO_DEFINE_PROP_FEATURE("host_tunnel", VirtIONet,
                                host_features_ex,
                                VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO,
-                               false),
+                               true),
     VIRTIO_DEFINE_PROP_FEATURE("host_tunnel_csum", VirtIONet,
                                host_features_ex,
                                VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO_CSUM,
-                               false),
+                               true),
     VIRTIO_DEFINE_PROP_FEATURE("guest_tunnel", VirtIONet,
                                host_features_ex,
                                VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO,
-                               false),
+                               true),
     VIRTIO_DEFINE_PROP_FEATURE("guest_tunnel_csum", VirtIONet,
                                host_features_ex,
                                VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO_CSUM,
-                               false),
+                               true),
 };
 
 static void virtio_net_class_init(ObjectClass *klass, const void *data)
-- 
2.51.0
Re: [PATCH] virtio-net: Advertise UDP tunnel GSO support by default
Posted by Jason Wang 1 month ago
On Fri, Oct 10, 2025 at 10:13 PM Paolo Abeni <pabeni@redhat.com> wrote:
>
> Allow bidirection aggregated traffic for UDP encapsulated flows.

bidirectional ?

>
> Add the needed compatibility entries to avoid migration issues
> vs older QEMU instances.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---

Other than that.

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks
Re: [PATCH] virtio-net: Advertise UDP tunnel GSO support by default
Posted by Lei Yang 1 month ago
Tested this patch with virtio-net regression tests, everything works fine.

Tested-by: Lei Yang <leiyang@redhat.com>

On Sat, Oct 11, 2025 at 12:58 PM Jason Wang <jasowang@redhat.com> wrote:
>
> On Fri, Oct 10, 2025 at 10:13 PM Paolo Abeni <pabeni@redhat.com> wrote:
> >
> > Allow bidirection aggregated traffic for UDP encapsulated flows.
>
> bidirectional ?
>
> >
> > Add the needed compatibility entries to avoid migration issues
> > vs older QEMU instances.
> >
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
>
> Other than that.
>
> Acked-by: Jason Wang <jasowang@redhat.com>
>
> Thanks
>
>