From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
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 21:31:45 +0100 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35F65B62@smartserver.smartshare.dk> (raw)
In-Reply-To: <20261202122213.645b3d3b@phoenix.local>
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, 2 December 2026 21.22
>
> 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.
This workaround is for guest applications NOT requesting any RX offloads from the virtio ports.
The VirtualBox host passes "incomplete" packets to the guest, expecting the guest's virtio driver to do the RX offloads, which the virtio driver doesn't when RX offload is disabled.
next prev parent reply other threads:[~2026-12-02 20:31 UTC|newest]
Thread overview: 5+ 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
2026-12-02 20:31 ` Morten Brørup [this message]
2026-12-02 20:44 ` Maxime Coquelin
2026-12-02 20:51 ` Maxime Coquelin
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=98CBD80474FA8B44BF855DF32C47DC35F65B62@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=chenbox@nvidia.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=rjarry@redhat.com \
--cc=stephen@networkplumber.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox