Skip to content

Commit da0c524

Browse files
w1ldptrSaeed Mahameed
authored andcommitted
net/mlx5: Bridge, fix ageing of peer FDB entries
SWITCHDEV_FDB_ADD_TO_BRIDGE event handler that updates FDB entry 'lastuse' field is only executed for eswitch that owns the entry. However, if peer entry processed packets at least once it will have hardware counter 'used' value greater than entry 'lastuse' from that point on, which will cause FDB entry not being aged out. Process the event on all eswitch instances. Fixes: ff9b752 ("net/mlx5: Bridge, support LAG") Signed-off-by: Vlad Buslov <[email protected]> Reviewed-by: Maor Dickman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 288d85e commit da0c524

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,6 @@ static int mlx5_esw_bridge_switchdev_event(struct notifier_block *nb,
438438

439439
switch (event) {
440440
case SWITCHDEV_FDB_ADD_TO_BRIDGE:
441-
/* only handle the event on native eswtich of representor */
442-
if (!mlx5_esw_bridge_is_local(dev, rep, esw))
443-
break;
444-
445441
fdb_info = container_of(info,
446442
struct switchdev_notifier_fdb_info,
447443
info);

drivers/net/ethernet/mellanox/mlx5/core/esw/bridge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ void mlx5_esw_bridge_fdb_update_used(struct net_device *dev, u16 vport_num, u16
17151715
struct mlx5_esw_bridge *bridge;
17161716

17171717
port = mlx5_esw_bridge_port_lookup(vport_num, esw_owner_vhca_id, br_offloads);
1718-
if (!port || port->flags & MLX5_ESW_BRIDGE_PORT_FLAG_PEER)
1718+
if (!port)
17191719
return;
17201720

17211721
bridge = port->bridge;

0 commit comments

Comments
 (0)