Page MenuHomeFreeBSD

bge: disable TXCSUM if UDP transmit checksum offloading is disabled
AcceptedPublic

Authored by tuexen on Sun, Jan 4, 9:08 AM.
Tags
None
Referenced Files
F141892877: D54486.diff
Mon, Jan 12, 2:43 AM
Unknown Object (File)
Sat, Jan 10, 5:15 AM
Unknown Object (File)
Sat, Jan 10, 4:39 AM
Unknown Object (File)
Fri, Jan 9, 11:34 PM
Unknown Object (File)
Fri, Jan 9, 7:56 PM
Unknown Object (File)
Thu, Jan 8, 3:56 AM
Unknown Object (File)
Wed, Jan 7, 4:23 PM
Unknown Object (File)
Sun, Jan 4, 11:08 PM
Subscribers

Details

Summary

The bge interface is special with respect to transmit checksum offloading. In the default settings, an bge interface announces TXCSUM capabilities, but only supports TCP/IPv4 and not UDP/IPv4 due to limitations of some of the NICs. This results in problems when the bge interface becomes a member of a bridge. Since currently only the TXCSUM capabilities are synced when a member is added to a bridge and not the protocol specific capabilities, this can result in a situation where UDP packets are sent out using a bge interface without having a correct checksum.
To mitigate this problem, initially don't announce TXCSUM capabilities, when UDP transmit checksum is disabled. It is still possible to enable TXCSUM capabilities via ifconfig.
This fixes PR 291420.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tuexen requested review of this revision.Sun, Jan 4, 9:08 AM

The question is, what means TXCSUM?

I guess, it means the interface can some sort of checksum offloading. Then, bge does nothing wrong with enabling TXCSUM when it supports only TCP and not UDP checksum offloading.

epair uses the fact that a bridge disables TXCSUM on all current and future member interfaces if one member has it disabled. If TXCSUM is enabled on epair, it assumes that all members support TCP and UDP checksum offloading, which is incorrect with bge. Thus, disabling TXCSUM on bge helps epair.

I'm planning to add TXCSUM support for the bridge, which makes disabling TXCSUM on the members and the epair's assumption obsolete and allows to enable TXCSUM on bge again.

This revision is now accepted and ready to land.Thu, Jan 8, 3:18 PM