RDMA/mlx5: Support optional counters in hw_stats initialization
authorAharon Landau <aharonl@nvidia.com>
Fri, 8 Oct 2021 12:24:36 +0000 (15:24 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 12 Oct 2021 15:48:06 +0000 (12:48 -0300)
commit886773d24962799e5eb3a1b31a9b77e32d6c25a1
tree8ce199772091cc48555d3426f5fd2fd81a84ac8f
parent3c3c1f1416392382faa0238e76a70d7810aab2ef
RDMA/mlx5: Support optional counters in hw_stats initialization

Add optional counter support when allocate and initialize hw_stats
structure. Optional counters have IB_STAT_FLAG_OPTIONAL flag set and are
disabled by default.

Link: https://lore.kernel.org/r/20211008122439.166063-11-markzhang@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/counters.c
drivers/infiniband/hw/mlx5/mlx5_ib.h