public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
To: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: 'Tatyana Nikolova'
	<Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	'Doug Ledford' <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH] RDMA/nes: Adding queue drain functions
Date: Mon, 4 Apr 2016 17:52:54 +0300	[thread overview]
Message-ID: <20160404145254.GE5264@leon.nu> (raw)
In-Reply-To: <01b501d18e79$92ddee20$b899ca60$@opengridcomputing.com>

On Mon, Apr 04, 2016 at 08:54:57AM -0500, Steve Wise wrote:
> > On Tue, Mar 29, 2016 at 03:49:18PM -0500, Steve Wise wrote:
> > > >
> > > > Adding sq and rq drain functions, which block until all
> > > > previously posted wr-s in the specified queue have completed.
> > > > A completion object is signaled to unblock the thread,
> > > > when the last cqe for the corresponding queue is processed.
> > > >
> > > > Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > > > Signed-off-by: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > >
> > > Looks good to me.  No locking needed though?
> > >
> > > Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> > 
> > Steve,
> > I see that this implementation follows your reference implementation of
> > iw_cxgb4 which was iWARP specific. Can you point me to the relevant
> > information which explain why this specific case exists?
> 
> The iWARP Verbs spec mandates that when the QP is in ERROR, post_send() and
> post_recv() must, at some point, fail synchronously.  See:
> 
> http://tools.ietf.org/html/draft-hilland-rddp-verbs-00#section-6.2.4

OK, 
I see it, the iWARP devices need to flush QP before moving to
drain(error) state.

This leads to another question, why don't we have common specific
functions for iWARP devices? Right now, we have two drivers with the
similar code.

The suggested refactoring can be as follows:

post_marker_func(..)
{
    post_send ....
}

ib_drain_qp(..)
{
    move_to_error
    call_post_marker_func
}

iw_drain_qp(..)
{
    call_to_post_marker_func
    move_to_drain
}

What do you think?

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

  reply	other threads:[~2016-04-04 14:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-29 17:58 [PATCH] RDMA/nes: Adding queue drain functions Tatyana Nikolova
2016-03-29 20:49 ` Steve Wise
2016-03-29 21:18   ` Nikolova, Tatyana E
2016-03-31  1:19   ` Leon Romanovsky
     [not found]     ` <20160331011902.GC2670-2ukJVAZIZ/Y@public.gmane.org>
2016-04-04 13:54       ` Steve Wise
2016-04-04 14:52         ` Leon Romanovsky [this message]
     [not found]           ` <20160404145254.GE5264-2ukJVAZIZ/Y@public.gmane.org>
2016-04-04 15:01             ` Steve Wise
2016-04-04 17:21               ` Leon Romanovsky
2016-03-30  7:11 ` Leon Romanovsky
2016-04-03 16:17 ` sagig
     [not found]   ` <570141FE.4090400-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-04  1:31     ` Leon Romanovsky
     [not found]       ` <20160404013152.GD5264-2ukJVAZIZ/Y@public.gmane.org>
2016-04-04  6:39         ` sagig
     [not found]           ` <57020C15.3000601-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2016-04-04 14:42             ` Steve Wise
2016-05-13 19:59 ` 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=20160404145254.GE5264@leon.nu \
    --to=leon-2ukjvaziz/y@public.gmane.org \
    --cc=Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@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