IB/mlx5: Fix congestion counters in LAG mode
authorMajd Dibbiny <majd@mellanox.com>
Thu, 21 Dec 2017 15:38:26 +0000 (17:38 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 21 Dec 2017 23:06:07 +0000 (16:06 -0700)
commit71a0ff65a21bf3e2c4fde208c4a635ed2bbb4e81
tree78ca981262559cd52b42de78c1b4ef981c9589bf
parente3524b269e451cff68b19f32b15448933a53a4f4
IB/mlx5: Fix congestion counters in LAG mode

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.

Fixes: e1f24a79f424 ("IB/mlx5: Support congestion related counters")
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Reviewed-by: Aviv Heller <avivh@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/cmd.c
drivers/infiniband/hw/mlx5/cmd.h
drivers/infiniband/hw/mlx5/main.c
drivers/net/ethernet/mellanox/mlx5/core/lag.c
include/linux/mlx5/driver.h