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 11/11] RDMA/rxe: Get rid of pkt resend on err
Date: Tue, 26 Mar 2024 12:43:26 -0500	[thread overview]
Message-ID: <20240326174325.300849-13-rpearsonhpe@gmail.com> (raw)
In-Reply-To: <20240326174325.300849-2-rpearsonhpe@gmail.com>

Currently the rxe_driver detects packet drops by ip_local_out()
which occur before the packet is sent on the wire and attempts to
resend them. This is redundant with the usual retry mechanism which
covers packets that get dropped in transit to or from the remote node.

The way this is implemented is not robust since it sets need_req_skb
and waits for the number of local skbs outstanding for this qp to
drop below a low water mark. This is racy since the skb may
be sent to the destructor before the requester can set the
need_req_skb flag. This will cause a deadlock in the send path for
that qp.

This patch removes this mechanism since the normal retry path will
correct the error and resend the packet and it makes no difference
if the packet is dropped locally or later.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_req.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index b217fa94ff03..445650b73b19 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -800,18 +800,8 @@ int rxe_requester(struct rxe_qp *qp)
 
 	err = rxe_xmit_packet(qp, &pkt, skb);
 	if (err) {
-		if (err != -EAGAIN) {
-			wqe->status = IB_WC_LOC_QP_OP_ERR;
-			goto err;
-		}
-
-		/* force a delay until the dropped packet is freed and
-		 * the send queue is drained below the low water mark
-		 */
-		qp->need_req_skb = 1;
-
-		rxe_sched_task(&qp->send_task);
-		goto exit;
+		wqe->status = IB_WC_LOC_QP_OP_ERR;
+		goto err;
 	}
 
 	update_wqe_state(qp, wqe, &pkt);
-- 
2.43.0


  parent reply	other threads:[~2024-03-26 17:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 17:43 [PATCH for-next 00/11] RDMA/rxe: Various fixes and cleanups Bob Pearson
2024-03-26 17:43 ` [PATCH for-next 01/11] RDMA/rxe: Fix seg fault in rxe_comp_queue_pkt Bob Pearson
2024-04-02 12:31   ` Leon Romanovsky
2024-03-26 17:43 ` [PATCH for-next 02/11] RDMA/rxe: Allow good work requests to be executed Bob Pearson
2024-04-02 12:57   ` Zhu Yanjun
2024-03-26 17:43 ` [PATCH for-next 03/11] RDMA/rxe: Remove redundant scheduling of rxe_completer Bob Pearson
2024-03-26 17:43 ` [PATCH for-next 04/11] RDMA/rxe: Merge request and complete tasks Bob Pearson
2024-03-26 17:43 ` [PATCH for-next 05/11] RDMA/rxe: Remove save/rollback_state in rxe_requester Bob Pearson
2024-03-26 17:43 ` [PATCH for-next 06/11] RDMA/rxe: Don't schedule rxe_completer() in rxe_requester() Bob Pearson
2024-03-26 17:43 ` [PATCH for-next 07/11] RDMA/rxe: Don't call rxe_requester from rxe_completer Bob Pearson
2024-04-02 12:29   ` Leon Romanovsky
2024-03-26 17:43 ` [PATCH for-next 08/11] RDMA/rxe: Don't call direct between tasks Bob Pearson
2024-03-26 17:43 ` [PATCH for-next 09/11] RDMA/rxe: Fix incorrect rxe_put in error path Bob Pearson
2024-03-26 17:43 ` [PATCH for-next 10/11] RDMA/rxe: Make rxe_loopback match rxe_send behavior Bob Pearson
2024-03-26 17:43 ` Bob Pearson [this message]
2024-03-26 19:01 ` [PATCH for-next 00/11] RDMA/rxe: Various fixes and cleanups Zhu Yanjun

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=20240326174325.300849-13-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.