On Wed, 2 Dec 2026 21:10:42 +0100 Morten Brørup 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. > > Venlig hilsen / Kind regards, > -Morten Brørup AI review with Fable says this is wrong and incomplete: On the RFC itself, I would NAK it as posted: * Checksum is only half the problem. With LRO off, the app still gets a 64K GSO packet it never asked for. A forwarder will then exceed the egress MTU. A real driver workaround has to segment (rte_gso), not just checksum. * seg_num > 1 is the wrong test. A small GSO packet fits in one mbuf, and a jumbo frame is multi-seg without GSO. Test hdr->flags and hdr->gso_type instead. * It sets RTE_MBUF_F_RX_LRO with LRO not configured, which breaks the ethdev contract. * The else if condition is backwards. With has_rx_offload == 0 it skips the software checksum in exactly the unknown-proto/tunnel case the original else existed for. * Only one of five RX paths is covered. It proposes the two attached instead: