Commit e43aca22 authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

mlxsw: spectrum: Use correct netdev when notifying bridge

LAG FDB entries pointing to VLAN devices should be reported to the
bridge with the matching VLAN device and not the underlying LAG device.

Fixes: aac78a44 ("mlxsw: spectrum: Adjust FDB notifications for VLAN devices")
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 004f85ea
...@@ -1281,6 +1281,7 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp, ...@@ -1281,6 +1281,7 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
bool adding) bool adding)
{ {
struct mlxsw_sp_port *mlxsw_sp_port; struct mlxsw_sp_port *mlxsw_sp_port;
struct net_device *dev;
char mac[ETH_ALEN]; char mac[ETH_ALEN];
u16 lag_vid = 0; u16 lag_vid = 0;
u16 lag_id; u16 lag_id;
...@@ -1307,10 +1308,12 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp, ...@@ -1307,10 +1308,12 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
} }
lag_vid = mlxsw_sp_vport_vid_get(mlxsw_sp_vport); lag_vid = mlxsw_sp_vport_vid_get(mlxsw_sp_vport);
dev = mlxsw_sp_vport->dev;
vid = 0; vid = 0;
/* Override the physical port with the vPort. */ /* Override the physical port with the vPort. */
mlxsw_sp_port = mlxsw_sp_vport; mlxsw_sp_port = mlxsw_sp_vport;
} else { } else {
dev = mlxsw_sp_lag_get(mlxsw_sp, lag_id)->dev;
vid = fid; vid = fid;
} }
...@@ -1328,8 +1331,7 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp, ...@@ -1328,8 +1331,7 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
if (!do_notification) if (!do_notification)
return; return;
mlxsw_sp_fdb_call_notifiers(mlxsw_sp_port->learning_sync, adding, mac, mlxsw_sp_fdb_call_notifiers(mlxsw_sp_port->learning_sync, adding, mac,
vid, vid, dev);
mlxsw_sp_lag_get(mlxsw_sp, lag_id)->dev);
return; return;
just_remove: just_remove:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment