diff options
author | Raed Salem <raeds@mellanox.com> | 2018-05-31 16:43:40 +0300 |
---|---|---|
committer | Leon Romanovsky <leonro@mellanox.com> | 2018-06-02 07:35:37 +0300 |
commit | 5e95af5f7b60796ccd890a39c0ed9c5df3537952 (patch) | |
tree | df627b48598c3c8b0f77b30fea392cb1dad8c807 /drivers/infiniband/hw/mlx5/mlx5_ib.h | |
parent | 3b3233fbf02ee4c5de4d635ca6c4f2566d9716df (diff) | |
download | linux-5e95af5f7b60796ccd890a39c0ed9c5df3537952.tar.xz |
IB/mlx5: Add flow counters read support
Implements the flow counters read wrapper.
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>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/mlx5_ib.h')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mlx5_ib.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index 155bca627222..d89c8fe626f6 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h @@ -814,6 +814,12 @@ struct mlx5_memic { DECLARE_BITMAP(memic_alloc_pages, MLX5_MAX_MEMIC_PAGES); }; +struct mlx5_read_counters_attr { + struct mlx5_fc *hw_cntrs_hndl; + u64 *out; + u32 flags; +}; + enum mlx5_ib_counters_type { MLX5_IB_COUNTERS_FLOW, }; @@ -821,7 +827,12 @@ enum mlx5_ib_counters_type { struct mlx5_ib_mcounters { struct ib_counters ibcntrs; enum mlx5_ib_counters_type type; - void *hw_cntrs_hndl; + /* number of counters supported for this counters type */ + u32 counters_num; + struct mlx5_fc *hw_cntrs_hndl; + /* read function for this counters type */ + int (*read_counters)(struct ib_device *ibdev, + struct mlx5_read_counters_attr *read_attr); /* max index set as part of create_flow */ u32 cntrs_max_index; /* number of counters data entries (<description,index> pair) */ |