Page MenuHomeFreeBSD

loopback: checksum offloading
ClosedPublic

Authored by timo.voelker_fh-muenster.de on Jun 10 2026, 7:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 17, 11:34 PM
Unknown Object (File)
Mon, Aug 17, 12:33 PM
Unknown Object (File)
Wed, Aug 12, 7:52 PM
Unknown Object (File)
Wed, Aug 12, 2:59 PM
Unknown Object (File)
Wed, Aug 12, 9:57 AM
Unknown Object (File)
Wed, Aug 12, 12:56 AM
Unknown Object (File)
Mon, Aug 10, 11:34 AM
Unknown Object (File)
Sat, Aug 8, 3:30 PM

Details

Summary

Currently the loopback interface does not work with SCTP/TCP/UDP if IFCAP_RXCSUM is disabled and IFCAP_TXCSUM is enabled. This patch fixes that and cleans up checksum offloading-related stuff.

  • Allow disabling IFCAP_RXCSUM_IPV6 or IFCAP_TXCSUM_IPV6.
  • Do not pretend the checksum is correct by setting the LO_CSUM_SET flags if IFCAP_RXCSUM_IPV6 or IFCAP_RXCSUM is enabled. Instead, remove the LO_CSUM_SET flags (in case they have been set somehow) if IFCAP_RXCSUM_IPV6 or IFCAP_RXCSUM is disabled.
  • Do not unset the transmit checksum offload flags LO_CSUM_FEATURES or LO_CSUM_FEATURES6 since they have a meaning for the receive path since D51475 and D54455.
Test Plan

Initially, ssh 127.0.0.1 works. After disabling IFCAP_RXCSUM,

ifconfig lo0 -rxcsum

ssh 127.0.0.1 does not work. It works after this patch has been applied.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jun 11 2026, 4:04 PM
This revision was automatically updated to reflect the committed changes.