From: Vamsi Attunuru Date: Mon, 5 Aug 2019 15:37:39 +0000 (+0530) Subject: net/octeontx2: fix optimal default SQE buffer count X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4d6816814acf2f8c64e8d4c26c07a1650b205f31;p=dpdk.git net/octeontx2: fix optimal default SQE buffer count 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 sqe 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 Acked-by: Jerin Jacob --- diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 4bd9452572..2a7bd23bed 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -811,7 +811,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 720386fd1a..027b909dda 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 85e7e312a8..7dc6e92bee 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>");