regex/mlx5: fix memory rule alignment

Due to Kernel requirement the memory allocated must be aligned to 2M.

Fixes: b34d816363 ("regex/mlx5: support rules import")
Cc: stable@dpdk.org

Signed-off-by: Ori Kam <orika@nvidia.com>
This commit is contained in:
Ori Kam 2021-01-07 18:57:07 +02:00 committed by Thomas Monjalon
parent 7e9a0cae13
commit 7e8b42e89a

View File

@ -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;