From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 294FBA0C47; Fri, 11 Jun 2021 12:21:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A62A3410F0; Fri, 11 Jun 2021 12:21:34 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 10BF7410E5 for ; Fri, 11 Jun 2021 12:21:32 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15BABeHt020967 for ; Fri, 11 Jun 2021 03:21:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=jqM8ExqO4NF3aX7iXACz4kUSUJx5jfXNcpALemWUfzk=; b=VmM9OWZsPo0T8HxDEGwaitM3YyY8L71Rs6Ho6nzMulasXHAEIY1i4GHGZa/zLHeugs1e wIM5y6Rd7z/dm0RyZVYT5gsg7o6iABekYBkP6tpDy1kvCCUIx2IWH9GLjPzzJeCtYl62 oY2jA+pCpRSDnPuTaga4HiUr1q0x8npjDD158XmiSpuvfw+VVDoKUXAuJmFML9Qkbpru Xo0hF/5UCJetVlkKRy8/9/VLni7sCt4rjoVKaF12iSPBoC8tfRZJtpm4jH/2T/Bo2z3q z9Rjloxt4REKVyN5JOaX6eXBewgoUaHoHwSGruy+yii9SIYTUSTzxe5p+Dq0NJzRJWGG Gg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 393x92hmw1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 11 Jun 2021 03:21:32 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Jun 2021 03:21:30 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 11 Jun 2021 03:21:30 -0700 Received: from HY-LT1002.marvell.com (unknown [10.193.70.1]) by maili.marvell.com (Postfix) with ESMTP id 498203F7074; Fri, 11 Jun 2021 03:21:26 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal CC: Anoob Joseph , Jerin Jacob , "Ankur Dwivedi" , Tejasree Kondoj , Date: Fri, 11 Jun 2021 15:51:13 +0530 Message-ID: <1623406873-7108-2-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1623406873-7108-1-git-send-email-anoobj@marvell.com> References: <1623406873-7108-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: _WNTvOUVvWsXVMFr3JpJIBxsbb6uWYFR X-Proofpoint-GUID: _WNTvOUVvWsXVMFr3JpJIBxsbb6uWYFR X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-11_03:2021-06-11, 2021-06-11 signatures=0 Subject: [dpdk-dev] [PATCH 2/2] crypto/octeontx: increase metabuf pool 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" When used with crypto adapter, metabuf pool would be shared across cores. Account for the same in pool size. Signed-off-by: Anoob Joseph --- drivers/crypto/octeontx/otx_cryptodev_hw_access.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c index 5229e7c..ab335c6 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c +++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c @@ -409,7 +409,7 @@ otx_cpt_deinit_device(void *dev) static int otx_cpt_metabuf_mempool_create(const struct rte_cryptodev *dev, struct cpt_instance *instance, uint8_t qp_id, - int nb_elements) + unsigned int nb_elements) { char mempool_name[RTE_MEMPOOL_NAMESIZE]; struct cpt_qp_meta_info *meta_info; @@ -417,6 +417,7 @@ otx_cpt_metabuf_mempool_create(const struct rte_cryptodev *dev, int max_mlen = 0; int sg_mlen = 0; int lb_mlen = 0; + int mb_pool_sz; int ret; /* @@ -453,7 +454,9 @@ otx_cpt_metabuf_mempool_create(const struct rte_cryptodev *dev, snprintf(mempool_name, RTE_MEMPOOL_NAMESIZE, "otx_cpt_mb_%u:%u", dev->data->dev_id, qp_id); - pool = rte_mempool_create_empty(mempool_name, nb_elements, max_mlen, + mb_pool_sz = RTE_MAX(nb_elements, (METABUF_POOL_CACHE_SIZE * rte_lcore_count())); + + pool = rte_mempool_create_empty(mempool_name, mb_pool_sz, max_mlen, METABUF_POOL_CACHE_SIZE, 0, rte_socket_id(), 0); -- 2.7.4