Skip to content

Commit 9cc6290

Browse files
Bob Pearsonjgunthorpe
authored andcommitted
RDMA/rxe: Get rid of pkt resend on err
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. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bob Pearson <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 55bec1c commit 9cc6290

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

drivers/infiniband/sw/rxe/rxe_net.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,7 @@ static int rxe_send(struct sk_buff *skb, struct rxe_pkt_info *pkt)
371371
else
372372
err = ip6_local_out(dev_net(skb_dst(skb)->dev), skb->sk, skb);
373373

374-
if (unlikely(net_xmit_eval(err))) {
375-
rxe_dbg_qp(pkt->qp, "error sending packet: %d\n", err);
376-
return -EAGAIN;
377-
}
378-
379-
return 0;
374+
return err;
380375
}
381376

382377
/* fix up a send packet to match the packets

drivers/infiniband/sw/rxe/rxe_req.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -802,18 +802,8 @@ int rxe_requester(struct rxe_qp *qp)
802802

803803
err = rxe_xmit_packet(qp, &pkt, skb);
804804
if (err) {
805-
if (err != -EAGAIN) {
806-
wqe->status = IB_WC_LOC_QP_OP_ERR;
807-
goto err;
808-
}
809-
810-
/* force a delay until the dropped packet is freed and
811-
* the send queue is drained below the low water mark
812-
*/
813-
qp->need_req_skb = 1;
814-
815-
rxe_sched_task(&qp->send_task);
816-
goto exit;
805+
wqe->status = IB_WC_LOC_QP_OP_ERR;
806+
goto err;
817807
}
818808

819809
update_wqe_state(qp, wqe, &pkt);

0 commit comments

Comments
 (0)