Page MenuHomeFreeBSD

bridge: Fix spurious warnings about capabilities

Authored by on Jan 22 2019, 7:28 PM.



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline edited the test plan for this revision. (Show Details)Jan 22 2019, 7:38 PM
kp accepted this revision as: kp.Feb 2 2019, 10:10 AM


This revision is now accepted and ready to land.Feb 2 2019, 10:10 AM
mav accepted this revision.Feb 4 2019, 12:34 AM
This revision was automatically updated to reflect the committed changes.