[PATCH net-next mlxsw v2 0/6] Support bridge router interfaces with non-default VLAN
petrm at mellanox.com
Thu Jun 14 12:00:42 AEST 2018
When traffic is inserted on a router interface associated with an 802.1q
bridge, the VLAN that the traffic appears on is determined by PVID of
the bridge device itself. However currently mlxsw always configures such
traffic to be forwarded to VLAN 1, regardless of the bridge PVID.
Fix the problem by modifying the FID-handling code to assign such
traffic not to FID that corresponds to VLAN 1, but to a FID that
corresponds to the configured PVID. Bail out if there is no PVID. This
is implemented in patches #1 and #2.
>From that point on, also forbid any changes to bridge device PVID,
because such changes would not be reflected. This is implemented in
patches #3, #4 and #5.
Finally in patch #6, introduce tests that use bridge as a routed
interface, and test mlxsw in both the currently-supported scenario of
using PVID 1, and the newly-supported one of using a custom PVID.
Changes from v1 to v2:
- Change subject
- Don't call the bridge device VLANs "CPU port" VLANs.
- Changes in patches #5 and #6, see notes there.
Petr Machata (6):
mlxsw: spectrum_router: Propagate extack to .fid_get()
mlxsw: spectrum_router: Allocate FID according to PVID
mlxsw: spectrum_router: Publish mlxsw_sp_rif_find_by_dev()
mlxsw: spectrum_router: Add mlxsw_sp_rif_fid()
mlxsw: spectrum_switchdev: Ban PVID change if bridge has a RIF
selftests: forwarding: Test routed bridge interface
.../net/ethernet/mellanox/mlxsw/spectrum_router.c | 42 +++++--
.../net/ethernet/mellanox/mlxsw/spectrum_router.h | 3 +
.../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 47 +++++++-
.../selftests/net/forwarding/router_bridge.sh | 113 ++++++++++++++++++
.../selftests/net/forwarding/router_bridge_vlan.sh | 132 +++++++++++++++++++++
5 files changed, 323 insertions(+), 14 deletions(-)
create mode 100755 tools/testing/selftests/net/forwarding/router_bridge.sh
create mode 100755 tools/testing/selftests/net/forwarding/router_bridge_vlan.sh
More information about the Linux-mlxsw