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 376D0A0C47; Fri, 11 Jun 2021 12:21:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC6514067C; Fri, 11 Jun 2021 12:21:29 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 07AA44014F for ; Fri, 11 Jun 2021 12:21:27 +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 15BABePS020986 for ; Fri, 11 Jun 2021 03:21:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=PXycm+g0Vu3MifH8TX8ehUnkWjS++xM9VSdbZ5PBffc=; b=Boik+HyzFpG37+Zr3ah4oxPuRaEvrTbcshzMQM81Y/sAvs8SU9KFUwulAYGjcUL1f/qv f8h+SLqXUlfjC+zf8WTBWicVQWiJOcmHEQJYylD7I9emg8r4Z+0XKprUC/Q1a8k+v++V y0f/WjFK3uAnQMkkV124oEooX4gR5eNOfhnkpybbT86m2eHyDsCWAsQbQtCUaSJIeQ5J oBctspWy9voQE9OJkTF/OzzFvRGF/hfh8mFcUwb4Dn8NqlH+AivIgqadhZ9hAIKHstCD BefKV87MG5Jymfo1qZNu2Cb80CQkGcs6v8HoJbcXaYsaHXz35nLqQZWZ1bEL51Baaw1Q bA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 393x92hmvp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 11 Jun 2021 03:21:26 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) 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:25 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 11 Jun 2021 03:21:25 -0700 Received: from HY-LT1002.marvell.com (unknown [10.193.70.1]) by maili.marvell.com (Postfix) with ESMTP id BEFD53F7074; Fri, 11 Jun 2021 03:21:22 -0700 (PDT) From: Anoob Joseph To: Akhil Goyal CC: Anoob Joseph , Jerin Jacob , "Ankur Dwivedi" , Tejasree Kondoj , Date: Fri, 11 Jun 2021 15:51:12 +0530 Message-ID: <1623406873-7108-1-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: bbQCJauBHujIJRmYtYT_tbg5FA1IoI05 X-Proofpoint-GUID: bbQCJauBHujIJRmYtYT_tbg5FA1IoI05 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 1/2] crypto/octeontx2: 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/octeontx2/otx2_cryptodev_ops.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c index 0cf8e80..12a2747 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c +++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c @@ -45,12 +45,12 @@ qp_memzone_name_get(char *name, int size, int dev_id, int qp_id) static int otx2_cpt_metabuf_mempool_create(const struct rte_cryptodev *dev, struct otx2_cpt_qp *qp, uint8_t qp_id, - int nb_elements) + unsigned int nb_elements) { char mempool_name[RTE_MEMPOOL_NAMESIZE]; struct cpt_qp_meta_info *meta_info; + int ret, max_mlen, mb_pool_sz; struct rte_mempool *pool; - int ret, max_mlen; int asym_mlen = 0; int lb_mlen = 0; int sg_mlen = 0; @@ -87,7 +87,9 @@ otx2_cpt_metabuf_mempool_create(const struct rte_cryptodev *dev, snprintf(mempool_name, RTE_MEMPOOL_NAMESIZE, "otx2_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