Page MenuHomeFreeBSD

tuntap: add IFCAP_TXCSUM and IFCAP_TXCSUM_IPV6
Needs ReviewPublic

Authored by timo.voelker_fh-muenster.de on Sun, Jul 13, 3:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 22, 9:48 AM
Unknown Object (File)
Tue, Jul 22, 8:08 AM
Unknown Object (File)
Tue, Jul 22, 7:38 AM
Unknown Object (File)
Fri, Jul 18, 6:13 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