User Details
- User Since
- Jul 13 2025, 2:07 PM (43 w, 6 d)
Sun, Apr 26
Addresses @bcr's comment.
To check the impact of IPv4 header checksum, I ran tests.
Offloading of IP header and TCP/UDP checksum need to work independently. This solves a bug.
Sat, Apr 25
Addresses @kp's comment.
Leave the lines that initialize ip_sum with 0, which some NICs require.
Change option syntax from -Bw to -W, add -R, and revise the code.
Fri, Apr 24
Thu, Apr 23
Addresses @gallatin's comments.
Wed, Apr 22
Addresses @gallatin's comment.
Tue, Apr 21
Sun, Apr 19
Mar 22 2026
Mar 21 2026
Mar 18 2026
Mar 17 2026
Why changing hw.virtio.pci.transitional to 1 by default:
Mar 2 2026
Mar 1 2026
Feb 28 2026
Feb 26 2026
Feb 22 2026
Looks good to me. It improves readability, in my opinion. Also, it eliminates unnecessary m_freem calls with a null pointer.
I agree on @pouria's comment.
Feb 19 2026
Solves this bug:
Feb 10 2026
Feb 9 2026
Feb 3 2026
Allow enabling/disabling the new capabilities: IFCAP_TXCSUM, IFCAP_TXCSUM_IPV6, and IFCAP_VLAN_HWCSUM.
Use CSUM_BITS string defined in sys/mbuf.h for output.
Feb 2 2026
Feb 1 2026
Jan 31 2026
Addressed @tuxen's style comments.
Without this patch, transmit checksum offloading for TCP/IPv6 and UDP/IPv6 is never used and transmit checksum offloading for IPv4, TCP/IPv4 and UDP/IPv4 is always used, even if disabled via ifconfig ue? -txcsum.
Jan 29 2026
I see the code of this driver the first time, but incrementing IFCOUNTER_OERRORS everywhere where tx_dropped is incremented makes sense. The positions of the lines where the other IFCOUNTER_* counters are incremented seems correct to me as well.
Jan 22 2026
Based on Dmitry's explanation
Seems to improve the code. Less lines and it looks less complex. This changes the functionality only if IFCAP_RXCSUM and IFCAP_RXCSUM_IPV6 or IFCAP_TXCSUM and IFCAP_TXCSUM_IPV6 get out of sync but, in my understanding of the code, this cannot happen.
Jan 20 2026
Looks good to me. I see no functional change but less lines of code and a more consistent way to change capenable and hwassist.
Jan 17 2026
Looks good to me.
Looks good. It makes sense to add TXCSUM_IPV6 since the interface supports it.
Jan 12 2026
Jan 10 2026
To address @tuexen's and @p.mousavizadeh_protonmail.com's comments, I restrict the code changes in this review to the changes required to process incoming packets with IP checksum offloading and leave code improvements for another review.
Jan 8 2026
The question is, what means TXCSUM?
Jan 2 2026
I agree @markj. It is not easy to understand the code. However, before this patch, without any other options, optlen is 0 and, thus, the jumbo option will never be added.
The different checksum offloading features should work independently.
Dec 19 2025
Dec 18 2025
Use the same semantic for cklen as in the UDP case.
Dec 17 2025
Nov 10 2025
Enabling TSO without TXCSUM is not good and should not be possible.
It's strange that the spec does not allow the driver to set the VIRTIO_NET_HDR_F_DATA_VALID flag. If the host receives a packet over a physical interface that validates the checksum, forwards that packet to a VM, and the VM sends it out again (e. g., because of routing), we now lose the information that the checksum has already been validated. However, the spec appears to be clear on that, and I guess FreeBSD should follow it.
Sep 30 2025
I did some tests to understand the consequence of disabling "hardware LRO".
Sep 28 2025
Right, I remember disabling txcsum, which didn't take affect, because hwassist wasn't updated. The patch seems to solve this issue. Thanks!
Sep 26 2025
Removing the ifdefs and allow receive checksum offloading for IPv6 is a good thing. Also, enabling/disabling receive checksum pairwise for IPv4 and IPv6 make sense for VirtIO.
Sep 25 2025
Sep 16 2025
Addressed comment from @tuexen
The suggested changes in the summary make sense to me and the changes in sys/conf/files seem to correctly correspond to them. Looks all good to me. However, I haven't touched this file and don't know enough to review it.
Sep 15 2025
Sep 10 2025
Sep 9 2025
Sep 8 2025
Sep 3 2025
I rebased my changes on the current state of FreeBSD head and addressed the comments from @tuexen.
Sep 2 2025
Addressing comments from a chat with @tuexen.
Sep 1 2025
For SIOCSIFCAP, check if requested capabilities are supported before enabling them.
Aug 28 2025
Addressing @tuexen's comment by adding a sentence in the man page that explains the sync of TXCSUM and TXCSUM6.
I tested this patch with D51686 applied by looking at the csum counters per queue and the general rx_csum_offloaded counter with sysctl dev.vtnet. With nc, I sent TCP packets from a Linux host to a FreeBSD VM that uses virtio with multiple queues.
Aug 27 2025
To focus on the guest-side in this review, I removed the tuntap related code and extended the vtnet code instead.
Addressing comments from @bcr
My only concern now is the need for the LOCK mechanism itself.
Addressing comments
