On Mon, Nov 23, 2026 at 11:40:09AM +0000, Ali Raheem wrote:
> >Synopsis: vio(4) enables TSO without checksum offload, TSO frames are
> >dropped by the host
> >Category: kernel
> >Environment:
> System : OpenBSD 8.0
> Details : OpenBSD 8.0 (GENERIC.MP) #12: Tue Nov 17 01:55:14 CST 2026
>
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Architecture: OpenBSD.amd64
> Machine : amd64
> >Description:
> On a KVM VPS, the same kernel gets one of two feature sets at
> boot, depending on whether the host agrees to VIRTIO_NET_F_CSUM.
> It always agrees to VIRTIO_NET_F_HOST_TSO4/6:
>
> Working:
> hwfeatures=71d6<CSUM_TCPv4,CSUM_UDPv4,VLAN_MTU,VLAN_HWOFFLOAD,
> CSUM_TCPv6,CSUM_UDPv6,TSOv4,TSOv6,LRO>
> Broken:
> hwfeatures=7050<VLAN_MTU,VLAN_HWOFFLOAD,TSOv4,TSOv6,LRO>
How do you get this case with LRO and w/o CSUM_TCPv4/CSUM_TCPv6. vio(4) resets
the interface an renegotiates without GUEST_TSO4/GUEST_TSO6 in this case.
What KVM or VPS provider do you use for your machine?
The VirtIO spec said:
2.2.2 Device Requirements: Feature Bits
The device MUST NOT offer a feature which requires another feature which
was not offered.
5.1.3.1 Feature bit requirements
Some networking feature bits require other networking feature bits (see 2.2.1)
...
VIRTIO_NET_F_HOST_TSO4 Requires VIRTIO_NET_F_CSUM.
VIRTIO_NET_F_HOST_TSO6 Requires VIRTIO_NET_F_CSUM.
Looks like this Hypervisor dont't follow the VirtIO spec.
> In the broken case vio_attach() still sets IFCAP_TSOv4/6, so TCP
> hands the driver TSO segments. As the interface has no checksum
> offload, the stack computes the checksum in software and
> M_TCP_CSUM_OUT is not set. vio_tx_offload() then returns at the
> first check, before the TSO code, so the segment goes to the host
> as a plain multi-KB frame (GSO_NONE) on a 1500-byte link. The host
> drops it silently: no interface errors or drops in the guest.
>
> Small packets (ping -s 1472, interactive ssh) work. Bulk TCP
> sending stalls and only progresses on retransmit timeouts. A
> 100 MB upload to speed.cloudflare.com ran at about 1 KB/s, with
> 969 data packets retransmitted (averaging ~2100 bytes, i.e. TSO
> segments), 491 retransmit timeouts and 0 fast retransmits in two
> minutes.
>
> The virtio spec makes VIRTIO_NET_F_HOST_TSO4/6 depend on
> VIRTIO_NET_F_CSUM.
>
> >How-To-Repeat:
> Boot on a virtio-net host that offers HOST_TSO4/6 without CSUM
> (here it happens on some boots only). Check that hwfeatures shows
> TSOv4 without CSUM_TCPv4, then send bulk TCP, e.g.
>
> curl --data-binary @100mb.bin https://speed.cloudflare.com/__up
>
> Results on the same VM, uploading 100 MB:
>
> kernel hwfeatures tcp.tso result
> 8.0 7050 1 ~1 KB/s, hundreds of RTOs
> 8.0 7050 0 18 MB/s, 0 retransmits
> patched 4050 1 39 and 44 MB/s, 0 retransmits
>
> Workaround: sysctl net.inet.tcp.tso=0
>
> >Fix:
> Only advertise TSO when checksum offload was negotiated. Tested on
> 8.0-stable (if_vio.c 1.81) on the affected VM, see table above.
> The diff is against if_vio.c 1.84.
>
> --- sys/dev/pv/if_vio.c.orig
> +++ sys/dev/pv/if_vio.c
> @@ -758,13 +758,14 @@
> ifp->if_capabilities |= IFCAP_VLAN_MTU;
> ifp->if_capabilities |= IFCAP_VLAN_HWOFFLOAD;
> #endif
> - if (virtio_has_feature(vsc, VIRTIO_NET_F_CSUM))
> + if (virtio_has_feature(vsc, VIRTIO_NET_F_CSUM)) {
> ifp->if_capabilities |= IFCAP_CSUM_TCPv4|IFCAP_CSUM_UDPv4|
> IFCAP_CSUM_TCPv6|IFCAP_CSUM_UDPv6;
> - if (virtio_has_feature(vsc, VIRTIO_NET_F_HOST_TSO4))
> - ifp->if_capabilities |= IFCAP_TSOv4;
> - if (virtio_has_feature(vsc, VIRTIO_NET_F_HOST_TSO6))
> - ifp->if_capabilities |= IFCAP_TSOv6;
> + if (virtio_has_feature(vsc, VIRTIO_NET_F_HOST_TSO4))
> + ifp->if_capabilities |= IFCAP_TSOv4;
> + if (virtio_has_feature(vsc, VIRTIO_NET_F_HOST_TSO6))
> + ifp->if_capabilities |= IFCAP_TSOv6;
> + }
>
> sc->sc_rx_mbuf_size = MCLBYTES;
> if (virtio_has_feature(vsc, VIRTIO_NET_F_CTRL_GUEST_OFFLOADS) &&
>
>
> dmesg:
> OpenBSD 8.0 (GENERIC.MP) #12: Tue Nov 17 01:55:14 CST 2026
>
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 2130558976 (2031MB)
> avail mem = 2044309504 (1949MB)
> random: good seed from bootblocks
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf5800 (10 entries)
> bios0: vendor SeaBIOS version "1.16.0-4.module_el8+603+e0ca2c01" date
> 04/01/2014
> bios0: oVirt RHEL
> acpi0 at bios0: ACPI 3.0
> acpi0: sleep states S5
> acpi0: tables DSDT FACP APIC SRAT MCFG WAET
> acpi0: wakeup devices
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz, 73.42 MHz, 06-3e-04
> cpu0: cpuid 1
> edx=1f8bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT>
>
> ecx=f7baa223<SSE3,PCLMUL,VMX,SSSE3,CX16,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV>
> cpu0: cpuid 6 eax=4<ARAT>
> cpu0: cpuid 7.0 ebx=283<FSGSBASE,TSC_ADJUST,SMEP,ERMS> ecx=4<UMIP>
> edx=bc000400<MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD>
> cpu0: cpuid a vers=2, gp=4, gpwidth=48, ff=3, ffwidth=48
> cpu0: cpuid d.1 eax=1<XSAVEOPT>
> cpu0: cpuid 80000001 edx=2c100800<NXE,PAGE1GB,RDTSCP,LONG> ecx=1<LAHF>
> cpu0: msr 10a=48<SKIP_L1DFL,IF_PSCHANGE>
> cpu0: MELTDOWN
> cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 4MB 64b/line
> 16-way L2 cache, 16MB 64b/line 16-way L3 cache
> cpu0: smt 0, core 0, package 0, type P
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 1000MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz, 53.59 MHz, 06-3e-04
> cpu1: smt 0, core 1, package 0, type P
> ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
> acpimcfg0 at acpi0
> acpimcfg0: addr 0xb0000000, bus 0-255
> acpiprt0 at acpi0: bus 0 (PCI0)
> "ACPI0006" at acpi0 not configured
> acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000
> com0 at acpi0 COM1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo
> "PNP0303" at acpi0 not configured
> "PNP0F13" at acpi0 not configured
> acpicmos0 at acpi0
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> "QEMU0002" at acpi0 not configured
> "ACPI0010" at acpi0 not configured
> "PNP0A06" at acpi0 not configured
> acpicpu0 at acpi0: C1(@1 halt!)
> acpicpu1 at acpi0: C1(@1 halt!)
> cpu0: using VERW MDS workaround
> pvbus0 at mainbus0: KVM
> pvclock0 at pvbus0
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel 82G33 Host" rev 0x00
> vga1 at pci0 dev 1 function 0 "Qumranet Virtio 1.x GPU" rev 0x01
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> ppb0 at pci0 dev 2 function 0 "Red Hat PCIE" rev 0x00: apic 0 int 22
> pci1 at ppb0 bus 1
> virtio0 at pci1 dev 0 function 0 "Qumranet Virtio 1.x Network" rev 0x01
> vio0 at virtio0: 2 queues, address 56:6f:8a:af:0f:ff, mtu 1500
> virtio0: msix
> ppb1 at pci0 dev 2 function 1 "Red Hat PCIE" rev 0x00: apic 0 int 22
> pci2 at ppb1 bus 2
> virtio1 at pci2 dev 0 function 0 "Qumranet Virtio 1.x Console" rev 0x01
> virtio1: no matching child driver; not configured
> ppb2 at pci0 dev 2 function 2 "Red Hat PCIE" rev 0x00: apic 0 int 22
> pci3 at ppb2 bus 3
> xhci0 at pci3 dev 0 function 0 "Red Hat xHCI" rev 0x01: msix, xHCI 1.0
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "Red Hat xHCI root hub" rev
> 3.00/1.00 addr 1
> ppb3 at pci0 dev 2 function 3 "Red Hat PCIE" rev 0x00: apic 0 int 22
> pci4 at ppb3 bus 4
> virtio2 at pci4 dev 0 function 0 "Qumranet Virtio 1.x SCSI" rev 0x01
> vioscsi0 at virtio2: qsize 256
> virtio2: msix per-VQ
> scsibus1 at vioscsi0: 255 targets
> sd0 at scsibus1 targ 0 lun 0: <QEMU, QEMU HARDDISK, 2.5+>
> serial.QEMU_QEMU_HARDDISK_3ee5c3c5-797c-4650-93ef-f81e23728cdb
> sd0: 61440MB, 512 bytes/sector, 125829120 sectors, thin
> ppb4 at pci0 dev 2 function 4 "Red Hat PCIE" rev 0x00: apic 0 int 22
> pci5 at ppb4 bus 5
> virtio3 at pci5 dev 0 function 0 "Qumranet Virtio 1.x Memory Balloon" rev 0x01
> viomb0 at virtio3
> virtio3: apic 0 int 22
> ppb5 at pci0 dev 2 function 5 "Red Hat PCIE" rev 0x00: apic 0 int 22
> pci6 at ppb5 bus 6
> virtio4 at pci6 dev 0 function 0 "Qumranet Virtio 1.x RNG" rev 0x01
> viornd0 at virtio4
> virtio4: apic 0 int 22
> ppb6 at pci0 dev 2 function 6 "Red Hat PCIE" rev 0x00: apic 0 int 22
> pci7 at ppb6 bus 7
> ppb7 at pci0 dev 2 function 7 "Red Hat PCIE" rev 0x00: apic 0 int 22
> pci8 at ppb7 bus 8
> ppb8 at pci0 dev 3 function 0 "Red Hat PCIE" rev 0x00: apic 0 int 23
> pci9 at ppb8 bus 9
> ppb9 at pci0 dev 3 function 1 "Red Hat PCIE" rev 0x00: apic 0 int 23
> pci10 at ppb9 bus 10
> ppb10 at pci0 dev 3 function 2 "Red Hat PCIE" rev 0x00: apic 0 int 23
> pci11 at ppb10 bus 11
> ppb11 at pci0 dev 3 function 3 "Red Hat PCIE" rev 0x00: apic 0 int 23
> pci12 at ppb11 bus 12
> ppb12 at pci0 dev 3 function 4 "Red Hat PCIE" rev 0x00: apic 0 int 23
> pci13 at ppb12 bus 13
> ppb13 at pci0 dev 3 function 5 "Red Hat PCIE" rev 0x00: apic 0 int 23
> pci14 at ppb13 bus 14
> ppb14 at pci0 dev 3 function 6 "Red Hat PCIE" rev 0x00: apic 0 int 23
> pci15 at ppb14 bus 15
> ppb15 at pci0 dev 3 function 7 "Red Hat PCIE" rev 0x00: apic 0 int 23
> pci16 at ppb15 bus 16
> azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: msi
> azalia0: No codecs found
> pcib0 at pci0 dev 31 function 0 "Intel 82801IB LPC" rev 0x02
> ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x02: msi, AHCI 1.0
> ahci0: port 2: 1.5Gb/s
> scsibus2 at ahci0: 32 targets
> cd0 at scsibus2 targ 2 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> removable
> ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x02: apic 0 int 16
> iic0 at ichiic0
> isa0 at pcib0
> isadma0 at isa0
> pckbc0 at isa0 port 0x60/5 irq 1 irq 12
> pckbd0 at pckbc0 (kbd slot)
> wskbd0 at pckbd0: console keyboard, using wsdisplay0
> pms0 at pckbc0 (aux slot)
> wsmouse0 at pms0 mux 0
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> vmm0 at mainbus0: VMX/EPT
> enable mbufs in high memory
> uhidev0 at uhub0 port 9 configuration 1 interface 0 "QEMU QEMU USB Tablet"
> rev 2.00/0.00 addr 2
> uhidev0: iclass 3/0
> ums0 at uhidev0: 3 buttons, Z dir
> wsmouse1 at ums0 mux 0
> vscsi0 at root
> scsibus3 at vscsi0: 256 targets
> softraid0 at root
> scsibus4 at softraid0: 256 targets
> root on sd0a (b5a9da77de02767c.a) swap on sd0b dump on sd0b
>
> usbdevs:
> Controller /dev/usb0:
> addr 01: 1b36:0000 Red Hat, xHCI root hub
> super speed, self powered, config 1, rev 1.00
> driver: uhub0
> addr 02: 0627:0001 QEMU, QEMU USB Tablet
> high speed, power 100 mA, config 1, rev 0.00, iSerial
> 28754-0000:00:02.2:00.0-1
> driver: uhidev0
>