All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] libcxgb4: set *bad_wr in post_send/recv error paths
Date: Wed, 7 Dec 2016 20:15:41 +0200	[thread overview]
Message-ID: <20161207181541.GA3709@yuval-lap> (raw)
In-Reply-To: <20161206210403.71E59E08C5-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>

Looks like same fix should be applied to cxgb4 driver, right?

Yuval

On Tue, Dec 06, 2016 at 11:49:32AM -0800, Steve Wise wrote:
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> ---
>  providers/cxgb4/qp.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/providers/cxgb4/qp.c b/providers/cxgb4/qp.c
> index 376a00a..3b448dd 100644
> --- a/providers/cxgb4/qp.c
> +++ b/providers/cxgb4/qp.c
> @@ -303,11 +303,13 @@ int c4iw_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  	pthread_spin_lock(&qhp->lock);
>  	if (t4_wq_in_error(&qhp->wq)) {
>  		pthread_spin_unlock(&qhp->lock);
> +		*bad_wr = wr;
>  		return -EINVAL;
>  	}
>  	num_wrs = t4_sq_avail(&qhp->wq);
>  	if (num_wrs == 0) {
>  		pthread_spin_unlock(&qhp->lock);
> +		*bad_wr = wr;
>  		return -ENOMEM;
>  	}
>  	while (wr) {
> @@ -403,12 +405,14 @@ int c4iw_post_receive(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
>  	pthread_spin_lock(&qhp->lock);
>  	if (t4_wq_in_error(&qhp->wq)) {
>  		pthread_spin_unlock(&qhp->lock);
> +		*bad_wr = wr;
>  		return -EINVAL;
>  	}
>  	INC_STAT(recv);
>  	num_wrs = t4_rq_avail(&qhp->wq);
>  	if (num_wrs == 0) {
>  		pthread_spin_unlock(&qhp->lock);
> +		*bad_wr = wr;
>  		return -ENOMEM;
>  	}
>  	while (wr) {
> -- 
> 1.8.3.1
> 
> --
> 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
--
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-12-07 18:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 19:49 [PATCH] libcxgb4: set *bad_wr in post_send/recv error paths Steve Wise
     [not found] ` <20161206210403.71E59E08C5-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
2016-12-07 18:15   ` Yuval Shaia [this message]
2016-12-07 18:21     ` Steve Wise
2016-12-07 18:23       ` Yuval Shaia
2016-12-10 14:20   ` Leon Romanovsky

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=20161207181541.GA3709@yuval-lap \
    --to=yuval.shaia-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.