On Wed, Dec 2, 2026 at 9:32 PM Morten Brørup <[email protected]> wrote: > > > From: Stephen Hemminger [mailto:[email protected]] > > Sent: Wednesday, 2 December 2026 21.22 > > > > On Wed, 2 Dec 2026 21:10:42 +0100 > > Morten Brørup <[email protected]> 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. >
Ok, but it's going to have a performance impact for other hosts than VirtualBox properly implementing the feature they advertise, right?

