* [PATCH rdma-rc] iw_cxgb4: only clear the ARMED bit if a notification is needed
@ 2017-11-30 17:41 Steve Wise
[not found] ` <20171201213130.1ED79E0C84-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Steve Wise @ 2017-11-30 17:41 UTC (permalink / raw)
To: jgg-uk2M96/98Pc, dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
In __flush_qp(), the CQ ARMED bit was being cleared regardless of
whether any notification is actually needed. This resulted in the iser
termination logic getting stuck in ib_drain_sq() because the CQ was not
marked ARMED and thus the drain CQE notification wasn't triggered.
This new bug was exposed when this commit was merged:
commit cbb40fadd31c ("iw_cxgb4: only call the cq comp_handler when the
cq is armed")
Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
drivers/infiniband/hw/cxgb4/qp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 5ee7fe4..355e288 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1285,21 +1285,21 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp,
spin_unlock_irqrestore(&rchp->lock, flag);
if (schp == rchp) {
- if (t4_clear_cq_armed(&rchp->cq) &&
- (rq_flushed || sq_flushed)) {
+ if ((rq_flushed || sq_flushed) &&
+ t4_clear_cq_armed(&rchp->cq)) {
spin_lock_irqsave(&rchp->comp_handler_lock, flag);
(*rchp->ibcq.comp_handler)(&rchp->ibcq,
rchp->ibcq.cq_context);
spin_unlock_irqrestore(&rchp->comp_handler_lock, flag);
}
} else {
- if (t4_clear_cq_armed(&rchp->cq) && rq_flushed) {
+ if (rq_flushed && t4_clear_cq_armed(&rchp->cq)) {
spin_lock_irqsave(&rchp->comp_handler_lock, flag);
(*rchp->ibcq.comp_handler)(&rchp->ibcq,
rchp->ibcq.cq_context);
spin_unlock_irqrestore(&rchp->comp_handler_lock, flag);
}
- if (t4_clear_cq_armed(&schp->cq) && sq_flushed) {
+ if (sq_flushed && t4_clear_cq_armed(&schp->cq)) {
spin_lock_irqsave(&schp->comp_handler_lock, flag);
(*schp->ibcq.comp_handler)(&schp->ibcq,
schp->ibcq.cq_context);
--
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [rdma-rc] iw_cxgb4: only clear the ARMED bit if a notification is needed
[not found] ` <20171201213130.1ED79E0C84-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
@ 2017-12-07 21:16 ` Jason Gunthorpe
[not found] ` <20171207211637.GA9479-uk2M96/98Pc@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jason Gunthorpe @ 2017-12-07 21:16 UTC (permalink / raw)
To: Steve Wise
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Thu, Nov 30, 2017 at 09:41:56AM -0800, Steve Wise wrote:
> In __flush_qp(), the CQ ARMED bit was being cleared regardless of
> whether any notification is actually needed. This resulted in the iser
> termination logic getting stuck in ib_drain_sq() because the CQ was not
> marked ARMED and thus the drain CQE notification wasn't triggered.
>
> This new bug was exposed when this commit was merged:
>
> commit cbb40fadd31c ("iw_cxgb4: only call the cq comp_handler when the
> cq is armed")
>
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> drivers/infiniband/hw/cxgb4/qp.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Applied to -rc, thanks
Jason
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [rdma-rc] iw_cxgb4: only clear the ARMED bit if a notification is needed
[not found] ` <20171207211637.GA9479-uk2M96/98Pc@public.gmane.org>
@ 2017-12-11 16:12 ` Steve Wise
0 siblings, 0 replies; 3+ messages in thread
From: Steve Wise @ 2017-12-11 16:12 UTC (permalink / raw)
To: 'Jason Gunthorpe'
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, linux-rdma-u79uwXL29TY76Z2rM5mHXA
>
> Applied to -rc, thanks
>
> Jason
Thanks! I also have this one for -rc:
https://www.spinics.net/lists/linux-rdma/msg57860.html
Steve.
---
This email has been checked for viruses by AVG.
http://www.avg.com
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-11 16:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30 17:41 [PATCH rdma-rc] iw_cxgb4: only clear the ARMED bit if a notification is needed Steve Wise
[not found] ` <20171201213130.1ED79E0C84-/5N3P9jjx0xzbRFIqnYvSA@public.gmane.org>
2017-12-07 21:16 ` [rdma-rc] " Jason Gunthorpe
[not found] ` <20171207211637.GA9479-uk2M96/98Pc@public.gmane.org>
2017-12-11 16:12 ` Steve Wise
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.