Page MenuHomeFreeBSD

bridge: Fix spurious warnings about capabilities
ClosedPublic

Authored by freqlabs on Jan 22 2019, 7:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 10:31 AM
Unknown Object (File)
Wed, Nov 13, 8:02 AM
Unknown Object (File)
Oct 5 2024, 2:05 PM
Unknown Object (File)
Sep 27 2024, 7:21 AM
Unknown Object (File)
Sep 17 2024, 7:55 AM
Unknown Object (File)
Aug 21 2024, 12:16 AM
Unknown Object (File)
Aug 20 2024, 11:34 PM
Unknown Object (File)
Aug 19 2024, 1:00 PM
Subscribers

Details

Summary

Mask off the bits we don't care about when checking that capabilities of the member interfaces have been disabled as intended.

Sponsored by: iXsystems, Inc.

Test Plan

I tested this change on 11.2 (with the patch from rS317586 applied), where RXCSUM and TXCSUM are linked together in e1000.
In 12+ the iflib-based e1000 drivers do not have these capabilities linked. However, some other drivers (for which I do not have hardware to test on 12+) do still toggle these capabilities together, so if someone wanted to compare before/after on 12+ with something like al_eth, qlxgbe, qlnx, qlxge, qlxgb, or stge (or whatever I missed by grepping for ^= IFCAP_HWCSUM), they could.

  1. verify RX and TX checksums are enabled on em0
  2. create a bridge with em0 as a member
  3. verify RX and TX checksums are enabled on em0
  4. add a tap member to the bridge
  5. verify RX and TX checksums are disabled on em0
  6. remove the tap member from the bridge
  7. observe the warning message before the patch, observe no warning message after the patch
  8. verify RX and TX checksums are enabled on em0

bridge is enabling TXCSUM to restore the greatest common denominator of capabilities when the tap is removed. In doing so, RXCSUM is also enabled. bridge erroneously checks that RXCSUM stays disabled. Masking the irrelevant bits out ensures only the relevant bits are checked.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable