* [PATCH for-next v3 05/13] RDMA/rxe: Cleanup comp tasks in rxe_qp.c
@ 2022-10-29 3:13 Bob Pearson
0 siblings, 0 replies; only message in thread
From: Bob Pearson @ 2022-10-29 3:13 UTC (permalink / raw)
To: jgg, leon, zyjzyj2000, jhack, linux-rdma; +Cc: Bob Pearson, Ian Ziemba
Take advantage of inline task behavior to cleanup code in rxe_qp.c
for completer tasks.
Signed-off-by: Ian Ziemba <ian.ziemba@hpe.com>
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
drivers/infiniband/sw/rxe/rxe_qp.c | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index b5e108794aa1..3691eb97c576 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -480,8 +480,7 @@ static void rxe_qp_reset(struct rxe_qp *qp)
/* stop request/comp */
if (qp->sq.queue) {
- if (qp_type(qp) == IB_QPT_RC)
- rxe_disable_task(&qp->comp.task);
+ rxe_disable_task(&qp->comp.task);
rxe_disable_task(&qp->req.task);
}
@@ -524,9 +523,7 @@ static void rxe_qp_reset(struct rxe_qp *qp)
rxe_enable_task(&qp->resp.task);
if (qp->sq.queue) {
- if (qp_type(qp) == IB_QPT_RC)
- rxe_enable_task(&qp->comp.task);
-
+ rxe_enable_task(&qp->comp.task);
rxe_enable_task(&qp->req.task);
}
}
@@ -537,10 +534,7 @@ static void rxe_qp_drain(struct rxe_qp *qp)
if (qp->sq.queue) {
if (qp->req.state != QP_STATE_DRAINED) {
qp->req.state = QP_STATE_DRAIN;
- if (qp_type(qp) == IB_QPT_RC)
- rxe_sched_task(&qp->comp.task);
- else
- __rxe_do_task(&qp->comp.task);
+ rxe_sched_task(&qp->comp.task);
rxe_sched_task(&qp->req.task);
}
}
@@ -556,11 +550,7 @@ void rxe_qp_error(struct rxe_qp *qp)
/* drain work and packet queues */
rxe_sched_task(&qp->resp.task);
-
- if (qp_type(qp) == IB_QPT_RC)
- rxe_sched_task(&qp->comp.task);
- else
- __rxe_do_task(&qp->comp.task);
+ rxe_sched_task(&qp->comp.task);
rxe_sched_task(&qp->req.task);
}
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-29 3:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-29 3:13 [PATCH for-next v3 05/13] RDMA/rxe: Cleanup comp tasks in rxe_qp.c Bob Pearson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox