From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id ADE6FA09F0; Thu, 17 Dec 2020 09:52:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B550BC9FE; Thu, 17 Dec 2020 09:52:27 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 3EFEEC9FC for ; Thu, 17 Dec 2020 09:52:26 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from orika@nvidia.com) with SMTP; 17 Dec 2020 10:52:20 +0200 Received: from MTL-ORIKA.mtl.com ([172.27.14.211]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BH8qHp3015085; Thu, 17 Dec 2020 10:52:19 +0200 From: Ori Kam To: thomas@monjalon.net Cc: orika@mellanox.com, dev@dpdk.org, stable@dpdk.org Date: Thu, 17 Dec 2020 10:51:55 +0200 Message-Id: <20201217085158.28367-2-orika@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201217085158.28367-1-orika@nvidia.com> References: <20201217085158.28367-1-orika@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/4] regex/mlx5: fix memory rule alignment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.25.1