]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_switchdev: Unify VxLAN leave function
authorIdo Schimmel <idosch@mellanox.com>
Wed, 28 Nov 2018 20:07:01 +0000 (20:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Dec 2018 01:06:29 +0000 (17:06 -0800)
commit85fc0472f01df05cfbba883f0fc3681665f687b3
treef9523a4c0a933ca0218a5e854a98ecf314b27d7f
parenta23ce4eefc5114da936d1c0cfa44ecbc5bf86dee
mlxsw: spectrum_switchdev: Unify VxLAN leave function

The function mlxsw_sp_bridge_vxlan_leave() is currently split between
VLAN-aware and VLAN-unaware bridges, but actually both types can use the
same function.

The function needs to resolve the FID that corresponds to the VxLAN
device and disable NVE encapsulation on it. Instead of looking up the
FID differently for VLAN-aware and VLAN-unaware bridges, we can always
use the VxLAN's device VNI.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c