[dpdk-dev] [PATCH v2] net/mlx5: fix hashed list size for tunnel flow groups

Viacheslav Ovsiienko viacheslavo at nvidia.com
Wed Feb 24 09:15:14 CET 2021

The hashed list size must be the power of 2, otherwise the
adjustment is applied and the warning message is emitted.
This patch provides the correct list size to eliminate the

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")
Cc: stable at dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>

v2: fix typos in commit message
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 632f46dfde..ab5be3dacc 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7940,7 +7940,8 @@ int mlx5_alloc_tunnel_hub(struct mlx5_dev_ctx_shared *sh)
 		return -ENOMEM;
-	thub->groups = mlx5_hlist_create("flow groups", MLX5_MAX_TABLES, 0,
+	thub->groups = mlx5_hlist_create("flow groups",
+					 rte_align32pow2(MLX5_MAX_TABLES), 0,
 					 0, mlx5_flow_tunnel_grp2tbl_create_cb,

More information about the dev mailing list