summaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw/rxe/rxe_resp.c
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2023-04-04 23:26:07 -0500
committerJason Gunthorpe <jgg@nvidia.com>2023-04-17 16:01:44 -0300
commita588429a66e92960b195b8dceb3fc5477a2b2f80 (patch)
tree46e519624b1c8257ebe2863ab3e071b4e1a04d3a /drivers/infiniband/sw/rxe/rxe_resp.c
parentbd4ba605c4a92b46ab414626a4f969a19103f97a (diff)
downloadlwn-a588429a66e92960b195b8dceb3fc5477a2b2f80.tar.gz
lwn-a588429a66e92960b195b8dceb3fc5477a2b2f80.zip
RDMA/rxe: Remove qp->resp.state
The rxe driver has four different QP state variables, qp->attr.qp_state, qp->req.state, qp->comp.state, and qp->resp.state. All of these basically carry the same information. This patch replaces uses of qp->resp.state by qp->attr.qp_state. This is the first of three patches which will remove all but the qp->attr.qp_state variable. This will bring the driver closer to the IBA description. Link: https://lore.kernel.org/r/20230405042611.6467-1-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_resp.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_resp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 01e3cbea8445..67eac616235c 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -1137,7 +1137,7 @@ static enum resp_states do_complete(struct rxe_qp *qp,
return RESPST_ERR_CQ_OVERFLOW;
finish:
- if (unlikely(qp->resp.state == QP_STATE_ERROR))
+ if (unlikely(qp_state(qp) == IB_QPS_ERR))
return RESPST_CHK_RESOURCE;
if (unlikely(!pkt))
return RESPST_DONE;
@@ -1464,10 +1464,10 @@ int rxe_responder(struct rxe_qp *qp)
struct rxe_pkt_info *pkt = NULL;
int ret;
- if (!qp->valid || qp->resp.state == QP_STATE_ERROR ||
- qp->resp.state == QP_STATE_RESET) {
- bool notify = qp->valid &&
- (qp->resp.state == QP_STATE_ERROR);
+ if (!qp->valid || qp_state(qp) == IB_QPS_ERR ||
+ qp_state(qp) == IB_QPS_RESET) {
+ bool notify = qp->valid && (qp_state(qp) == IB_QPS_ERR);
+
drain_req_pkts(qp);
flush_recv_queue(qp, notify);
goto exit;