Skip to content

Commit

Permalink
regex/mlx5: fix memory rule alignment
Browse files Browse the repository at this point in the history
[ upstream commit 7e8b42e ]

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

Fixes: b34d816 ("regex/mlx5: support rules import")

Signed-off-by: Ori Kam <orika@nvidia.com>
  • Loading branch information
orikam authored and bluca committed Feb 4, 2021
1 parent 746a7c2 commit dfbcce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regex/mlx5/mlx5_rxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dfbcce9

Please sign in to comment.