Page MenuHomeFreeBSD

tuntap: add IFCAP_TXCSUM and IFCAP_TXCSUM_IPV6
Needs ReviewPublic

Authored by timo.voelker_fh-muenster.de on Jul 13 2025, 3:47 PM.
Tags
None
Referenced Files
F132464604: D51291.diff
Fri, Oct 17, 3:57 AM
Unknown Object (File)
Thu, Oct 16, 8:19 AM
Unknown Object (File)
Fri, Oct 10, 11:37 AM
Unknown Object (File)
Fri, Oct 10, 11:37 AM
Unknown Object (File)
Fri, Oct 10, 4:52 AM
Unknown Object (File)
Fri, Oct 10, 4:52 AM
Unknown Object (File)
Fri, Oct 10, 4:52 AM
Unknown Object (File)
Thu, Oct 9, 11:31 PM

Details

Reviewers
kevans
tuexen
Summary

Add IFCAP_TXCSUM and IFCAP_TXCSUM_IPV6 to if_capabilities of tun/tap interfaces. If enabled, csum flags are translated into virtio-net header flags. If the virtio-net header is not available, an error gets returned when reading from the character device.
This will be used to add tx checksum offload functionality for a bhyve guest.

Test Plan

Run

ifconfig tap0 create
ifconfig tap0 txcsum txcsum6

and verify using

ifconfig tap0

that the offloading flags are actually set.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

No functional changes. Just modified comments and code style.

@timo.voelker_fh-muenster.de Is it intended that this patch now contains the changes from D51289?

@timo.voelker_fh-muenster.de Is it intended that this patch now contains the changes from D51289?

No it wasn't. Thanks for noting.