* [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs
@ 2021-12-06 20:13 Kamal Heib
2021-12-06 21:06 ` Jason Gunthorpe
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Kamal Heib @ 2021-12-06 20:13 UTC (permalink / raw)
To: linux-rdma; +Cc: Michal Kalderon, Ariel Elior, Jason Gunthorpe, Kamal Heib
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.
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
drivers/infiniband/hw/qedr/verbs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index 9100009f0a23..a53476653b0d 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -1931,6 +1931,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,
@@ -1941,6 +1942,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,
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs
2021-12-06 20:13 [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs Kamal Heib
@ 2021-12-06 21:06 ` Jason Gunthorpe
2021-12-07 9:31 ` Kamal Heib
2021-12-07 10:56 ` [EXT] " Michal Kalderon
2021-12-07 19:04 ` Jason Gunthorpe
2 siblings, 1 reply; 5+ messages in thread
From: Jason Gunthorpe @ 2021-12-06 21:06 UTC (permalink / raw)
To: Kamal Heib; +Cc: linux-rdma, Michal Kalderon, Ariel Elior
On Mon, Dec 06, 2021 at 10:13:14PM +0200, Kamal Heib wrote:
> 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.
>
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> ---
> drivers/infiniband/hw/qedr/verbs.c | 2 ++
> 1 file changed, 2 insertions(+)
Fixes line?
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs
2021-12-06 21:06 ` Jason Gunthorpe
@ 2021-12-07 9:31 ` Kamal Heib
0 siblings, 0 replies; 5+ messages in thread
From: Kamal Heib @ 2021-12-07 9:31 UTC (permalink / raw)
To: Jason Gunthorpe; +Cc: linux-rdma, Michal Kalderon, Ariel Elior
On Mon, Dec 06, 2021 at 05:06:55PM -0400, Jason Gunthorpe wrote:
> On Mon, Dec 06, 2021 at 10:13:14PM +0200, Kamal Heib wrote:
> > 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.
> >
> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> > ---
> > drivers/infiniband/hw/qedr/verbs.c | 2 ++
> > 1 file changed, 2 insertions(+)
>
> Fixes line?
>
> Jason
Fixes: cecbcddf6461 ("qedr: Add support for QP verbs")
Thanks,
Kamal
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [EXT] [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs
2021-12-06 20:13 [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs Kamal Heib
2021-12-06 21:06 ` Jason Gunthorpe
@ 2021-12-07 10:56 ` Michal Kalderon
2021-12-07 19:04 ` Jason Gunthorpe
2 siblings, 0 replies; 5+ messages in thread
From: Michal Kalderon @ 2021-12-07 10:56 UTC (permalink / raw)
To: Kamal Heib, linux-rdma; +Cc: Ariel Elior, Jason Gunthorpe
> From: Kamal Heib <kamalheib1@gmail.com>
> Sent: Monday, December 6, 2021 10:13 PM
>
> 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.
>
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> ---
> drivers/infiniband/hw/qedr/verbs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/infiniband/hw/qedr/verbs.c
> b/drivers/infiniband/hw/qedr/verbs.c
> index 9100009f0a23..a53476653b0d 100644
> --- a/drivers/infiniband/hw/qedr/verbs.c
> +++ b/drivers/infiniband/hw/qedr/verbs.c
> @@ -1931,6 +1931,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,
> @@ -1941,6 +1942,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,
> --
> 2.31.1
Thanks,
Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs
2021-12-06 20:13 [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs Kamal Heib
2021-12-06 21:06 ` Jason Gunthorpe
2021-12-07 10:56 ` [EXT] " Michal Kalderon
@ 2021-12-07 19:04 ` Jason Gunthorpe
2 siblings, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2021-12-07 19:04 UTC (permalink / raw)
To: Kamal Heib; +Cc: linux-rdma, Michal Kalderon, Ariel Elior
On Mon, Dec 06, 2021 at 10:13:14PM +0200, Kamal Heib wrote:
> 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.
>
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
> ---
> drivers/infiniband/hw/qedr/verbs.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-07 19:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 20:13 [PATCH for-next] RDMA/qedr: Fix reporting max_{send/recv}_wr attrs Kamal Heib
2021-12-06 21:06 ` Jason Gunthorpe
2021-12-07 9:31 ` Kamal Heib
2021-12-07 10:56 ` [EXT] " Michal Kalderon
2021-12-07 19:04 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).