Message ID | D594F7C4.1AF34%Andrew.Boyer@emc.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On 7/19/2017 11:56 AM, Boyer, Andrew wrote: > To make this work, it also needs to handle the case where a pkt is on the > req_pkts list but the QP is no longer valid. > > --- a/drivers/infiniband/sw/rxe/rxe_req.c > +++ b/drivers/infiniband/sw/rxe/rxe_req.c > @@ -594,8 +594,10 @@ int rxe_requester(void *arg) > rxe_add_ref(qp); > > next_wqe: > - if (unlikely(!qp->valid)) > + if (unlikely(!qp->valid)) { > + rxe_drain_req_pkts(qp, true); > goto exit; > + } > > if (unlikely(qp->req.state == QP_STATE_ERROR)) { > rxe_drain_req_pkts(qp, true); > > > You could also combine the two checks into one conditional. > > For that matter, what is the Œnotify¹ argument supposed to do? I would > think Œnotify == true¹ would mean advancing the consumer pointer, not the > other way around. This will have to be done in a follow up patch. I had already accepted the original patch before you made this review comment.
--- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -594,8 +594,10 @@ int rxe_requester(void *arg) rxe_add_ref(qp); next_wqe: - if (unlikely(!qp->valid)) + if (unlikely(!qp->valid)) { + rxe_drain_req_pkts(qp, true); goto exit; + } if (unlikely(qp->req.state == QP_STATE_ERROR)) { rxe_drain_req_pkts(qp, true);