From 4240b11e7b32e5b5ca23eb81fbcd6ac5c967248c Mon Sep 17 00:00:00 2001 From: Dekel Peled Date: Mon, 11 May 2020 13:02:45 +0300 Subject: [PATCH] common/mlx5: fix umem buffer alignment 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") Cc: stable@dpdk.org Signed-off-by: Dekel Peled Acked-by: Matan Azrad --- drivers/common/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 @@ #pragma GCC diagnostic error "-Wpedantic" #endif +#include + #include #include @@ -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