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)
Feb 15 2024, 2:55 PM
Unknown Object (File)
Dec 23 2023, 12:44 AM
Unknown Object (File)
Oct 24 2023, 2:18 AM
Unknown Object (File)
Sep 10 2023, 8:32 PM
Unknown Object (File)
Sep 7 2023, 10:21 AM
Unknown Object (File)
Sep 7 2023, 10:19 AM
Unknown Object (File)
Sep 7 2023, 10:18 AM
Unknown Object (File)
Sep 3 2023, 7:12 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