all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v2 2/2] virtio-net: expose host_tunnel option
Date: Fri, 26 Jun 2026 14:06:13 +0200	[thread overview]
Message-ID: <20260626120701.116793-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260626120701.116793-1-f.ebner@proxmox.com>

Since the option is disabled starting with machine version 11.0+pve1
as a workaround to bug #7627, give users the possibility to explicitly
enable the option again.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuServer.pm         | 11 +++++++++--
 src/PVE/QemuServer/Network.pm | 10 ++++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index ec0423af..cdf66e89 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -1422,8 +1422,15 @@ sub print_netdevice_full {
     # FIXME: MAJOR VERSION: consider re-enabling by default if most guest kernels are expected to
     # include the fix "virtio_net: do not allow tunnel csum offload for non GSO packets" with a
     # prominent notice in the upgrade guide.
-    if (min_version($machine_version, 11, 0, 1) && $net->{model} eq 'virtio') {
-        $tmpstr .= ",host_tunnel=off";
+    if ($net->{model} eq 'virtio') {
+        if (min_version($machine_version, 11, 0, 1)) {
+            # Turn off if not explicitly enabled starting with 11.0+pve1
+            $tmpstr .= ",host_tunnel=off" if !$net->{'host-tunnel'};
+        } elsif (min_version($machine_version, 10, 2)) {
+            # The feature was introduced in QEMU 10.2. Turn off if explicitly disabled.
+            $tmpstr .= ",host_tunnel=off"
+                if defined($net->{'host-tunnel'}) && !$net->{'host-tunnel'};
+        }
     }
 
     return $tmpstr;
diff --git a/src/PVE/QemuServer/Network.pm b/src/PVE/QemuServer/Network.pm
index eb8222e8..11bebdec 100644
--- a/src/PVE/QemuServer/Network.pm
+++ b/src/PVE/QemuServer/Network.pm
@@ -116,6 +116,16 @@ my $net_fmt = {
             "Force MTU of network device (VirtIO only). Setting to '1' or empty will use the bridge MTU",
         optional => 1,
     },
+    'host-tunnel' => {
+        type => 'boolean',
+        description => 'Enable host GSO over UDP tunnel offload. (VirtIO only).',
+        verbose_description =>
+            'Enable host GSO over UDP tunnel offload (VirtIO only). Requires QEMU > 10.2 and guest'
+            . ' and host kernel support. Disabled by default starting with machine version'
+            . ' 11.0+pve1 to work around an issue with the virtio-net driver in guest kernels. With'
+            . ' machine versions 10.2 and 11.0, this is enabled by default.',
+        optional => 1,
+    },
 };
 
 our $netdesc = {
-- 
2.47.3





      parent reply	other threads:[~2026-06-26 12:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26 12:06 [PATCH-SERIES qemu-server v2 0/2] fix #7627: net: virtio: disable host_tunnel feature again with 11.0+pve1 Fiona Ebner
2026-06-26 12:06 ` [PATCH qemu-server v2 1/2] " Fiona Ebner
2026-06-26 12:06 ` Fiona Ebner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260626120701.116793-3-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal