patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 20.11] net/bnxt: fix ring count calculation for Thor
@ 2021-05-27  5:05 Kalesh A P
  2021-05-31 11:34 ` Xueming(Steven) Li
  0 siblings, 1 reply; 2+ messages in thread
From: Kalesh A P @ 2021-05-27  5:05 UTC (permalink / raw)
  To: stable

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

[ upstream commit a49844ffa39df02bbcb8353436ae10b830bfed73 ]

For Thor devices, RSS table can only accommodate 512 Rx queues.
Cap the max Rx rings to 512.

Fixes: d819382543f3 ("net/bnxt: add RSS redirection table operations")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        | 6 ++++++
 drivers/net/bnxt/bnxt_ethdev.c | 7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index b912fd8..555ff04 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -831,6 +831,12 @@ inline uint16_t bnxt_max_rings(struct bnxt *bp)
 				       bp->max_stat_ctx / 2U);
 	}
 
+	/* RSS table size in Thor is 512.
+	 * Cap max Rx rings to the same value for RSS.
+	 */
+	if (BNXT_CHIP_THOR(bp))
+		max_rx_rings = RTE_MIN(max_rx_rings, BNXT_RSS_TBL_SIZE_THOR);
+
 	max_tx_rings = RTE_MIN(max_tx_rings, max_rx_rings);
 	if (max_cp_rings > BNXT_NUM_ASYNC_CPR(bp))
 		max_cp_rings -= BNXT_NUM_ASYNC_CPR(bp);
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3aa346d..78d9f15 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -427,12 +427,13 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS) {
 		int j, nr_ctxs = bnxt_rss_ctxts(bp);
 
+		/* RSS table size in Thor is 512.
+		 * Cap max Rx rings to same value
+		 */
 		if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_THOR) {
 			PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n",
 				    bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_THOR);
-			PMD_DRV_LOG(ERR,
-				    "Only queues 0-%d will be in RSS table\n",
-				    BNXT_RSS_TBL_SIZE_THOR - 1);
+			goto err_out;
 		}
 
 		rc = 0;
-- 
2.10.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 20.11] net/bnxt: fix ring count calculation for Thor
  2021-05-27  5:05 [dpdk-stable] [PATCH 20.11] net/bnxt: fix ring count calculation for Thor Kalesh A P
@ 2021-05-31 11:34 ` Xueming(Steven) Li
  0 siblings, 0 replies; 2+ messages in thread
From: Xueming(Steven) Li @ 2021-05-31 11:34 UTC (permalink / raw)
  To: Kalesh A P, stable

Thanks, applied to 20.11 work queue.

> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Kalesh A P
> Sent: Thursday, May 27, 2021 1:06 PM
> To: stable@dpdk.org
> Subject: [dpdk-stable] [PATCH 20.11] net/bnxt: fix ring count calculation for Thor
> 
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> 
> [ upstream commit a49844ffa39df02bbcb8353436ae10b830bfed73 ]
> 
> For Thor devices, RSS table can only accommodate 512 Rx queues.
> Cap the max Rx rings to 512.
> 
> Fixes: d819382543f3 ("net/bnxt: add RSS redirection table operations")
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt.h        | 6 ++++++
>  drivers/net/bnxt/bnxt_ethdev.c | 7 ++++---
>  2 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index b912fd8..555ff04 100644
> --- a/drivers/net/bnxt/bnxt.h
> +++ b/drivers/net/bnxt/bnxt.h
> @@ -831,6 +831,12 @@ inline uint16_t bnxt_max_rings(struct bnxt *bp)
>  				       bp->max_stat_ctx / 2U);
>  	}
> 
> +	/* RSS table size in Thor is 512.
> +	 * Cap max Rx rings to the same value for RSS.
> +	 */
> +	if (BNXT_CHIP_THOR(bp))
> +		max_rx_rings = RTE_MIN(max_rx_rings, BNXT_RSS_TBL_SIZE_THOR);
> +
>  	max_tx_rings = RTE_MIN(max_tx_rings, max_rx_rings);
>  	if (max_cp_rings > BNXT_NUM_ASYNC_CPR(bp))
>  		max_cp_rings -= BNXT_NUM_ASYNC_CPR(bp); diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c index 3aa346d..78d9f15 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -427,12 +427,13 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
>  	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS) {
>  		int j, nr_ctxs = bnxt_rss_ctxts(bp);
> 
> +		/* RSS table size in Thor is 512.
> +		 * Cap max Rx rings to same value
> +		 */
>  		if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_THOR) {
>  			PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n",
>  				    bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_THOR);
> -			PMD_DRV_LOG(ERR,
> -				    "Only queues 0-%d will be in RSS table\n",
> -				    BNXT_RSS_TBL_SIZE_THOR - 1);
> +			goto err_out;
>  		}
> 
>  		rc = 0;
> --
> 2.10.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-31 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27  5:05 [dpdk-stable] [PATCH 20.11] net/bnxt: fix ring count calculation for Thor Kalesh A P
2021-05-31 11:34 ` Xueming(Steven) Li

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git