From: Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>
To: Tatyana Nikolova
<Tatyana.E.Nikolova-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: 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: Wed, 30 Mar 2016 10:11:39 +0300 [thread overview]
Message-ID: <20160330071139.GA8511@leon.nu> (raw)
In-Reply-To: <20160329175837.GA9868@TENIKOLO-MOBL2>
On Tue, Mar 29, 2016 at 12:58:37PM -0500, Tatyana Nikolova 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>
> ---
> drivers/infiniband/hw/nes/nes_verbs.c | 34 ++++++++++++++++++++++++++++++++++
> drivers/infiniband/hw/nes/nes_verbs.h | 2 ++
> 2 files changed, 36 insertions(+)
>
> diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
> index fba69a3..170d43a 100644
> --- a/drivers/infiniband/hw/nes/nes_verbs.c
> +++ b/drivers/infiniband/hw/nes/nes_verbs.c
> @@ -1315,6 +1315,8 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
> nes_debug(NES_DBG_QP, "Invalid QP type: %d\n", init_attr->qp_type);
> return ERR_PTR(-EINVAL);
> }
> + init_completion(&nesqp->sq_drained);
> + init_completion(&nesqp->rq_drained);
>
> nesqp->sig_all = (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR);
> init_timer(&nesqp->terminate_timer);
> @@ -3452,6 +3454,29 @@ out:
> return err;
> }
>
> +/**
> + * nes_drain_sq - drain sq
> + * @ibqp: pointer to ibqp
> + */
> +static void nes_drain_sq(struct ib_qp *ibqp)
> +{
> + struct nes_qp *nesqp = to_nesqp(ibqp);
> +
> + if (nesqp->hwqp.sq_tail != nesqp->hwqp.sq_head)
I'm not sure that you need these checks in all places.
It won't protect from anything.
--
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:[~2016-03-30 7:11 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
[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 [this message]
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=20160330071139.GA8511@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 \
/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