Message ID | 20220328095436.304063-1-yangx.jy@fujitsu.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | RDMA/rxe: Generate a completion on error after getting a wqe | expand |
On Mon, Mar 28, 2022 at 05:54:36PM +0800, Xiao Yang wrote: > Current rxe_requester() doesn't generate a completion on error after > getting a wqe. Fix the issue by calling "goto err;" instead. > > Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com> > --- > drivers/infiniband/sw/rxe/rxe_req.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Don't you need to set wqe->status too to have complete fix? Thanks > > diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c > index ae5fbc79dd5c..6f8dd2b3b817 100644 > --- a/drivers/infiniband/sw/rxe/rxe_req.c > +++ b/drivers/infiniband/sw/rxe/rxe_req.c > @@ -648,26 +648,26 @@ int rxe_requester(void *arg) > psn_compare(qp->req.psn, (qp->comp.psn + > RXE_MAX_UNACKED_PSNS)) > 0)) { > qp->req.wait_psn = 1; > - goto exit; > + goto err; > } > > /* Limit the number of inflight SKBs per QP */ > if (unlikely(atomic_read(&qp->skb_out) > > RXE_INFLIGHT_SKBS_PER_QP_HIGH)) { > qp->need_req_skb = 1; > - goto exit; > + goto err; > } > > opcode = next_opcode(qp, wqe, wqe->wr.opcode); > if (unlikely(opcode < 0)) { > wqe->status = IB_WC_LOC_QP_OP_ERR; > - goto exit; > + goto err; > } > > mask = rxe_opcode[opcode].mask; > if (unlikely(mask & RXE_READ_OR_ATOMIC_MASK)) { > if (check_init_depth(qp, wqe)) > - goto exit; > + goto err; > } > > mtu = get_mtu(qp); > -- > 2.23.0 > > >
On 2022/3/28 19:27, Leon Romanovsky wrote: > On Mon, Mar 28, 2022 at 05:54:36PM +0800, Xiao Yang wrote: >> Current rxe_requester() doesn't generate a completion on error after >> getting a wqe. Fix the issue by calling "goto err;" instead. >> >> Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com> >> --- >> drivers/infiniband/sw/rxe/rxe_req.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) > Don't you need to set wqe->status too to have complete fix? Hi Leon, Agreed. I will set wqe->status to IB_WC_LOC_QP_OP_ERR in my v2 patch. Best Regards, Xiao Yang > > Thanks > >> diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c >> index ae5fbc79dd5c..6f8dd2b3b817 100644 >> --- a/drivers/infiniband/sw/rxe/rxe_req.c >> +++ b/drivers/infiniband/sw/rxe/rxe_req.c >> @@ -648,26 +648,26 @@ int rxe_requester(void *arg) >> psn_compare(qp->req.psn, (qp->comp.psn + >> RXE_MAX_UNACKED_PSNS)) > 0)) { >> qp->req.wait_psn = 1; >> - goto exit; >> + goto err; >> } >> >> /* Limit the number of inflight SKBs per QP */ >> if (unlikely(atomic_read(&qp->skb_out) > >> RXE_INFLIGHT_SKBS_PER_QP_HIGH)) { >> qp->need_req_skb = 1; >> - goto exit; >> + goto err; >> } >> >> opcode = next_opcode(qp, wqe, wqe->wr.opcode); >> if (unlikely(opcode < 0)) { >> wqe->status = IB_WC_LOC_QP_OP_ERR; >> - goto exit; >> + goto err; >> } >> >> mask = rxe_opcode[opcode].mask; >> if (unlikely(mask & RXE_READ_OR_ATOMIC_MASK)) { >> if (check_init_depth(qp, wqe)) >> - goto exit; >> + goto err; >> } >> >> mtu = get_mtu(qp); >> -- >> 2.23.0 >> >> >>
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index ae5fbc79dd5c..6f8dd2b3b817 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -648,26 +648,26 @@ int rxe_requester(void *arg) psn_compare(qp->req.psn, (qp->comp.psn + RXE_MAX_UNACKED_PSNS)) > 0)) { qp->req.wait_psn = 1; - goto exit; + goto err; } /* Limit the number of inflight SKBs per QP */ if (unlikely(atomic_read(&qp->skb_out) > RXE_INFLIGHT_SKBS_PER_QP_HIGH)) { qp->need_req_skb = 1; - goto exit; + goto err; } opcode = next_opcode(qp, wqe, wqe->wr.opcode); if (unlikely(opcode < 0)) { wqe->status = IB_WC_LOC_QP_OP_ERR; - goto exit; + goto err; } mask = rxe_opcode[opcode].mask; if (unlikely(mask & RXE_READ_OR_ATOMIC_MASK)) { if (check_init_depth(qp, wqe)) - goto exit; + goto err; } mtu = get_mtu(qp);
Current rxe_requester() doesn't generate a completion on error after getting a wqe. Fix the issue by calling "goto err;" instead. Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com> --- drivers/infiniband/sw/rxe/rxe_req.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)