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: 386248 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp1904750jap; Mon, 22 Feb 2021 22:25:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHKxaF8UYlub6sLuhqFDptdNZMy6Mp57xDYsY8S90n/w9w+6A72cQQMVKaTEA0FJhjwxjh X-Received: by 2002:a50:d7c7:: with SMTP id m7mr25798011edj.260.1614061511947; Mon, 22 Feb 2021 22:25:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614061511; cv=none; d=google.com; s=arc-20160816; b=MifQmT3HbmtZHR5WcA4aDEt9RrNhUzQxMkzI47NEJ1iMS6F3O6uaMZuVbmnKPkx7uq Yb/79pOu7XnLiEDpMhCEFVTqCQFfV1w5+d7qLwqoGa5kJ1/sLN6YCrDfmMhT0+QmslVo 1NfqTzMtKPfaJ0N6xacgcfhx+D1E9puNKX3kxqcnNl4jBaffJwoMn2rfMVCe8DgXaWhV BVkz3btzJIVPJ0g7JjCnQ9TIZz25QZWA29Nn2xRKPlEvyTGNRIMU42wD8vSqUj15OC4q es/TvNWgJUXKqn348pkHXJSbZhFg+/PzYmK7KoE3kOMdZ09ZzFK5TUdgWQPn3X/kfBmY 6oxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:cc:to :from; bh=BwvfdkO7cDX6FLgF4Yyx8HdN7YBhVWBj4DVBqs1wlDI=; b=FAPdVYqu9PWBe3yxq2lE4VAnKwvrgdqL8LAQF5vUClnc/HjYtRkihWnxGLj3HAWIPZ 4MY80NSvcYAkVNTTSy4JjhEOeg9xEyeTY04vdHsaoXzPJDca2amdni2S3ndYjcyvuSvO qebpvnUv+MpJh+VsMasmv2WLnmkNXQTjahTjEt2audVwP6ekyhE+X20MtUDZeClGb09M Pf2p/brSyq6eFYMizqP4ko/808ETy+xBhzSUQwDUUAvyJsF8Bua3DvWKuEi8Q1gwrfdb QO92V1cGZxldin7aV5H5IVytgbueA22EwuuMyeeDr9sYzTQG99qSP+a5w9TD68CuWSmL hNrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id h19si13496816eji.32.2021.02.22.22.25.11; Mon, 22 Feb 2021 22:25:11 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 --- app/proc-info/main.c | 2 +- examples/l2fwd-crypto/main.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.17.1 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");