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
F137301352: D51291.id159595.diff
Sat, Nov 22, 5:25 AM
F137278393: D51291.id159595.diff
Sat, Nov 22, 12:21 AM
Unknown Object (File)
Thu, Nov 20, 4:12 PM
Unknown Object (File)
Tue, Nov 18, 3:17 AM
Unknown Object (File)
Fri, Nov 14, 2:47 PM
Unknown Object (File)
Wed, Nov 12, 10:24 PM
Unknown Object (File)
Mon, Nov 10, 8:21 PM
Unknown Object (File)
Mon, Nov 10, 7:10 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.