From: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Mike Marciniszyn
<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
Subject: [PATCH 1/5] IB/srpt: Post receive work requests after qp transition to INIT state
Date: Fri, 3 Nov 2017 16:20:52 -0700 [thread overview]
Message-ID: <20171103232056.30614-2-bart.vanassche@wdc.com> (raw)
In-Reply-To: <20171103232056.30614-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
From: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Not all HCAs support posting receive work requests in the RESET
state. Postpone posting receive work requests until after the
transition to the INIT state.
Fixes: commit dea262094cdf ("IB/srpt: Change default behavior from using SRQ to using RC")
Signed-off-by: Mike Marciniszyn <mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 304855b9b537..98b1b80e476b 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1687,10 +1687,6 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
goto err_destroy_cq;
}
- if (!sdev->use_srq)
- for (i = 0; i < ch->rq_size; i++)
- srpt_post_recv(sdev, ch, ch->ioctx_recv_ring[i]);
-
atomic_set(&ch->sq_wr_avail, qp_init->cap.max_send_wr);
pr_debug("%s: max_cqe= %d max_sge= %d sq_size = %d cm_id= %p\n",
@@ -1701,6 +1697,10 @@ static int srpt_create_ch_ib(struct srpt_rdma_ch *ch)
if (ret)
goto err_destroy_qp;
+ if (!sdev->use_srq)
+ for (i = 0; i < ch->rq_size; i++)
+ srpt_post_recv(sdev, ch, ch->ioctx_recv_ring[i]);
+
out:
kfree(qp_init);
return ret;
--
2.14.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-11-03 23:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 23:20 [PATCH 0/5] More SRP target patches for kernel v4.15 Bart Van Assche
[not found] ` <20171103232056.30614-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-11-03 23:20 ` Bart Van Assche [this message]
[not found] ` <20171103232056.30614-2-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-11-06 17:15 ` [PATCH 1/5] IB/srpt: Post receive work requests after qp transition to INIT state Jason Gunthorpe
[not found] ` <20171106171523.GA18802-uk2M96/98Pc@public.gmane.org>
2017-11-06 17:28 ` Marciniszyn, Mike
2017-11-03 23:20 ` [PATCH 2/5] IB/srpt: Introduce helper functions for SRQ allocation and freeing Bart Van Assche
2017-11-03 23:20 ` [PATCH 3/5] IB/srpt: Introduce srpt_disconnect_ch_sync() Bart Van Assche
2017-11-03 23:20 ` [PATCH 4/5] IB/srpt: Wait until channel release has finished during module unload Bart Van Assche
2017-11-03 23:20 ` [PATCH 5/5] IB/srpt: Ensure that modifying the use_srq configfs attribute works Bart Van Assche
2017-11-13 20:26 ` [PATCH 0/5] More SRP target patches for kernel v4.15 Doug Ledford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171103232056.30614-2-bart.vanassche@wdc.com \
--to=bart.vanassche-sjgp3ctcywe@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox