From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B723E606A322 for ; Wed, 2 Dec 2026 20:22:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=dXJnrB4P Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 827DA402DD; Wed, 2 Dec 2026 21:22:21 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTPS id CF56D402D1 for ; Wed, 2 Dec 2026 21:22:20 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-8c70c2ab5a2so5449660b3a.3 for ; Wed, 02 Dec 2026 12:22:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796242939; x=1796847739; darn=dpdk.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=y0E9+jm/eD8nC9TdrqkLpIGSZatkIKgmuaXHFAAZZj4=; b=dXJnrB4P7sQ0v1xyZgZ6DRU1HZk20vximsuaG5G550aTttGTV50mzz1POE3NkyeSA8 Tl6iFljkkWdKEYQlZwVQtBzRoHUJ97HvFi1WdcumaevUOdQM0XE615o+f50jGyoUs3pn ZITC8mbA6PtxbWTY7VcsGDXHF5zIl7PbKPCeQbwfI73jzLuYRux5+8JAUWCyS+Wa+wlu UrII+3fYm4ajxM+sSXU6+fQJIdpavTLvXsb99o16PxwLNDr6T9yNfhGgZYsQDFFW1IvO IP4sSIy7+ZqbxNQ5KE6ezo66dpc+rufNrJZVyiLK1j9qer4BhYCwY48/m9w9Nrs7QWva nvPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796242939; x=1796847739; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=y0E9+jm/eD8nC9TdrqkLpIGSZatkIKgmuaXHFAAZZj4=; b=1ryroVyYTV5ffUGVU6O3kK8U9mj1N4N/8EI6/dQspX4LGKGI08bK6f0qboC1lTdsWB 1HnYf71PNcfH6DnwA0zinXlgZqevDBTdvXsOtYEqJKXPsgfl2Mw/ouPYZmAWQg9MNWuq VHZc0AsPhJjFS5Ty0q7bf60TMWQ9x0XPtf7e7TbJng7lCbf4BG91Tjplo12NmSK2Atug 0936OXSh4EaprXo6vX7RShjMEA0wk/Gf7JLmEQdJKErRBBKL9wauZfSSRDe/meYoFZ7P SqPz5zR+QUWgdo5FH7JTEGHSAMF//+pX7ovQV5l0zKsb/xLF8xZ84ySjnWZCQcsFnRFu SSuw== X-Forwarded-Encrypted: i=1; AL+hErGpA4ilAQvDSUTtpWPxC3a45zV7cSJ5FCCFgC7s4BNTxREdcKrz3N4hlYKbYWnilfHNaGA=@dpdk.org X-Gm-Message-State: APuU4Z+PWMVEkLRcwFZaQxLGG/TdCGgVxV9eVbhdcup/DhM7dhknbCIc CXLFwtiuk20qM6N746XxgK4El2UxlsMgm8+WVRRmEkgroVY03+s1WrOKldILBFBLVI4= X-Gm-Gg: AZFdTZc+53je6lfwAaiDQbe2Cg7j2lcwNj/CnL3zKi6vEgWaZMNZpXnoG3YfBX5kFCH cZRY4szWU1SB+/bEVZuvEBu3sYMj4xIZWcQDxBcNBVfpPYh3/3dzeU3WT70Q4+obPzo1JM5qol1 QvxToxt2iFILawJCUgyMOfXy9DjA8Xs/0A+KVsUxlh0WCepqZuiHn+k3lTXsRU7ZtHaFAxjhpbc yWJypbIA05F9Cp0UVHKWLNWLXPlJJY1p8MxYJOUo5iFwOEJfr3IQgrdKwFGZh5WehHVTLEvczwq 3CbTlCxvkF5XV3FPHACOS7XPk1kLm+GMoVqWooDDp9MrS51QBmGUZqeaHCeJD3yfgfxv2cDPcxx 9qG+eAeBg2miSfj00ORYVly0I1ji/S8eG1gqR6wdvRVN7ErJ1T8eDfZWn593xEot91PxWQl7jk4 VaIDfXeds/DSbyz0d2/KIP62FY89s+lp5RkwsOa6LrCAaWeIkarYTecK3BaqxsYjz2BSUEtoJaH LldM9XFuNTDGnhAVRf1smz0zVAQ9ioMoV4mn/cMTFwYF0vhZqlfP1kUKesLHfVmicnXq2FesfXt oqVN48OISmVyT8Z2JtqhKw6vQcJQoBm9c4rqclMgcjMUFju3GPcRbBPHGfOewlJx9DyGTw== X-Received: by 2002:a05:6a00:a112:b0:874:705d:f659 with SMTP id d2e1a72fcca58-8c87cc43fe3mr41045516b3a.39.1796242939197; Wed, 02 Dec 2026 12:22:19 -0800 (PST) Received: from phoenix.local (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8c87420be40sm22190734b3a.57.2026.12.02.12.22.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 12:22:19 -0800 (PST) Date: Wed, 2 Dec 2026 12:22:13 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Maxime Coquelin" , "Chenbo Xia" , , "Robin Jarry" , "David Marchand" Subject: Re: [RFC] virtio: VirtualBox GSO workaround Message-ID: <20261202122213.645b3d3b@phoenix.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35F65B61@smartserver.smartshare.dk> References: <98CBD80474FA8B44BF855DF32C47DC35F65B61@smartserver.smartshare.dk> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, 2 Dec 2026 21:10:42 +0100 Morten Br=C3=B8rup wrote: > VirtIO PMD maintainers, >=20 > VirtualBox has a well known issue: > When a packet is received in a VirtualBox host by a physical interface us= ing GSO, VirtualBox bridges that packet as-is (i.e. with VIRTIO_NET_HDR_F_N= EEDS_CSUM and invalid TCP checksum field value) into the guest, even when t= he guest's virtio port is configured without any RX offload. > When the application has configured the port without RX offload, the appl= ication doesn't consider RTE_MBUF_F_RX_L4_CKSUM_NONE (because it expects th= e hardware/driver has not checked the TCP checksum), and when it checks the= TCP checksum, it discards the packet as being invalid. (Or if the applicat= ion forwards the packet with an incremental TCP checksum update, the packet= will remain invalid, and will be discarded by an on-path router with TCP c= hecksum validation or when reaching its ultimate destination.) > The virtio driver doesn't do any RX offload if RX offload is disabled. >=20 > As a workaround, I propose that the virtio driver calculates the TCP chec= ksum and sets the TCP checksum field for GSO packets when RX offload is dis= abled. The host should have done that, but VirtualBox doesn't. > What do you think about such a workaround? >=20 > Note: The workaround has only been applied to virtio_recv_mergeable_pkts(= ), which is used for VirtualBox virtio. >=20 > Diff for DPDK 25.11.2 below. Work in progress, code not yet tested. Seems to me that virtio already supports negotiation with host about offloa= ds. Maybe add a check in the negotiation and mask off those bits if virtualbox = is detected. It is a case of host lying about support then.