From patchwork Tue Feb 23 06:13:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 88094 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B1264A034F; Tue, 23 Feb 2021 07:25:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E8BB1CC3CE; Tue, 23 Feb 2021 07:25:11 +0100 (CET) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id 605A01CC3CE for ; Tue, 23 Feb 2021 07:25:10 +0100 (CET) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 35F9320173A; Tue, 23 Feb 2021 07:25:10 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 20C70201732; Tue, 23 Feb 2021 07:25:08 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0EBDC402B7; Tue, 23 Feb 2021 07:25:04 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org, declan.doherty@intel.com Cc: Gagandeep Singh Date: Tue, 23 Feb 2021 11:43:07 +0530 Message-Id: <20210223061307.22765-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] l2fwd-crypto: align private data size to cache size 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" From: Gagandeep Singh L2fwd-crypto is passing 24b private data size while packet pool creation. This patch aligns that private data size to cache line size for better performance results. Signed-off-by: Gagandeep Singh Signed-off-by: Gagandeep Singh --- app/proc-info/main.c | 2 +- examples/l2fwd-crypto/main.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index b9587f7de..2ca685f86 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1406,7 +1406,7 @@ main(int argc, char **argv) /* If no port mask was specified, then show non-owned ports */ if (enabled_port_mask == 0) { RTE_ETH_FOREACH_DEV(i) - enabled_port_mask = 1ul << i; + enabled_port_mask |= 1ul << i; } for (i = 0; i < RTE_MAX_ETHPORTS; i++) { diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 656b14036..23a398043 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -2711,7 +2711,8 @@ main(int argc, char **argv) /* create the mbuf pool */ l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 512, - sizeof(struct rte_crypto_op), + RTE_ALIGN(sizeof(struct rte_crypto_op), + RTE_CACHE_LINE_SIZE), RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id()); if (l2fwd_pktmbuf_pool == NULL) rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");