mlxsw: spectrum_switchdev: Prepare function for VLAN-aware bridges
authorIdo Schimmel <idosch@mellanox.com>
Wed, 28 Nov 2018 20:07:02 +0000 (20:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Dec 2018 01:06:29 +0000 (17:06 -0800)
commit48fde4660654d5bbaa09c2a38fa9ca7c72f1a95e
tree96723d02d78c661168a090c791417b8a052c5c17
parentb03fa9e7e0cfe9ae5f3d294bbb60b5acd02dbfde
mlxsw: spectrum_switchdev: Prepare function for VLAN-aware bridges

The vxlan_join() function resolves the FID on which the VNI should be
set and then sets the VNI. Currently, the FID is simply resolved
according to the ifindex of the bridge device to which the VxLAN device
is enslaved. This works because only VLAN-unaware bridges are supported.

With VLAN-aware bridges the FID would need to be resolved based on the
VLAN to which the VNI is mapped to.

Add the VLAN ID to the argument list of the function.

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