Re: [PATCH] RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2024/6/24 10:03, Honggang LI 写道:
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.

From IBTA
"
o9-30: If a TCA responder implements Reliable Connection service, or if
a CA responder implements Reliable Datagram or XRC service, the responder shall behave as follows. A responder shall acknowledge each request packet received. A responder shall generate an explicit response
for each RDMA READ request received. A responder shall generate an
explicit response for each ATOMIC Request received. A responder shall
generate response packets in the PSN order in which the original request
packets were received, including RDMA READ responses.
"

This ack_req should be based on "Reliable Connection service".
As such, I am fine with this commit.

Reviewed-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxx>

Thanks,
Zhu Yanjun


Fixes: 8700e3e7c485 ("Soft RoCE driver")
Signed-off-by: Honggang LI <honggangli@xxxxxxx>
---
  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;





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux