net/mlx5e: Lag, Fix fib_info pointer assignment
authorVlad Buslov <vladbu@nvidia.com>
Mon, 18 Apr 2022 14:32:54 +0000 (17:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:32:31 +0000 (12:32 +0200)
commit a6589155ec9847918e00e7279b8aa6d4c272bea7 upstream.

Referenced change incorrectly sets single path fib_info even when LAG is
not active. Fix it by moving call to mlx5_lag_fib_set() into conditional
that verifies LAG state.

Fixes: ad11c4f1d8fd ("net/mlx5e: Lag, Only handle events from highest priority multipath entry")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/lag/mp.c

index 760f42c2b4706978449028a8312711fc6b111407..3ec5be73313db89396b130ff5917a0f109d9e5ae 100644 (file)
@@ -149,9 +149,9 @@ static void mlx5_lag_fib_route_event(struct mlx5_lag *ldev,
 
                        i++;
                        mlx5_lag_set_port_affinity(ldev, i);
+                       mlx5_lag_fib_set(mp, fi);
                }
 
-               mlx5_lag_fib_set(mp, fi);
                return;
        }