From: Stephen Hemminger <stephen@networkplumber.org>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: "Maxime Coquelin" <maxime.coquelin@redhat.com>,
"Chenbo Xia" <chenbox@nvidia.com>, <dev@dpdk.org>,
"Robin Jarry" <rjarry@redhat.com>,
"David Marchand" <david.marchand@redhat.com>
Subject: Re: [RFC] virtio: VirtualBox GSO workaround
Date: Wed, 2 Dec 2026 12:22:13 -0800 [thread overview]
Message-ID: <20261202122213.645b3d3b@phoenix.local> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35F65B61@smartserver.smartshare.dk>
On Wed, 2 Dec 2026 21:10:42 +0100
Morten Brørup <mb@smartsharesystems.com> wrote:
> VirtIO PMD maintainers,
>
> VirtualBox has a well known issue:
> When a packet is received in a VirtualBox host by a physical interface using GSO, VirtualBox bridges that packet as-is (i.e. with VIRTIO_NET_HDR_F_NEEDS_CSUM and invalid TCP checksum field value) into the guest, even when the guest's virtio port is configured without any RX offload.
> When the application has configured the port without RX offload, the application doesn't consider RTE_MBUF_F_RX_L4_CKSUM_NONE (because it expects the 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 application 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 checksum validation or when reaching its ultimate destination.)
> The virtio driver doesn't do any RX offload if RX offload is disabled.
>
> As a workaround, I propose that the virtio driver calculates the TCP checksum and sets the TCP checksum field for GSO packets when RX offload is disabled. The host should have done that, but VirtualBox doesn't.
> What do you think about such a workaround?
>
> Note: The workaround has only been applied to virtio_recv_mergeable_pkts(), which is used for VirtualBox virtio.
>
> 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 offloads.
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.
prev parent reply other threads:[~2026-12-02 20:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 20:10 [RFC] virtio: VirtualBox GSO workaround Morten Brørup
2026-12-02 20:22 ` Stephen Hemminger [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=20261202122213.645b3d3b@phoenix.local \
--to=stephen@networkplumber.org \
--cc=chenbox@nvidia.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=mb@smartsharesystems.com \
--cc=rjarry@redhat.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.