Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH] RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs
@ 2024-06-24  2:03 Honggang LI
  2024-06-24 13:33 ` Zhu Yanjun
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Honggang LI @ 2024-06-24  2:03 UTC (permalink / raw)
  To: zyjzyj2000, jgg, leon, linux-rdma
  Cc: dledford, kamalh, amirv, monis, haggaie, honggangli

BTH_ACK_MASK bit is used to indicate that an acknowledge
(for this packet) should be scheduled by the responder.
Both UC and UD QPs are unacknowledged, so don't set
BTH_ACK_MASK for UC or UD QPs.

Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Honggang LI <honggangli@163.com>
---
 drivers/infiniband/sw/rxe/rxe_req.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index cd14c4c2dff9..ffd7ed712a02 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -445,8 +445,12 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
 	qp_num = (pkt->mask & RXE_DETH_MASK) ? ibwr->wr.ud.remote_qpn :
 					 qp->attr.dest_qp_num;
 
-	ack_req = ((pkt->mask & RXE_END_MASK) ||
-		(qp->req.noack_pkts++ > RXE_MAX_PKT_PER_ACK));
+	if (qp_type(qp) == IB_QPT_UD || qp_type(qp) == IB_QPT_UC)
+		ack_req = 0;
+	else {
+		ack_req = ((pkt->mask & RXE_END_MASK) ||
+			(qp->req.noack_pkts++ > RXE_MAX_PKT_PER_ACK));
+	}
 	if (ack_req)
 		qp->req.noack_pkts = 0;
 
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-24 14:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24  2:03 [PATCH] RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs Honggang LI
2024-06-24 13:33 ` Zhu Yanjun
2024-06-24 14:18 ` Leon Romanovsky
2024-06-24 14:18 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox