Commit b4990804 authored by Leon Romanovsky's avatar Leon Romanovsky

RDMA/mlx5: Update SRQ functions signatures to mlx5_ib format

Reflect the change of moving SRQ code from mlx5_core to mlx5_ib by
updating function signatures do not require mlx5_core_dev as an input,
because all operations in mlx5_ib are supposed to use mlx5_ib_dev.
Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
parent 81773ce5
...@@ -178,8 +178,7 @@ static void handle_responder(struct ib_wc *wc, struct mlx5_cqe64 *cqe, ...@@ -178,8 +178,7 @@ static void handle_responder(struct ib_wc *wc, struct mlx5_cqe64 *cqe,
struct mlx5_core_srq *msrq = NULL; struct mlx5_core_srq *msrq = NULL;
if (qp->ibqp.xrcd) { if (qp->ibqp.xrcd) {
msrq = mlx5_core_get_srq(dev->mdev, msrq = mlx5_cmd_get_srq(dev, be32_to_cpu(cqe->srqn));
be32_to_cpu(cqe->srqn));
srq = to_mibsrq(msrq); srq = to_mibsrq(msrq);
} else { } else {
srq = to_msrq(qp->ibqp.srq); srq = to_msrq(qp->ibqp.srq);
......
...@@ -297,7 +297,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, ...@@ -297,7 +297,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,
in.pd = to_mpd(pd)->pdn; in.pd = to_mpd(pd)->pdn;
in.db_record = srq->db.dma; in.db_record = srq->db.dma;
err = mlx5_core_create_srq(dev->mdev, &srq->msrq, &in); err = mlx5_cmd_create_srq(dev, &srq->msrq, &in);
kvfree(in.pas); kvfree(in.pas);
if (err) { if (err) {
mlx5_ib_dbg(dev, "create SRQ failed, err %d\n", err); mlx5_ib_dbg(dev, "create SRQ failed, err %d\n", err);
...@@ -321,7 +321,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd, ...@@ -321,7 +321,7 @@ struct ib_srq *mlx5_ib_create_srq(struct ib_pd *pd,
return &srq->ibsrq; return &srq->ibsrq;
err_core: err_core:
mlx5_core_destroy_srq(dev->mdev, &srq->msrq); mlx5_cmd_destroy_srq(dev, &srq->msrq);
err_usr_kern_srq: err_usr_kern_srq:
if (pd->uobject) if (pd->uobject)
...@@ -351,7 +351,7 @@ int mlx5_ib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, ...@@ -351,7 +351,7 @@ int mlx5_ib_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
return -EINVAL; return -EINVAL;
mutex_lock(&srq->mutex); mutex_lock(&srq->mutex);
ret = mlx5_core_arm_srq(dev->mdev, &srq->msrq, attr->srq_limit, 1); ret = mlx5_cmd_arm_srq(dev, &srq->msrq, attr->srq_limit, 1);
mutex_unlock(&srq->mutex); mutex_unlock(&srq->mutex);
if (ret) if (ret)
...@@ -372,7 +372,7 @@ int mlx5_ib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr) ...@@ -372,7 +372,7 @@ int mlx5_ib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr)
if (!out) if (!out)
return -ENOMEM; return -ENOMEM;
ret = mlx5_core_query_srq(dev->mdev, &srq->msrq, out); ret = mlx5_cmd_query_srq(dev, &srq->msrq, out);
if (ret) if (ret)
goto out_box; goto out_box;
...@@ -390,7 +390,7 @@ int mlx5_ib_destroy_srq(struct ib_srq *srq) ...@@ -390,7 +390,7 @@ int mlx5_ib_destroy_srq(struct ib_srq *srq)
struct mlx5_ib_dev *dev = to_mdev(srq->device); struct mlx5_ib_dev *dev = to_mdev(srq->device);
struct mlx5_ib_srq *msrq = to_msrq(srq); struct mlx5_ib_srq *msrq = to_msrq(srq);
mlx5_core_destroy_srq(dev->mdev, &msrq->msrq); mlx5_cmd_destroy_srq(dev, &msrq->msrq);
if (srq->uobject) { if (srq->uobject) {
mlx5_ib_db_unmap_user(to_mucontext(srq->uobject->context), &msrq->db); mlx5_ib_db_unmap_user(to_mucontext(srq->uobject->context), &msrq->db);
......
...@@ -35,12 +35,14 @@ struct mlx5_srq_attr { ...@@ -35,12 +35,14 @@ struct mlx5_srq_attr {
u16 uid; u16 uid;
}; };
int mlx5_core_create_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, struct mlx5_ib_dev;
struct mlx5_srq_attr *in);
int mlx5_core_destroy_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq); int mlx5_cmd_create_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
int mlx5_core_query_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, struct mlx5_srq_attr *in);
struct mlx5_srq_attr *out); int mlx5_cmd_destroy_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq);
int mlx5_core_arm_srq(struct mlx5_core_dev *dev, struct mlx5_core_srq *srq, int mlx5_cmd_query_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
u16 lwm, int is_srq); struct mlx5_srq_attr *out);
struct mlx5_core_srq *mlx5_core_get_srq(struct mlx5_core_dev *dev, u32 srqn); int mlx5_cmd_arm_srq(struct mlx5_ib_dev *dev, struct mlx5_core_srq *srq,
u16 lwm, int is_srq);
struct mlx5_core_srq *mlx5_cmd_get_srq(struct mlx5_ib_dev *dev, u32 srqn);
#endif /* MLX5_IB_SRQ_H */ #endif /* MLX5_IB_SRQ_H */
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment