]> git.dujemihanovic.xyz Git - linux.git/commit
selftests: net: bridge_vlan_aware: test that other TPIDs are seen as untagged
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 15 Aug 2024 00:07:01 +0000 (03:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Aug 2024 08:59:32 +0000 (09:59 +0100)
commite29b82ef27616777e21c07dc263a8769cbdaa358
treee1a73f3cc790ffec4d4c6ff5c188562728edaf30
parent237979504264912a9797dabc0db35126e705fe0d
selftests: net: bridge_vlan_aware: test that other TPIDs are seen as untagged

The bridge VLAN implementation w.r.t. VLAN protocol is described in
merge commit 1a0b20b25732 ("Merge branch 'bridge-next'"). We are only
sensitive to those VLAN tags whose TPID is equal to the bridge's
vlan_protocol. Thus, an 802.1ad VLAN should be treated as 802.1Q-untagged.

Add 3 tests which validate that:
- 802.1ad-tagged traffic is learned into the PVID of an 802.1Q-aware
  bridge
- Double-tagged traffic is forwarded when just the PVID of the port is
  present in the VLAN group of the ports
- Double-tagged traffic is not forwarded when the PVID of the port is
  absent from the VLAN group of the ports

The test passes with both veth and ocelot.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/forwarding/bridge_vlan_aware.sh