]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_nve_vxlan: Add support for Q-in-VNI for Spectrum-2 ASIC
authorAmit Cohen <amcohen@nvidia.com>
Tue, 8 Dec 2020 09:22:48 +0000 (11:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Dec 2020 23:45:56 +0000 (15:45 -0800)
commit876bc663ae3ee1092ebd413db515bfa066b06160
tree4675d97a8fe5bd37bbf4a5c3f43fe7822d0690dd
parent8630d6b6cd6c92c0a03fd6fdd2a44949355dc3e0
mlxsw: spectrum_nve_vxlan: Add support for Q-in-VNI for Spectrum-2 ASIC

On Spectrum-2, the default setting is not to push VLAN to the decapsulated
packet. This is controlled by SPVTR.ipvid_mode.
Set SPVTR.ipvid_mode to always push VLAN.
Without this setting, Spectrum-2 overtakes the VLAN tag of decapsulated
packet for bridging.

In addition, set SPVID register to use EtherType saved in
mlxsw_sp_nve_config when VLAN is pushed for the NVE tunnel.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c