[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190111131054.818823621@linuxfoundation.org>
Date: Fri, 11 Jan 2019 15:15:00 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Walker Benjamin <benjamin.walker@...el.com>,
Sagi Grimberg <sagi@...mberg.me>,
Zhu Yanjun <yanjun.zhu@...cle.com>,
Doug Ledford <dledford@...hat.com>
Subject: [PATCH 4.9 57/63] rxe: fix error completion wr_id and qp_num
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sagi Grimberg <sagi@...mberg.me>
commit e48d8ed9c6193502d849b35767fd18e20bbd7ba2 upstream.
Error completions must still contain a valid wr_id and
qp_num such that the consumer can rely on. Correctly
fill these fields in receive error completions.
Reported-by: Walker Benjamin <benjamin.walker@...el.com>
Cc: stable@...r.kernel.org
Signed-off-by: Sagi Grimberg <sagi@...mberg.me>
Reviewed-by: Zhu Yanjun <yanjun.zhu@...cle.com>
Tested-by: Zhu Yanjun <yanjun.zhu@...cle.com>
Signed-off-by: Doug Ledford <dledford@...hat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/infiniband/sw/rxe/rxe_resp.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -826,11 +826,16 @@ static enum resp_states do_complete(stru
memset(&cqe, 0, sizeof(cqe));
- wc->wr_id = wqe->wr_id;
- wc->status = qp->resp.status;
- wc->qp = &qp->ibqp;
+ if (qp->rcq->is_user) {
+ uwc->status = qp->resp.status;
+ uwc->qp_num = qp->ibqp.qp_num;
+ uwc->wr_id = wqe->wr_id;
+ } else {
+ wc->status = qp->resp.status;
+ wc->qp = &qp->ibqp;
+ wc->wr_id = wqe->wr_id;
+ }
- /* fields after status are not required for errors */
if (wc->status == IB_WC_SUCCESS) {
wc->opcode = (pkt->mask & RXE_IMMDT_MASK &&
pkt->mask & RXE_WRITE_MASK) ?
Powered by blists - more mailing lists