RDMA: Handle SRQ allocations by IB/core
Convert SRQ allocation from drivers to be in the IB/core Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:

committed by
Jason Gunthorpe

parent
d345691471
commit
68e326dea1
@@ -607,7 +607,7 @@ err_destroy_srq_split:
|
||||
return err;
|
||||
}
|
||||
|
||||
int mlx5_cmd_destroy_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq)
|
||||
void mlx5_cmd_destroy_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq)
|
||||
{
|
||||
struct mlx5_srq_table *table = &dev->srq_table;
|
||||
struct mlx5_core_srq *tmp;
|
||||
@@ -615,16 +615,14 @@ int mlx5_cmd_destroy_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq)
|
||||
|
||||
tmp = xa_erase_irq(&table->array, srq->srqn);
|
||||
if (!tmp || tmp != srq)
|
||||
return -EINVAL;
|
||||
return;
|
||||
|
||||
err = destroy_srq_split(dev, srq);
|
||||
if (err)
|
||||
return err;
|
||||
return;
|
||||
|
||||
mlx5_core_res_put(&srq->common);
|
||||
wait_for_completion(&srq->common.free);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int mlx5_cmd_query_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
|
||||
|
Reference in New Issue
Block a user