linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-rc 1/3] iw_cxgb4: Only validate the MSN for successful completions
@ 2017-12-18 21:10 Steve Wise
       [not found] ` <20171220191644.CB3F62BC88-ff04S8wfc4plDsoTORJclLwze2ij/50Q0E9HWUfgJXw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Wise @ 2017-12-18 21:10 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, jgg-uk2M96/98Pc

If the RECV CQE is in error, ignore the MSN check.  This was causing
recvs that were flushed into the sw cq to be completed with the wrong
status (BAD_MSN instead of FLUSHED).

Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c
index b7bfc53..7ed8762 100644
--- a/drivers/infiniband/hw/cxgb4/cq.c
+++ b/drivers/infiniband/hw/cxgb4/cq.c
@@ -571,10 +571,10 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe,
 			ret = -EAGAIN;
 			goto skip_cqe;
 		}
-		if (unlikely((CQE_WRID_MSN(hw_cqe) != (wq->rq.msn)))) {
+		if (unlikely(!CQE_STATUS(hw_cqe) &&
+			     CQE_WRID_MSN(hw_cqe) != wq->rq.msn)) {
 			t4_set_wq_in_error(wq);
-			hw_cqe->header |= htonl(CQE_STATUS_V(T4_ERR_MSN));
-			goto proc_cqe;
+			hw_cqe->header |= cpu_to_be32(CQE_STATUS_V(T4_ERR_MSN));
 		}
 		goto proc_cqe;
 	}
-- 
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] 4+ messages in thread

* Re: [PATCH rdma-rc 1/3] iw_cxgb4: Only validate the MSN for successful completions
       [not found] ` <20171220191644.CB3F62BC88-ff04S8wfc4plDsoTORJclLwze2ij/50Q0E9HWUfgJXw@public.gmane.org>
@ 2017-12-22  0:23   ` Jason Gunthorpe
       [not found]     ` <20171222002341.GA20855-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2017-12-22  0:23 UTC (permalink / raw)
  To: Steve Wise
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA

On Mon, Dec 18, 2017 at 01:10:00PM -0800, Steve Wise wrote:
> If the RECV CQE is in error, ignore the MSN check.  This was causing
> recvs that were flushed into the sw cq to be completed with the wrong
> status (BAD_MSN instead of FLUSHED).
> 
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
>  drivers/infiniband/hw/cxgb4/cq.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied the series to for-next, 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] 4+ messages in thread

* RE: [PATCH rdma-rc 1/3] iw_cxgb4: Only validate the MSN for successful completions
       [not found]     ` <20171222002341.GA20855-uk2M96/98Pc@public.gmane.org>
@ 2017-12-22  1:23       ` Steve Wise
  2017-12-22  2:48         ` Jason Gunthorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Wise @ 2017-12-22  1:23 UTC (permalink / raw)
  To: 'Jason Gunthorpe'
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA

> 
> On Mon, Dec 18, 2017 at 01:10:00PM -0800, Steve Wise wrote:
> > If the RECV CQE is in error, ignore the MSN check.  This was causing
> > recvs that were flushed into the sw cq to be completed with the wrong
> > status (BAD_MSN instead of FLUSHED).
> >
> > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> >  drivers/infiniband/hw/cxgb4/cq.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Applied the series to for-next, thanks

Thanks Jason.  I requested -rc though.  Did you not want it in -rc? 

--
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] 4+ messages in thread

* Re: [PATCH rdma-rc 1/3] iw_cxgb4: Only validate the MSN for successful completions
  2017-12-22  1:23       ` Steve Wise
@ 2017-12-22  2:48         ` Jason Gunthorpe
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2017-12-22  2:48 UTC (permalink / raw)
  To: Steve Wise
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA

On Thu, Dec 21, 2017 at 07:23:39PM -0600, Steve Wise wrote:
> > 
> > On Mon, Dec 18, 2017 at 01:10:00PM -0800, Steve Wise wrote:
> > > If the RECV CQE is in error, ignore the MSN check.  This was causing
> > > recvs that were flushed into the sw cq to be completed with the wrong
> > > status (BAD_MSN instead of FLUSHED).
> > >
> > > Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > > Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> > >  drivers/infiniband/hw/cxgb4/cq.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > Applied the series to for-next, thanks
> 
> Thanks Jason.  I requested -rc though.  Did you not want it in -rc? 

Ah, I did put it in -rc, sorry, toddler-came-home distraction when I
was finishing.. Same for all the last couple patches.

The -rc branch tip is here right now while 0-day runs on it.

https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=wip/jgg-zero-day

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] 4+ messages in thread

end of thread, other threads:[~2017-12-22  2:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18 21:10 [PATCH rdma-rc 1/3] iw_cxgb4: Only validate the MSN for successful completions Steve Wise
     [not found] ` <20171220191644.CB3F62BC88-ff04S8wfc4plDsoTORJclLwze2ij/50Q0E9HWUfgJXw@public.gmane.org>
2017-12-22  0:23   ` Jason Gunthorpe
     [not found]     ` <20171222002341.GA20855-uk2M96/98Pc@public.gmane.org>
2017-12-22  1:23       ` Steve Wise
2017-12-22  2:48         ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).