]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5: Read congestion counters from all ports when lag is active
authorMark Zhang <markzhang@nvidia.com>
Tue, 2 Feb 2021 11:28:29 +0000 (13:28 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 12 Mar 2021 23:29:31 +0000 (15:29 -0800)
Read congestion counters from all ports in any lag mode rather than
only in RoCE lag mode (e.g., VF lag).

Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag.c

index 83a05371e2aa14698053acb668495603d6b583af..127bb92da1500b8b87be4ebeb987be729ac4b8c8 100644 (file)
@@ -768,7 +768,7 @@ int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev,
 
        spin_lock(&lag_lock);
        ldev = mlx5_lag_dev_get(dev);
-       if (ldev && __mlx5_lag_is_roce(ldev)) {
+       if (ldev && __mlx5_lag_is_active(ldev)) {
                num_ports = MLX5_MAX_PORTS;
                mdev[MLX5_LAG_P1] = ldev->pf[MLX5_LAG_P1].dev;
                mdev[MLX5_LAG_P2] = ldev->pf[MLX5_LAG_P2].dev;