[dpdk-stable] patch 'common/mlx5: fix umem buffer alignment' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri May 22 11:39:51 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/24/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 22f701a5d4ce1a8f97695545818f1ac140ff91b3 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp at mellanox.com>
Date: Mon, 11 May 2020 13:02:45 +0300
Subject: [PATCH] common/mlx5: fix umem buffer alignment

[ upstream commit 4240b11e7b32e5b5ca23eb81fbcd6ac5c967248c ]

The value MLX5_WQE_BUF_ALIGNMENT is defined as 512.
In some cases this alignment size is not adequate, which results in
memory registration that is not accepted by FW.
The result error can be "page_offset is not aligned to page_size/64,
bad umem_offset" (syndrome 0x357275).

This patch updates the definition to match the running system.

Fixes: 18a68e046b51 ("net/mlx5: fix DevX Rx queue memory alignment")

Signed-off-by: Dekel Peled <dekelp at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_prm.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index bdbfe56a13..4c86719769 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -18,6 +18,8 @@
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
 
+#include <unistd.h>
+
 #include <rte_vect.h>
 #include "mlx5_autoconf.h"
 
@@ -251,7 +253,7 @@
 #define MLX5_MAX_LOG_RQ_SEGS 5u
 
 /* The alignment needed for WQ buffer. */
-#define MLX5_WQE_BUF_ALIGNMENT 512
+#define MLX5_WQE_BUF_ALIGNMENT sysconf(_SC_PAGESIZE)
 
 /* Completion mode. */
 enum mlx5_completion_mode {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-22 10:37:39.684834095 +0100
+++ 0012-common-mlx5-fix-umem-buffer-alignment.patch	2020-05-22 10:37:39.076411781 +0100
@@ -1,8 +1,10 @@
-From 4240b11e7b32e5b5ca23eb81fbcd6ac5c967248c Mon Sep 17 00:00:00 2001
+From 22f701a5d4ce1a8f97695545818f1ac140ff91b3 Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp at mellanox.com>
 Date: Mon, 11 May 2020 13:02:45 +0300
 Subject: [PATCH] common/mlx5: fix umem buffer alignment
 
+[ upstream commit 4240b11e7b32e5b5ca23eb81fbcd6ac5c967248c ]
+
 The value MLX5_WQE_BUF_ALIGNMENT is defined as 512.
 In some cases this alignment size is not adequate, which results in
 memory registration that is not accepted by FW.
@@ -12,26 +14,25 @@
 This patch updates the definition to match the running system.
 
 Fixes: 18a68e046b51 ("net/mlx5: fix DevX Rx queue memory alignment")
-Cc: stable at dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp at mellanox.com>
 Acked-by: Matan Azrad <matan at mellanox.com>
 ---
- drivers/common/mlx5/mlx5_prm.h | 4 +++-
+ drivers/net/mlx5/mlx5_prm.h | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
-index 4ab1c75930..b39a141d74 100644
---- a/drivers/common/mlx5/mlx5_prm.h
-+++ b/drivers/common/mlx5/mlx5_prm.h
-@@ -16,6 +16,8 @@
+diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
+index bdbfe56a13..4c86719769 100644
+--- a/drivers/net/mlx5/mlx5_prm.h
++++ b/drivers/net/mlx5/mlx5_prm.h
+@@ -18,6 +18,8 @@
  #pragma GCC diagnostic error "-Wpedantic"
  #endif
  
 +#include <unistd.h>
 +
  #include <rte_vect.h>
- #include <rte_byteorder.h>
+ #include "mlx5_autoconf.h"
  
 @@ -251,7 +253,7 @@
  #define MLX5_MAX_LOG_RQ_SEGS 5u


More information about the stable mailing list