public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche-Sjgp3cTcYWE@public.gmane.org>
To: "mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org"
	<mike.marciniszyn-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v2 4/8] IB/srpt: Change default behavior from using SRQ to using RC
Date: Fri, 3 Nov 2017 16:10:59 +0000	[thread overview]
Message-ID: <1509725458.2473.23.camel@wdc.com> (raw)
In-Reply-To: <32E1700B9017364D9B60AED9960492BC6266E41A-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Fri, 2017-11-03 at 16:01 +0000, Marciniszyn, Mike wrote:
> > The RNR naks are happening because ALL post receives fail in a QP state of
> > reset.
> > 
> 
> Moving the post receives till after the init works:
> 
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index 304855b..98b1b80 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;

Thanks Mike for your work and this patch. I will test this patch further and
include it when I post the patches for fixing the behavior of the configfs
"use_srq" attribute.

Bart.

  parent reply	other threads:[~2017-11-03 16:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 17:27 [PATCH v2 0/8] SRP patches for kernel v4.15 Bart Van Assche
2017-10-11 17:27 ` [PATCH v2 5/8] IB/srp: Avoid that a cable pull can trigger a kernel crash Bart Van Assche
     [not found] ` <20171011172729.16984-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-10-11 17:27   ` [PATCH v2 1/8] IB/srpt: Do not accept invalid initiator port names Bart Van Assche
2017-10-11 17:27   ` [PATCH v2 2/8] IB/srpt: Limit the send and receive queue sizes to what the HCA supports Bart Van Assche
2017-10-11 17:27   ` [PATCH v2 3/8] IB/srpt: Cache global L_Key Bart Van Assche
2017-10-11 17:27   ` [PATCH v2 4/8] IB/srpt: Change default behavior from using SRQ to using RC Bart Van Assche
     [not found]     ` <20171011172729.16984-5-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2017-11-02 18:30       ` Marciniszyn, Mike
     [not found]         ` <32E1700B9017364D9B60AED9960492BC6266931A-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-11-02 21:41           ` Bart Van Assche
     [not found]             ` <1509658914.2484.21.camel-Sjgp3cTcYWE@public.gmane.org>
2017-11-03 13:05               ` Marciniszyn, Mike
2017-11-03 15:46             ` Marciniszyn, Mike
2017-11-03 16:01             ` Marciniszyn, Mike
     [not found]               ` <32E1700B9017364D9B60AED9960492BC6266E41A-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-11-03 16:10                 ` Bart Van Assche [this message]
     [not found]                   ` <1509725458.2473.23.camel-Sjgp3cTcYWE@public.gmane.org>
2017-11-03 16:13                     ` Marciniszyn, Mike
2017-11-03 19:53                   ` Marciniszyn, Mike
     [not found]                     ` <32E1700B9017364D9B60AED9960492BC626708EE-RjuIdWtd+YbTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-11-13 19:56                       ` Doug Ledford
2017-10-11 17:27   ` [PATCH v2 6/8] IB/srp: Remove second argument of srp_destroy_qp() Bart Van Assche
2017-10-11 17:27   ` [PATCH v2 7/8] IB/srp: Cache global rkey Bart Van Assche
2017-10-11 17:27   ` [PATCH v2 8/8] IB/srp: Make CM timeout dependent on subnet timeout Bart Van Assche
2017-10-18 14:50   ` [PATCH v2 0/8] SRP 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=1509725458.2473.23.camel@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