Blame SOURCES/0001-mlx5-Fix-wqe-size-parameter-in-wqe-signature-calcula.patch

0e3d1a
From e99103602f477c84f31b79779f7544d6e1704593 Mon Sep 17 00:00:00 2001
0e3d1a
From: Michael Guralnik <michaelgur@nvidia.com>
0e3d1a
Date: Mon, 19 Oct 2020 09:00:56 +0300
0e3d1a
Subject: [PATCH] mlx5: Fix wqe size parameter in wqe signature calculation
0e3d1a
0e3d1a
[ Upstream commit 8cde184624d192f7cd61247eec92a3a9b4ba7c7f ]
0e3d1a
0e3d1a
WQE signature calculation requires passing the size of the WQE as a
0e3d1a
parameter.
0e3d1a
0e3d1a
Current code passes the qpn_ds field as the WQE size which is wrong.
0e3d1a
Fixing to extract from the qpn_ds the WQE size in bytes and use it for
0e3d1a
the signature calculations.
0e3d1a
0e3d1a
Fixes: 8c4791ae2395 ("libmlx5: First version of libmlx5")
0e3d1a
Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
0e3d1a
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
0e3d1a
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
0e3d1a
---
0e3d1a
 providers/mlx5/qp.c | 2 +-
0e3d1a
 1 file changed, 1 insertion(+), 1 deletion(-)
0e3d1a
0e3d1a
diff --git a/providers/mlx5/qp.c b/providers/mlx5/qp.c
0e3d1a
index 077346d63137..13d7bcccc39d 100644
0e3d1a
--- a/providers/mlx5/qp.c
0e3d1a
+++ b/providers/mlx5/qp.c
0e3d1a
@@ -368,7 +368,7 @@ static int set_data_inl_seg(struct mlx5_qp *qp, struct ibv_send_wr *wr,
0e3d1a
 
0e3d1a
 static uint8_t wq_sig(struct mlx5_wqe_ctrl_seg *ctrl)
0e3d1a
 {
0e3d1a
-	return calc_sig(ctrl, be32toh(ctrl->qpn_ds));
0e3d1a
+	return calc_sig(ctrl, (be32toh(ctrl->qpn_ds) & 0x3f) << 4);
0e3d1a
 }
0e3d1a
 
0e3d1a
 #ifdef MLX5_DEBUG
0e3d1a
-- 
0e3d1a
2.25.4
0e3d1a