summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2018-11-28 20:07:02 +0000
committerDavid S. Miller <davem@davemloft.net>2018-11-30 17:06:29 -0800
commit48fde4660654d5bbaa09c2a38fa9ca7c72f1a95e (patch)
tree96723d02d78c661168a090c791417b8a052c5c17 /drivers/net/ethernet/mellanox/mlxsw/spectrum.c
parentb03fa9e7e0cfe9ae5f3d294bbb60b5acd02dbfde (diff)
downloadlinux-stable-48fde4660654d5bbaa09c2a38fa9ca7c72f1a95e.tar.gz
linux-stable-48fde4660654d5bbaa09c2a38fa9ca7c72f1a95e.tar.bz2
linux-stable-48fde4660654d5bbaa09c2a38fa9ca7c72f1a95e.zip
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 9cc063af6f7b..d215e3270376 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -5172,7 +5172,7 @@ static int mlxsw_sp_netdevice_vxlan_event(struct mlxsw_sp *mlxsw_sp,
if (!netif_running(dev))
return 0;
return mlxsw_sp_bridge_vxlan_join(mlxsw_sp, upper_dev,
- dev, extack);
+ dev, 0, extack);
} else {
mlxsw_sp_bridge_vxlan_leave(mlxsw_sp, dev);
}
@@ -5185,7 +5185,7 @@ static int mlxsw_sp_netdevice_vxlan_event(struct mlxsw_sp *mlxsw_sp,
return 0;
if (!mlxsw_sp_lower_get(upper_dev))
return 0;
- return mlxsw_sp_bridge_vxlan_join(mlxsw_sp, upper_dev, dev,
+ return mlxsw_sp_bridge_vxlan_join(mlxsw_sp, upper_dev, dev, 0,
extack);
case NETDEV_DOWN:
upper_dev = netdev_master_upper_dev_get(dev);