Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2025 15:56:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 276760] vtnet driver incorrectly calculates checksums
Message-ID:  <bug-276760-7501-fehNrGDBR5@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-276760-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-276760-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276760

--- Comment #36 from vova@fbsd.ru ---
(In reply to Michael Tuexen from comment #35)

> Is the sysctl output from 14.3 or stable/14? 
stable/14


new measurements on original VM (cx11):
(reboot for each re-configuration)

summary:
FreeBSD  Offloading     Download (CV%)  delta % Upload (CV%)    delta % 
14.3p4          yes      879 (24.21%)            456 (24.21%)
14.3p4          no       902 (13.36%)   +2.59%   472 (13.36%)    +3.60%
14-087fc6ae0a8c yes      877 (18.19%)   -2.73%   476 (18.19%)    +0.95%
14-087fc6ae0a8c no       877 (24.66%)   -0.02%   404 (24.66%)   -15.13%


In general, I would assess results as - these cheap VMs do not provide any
stable results to do such kind of measures, spikes are quite significant
(shared hosting?).
Also, I do not see much correlation on top of FreeBSD version or checksum
offloading.

Also, somehow, download is ~ twice faster than upload, no clue why ... 

Raw data (far-non-average results marked):

FreeBSD Offloading      Try     Download Upload         

14.3p4          yes     1        987     484            
14.3p4          yes     2        963     532            
14.3p4          yes     3        969     491            
14.3p4          yes     4        828     405            
14.3p4          yes     5        898     339            
14.3p4          yes     6        984     490            
14.3p4          yes     7        973     517            
14.3p4          yes     8        922     499            
14.3p4          yes     9        290     103            <<<<<
14.3p4          yes     10       974     695            
14.3p4          yes     avg      879     456            
                        CV%     22.00%  33.20%          

14.3p4          no      1        949     302            
14.3p4          no      2        571     436            
14.3p4          no      3        895     451            
14.3p4          no      4        941     487            
14.3p4          no      5        990     490            
14.3p4          no      6        900     561            
14.3p4          no      7        900     492            
14.3p4          no      8        978     496            
14.3p4          no      9        938     494            
14.3p4          no      10       954     509            
14.3p4          no      avg      902     472            
                CV%     12.40%  13.40%          

14-087fc6ae0a8c yes     1        936     538            
14-087fc6ae0a8c yes     2        974     484            
14-087fc6ae0a8c yes     3        752     441            
14-087fc6ae0a8c yes     4        827     426            
14-087fc6ae0a8c yes     5        965     493            
14-087fc6ae0a8c yes     6        988     495            
14-087fc6ae0a8c yes     7        981     524            
14-087fc6ae0a8c yes     8        872     557            
14-087fc6ae0a8c yes     9        991     500            
14-087fc6ae0a8c yes     10       484     306            
14-087fc6ae0a8c yes     avg      877     476            
                CV%     18.19%  15.13%          

14-087fc6ae0a8c no      1        942     485            
14-087fc6ae0a8c no      2        956     489            
14-087fc6ae0a8c no      3        970     517            
14-087fc6ae0a8c no      4        868     493            
14-087fc6ae0a8c no      5        965     467            
14-087fc6ae0a8c no      6        988     528            
14-087fc6ae0a8c no      7        277     98             <<<<
14-087fc6ae0a8c no      8        963     384            
14-087fc6ae0a8c no      9        848     490            
14-087fc6ae0a8c no      10       992     94             <<<<
14-087fc6ae0a8c no      avg      877     404            
                CV%     24.66%  41.31%          

Command used to get statistics:
for i in `seq 1 10`; do
   speedtest-go --server 60469 | awk '($2 == "Download:") { printf("%s\t", $3);
} ($2 == "Upload:") { printf("%s\n", $3); }'
done

more info from sysctls on 

stable/14-087fc6ae0a8c:
ifconfig_vtnet0="DHCP -tso4 -tso6 -lro -rxcsum"

[root@mb0 /usr/home/vova]# sysctl dev.vtnet.0
dev.vtnet.0.txq0.rescheduled: 0
dev.vtnet.0.txq0.tso: 0
dev.vtnet.0.txq0.csum: 10705229
dev.vtnet.0.txq0.omcasts: 7
dev.vtnet.0.txq0.obytes: 7014701105
dev.vtnet.0.txq0.opackets: 10705766
dev.vtnet.0.rxq0.rescheduled: 0
dev.vtnet.0.rxq0.host_lro: 0
dev.vtnet.0.rxq0.csum_failed: 0
dev.vtnet.0.rxq0.csum: 2265936
dev.vtnet.0.rxq0.ierrors: 0
dev.vtnet.0.rxq0.iqdrops: 0
dev.vtnet.0.rxq0.ibytes: 14080902273
dev.vtnet.0.rxq0.ipackets: 11187201
dev.vtnet.0.tx_task_rescheduled: 0
dev.vtnet.0.tx_tso_offloaded: 0
dev.vtnet.0.tx_csum_offloaded: 10705229
dev.vtnet.0.tx_defrag_failed: 0
dev.vtnet.0.tx_defragged: 0
dev.vtnet.0.tx_tso_without_csum: 0
dev.vtnet.0.tx_tso_not_tcp: 0
dev.vtnet.0.tx_csum_proto_mismatch: 0
dev.vtnet.0.tx_csum_unknown_ethtype: 0
dev.vtnet.0.rx_task_rescheduled: 0
dev.vtnet.0.rx_csum_offloaded: 2265936
dev.vtnet.0.rx_csum_failed: 0
dev.vtnet.0.rx_csum_inaccessible_ipproto: 0
dev.vtnet.0.rx_csum_bad_offset: 0
dev.vtnet.0.rx_csum_bad_ipproto: 0
dev.vtnet.0.rx_csum_bad_ethtype: 0
dev.vtnet.0.rx_mergeable_failed: 0
dev.vtnet.0.rx_enq_replacement_failed: 0
dev.vtnet.0.rx_frame_too_large: 0
dev.vtnet.0.mbuf_alloc_failed: 0
dev.vtnet.0.act_vq_pairs: 1
dev.vtnet.0.req_vq_pairs: 1
dev.vtnet.0.max_vq_pairs: 1
dev.vtnet.0.%iommu:
dev.vtnet.0.%parent: virtio_pci0
dev.vtnet.0.%pnpinfo: vendor=0x00001af4 device=0x1000 subvendor=0x1af4
device_type=0x00000001
dev.vtnet.0.%location:
dev.vtnet.0.%driver: vtnet
dev.vtnet.0.%desc: VirtIO Networking Adapter
# sysctl hw.vtnet
hw.vtnet.lro_mbufq_depth: 0
hw.vtnet.lro_entry_count: 128
hw.vtnet.rx_process_limit: 1024
hw.vtnet.tso_maxlen: 65535
hw.vtnet.mq_max_pairs: 32
hw.vtnet.mq_disable: 0
hw.vtnet.lro_disable: 1
hw.vtnet.tso_disable: 0
hw.vtnet.fixup_needs_csum: 0

stable/14-087fc6ae0a8c:
ifconfig_vtnet0="DHCP"

# ifconfig vtnet0
vtnet0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0
mtu 1500
       
options=ec07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6,HWSTATS>

# sysctl dev.vtnet.0
dev.vtnet.0.txq0.rescheduled: 0
dev.vtnet.0.txq0.tso: 311575
dev.vtnet.0.txq0.csum: 11032984
dev.vtnet.0.txq0.omcasts: 7
dev.vtnet.0.txq0.obytes: 8466101606
dev.vtnet.0.txq0.opackets: 11033797
dev.vtnet.0.rxq0.rescheduled: 0
dev.vtnet.0.rxq0.host_lro: 0
dev.vtnet.0.rxq0.csum_failed: 0
dev.vtnet.0.rxq0.csum: 12244247
dev.vtnet.0.rxq0.ierrors: 0
dev.vtnet.0.rxq0.iqdrops: 0
dev.vtnet.0.rxq0.ibytes: 15515499836
dev.vtnet.0.rxq0.ipackets: 12244260
dev.vtnet.0.tx_task_rescheduled: 0
dev.vtnet.0.tx_tso_offloaded: 311575
dev.vtnet.0.tx_csum_offloaded: 11032984
dev.vtnet.0.tx_defrag_failed: 0
dev.vtnet.0.tx_defragged: 0
dev.vtnet.0.tx_tso_without_csum: 0
dev.vtnet.0.tx_tso_not_tcp: 0
dev.vtnet.0.tx_csum_proto_mismatch: 0
dev.vtnet.0.tx_csum_unknown_ethtype: 0
dev.vtnet.0.rx_task_rescheduled: 0
dev.vtnet.0.rx_csum_offloaded: 12244247
dev.vtnet.0.rx_csum_failed: 0
dev.vtnet.0.rx_csum_inaccessible_ipproto: 0
dev.vtnet.0.rx_csum_bad_offset: 0
dev.vtnet.0.rx_csum_bad_ipproto: 0
dev.vtnet.0.rx_csum_bad_ethtype: 0
dev.vtnet.0.rx_mergeable_failed: 0
dev.vtnet.0.rx_enq_replacement_failed: 0
dev.vtnet.0.rx_frame_too_large: 0
dev.vtnet.0.mbuf_alloc_failed: 0
dev.vtnet.0.act_vq_pairs: 1
dev.vtnet.0.req_vq_pairs: 1
dev.vtnet.0.max_vq_pairs: 1
dev.vtnet.0.%iommu:
dev.vtnet.0.%parent: virtio_pci0
dev.vtnet.0.%pnpinfo: vendor=0x00001af4 device=0x1000 subvendor=0x1af4
device_type=0x00000001
dev.vtnet.0.%location:
dev.vtnet.0.%driver: vtnet
dev.vtnet.0.%desc: VirtIO Networking Adapter
# sysctl hw.vtnet
hw.vtnet.lro_mbufq_depth: 0
hw.vtnet.lro_entry_count: 128
hw.vtnet.rx_process_limit: 1024
hw.vtnet.tso_maxlen: 65535
hw.vtnet.mq_max_pairs: 32
hw.vtnet.mq_disable: 0
hw.vtnet.lro_disable: 1
hw.vtnet.tso_disable: 0
hw.vtnet.fixup_needs_csum: 0
hw.vtnet.csum_disable: 0

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276760-7501-fehNrGDBR5>