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

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