From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EA26EA0350 for ; Mon, 11 May 2020 12:04:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D35001C220; Mon, 11 May 2020 12:04:14 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 865531C20D for ; Mon, 11 May 2020 12:04:11 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 11 May 2020 13:04:08 +0300 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.228.134.250]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 04BA48J3017265; Mon, 11 May 2020 13:04:08 +0300 From: Dekel Peled To: matan@mellanox.com, viacheslavo@mellanox.com, rasland@mellanox.com Cc: dev@dpdk.org, stable@dpdk.org Date: Mon, 11 May 2020 13:02:45 +0300 Message-Id: <7a382de5e9be260f7cadb07fd5396f48615ea911.1589191348.git.dekelp@mellanox.com> X-Mailer: git-send-email 1.7.1 Subject: [dpdk-stable] [PATCH] common/mlx5: fix umem buffer alignment X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 4ab1c75..b39a141 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 { -- 1.8.3.1