Congestion counters are counted and queried per physical function. When working in LAG mode, CNP packets can be sent or received on both of the functions, thus congestion counters should be aggregated from the two physical functions.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -1164,6 +1164,10 @@ int mlx5_cmd_create_vport_lag(struct mlx5_core_dev *dev); · 1163 unmodified lines | ||
| 1164 | 1164 | int mlx5_cmd_destroy_vport_lag(struct mlx5_core_dev *dev); |
| 1165 | 1165 | bool mlx5_lag_is_active(struct mlx5_core_dev *dev); |
| 1166 | 1166 | struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev); |
| 1167 | +int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev, | |
| 1168 | + u64 *values, | |
| 1169 | + int num_counters, | |
| 1170 | + size_t *offsets); | |
| 1167 | 1171 | struct mlx5_uars_page *mlx5_get_uars_page(struct mlx5_core_dev *mdev); |
| 1168 | 1172 | void mlx5_put_uars_page(struct mlx5_core_dev *mdev, struct mlx5_uars_page *up); |
| 1169 | 1173 | |