net/mlx5: Add interface to hold and release core resources
Sometimes upper layers may want to prevent the destruction of a core resource for a period of time while work on that resource is in progress. Add API to support this. Signed-off-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
This commit is contained in:

committed by
Leon Romanovsky

parent
698114968a
commit
27e95603f4
@@ -596,6 +596,11 @@ int mlx5_core_dealloc_q_counter(struct mlx5_core_dev *dev, u16 counter_id);
|
||||
int mlx5_core_query_q_counter(struct mlx5_core_dev *dev, u16 counter_id,
|
||||
int reset, void *out, int out_size);
|
||||
|
||||
struct mlx5_core_rsc_common *mlx5_core_res_hold(struct mlx5_core_dev *dev,
|
||||
int res_num,
|
||||
enum mlx5_res_type res_type);
|
||||
void mlx5_core_res_put(struct mlx5_core_rsc_common *res);
|
||||
|
||||
static inline const char *mlx5_qp_type_str(int type)
|
||||
{
|
||||
switch (type) {
|
||||
|
Reference in New Issue
Block a user