Skip to content

Commit

Permalink
mlxsw: spectrum: Use correct netdev when notifying bridge
Browse files Browse the repository at this point in the history
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: aac78a4 ("mlxsw: spectrum: Adjust FDB notifications for VLAN devices")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ido Schimmel authored and David S. Miller committed Jan 28, 2016
1 parent 004f85e commit e43aca2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,7 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
bool adding)
{
struct mlxsw_sp_port *mlxsw_sp_port;
struct net_device *dev;
char mac[ETH_ALEN];
u16 lag_vid = 0;
u16 lag_id;
Expand All @@ -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);
dev = mlxsw_sp_vport->dev;
vid = 0;
/* Override the physical port with the vPort. */
mlxsw_sp_port = mlxsw_sp_vport;
} else {
dev = mlxsw_sp_lag_get(mlxsw_sp, lag_id)->dev;
vid = fid;
}

Expand All @@ -1328,8 +1331,7 @@ static void mlxsw_sp_fdb_notify_mac_lag_process(struct mlxsw_sp *mlxsw_sp,
if (!do_notification)
return;
mlxsw_sp_fdb_call_notifiers(mlxsw_sp_port->learning_sync, adding, mac,
vid,
mlxsw_sp_lag_get(mlxsw_sp, lag_id)->dev);
vid, dev);
return;

just_remove:
Expand Down

0 comments on commit e43aca2

Please sign in to comment.