From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 976BB1FF14C for ; Fri, 26 Jun 2026 14:07:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EC0B0E43B; Fri, 26 Jun 2026 14:07:39 +0200 (CEST) From: Fiona Ebner 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 Message-ID: <20260626120701.116793-3-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260626120701.116793-1-f.ebner@proxmox.com> References: <20260626120701.116793-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782475618680 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.009 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemuserver.pm,network.pm] Message-ID-Hash: TQHZFFXT6N4TKFR5ZDIB7GVU54NOSUA7 X-Message-ID-Hash: TQHZFFXT6N4TKFR5ZDIB7GVU54NOSUA7 X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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