]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: net: local_termination: test link-local protocols
authorDaniel Golle <daniel@makrotopia.org>
Tue, 10 Mar 2026 18:10:32 +0000 (18:10 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Mar 2026 01:58:05 +0000 (18:58 -0700)
commit7e27d6202e90bc1c2ff16cd3118cb5456214ee42
treebbe62e406a0a0dfd1d00144c8082ba04700548b5
parent410593fec752f15c97062d2ded5e3a9dd654dcb2
selftests: net: local_termination: test link-local protocols

Add tests to local_termination.sh to verify that link-local frames
arrive. On some switches the DSA driver uses bridges to connect the
user ports to their CPU ports. More "intelligent" switches typically
don't forward link-local frames, but may trap them to an internal
microcontroller. The driver may have to change trapping rules, so
link-local frames end up on the DSA CPU ports instead of being
silently dropped or trapped to the internal microcontroller of the
switch.

Add two tests which help to validate this has been done correctly:
 - Link-local STP BPDU should arrive at the Linux netdev when the
   bridge has STP disabled (BR_NO_STP), in which case the bridge
   forwards them rather than consuming them in the control plane
 - Link-local LLDP should arrive at standalone ports (and the test
   should be skipped on bridged ports similar to how it is done
   for the IEEE1588v2/PTP tests)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/1a67081b2ede1e6d2d32f7dd54ae9688f3566152.1773166131.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/local_termination.sh