From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B9E04A00E6 for ; Mon, 5 Aug 2019 15:29:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE9FC1BDE8; Mon, 5 Aug 2019 15:29:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 7F3BC1BDE0 for ; Mon, 5 Aug 2019 15:29:48 +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 x75DOS9B011545; Mon, 5 Aug 2019 06:29:47 -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=ssZdvLPWmJ4elgr83pvafH0Es3/d34qFPsHJybOO2Ao=; b=XqB7LIIi4rXQSMOLjWwa3POfxGrcUPSjC9vIyiz6SFBVRlmNtDkTimnR+Em5E+2kYjBU /sK+dOLqXw915A/QIQvXH/aMqh7DgqEQ1poAlprfRTKYviUIP7LqNDKbKgyGxkyNJdw7 7a7oa4mRRHvac+kxvNZMHDWE0Er7D8FUPusyMsB+ZamoQuV46R3AoeXDHUGz0k9yo3xj jWlor153sRKLMM1koeMIXnDJjbzDUU026WiFScTIALQFcFEC9ZthNCEqPVsVLLbWgVc5 vRobbzHLzCNGrXJtCrZpAsJ3mWLILt2jeUQVpXuIFq9VjhQcTgavbLrDjUgcJwrzeWqi bg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2u57mqy10r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 05 Aug 2019 06:29:47 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 5 Aug 2019 06:29:45 -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; Mon, 5 Aug 2019 06:29:46 -0700 Received: from hyd1vattunuru-dt.caveonetworks.com (unknown [10.29.52.72]) by maili.marvell.com (Postfix) with ESMTP id 2F6CC3F7040; Mon, 5 Aug 2019 06:29:43 -0700 (PDT) From: To: CC: , , Vamsi Attunuru Date: Mon, 5 Aug 2019 18:59:36 +0530 Message-ID: <20190805132936.3904-1-vattunuru@marvell.com> X-Mailer: git-send-email 2.8.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-05_07:2019-07-31,2019-08-05 signatures=0 Subject: [dpdk-dev] [PATCH v1 1/1] net/octeontx2: fix optimal default smq buffer count 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 Patch extends minimum supported max_sqb_count devarg value such that it can limit the max sqb count to 8 buffers and also defines NIX_DEF_SQB and uses it to compute the number of smq buffers required for the egress traffic. NIX_DEF_SQB is defined as 16 which is optimal across multiple octeontx2 platforms to scale up the performance proportional to the corresponding port/queue to lcore mappings. Fixes: fb0198b7dc07 ("net/octeontx2: add devargs parsing functions") Signed-off-by: Vamsi Attunuru --- drivers/net/octeontx2/otx2_ethdev.c | 2 +- drivers/net/octeontx2/otx2_ethdev.h | 3 ++- drivers/net/octeontx2/otx2_ethdev_devargs.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 3fb7bd9..3615ed2 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -810,7 +810,7 @@ nix_alloc_sqb_pool(int port, struct otx2_eth_txq *txq, uint16_t nb_desc) nb_sqb_bufs = nb_desc / sqes_per_sqb; /* Clamp up to devarg passed SQB count */ - nb_sqb_bufs = RTE_MIN(dev->max_sqb_count, RTE_MAX(NIX_MIN_SQB, + nb_sqb_bufs = RTE_MIN(dev->max_sqb_count, RTE_MAX(NIX_DEF_SQB, nb_sqb_bufs + NIX_SQB_LIST_SPACE)); txq->sqb_pool = rte_mempool_create_empty(name, NIX_MAX_SQB, blk_sz, diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h index 720386f..027b909 100644 --- a/drivers/net/octeontx2/otx2_ethdev.h +++ b/drivers/net/octeontx2/otx2_ethdev.h @@ -66,7 +66,8 @@ (NIX_MAX_FRS - NIX_L2_OVERHEAD) #define NIX_MAX_SQB 512 -#define NIX_MIN_SQB 32 +#define NIX_DEF_SQB 16 +#define NIX_MIN_SQB 8 #define NIX_SQB_LIST_SPACE 2 #define NIX_RSS_RETA_SIZE_MAX 256 /* Group 0 will be used for RSS, 1 -7 will be used for rte_flow RSS action*/ diff --git a/drivers/net/octeontx2/otx2_ethdev_devargs.c b/drivers/net/octeontx2/otx2_ethdev_devargs.c index 85e7e31..7dc6e92 100644 --- a/drivers/net/octeontx2/otx2_ethdev_devargs.c +++ b/drivers/net/octeontx2/otx2_ethdev_devargs.c @@ -160,6 +160,6 @@ RTE_PMD_REGISTER_PARAM_STRING(net_octeontx2, OTX2_RSS_RETA_SIZE "=<64|128|256>" OTX2_PTYPE_DISABLE "=1" OTX2_SCL_ENABLE "=1" - OTX2_MAX_SQB_COUNT "=<32-512>" + OTX2_MAX_SQB_COUNT "=<8-512>" OTX2_FLOW_PREALLOC_SIZE "=<1-32>" OTX2_FLOW_MAX_PRIORITY "=<1-32>"); -- 2.8.4