Skip to content

Commit 37cc10d

Browse files
shayshyikuba-moo
authored andcommitted
net/mlx5: Lag, restore buckets number to default after hash LAG deactivation
The cited patch introduces the concept of buckets in LAG in hash mode. However, the patch doesn't clear the number of buckets in the LAG deactivation. This results in using the wrong number of buckets in case user create a hash mode LAG and afterwards create a non-hash mode LAG. Hence, restore buckets number to default after hash mode LAG deactivation. Fixes: 352899f ("net/mlx5: Lag, use buckets in hash mode") Signed-off-by: Shay Drory <[email protected]> Reviewed-by: Maor Gottlieb <[email protected]> Signed-off-by: Tariq Toukan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 68aba00 commit 37cc10d

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/lag

1 file changed

+3
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,10 @@ int mlx5_deactivate_lag(struct mlx5_lag *ldev)
703703
return err;
704704
}
705705

706-
if (test_bit(MLX5_LAG_MODE_FLAG_HASH_BASED, &flags))
706+
if (test_bit(MLX5_LAG_MODE_FLAG_HASH_BASED, &flags)) {
707707
mlx5_lag_port_sel_destroy(ldev);
708+
ldev->buckets = 1;
709+
}
708710
if (mlx5_lag_has_drop_rule(ldev))
709711
mlx5_lag_drop_rule_cleanup(ldev);
710712

0 commit comments

Comments
 (0)