From nobody Fri Nov 14 23:28:04 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1759691896; cv=none; d=zohomail.com; s=zohoarc; b=oAAF1nGUU/yJc7quVCNfsQjWSeFCLUUULB8TyeO5SjdjP63dQk8qynu7rcBduMBXp5CD9fgMz1+toosKTrcp3bNtuA1fQA6tcnEjpOUgow26eiY2eCErwgDuvre46bjApK7MUXTDort+JVBHUgaxQ74+bLmBxcNbYmTp5p1yuf4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1759691896; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Rh5F3iR0qYWe5wSoBa0ieaCgok0ju7ghEdEEZdYuvW4=; b=ZrUS/1yCLW6dZyWE8oEZ/Qd1BvEA4pdcdsG3j6ADa7cgWL6qQYgrfizKuIWRNI4svqD6a6ZXhTWbNYi5wkNNgvba2DQjkoaWOh4rNqQsxy5iDXrc7savbiSytx6rqavfFWqXR3+d1ae9jbkZ6B6SGO6Md53pV+1KtiosdSUMsGw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 175969189685666.89837186613704; Sun, 5 Oct 2025 12:18:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v5UDi-0007S0-QM; Sun, 05 Oct 2025 15:16:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v5UDP-0007Q7-MH for qemu-devel@nongnu.org; Sun, 05 Oct 2025 15:16:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v5UDN-0006Km-4U for qemu-devel@nongnu.org; Sun, 05 Oct 2025 15:16:15 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-543-DD5911nQON2KAqBq_ZY2iQ-1; Sun, 05 Oct 2025 15:16:08 -0400 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-46e3ed6540fso22341055e9.0 for ; Sun, 05 Oct 2025 12:16:07 -0700 (PDT) Received: from redhat.com ([2a0d:6fc0:1518:6900:b69a:73e1:9698:9cd3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-46e61a020a3sm224357575e9.10.2025.10.05.12.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Oct 2025 12:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759691769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Rh5F3iR0qYWe5wSoBa0ieaCgok0ju7ghEdEEZdYuvW4=; b=FFM4cuSIIphc+7ES+LTdqeD/C725IcLPozJJUYwWcMWG1EOw/OJE0T5P1XhXFdmH4jCkqA XLwbduZwIVuldLTPj4bz5voUG0cOOVRgO1IP92ckO/+gN3ib5KbKfhuBL3YFBu+R69K2nd 3bthI/U8oCfYke0kamKI7kGMQtaMGrM= X-MC-Unique: DD5911nQON2KAqBq_ZY2iQ-1 X-Mimecast-MFC-AGG-ID: DD5911nQON2KAqBq_ZY2iQ_1759691767 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759691766; x=1760296566; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Rh5F3iR0qYWe5wSoBa0ieaCgok0ju7ghEdEEZdYuvW4=; b=AaPlfeZH0Yr125ZaWeEs1occHRxj7MXbb11+lJ+Hj+0q5az1G2sRpoLx1mFZqij2Xj bt3wgzCFLV/j/hCuqDNnalXTG2n09LH+UkpyR6WoEZCTZGBihzOM+u3hzE4i5IyFALGC B/pkDfAfBhQvg08zvja0VUCZRaO9U5njqvdVXucvDhAJiHBPp/TBfzXVAGXi2WDOSX6l A7U3sLPhgFEyVjZNNLOuc9c2aRYKd/pekdN259xwxPObb6SuiQwrWvvM65siJ1yhqdgv CjBXX9huuAcF0P80VBk+UeaJ7YqchyEI6uLs78vK9we+yqwIyHxIhxiteE1LfkC/qnb6 gDkA== X-Gm-Message-State: AOJu0YxFo1Rs5SDrnCQeLG8GTAgWyuExm5ekH8thdYLfsIOul+iDcUC8 yU4tjMDdRISVe5DK769RAmEQYlaUy3+zO5mF3OSBDuwdS3Vh58MYtVpwQck4fFBNI0SDxBW1m55 AkjnDz0X+pHxrQZVn6t5MTghuaA1GlIJBQWw/SvdX6CVXwwXSUo5XtNf2FORIbOYEkUc0I3adFU 5wkOCodvnTscg3uXeaQPcxAVpGNofIGc/N8g== X-Gm-Gg: ASbGncsWOidzeMkpX1uOmToIKG3NxzotniT0/lWQfiq9XjJ8hj18G8q20CkH8sGGcfq B4L6k7uPepKavuOf8leSJVzR/yqVUy51vCp0EAUPoOUSmAJCPwsewSeeC3+a8WgByKcfPG17NiQ MXdGXw3mHv/JNsbB4caWNUA8acK0oR78MqjAWnduVQZIsSEN6kP1rMykd70n/hEBwEC4ubwiXUx OOHAkh8LvJ17ux8+KHbie320DaUgWdox35+F38kCo6KbG8TDC+xjYPegYZYO5Y52x+k3WQn/j13 xpLKWaV7pRzGoDdtB4KuBJqp0NWGV+RhEyDSpYw= X-Received: by 2002:a05:600c:45c9:b0:46e:3b58:1b40 with SMTP id 5b1f17b1804b1-46e70c49676mr78317155e9.4.1759691766429; Sun, 05 Oct 2025 12:16:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHALY+cypn8YkvnkXe8TwgZtAZG390MsUptzMg20MqiY8kzR8TGvURBMqeWjTOpmQ2py+Y5bQ== X-Received: by 2002:a05:600c:45c9:b0:46e:3b58:1b40 with SMTP id 5b1f17b1804b1-46e70c49676mr78316905e9.4.1759691765868; Sun, 05 Oct 2025 12:16:05 -0700 (PDT) Date: Sun, 5 Oct 2025 15:16:03 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Abeni , Lei Yang , Dmitry Fleytman , Akihiko Odaki , Jason Wang , Sriram Yagnaraman , Luigi Rizzo , Giuseppe Lettieri , Vincenzo Maffione Subject: [PULL 01/75] net: bundle all offloads in a single struct Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.43, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1759691899137116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Paolo Abeni The set_offload() argument list is already pretty long and we are going to introduce soon a bunch of additional offloads. Replace the offload arguments with a single struct and update all the relevant call-sites. No functional changes intended. Signed-off-by: Paolo Abeni Tested-by: Lei Yang Reviewed-by: Michael S. Tsirkin Message-ID: Signed-off-by: Michael S. Tsirkin --- include/net/net.h | 15 ++++++++++++--- net/tap_int.h | 4 ++-- hw/net/e1000e_core.c | 5 +++-- hw/net/igb_core.c | 5 +++-- hw/net/virtio-net.c | 19 +++++++++++-------- hw/net/vmxnet3.c | 13 +++++-------- net/net.c | 5 ++--- net/netmap.c | 3 +-- net/tap-bsd.c | 3 +-- net/tap-linux.c | 21 ++++++++++++--------- net/tap-solaris.c | 4 ++-- net/tap-stub.c | 3 +-- net/tap.c | 8 ++++---- 13 files changed, 59 insertions(+), 49 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 84ee18e0f9..48ba333d02 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -35,6 +35,16 @@ typedef struct NICConf { int32_t bootindex; } NICConf; =20 +typedef struct NetOffloads { + bool csum; + bool tso4; + bool tso6; + bool ecn; + bool ufo; + bool uso4; + bool uso6; +} NetOffloads; + #define DEFINE_NIC_PROPERTIES(_state, _conf) \ DEFINE_PROP_MACADDR("mac", _state, _conf.macaddr), \ DEFINE_PROP_NETDEV("netdev", _state, _conf.peers) @@ -57,7 +67,7 @@ typedef bool (HasUfo)(NetClientState *); typedef bool (HasUso)(NetClientState *); typedef bool (HasVnetHdr)(NetClientState *); typedef bool (HasVnetHdrLen)(NetClientState *, int); -typedef void (SetOffload)(NetClientState *, int, int, int, int, int, int, = int); +typedef void (SetOffload)(NetClientState *, const NetOffloads *); typedef int (GetVnetHdrLen)(NetClientState *); typedef void (SetVnetHdrLen)(NetClientState *, int); typedef bool (GetVnetHashSupportedTypes)(NetClientState *, uint32_t *); @@ -189,8 +199,7 @@ bool qemu_has_ufo(NetClientState *nc); bool qemu_has_uso(NetClientState *nc); bool qemu_has_vnet_hdr(NetClientState *nc); bool qemu_has_vnet_hdr_len(NetClientState *nc, int len); -void qemu_set_offload(NetClientState *nc, int csum, int tso4, int tso6, - int ecn, int ufo, int uso4, int uso6); +void qemu_set_offload(NetClientState *nc, const NetOffloads *ol); int qemu_get_vnet_hdr_len(NetClientState *nc); void qemu_set_vnet_hdr_len(NetClientState *nc, int len); bool qemu_get_vnet_hash_supported_types(NetClientState *nc, uint32_t *type= s); diff --git a/net/tap_int.h b/net/tap_int.h index 8857ff299d..f8bbe1cb0c 100644 --- a/net/tap_int.h +++ b/net/tap_int.h @@ -27,6 +27,7 @@ #define NET_TAP_INT_H =20 #include "qapi/qapi-types-net.h" +#include "net/net.h" =20 int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required, int mq_required, Error **errp); @@ -37,8 +38,7 @@ void tap_set_sndbuf(int fd, const NetdevTapOptions *tap, = Error **errp); int tap_probe_vnet_hdr(int fd, Error **errp); int tap_probe_has_ufo(int fd); int tap_probe_has_uso(int fd); -void tap_fd_set_offload(int fd, int csum, int tso4, int tso6, int ecn, int= ufo, - int uso4, int uso6); +void tap_fd_set_offload(int fd, const NetOffloads *ol); void tap_fd_set_vnet_hdr_len(int fd, int len); int tap_fd_set_vnet_le(int fd, int vnet_is_le); int tap_fd_set_vnet_be(int fd, int vnet_is_be); diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index 06657bb3ac..8fef598b49 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -2822,8 +2822,9 @@ e1000e_update_rx_offloads(E1000ECore *core) trace_e1000e_rx_set_cso(cso_state); =20 if (core->has_vnet) { - qemu_set_offload(qemu_get_queue(core->owner_nic)->peer, - cso_state, 0, 0, 0, 0, 0, 0); + NetOffloads ol =3D { .csum =3D cso_state }; + + qemu_set_offload(qemu_get_queue(core->owner_nic)->peer, &ol); } } =20 diff --git a/hw/net/igb_core.c b/hw/net/igb_core.c index 39e3ce1c8f..45d8fd795b 100644 --- a/hw/net/igb_core.c +++ b/hw/net/igb_core.c @@ -3058,8 +3058,9 @@ igb_update_rx_offloads(IGBCore *core) trace_e1000e_rx_set_cso(cso_state); =20 if (core->has_vnet) { - qemu_set_offload(qemu_get_queue(core->owner_nic)->peer, - cso_state, 0, 0, 0, 0, 0, 0); + NetOffloads ol =3D {.csum =3D cso_state }; + + qemu_set_offload(qemu_get_queue(core->owner_nic)->peer, &ol); } } =20 diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7848e26278..129bebd82e 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -773,14 +773,17 @@ static uint64_t virtio_net_bad_features(VirtIODevice = *vdev) =20 static void virtio_net_apply_guest_offloads(VirtIONet *n) { - qemu_set_offload(qemu_get_queue(n->nic)->peer, - !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_CSUM)), - !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_TSO4)), - !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_TSO6)), - !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_ECN)), - !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_UFO)), - !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_USO4)), - !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_USO6))= ); + NetOffloads ol =3D { + .csum =3D !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_C= SUM)), + .tso4 =3D !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_T= SO4)), + .tso6 =3D !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_T= SO6)), + .ecn =3D !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_E= CN)), + .ufo =3D !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_U= FO)), + .uso4 =3D !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_U= SO4)), + .uso6 =3D !!(n->curr_guest_offloads & (1ULL << VIRTIO_NET_F_GUEST_U= SO6)), + }; + + qemu_set_offload(qemu_get_queue(n->nic)->peer, &ol); } =20 static uint64_t virtio_net_guest_offloads_by_features(uint64_t features) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index af73aa8ef2..03732375a7 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1322,14 +1322,11 @@ static void vmxnet3_update_features(VMXNET3State *s) s->lro_supported, rxcso_supported, s->rx_vlan_stripping); if (s->peer_has_vhdr) { - qemu_set_offload(qemu_get_queue(s->nic)->peer, - rxcso_supported, - s->lro_supported, - s->lro_supported, - 0, - 0, - 0, - 0); + NetOffloads ol =3D { .csum =3D rxcso_supported, + .tso4 =3D s->lro_supported, + .tso6 =3D s->lro_supported }; + + qemu_set_offload(qemu_get_queue(s->nic)->peer, &ol); } } =20 diff --git a/net/net.c b/net/net.c index da275db86e..63872b6855 100644 --- a/net/net.c +++ b/net/net.c @@ -540,14 +540,13 @@ bool qemu_has_vnet_hdr_len(NetClientState *nc, int le= n) return nc->info->has_vnet_hdr_len(nc, len); } =20 -void qemu_set_offload(NetClientState *nc, int csum, int tso4, int tso6, - int ecn, int ufo, int uso4, int uso6) +void qemu_set_offload(NetClientState *nc, const NetOffloads *ol) { if (!nc || !nc->info->set_offload) { return; } =20 - nc->info->set_offload(nc, csum, tso4, tso6, ecn, ufo, uso4, uso6); + nc->info->set_offload(nc, ol); } =20 int qemu_get_vnet_hdr_len(NetClientState *nc) diff --git a/net/netmap.c b/net/netmap.c index 297510e190..6cd8f2bdc5 100644 --- a/net/netmap.c +++ b/net/netmap.c @@ -366,8 +366,7 @@ static void netmap_set_vnet_hdr_len(NetClientState *nc,= int len) } } =20 -static void netmap_set_offload(NetClientState *nc, int csum, int tso4, int= tso6, - int ecn, int ufo, int uso4, int uso6) +static void netmap_set_offload(NetClientState *nc, const NetOffloads *ol) { NetmapState *s =3D DO_UPCAST(NetmapState, nc, nc); =20 diff --git a/net/tap-bsd.c b/net/tap-bsd.c index 3f98d0ea82..38eb28cb58 100644 --- a/net/tap-bsd.c +++ b/net/tap-bsd.c @@ -239,8 +239,7 @@ int tap_fd_set_vnet_be(int fd, int is_be) return -EINVAL; } =20 -void tap_fd_set_offload(int fd, int csum, int tso4, - int tso6, int ecn, int ufo, int uso4, int uso6) +void tap_fd_set_offload(int fd, const NetOffloads *ol) { } =20 diff --git a/net/tap-linux.c b/net/tap-linux.c index e832810665..79a9dd0da0 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -244,8 +244,7 @@ int tap_fd_set_vnet_be(int fd, int is_be) abort(); } =20 -void tap_fd_set_offload(int fd, int csum, int tso4, - int tso6, int ecn, int ufo, int uso4, int uso6) +void tap_fd_set_offload(int fd, const NetOffloads *ol) { unsigned int offload =3D 0; =20 @@ -254,20 +253,24 @@ void tap_fd_set_offload(int fd, int csum, int tso4, return; } =20 - if (csum) { + if (ol->csum) { offload |=3D TUN_F_CSUM; - if (tso4) + if (ol->tso4) { offload |=3D TUN_F_TSO4; - if (tso6) + } + if (ol->tso6) { offload |=3D TUN_F_TSO6; - if ((tso4 || tso6) && ecn) + } + if ((ol->tso4 || ol->tso6) && ol->ecn) { offload |=3D TUN_F_TSO_ECN; - if (ufo) + } + if (ol->ufo) { offload |=3D TUN_F_UFO; - if (uso4) { + } + if (ol->uso4) { offload |=3D TUN_F_USO4; } - if (uso6) { + if (ol->uso6) { offload |=3D TUN_F_USO6; } } diff --git a/net/tap-solaris.c b/net/tap-solaris.c index af2ebb16f5..ef8e0feeb0 100644 --- a/net/tap-solaris.c +++ b/net/tap-solaris.c @@ -27,6 +27,7 @@ #include "tap_int.h" #include "qemu/ctype.h" #include "qemu/cutils.h" +#include "net/net.h" =20 #include #include @@ -240,8 +241,7 @@ int tap_fd_set_vnet_be(int fd, int is_be) return -EINVAL; } =20 -void tap_fd_set_offload(int fd, int csum, int tso4, - int tso6, int ecn, int ufo, int uso4, int uso6) +void tap_fd_set_offload(int fd, const NetOffloads *ol) { } =20 diff --git a/net/tap-stub.c b/net/tap-stub.c index 38673434cb..67d14ad4d5 100644 --- a/net/tap-stub.c +++ b/net/tap-stub.c @@ -66,8 +66,7 @@ int tap_fd_set_vnet_be(int fd, int is_be) return -EINVAL; } =20 -void tap_fd_set_offload(int fd, int csum, int tso4, - int tso6, int ecn, int ufo, int uso4, int uso6) +void tap_fd_set_offload(int fd, const NetOffloads *ol) { } =20 diff --git a/net/tap.c b/net/tap.c index f37133e301..df23283744 100644 --- a/net/tap.c +++ b/net/tap.c @@ -285,15 +285,14 @@ static int tap_set_vnet_be(NetClientState *nc, bool i= s_be) return tap_fd_set_vnet_be(s->fd, is_be); } =20 -static void tap_set_offload(NetClientState *nc, int csum, int tso4, - int tso6, int ecn, int ufo, int uso4, int uso6) +static void tap_set_offload(NetClientState *nc, const NetOffloads *ol) { TAPState *s =3D DO_UPCAST(TAPState, nc, nc); if (s->fd < 0) { return; } =20 - tap_fd_set_offload(s->fd, csum, tso4, tso6, ecn, ufo, uso4, uso6); + tap_fd_set_offload(s->fd, ol); } =20 static void tap_exit_notify(Notifier *notifier, void *data) @@ -391,6 +390,7 @@ static TAPState *net_tap_fd_init(NetClientState *peer, int fd, int vnet_hdr) { + NetOffloads ol =3D {}; NetClientState *nc; TAPState *s; =20 @@ -404,7 +404,7 @@ static TAPState *net_tap_fd_init(NetClientState *peer, s->has_ufo =3D tap_probe_has_ufo(s->fd); s->has_uso =3D tap_probe_has_uso(s->fd); s->enabled =3D true; - tap_set_offload(&s->nc, 0, 0, 0, 0, 0, 0, 0); + tap_set_offload(&s->nc, &ol); /* * Make sure host header length is set correctly in tap: * it might have been modified by another instance of qemu. --=20 MST