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

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