IB/mlx5: Add counters create and destroy support
This patch implements the device counters create and destroy APIs and introducing some internal management structures. Downstream patches in this series will add the functionality to support flow counters binding and reading. Reviewed-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Raed Salem <raeds@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
committed by
Leon Romanovsky
parent
b6ba4a9aa5
commit
b29e2a1309
@@ -813,6 +813,16 @@ struct mlx5_memic {
|
||||
DECLARE_BITMAP(memic_alloc_pages, MLX5_MAX_MEMIC_PAGES);
|
||||
};
|
||||
|
||||
struct mlx5_ib_mcounters {
|
||||
struct ib_counters ibcntrs;
|
||||
};
|
||||
|
||||
static inline struct mlx5_ib_mcounters *
|
||||
to_mcounters(struct ib_counters *ibcntrs)
|
||||
{
|
||||
return container_of(ibcntrs, struct mlx5_ib_mcounters, ibcntrs);
|
||||
}
|
||||
|
||||
struct mlx5_ib_dev {
|
||||
struct ib_device ib_dev;
|
||||
struct mlx5_core_dev *mdev;
|
||||
|
||||
Reference in New Issue
Block a user