From 7e8b42e89aaa9217472fc2a3aa37718391ae08a5 Mon Sep 17 00:00:00 2001 From: Ori Kam Date: Thu, 7 Jan 2021 18:57:07 +0200 Subject: [PATCH] regex/mlx5: fix memory rule alignment Due to Kernel requirement the memory allocated must be aligned to 2M. Fixes: b34d816363b5 ("regex/mlx5: support rules import") Cc: stable@dpdk.org Signed-off-by: Ori Kam --- drivers/regex/mlx5/mlx5_rxp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c index fcbc766441..bd721f0b11 100644 --- a/drivers/regex/mlx5/mlx5_rxp.c +++ b/drivers/regex/mlx5/mlx5_rxp.c @@ -892,7 +892,7 @@ rxp_db_setup(struct mlx5_regex_priv *priv) /* Setup database memories for both RXP engines + reprogram memory. */ for (i = 0; i < (priv->nb_engines + MLX5_RXP_EM_COUNT); i++) { - priv->db[i].ptr = rte_malloc("", MLX5_MAX_DB_SIZE, 0); + priv->db[i].ptr = rte_malloc("", MLX5_MAX_DB_SIZE, 1 << 21); if (!priv->db[i].ptr) { DRV_LOG(ERR, "Failed to alloc db memory!"); ret = ENODEV; -- 2.20.1