Hi, > -----Original Message----- > From: Dekel Peled <dek...@mellanox.com> > Sent: Monday, May 11, 2020 1:03 PM > To: Matan Azrad <ma...@mellanox.com>; Slava Ovsiienko > <viachesl...@mellanox.com>; Raslan Darawsheh <rasl...@mellanox.com> > Cc: dev@dpdk.org; sta...@dpdk.org > 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: sta...@dpdk.org > > Signed-off-by: Dekel Peled <dek...@mellanox.com> > Acked-by: Matan Azrad <ma...@mellanox.com> > --- > 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 <unistd.h> > + > #include <rte_vect.h> > #include <rte_byteorder.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 { > -- > 1.8.3.1
Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh