RDMA/qedr: Fix reporting max_{send/recv}_wr attrs
[ Upstream commitb1a4da64bf] Fix the wrongly reported max_send_wr and max_recv_wr attributes for user QP by making sure to save their valuse on QP creation, so when query QP is called the attributes will be reported correctly. Fixes:cecbcddf64("qedr: Add support for QP verbs") Link: https://lore.kernel.org/r/20211206201314.124947-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Acked-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e19469468b
commit
7be2a0bcaf
1 changed files with 2 additions and 0 deletions
|
|
@ -1918,6 +1918,7 @@ static int qedr_create_user_qp(struct qedr_dev *dev,
|
|||
/* db offset was calculated in copy_qp_uresp, now set in the user q */
|
||||
if (qedr_qp_has_sq(qp)) {
|
||||
qp->usq.db_addr = ctx->dpi_addr + uresp.sq_db_offset;
|
||||
qp->sq.max_wr = attrs->cap.max_send_wr;
|
||||
rc = qedr_db_recovery_add(dev, qp->usq.db_addr,
|
||||
&qp->usq.db_rec_data->db_data,
|
||||
DB_REC_WIDTH_32B,
|
||||
|
|
@ -1928,6 +1929,7 @@ static int qedr_create_user_qp(struct qedr_dev *dev,
|
|||
|
||||
if (qedr_qp_has_rq(qp)) {
|
||||
qp->urq.db_addr = ctx->dpi_addr + uresp.rq_db_offset;
|
||||
qp->rq.max_wr = attrs->cap.max_recv_wr;
|
||||
rc = qedr_db_recovery_add(dev, qp->urq.db_addr,
|
||||
&qp->urq.db_rec_data->db_data,
|
||||
DB_REC_WIDTH_32B,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue