From patchwork Tue Sep 10 11:03:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vamsi Krishna Attunuru X-Patchwork-Id: 59098 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A36291EBB7; Tue, 10 Sep 2019 13:03:44 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id B62441E9BF for ; Tue, 10 Sep 2019 13:03:42 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8AAZPZN025351; Tue, 10 Sep 2019 04:03:41 -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-type; s=pfpt0818; bh=HW4iNEyoZE0Xh9fjin15fmv/59DqoiqZEfW1hhrfAZQ=; b=cfeW2tB4VInUv2UwpqYJt/GXl+oXflZspoi7MLQoYfv9RqJ1XaAUq02apYVLA432mt2l pcK4Z0Q8b4H5ekUutc1dkYQnQF0rkXci3nnAbdlZ1OO0oT22DsjKXVI2WUW8TLxOaSfR 9EM+EX3wqJYnONHrSgJuNv4Uu9KqyHZwF1iIVwguNC0e44ZgLqHIAZZMDhfJPldWdkBZ JhHk2aB2oz6FB7dDXsg8Gb00yJV0BcloUn4Bw5CZc3QpmzPNndexrw9iwR9K1xnDDFaO jaKcnrQrFxJo0KLr/fBV20Txwfe6gzEqOpcwxWTbYuGrr4IlumdvCnafY4jzOJ2VrV5b Kw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2uv9wpv7d8-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 10 Sep 2019 04:03:41 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 10 Sep 2019 04:03:37 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 10 Sep 2019 04:03:37 -0700 Received: from hyd1vattunuru-dt.caveonetworks.com (unknown [10.29.52.72]) by maili.marvell.com (Postfix) with ESMTP id 551273F7043; Tue, 10 Sep 2019 04:03:35 -0700 (PDT) From: To: CC: , , Vamsi Attunuru Date: Tue, 10 Sep 2019 16:33:24 +0530 Message-ID: <20190910110324.27861-1-vattunuru@marvell.com> X-Mailer: git-send-email 2.8.4 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-10_07:2019-09-10,2019-09-10 signatures=0 Subject: [dpdk-dev] [PATCH v1 1/1] mempool/octeontx2: remove minimum chunck size limitation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Vamsi Attunuru Memory required for the mempool objects need not be physically contiguous on octeontx2's HW, mempool pmd supports the minimum chunk size set by the default handler. Hence discarding the limitation set by the pmd on the min_chunk_size value. Signed-off-by: Vamsi Attunuru Acked-by: Jerin Jacob --- drivers/mempool/octeontx2/otx2_mempool_ops.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c index f5a4fe3..d769575 100644 --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c @@ -713,24 +713,12 @@ static ssize_t otx2_npa_calc_mem_size(const struct rte_mempool *mp, uint32_t obj_num, uint32_t pg_shift, size_t *min_chunk_size, size_t *align) { - ssize_t mem_size; - /* * Simply need space for one more object to be able to * fulfill alignment requirements. */ - mem_size = rte_mempool_op_calc_mem_size_default(mp, obj_num + 1, - pg_shift, - min_chunk_size, align); - if (mem_size >= 0) { - /* - * Memory area which contains objects must be physically - * contiguous. - */ - *min_chunk_size = mem_size; - } - - return mem_size; + return rte_mempool_op_calc_mem_size_default(mp, obj_num + 1, pg_shift, + min_chunk_size, align); } static int