All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Anumula Murali Mohan Reddy <anumula@chelsio.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org, bharat@chelsio.com
Subject: Re: [PATCH for-rc v2] RDMA/cxgb4: notify rdma stack for IB_EVENT_QP_LAST_WQE_REACHED event
Date: Tue, 7 Jan 2025 12:19:11 +0200	[thread overview]
Message-ID: <20250107101911.GA87447@unreal> (raw)
In-Reply-To: <20250107095053.81007-1-anumula@chelsio.com>

On Tue, Jan 07, 2025 at 03:20:53PM +0530, Anumula Murali Mohan Reddy wrote:
> This patch sends IB_EVENT_QP_LAST_WQE_REACHED event on a QP that is in
> error state and associated with an SRQ. This behaviour is incorporated
> in flush_qp() which is called when QP transitions to error state.
> Supports SRQ drain functionality added by commit 844bc12e6da3 ("IB/core:
> add support for draining Shared receive queues")
> 
> Fixes: 844bc12e6da3 ("IB/core: add support for draining Shared receive queues")
> Signed-off-by: Anumula Murali Mohan Reddy <anumula@chelsio.com>
> Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> ---
> Changes since v1:
> Addressed previous review comments

There are two review comments. One is Fixes line, which is not a big deal
as I can add it when applying patch, but what about second comment?

Why is this event limited to QP with SRQ only?
https://lore.kernel.org/all/20250105090622.GA5511@unreal/

Thanks

> ---
>  drivers/infiniband/hw/cxgb4/qp.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
> index 7b5c4522b426..10f61bc16dd5 100644
> --- a/drivers/infiniband/hw/cxgb4/qp.c
> +++ b/drivers/infiniband/hw/cxgb4/qp.c
> @@ -1599,6 +1599,7 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp,
>  	int count;
>  	int rq_flushed = 0, sq_flushed;
>  	unsigned long flag;
> +	struct ib_event ev;
>  
>  	pr_debug("qhp %p rchp %p schp %p\n", qhp, rchp, schp);
>  
> @@ -1607,6 +1608,14 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp,
>  	if (schp != rchp)
>  		spin_lock(&schp->lock);
>  	spin_lock(&qhp->lock);
> +	if (qhp->srq) {
> +		if (qhp->attr.state == C4IW_QP_STATE_ERROR && qhp->ibqp.event_handler) {
> +			ev.device = qhp->ibqp.device;
> +			ev.element.qp = &qhp->ibqp;
> +			ev.event = IB_EVENT_QP_LAST_WQE_REACHED;
> +			qhp->ibqp.event_handler(&ev, qhp->ibqp.qp_context);
> +		}
> +	}
>  
>  	if (qhp->wq.flushed) {
>  		spin_unlock(&qhp->lock);
> -- 
> 2.39.3
> 
> 

  reply	other threads:[~2025-01-07 10:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07  9:50 [PATCH for-rc v2] RDMA/cxgb4: notify rdma stack for IB_EVENT_QP_LAST_WQE_REACHED event Anumula Murali Mohan Reddy
2025-01-07 10:19 ` Leon Romanovsky [this message]
2025-01-10 12:22   ` Anumula Murali Mohan Reddy
2025-01-14 11:32 ` 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=20250107101911.GA87447@unreal \
    --to=leon@kernel.org \
    --cc=anumula@chelsio.com \
    --cc=bharat@chelsio.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.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.