From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4141BA0524; Thu, 7 Jan 2021 17:57:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D1F2140FE3; Thu, 7 Jan 2021 17:57:37 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id 1C68F140FC0 for ; Thu, 7 Jan 2021 17:57:34 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from orika@nvidia.com) with SMTP; 7 Jan 2021 18:57:29 +0200 Received: from MTL-ORIKA.mtl.com ([172.27.15.148]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 107GvNvh011624; Thu, 7 Jan 2021 18:57:29 +0200 From: Ori Kam To: thomas@monjalon.net Cc: orika@mellanox.com, dev@dpdk.org, stable@dpdk.org Date: Thu, 7 Jan 2021 18:57:07 +0200 Message-Id: <20210107165711.1782-2-orika@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107165711.1782-1-orika@nvidia.com> References: <20201217085158.28367-1-orika@nvidia.com> <20210107165711.1782-1-orika@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/5] regex/mlx5: fix memory rule alignment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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