linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Sagi Grimberg'
	<sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: [PATCH 1/3] IB: new common API for draining a queue pair
Date: Mon, 8 Feb 2016 09:24:25 -0600	[thread overview]
Message-ID: <00f801d16284$cb6d0620$62471260$@opengridcomputing.com> (raw)
In-Reply-To: <56B72FD4.3060407-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>



> -----Original Message-----
> From: Sagi Grimberg [mailto:sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org]
> Sent: Sunday, February 07, 2016 5:52 AM
> To: Steve Wise; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: Re: [PATCH 1/3] IB: new common API for draining a queue pair
> 
> 
> >> +	ret = ib_modify_qp(qp, &attr, IB_QP_STATE);
> >> +	if (ret) {
> >> +		WARN_ONCE(ret, "failed to drain QP: %d\n", ret);
> >> +		return;
> >> +	}
> >> +
> >> +	ret = ib_post_recv(qp, &rwr, &bad_rwr);
> >> +	if (ret) {
> >> +		WARN_ONCE(ret, "failed to drain recv queue: %d\n", ret);
> >> +		return;
> >> +	}
> >> +
> >> +	ret = ib_post_send(qp, &swr, &bad_swr);
> >> +	if (ret) {
> >> +		WARN_ONCE(ret, "failed to drain send queue: %d\n", ret);
> >> +		return;
> >
> > You are returning here despite the fact that recv queue drained
> > successfully and you can wait for completion of rdrain safely.
> > Is it done on purpose?
> 
> Good catch, the completion structures are on-stack.
> 
> Steve, you need to wait for the completion of the
> successful post in this case...

Yup.  Will do.

--
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

  parent reply	other threads:[~2016-02-08 15:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 21:55 [PATCH 0/3] new ib_drain_qp() API Steve Wise
     [not found] ` <cover.1454709317.git.swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2016-01-14 18:24   ` [PATCH 2/3] iw_cxgb4: add drain_qp function Steve Wise
2016-01-27 20:09   ` [PATCH 3/3] IB/srp: use ib_drain_qp() Steve Wise
2016-02-05 21:13   ` [PATCH 1/3] IB: new common API for draining a queue pair Steve Wise
     [not found]     ` <2da1db58d642789e8df154e34d622a37295d1ba3.1454709317.git.swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2016-02-05 21:49       ` Chuck Lever
     [not found]         ` <3AB519EB-3BFE-4A02-A825-F74EECD2CE19-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-02-05 21:53           ` Steve Wise
2016-02-05 22:00             ` Chuck Lever
     [not found]               ` <53AAECEE-AC46-4E28-9FC0-DB1E567A2A50-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-02-05 22:20                 ` Chuck Lever
2016-02-08 15:23                 ` Steve Wise
2016-02-06 16:10       ` Devesh Sharma
     [not found]         ` <CANjDDBjFY+u=8UXVCkKkK0LKSWiRcfZYnP9035m5owAYZnfn6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-07 11:53           ` Sagi Grimberg
     [not found]             ` <56B73049.5040901-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-02-08 10:37               ` Devesh Sharma
     [not found]                 ` <CANjDDBiGVxmMn7H-__z48hS93mHoqejiZgsry0DmLwJKxZ=MqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-08 15:53                   ` Steve Wise
2016-02-08 15:34               ` Steve Wise
2016-02-06 17:08       ` Leon Romanovsky
     [not found]         ` <20160206170838.GC8584-2ukJVAZIZ/Y@public.gmane.org>
2016-02-07 11:51           ` Sagi Grimberg
     [not found]             ` <56B72FD4.3060407-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-02-08 15:24               ` Steve Wise [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-08 22:14 [PATCH v2 0/3] new ib_drain_qp() API Steve Wise
     [not found] ` <cover.1454969695.git.swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2016-02-05 21:13   ` [PATCH 1/3] IB: new common API for draining a queue pair Steve Wise

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='00f801d16284$cb6d0620$62471260$@opengridcomputing.com' \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@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;
as well as URLs for NNTP newsgroup(s).