Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e17530f authored by Honggang LI's avatar Honggang LI Committed by Greg Kroah-Hartman
Browse files

RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs



[ Upstream commit 4adcaf969d77d3d3aa3871bbadc196258a38aec6 ]

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: 8700e3e7 ("Soft RoCE driver")
Signed-off-by: default avatarHonggang LI <honggangli@163.com>
Link: https://lore.kernel.org/r/20240624020348.494338-1-honggangli@163.com


Reviewed-by: default avatarZhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6607140c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
	int			solicited;
	u16			pkey;
	u32			qp_num;
	int			ack_req;
	int			ack_req = 0;

	/* length from start of bth to end of icrc */
	paylen = rxe_opcode[opcode].length + payload + pad + RXE_ICRC_SIZE;
@@ -426,6 +426,7 @@ 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;

	if (qp_type(qp) != IB_QPT_UD && qp_type(qp) != IB_QPT_UC)
		ack_req = ((pkt->mask & RXE_END_MASK) ||
			   (qp->req.noack_pkts++ > RXE_MAX_PKT_PER_ACK));
	if (ack_req)