All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Pearson <rpearsonhpe@gmail.com>
To: yanjun.zhu@linux.dev, jgg@ziepe.ca, leon@kernel.org,
	linux-rdma@vger.kernel.org, jhack@hpe.com
Cc: Bob Pearson <rpearsonhpe@gmail.com>
Subject: [PATCH for-next v2 06/12] RDMA/rxe: Don't schedule rxe_completer from rxe_requester
Date: Wed, 27 Mar 2024 10:51:52 -0500	[thread overview]
Message-ID: <20240327155157.590886-8-rpearsonhpe@gmail.com> (raw)
In-Reply-To: <20240327155157.590886-2-rpearsonhpe@gmail.com>

Now that rxe_completer() is always called serially after
rxe_requester() there is no reason to schedule rxe_completer()
from rxe_requester().

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_net.c | 6 ------
 drivers/infiniband/sw/rxe/rxe_req.c | 9 ++-------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index 928508558df4..a2fc118e7ec1 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -440,12 +440,6 @@ int rxe_xmit_packet(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
 		return err;
 	}
 
-	if ((qp_type(qp) != IB_QPT_RC) &&
-	    (pkt->mask & RXE_END_MASK)) {
-		pkt->wqe->state = wqe_state_done;
-		rxe_sched_task(&qp->send_task);
-	}
-
 	rxe_counter_inc(rxe, RXE_CNT_SENT_PKTS);
 	goto done;
 
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index e20462c3040d..34c55dee0774 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -545,6 +545,8 @@ static void update_wqe_state(struct rxe_qp *qp,
 	if (pkt->mask & RXE_END_MASK) {
 		if (qp_type(qp) == IB_QPT_RC)
 			wqe->state = wqe_state_pending;
+		else
+			wqe->state = wqe_state_done;
 	} else {
 		wqe->state = wqe_state_processing;
 	}
@@ -631,12 +633,6 @@ static int rxe_do_local_ops(struct rxe_qp *qp, struct rxe_send_wqe *wqe)
 	wqe->status = IB_WC_SUCCESS;
 	qp->req.wqe_index = queue_next_index(qp->sq.queue, qp->req.wqe_index);
 
-	/* There is no ack coming for local work requests
-	 * which can lead to a deadlock. So go ahead and complete
-	 * it now.
-	 */
-	rxe_sched_task(&qp->send_task);
-
 	return 0;
 }
 
@@ -760,7 +756,6 @@ int rxe_requester(struct rxe_qp *qp)
 						       qp->req.wqe_index);
 			wqe->state = wqe_state_done;
 			wqe->status = IB_WC_SUCCESS;
-			rxe_sched_task(&qp->send_task);
 			goto done;
 		}
 		payload = mtu;
-- 
2.43.0


  parent reply	other threads:[~2024-03-27 15:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 15:51 [PATCH for-next v2 00/12] RDMA/rxe: Various fixes and cleanups Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 01/12] RDMA/rxe: Fix seg fault in rxe_comp_queue_pkt Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 02/12] RDMA/rxe: Allow good work requests to be executed Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 03/12] RDMA/rxe: Remove redundant scheduling of rxe_completer Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 04/12] RDMA/rxe: Merge request and complete tasks Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 05/12] RDMA/rxe: Remove save/rollback_state in rxe_requester Bob Pearson
2024-03-27 15:51 ` Bob Pearson [this message]
2024-03-27 15:51 ` [PATCH for-next v2 07/12] RDMA/rxe: Don't call rxe_requester from rxe_completer Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 08/12] RDMA/rxe: Don't call direct between tasks Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 09/12] RDMA/rxe: Fix incorrect rxe_put in error path Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 10/12] RDMA/rxe: Make rxe_loopback match rxe_send behavior Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 11/12] RDMA/rxe: Get rid of pkt resend on err Bob Pearson
2024-03-27 15:51 ` [PATCH for-next v2 12/12] RDMA/rxe: Let destroy qp succeed with stuck packet Bob Pearson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240327155157.590886-8-rpearsonhpe@gmail.com \
    --to=rpearsonhpe@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=jhack@hpe.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yanjun.zhu@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.