[PATCH net-next mlxsw v2 0/4] mlxsw: Support VLAN devices in mirroring offloads
petrm at mellanox.com
Wed May 9 02:02:19 AEST 2018
When offloading "tc action mirred mirror", there are several scenarios
where VLAN devices can show up, that mlxsw can offload on Spectrum
I) A direct mirror to a VLAN device on top of a front-panel port device
(commonly referred to as "RSPAN")
II) VLAN device in egress path of a packet when resolving a mirror to
gretap or ip6gretap netdevice.
Specifically in the latter case, the following are the cases that can be
IIa) VLAN device directly above a physical device.
IIb) A VLAN-unaware bridge where the egress device is as in IIa.
IIc) VLAN device on top of a VLAN-aware bridge where the egress device
is a physical device.
This patch set implements all the above cases.
First, in patch #1, br_vlan_get_info() is extended to allow bridge
Case I is then implemented in patches #2 and #3, case II in patch #4.
Note that handling of VLAN protocol is not included. In case I, mirrored
packets may end up being double-tagged, and it might be reasonable for
the outer tag to be an 802.1ad. However, the protocol type configuration
would have to be put on the same VLAN netdevice that represents normal
VLAN traffic, and mlxsw currently ignores this setting in that case. Thus
this support was left out and the encapsulation always uses 802.1q
Changes from v1 to v2:
- Add patch 1.
- In patch 3, do not consider offloading of mirroring to VLAN devices
that aren't on top of a mlxsw physical device.
- In patch 4, check that the VLAN ID that a VLAN device imposes to its
lower 802.1q bridge, is actually allowed to ingress that bridge.
- Also in patch 4, rename variable pvid to just vid, because it's not
used for tracking of only PVID anymore.
Petr Machata (4):
net: bridge: Allow bridge master in br_vlan_get_info()
mlxsw: reg: Add MLXSW_REG_MPAT_SPAN_TYPE_REMOTE_ETH
mlxsw: spectrum_span: Support mirror-to-VLAN
mlxsw: spectrum_span: Support VLAN under mirror-to-gretap
drivers/net/ethernet/mellanox/mlxsw/reg.h | 6 ++
.../net/ethernet/mellanox/mlxsw/spectrum_span.c | 91 ++++++++++++++++++++--
net/bridge/br_vlan.c | 2 +
3 files changed, 91 insertions(+), 8 deletions(-)
More information about the Linux-mlxsw