From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96DBF1E86F; Tue, 30 Jul 2024 17:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722359019; cv=none; b=hGV5VLVQkCs0l7/TxDXc8YCvyUhX49OH+oXdTBF8uFR7tx1f3+rnAoCkqNt6B8TYwETgT0Wb+1Z7rTy/FkQS6O53nU5z/DLnqlkKV+WPpYLxBGLq3D7E0xkOVPtXyXskE52GdFkyPpLNi+0GSIWxq2qYH63awBxqjkIlgW5e5Vw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722359019; c=relaxed/simple; bh=YuJJ45cYTudpWNlyvmoMbiRDBeykdwGrO4Sq8nbZkxQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RPRxgBGDpZi60F7zZVogt7RVGIcjXKPWC9D+ntEFXxSXnigjsnLq4CpP5aVfa96mE27i3u3DrM+k5zQcQ+H0Stn+WDpDRBntnaBmwZsB1LHSxpiIrvwIE8dFwSats12Yjq70HWItpll5EPDmF0tw2hRhPRL21jVA4791wAutZHM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qr76QLHT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qr76QLHT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CCBDC32782; Tue, 30 Jul 2024 17:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722359019; bh=YuJJ45cYTudpWNlyvmoMbiRDBeykdwGrO4Sq8nbZkxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qr76QLHTQMh3JJ/7JMudb8LYHac3BHiqNICbENJ2IvRZ+B/JjcrPuflc72H2T7tr4 RvyXImDCviMIkeRemuFIeFjgCaXjwZM/r8P7+MCoWwLUSSDacQxfw8BdpGB+c8LBrL mvRL/QMtpPnfBr2hR91RqKQ7pbJNDRUYL+9wuseg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Honggang LI , Zhu Yanjun , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 6.10 422/809] RDMA/rxe: Dont set BTH_ACK_MASK for UC or UD QPs Date: Tue, 30 Jul 2024 17:44:58 +0200 Message-ID: <20240730151741.362286308@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730151724.637682316@linuxfoundation.org> References: <20240730151724.637682316@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Honggang LI [ 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: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Honggang LI Link: https://lore.kernel.org/r/20240624020348.494338-1-honggangli@163.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/sw/rxe/rxe_req.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c index cd14c4c2dff9d..479c07e6e4ed3 100644 --- a/drivers/infiniband/sw/rxe/rxe_req.c +++ b/drivers/infiniband/sw/rxe/rxe_req.c @@ -424,7 +424,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp, int paylen; int solicited; 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; @@ -445,8 +445,9 @@ 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 = ((pkt->mask & RXE_END_MASK) || + (qp->req.noack_pkts++ > RXE_MAX_PKT_PER_ACK)); if (ack_req) qp->req.noack_pkts = 0; -- 2.43.0