DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dpdk-dev <dev@dpdk.org>
Cc: Lance Richardson <lance.richardson@broadcom.com>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/bnxt: cap max Rx rings for Thor
Date: Mon, 19 Apr 2021 16:56:58 -0700
Message-ID: <CACZ4nhu-NwGPoKNpTUaKbWxTXmcYnOFkr4H563C6=Xo7mUtP2A@mail.gmail.com> (raw)
In-Reply-To: <20210419192838.45708-2-ajit.khaparde@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 3071 bytes --]

On Mon, Apr 19, 2021 at 12:28 PM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> For Thor devices, RSS table can only accommodate 512 Rx queues.
> When RSS is enabled, Cap the max Rx rings to 512.
> For non-RSS case, the number will be limited by number of VNICs.
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Patch applied to dpdk-next-net-brcm.
Fixed the checkpatch error during merge.

> ---
>  drivers/net/bnxt/bnxt.h        | 13 +++++++++++++
>  drivers/net/bnxt/bnxt_ethdev.c |  7 ++++---
>  2 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
> index 05f8804274..263ea86590 100644
> --- a/drivers/net/bnxt/bnxt.h
> +++ b/drivers/net/bnxt/bnxt.h
> @@ -844,6 +844,7 @@ struct bnxt {
>  static
>  inline uint16_t bnxt_max_rings(struct bnxt *bp)
>  {
> +       struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf;
>         uint16_t max_tx_rings = bp->max_tx_rings;
>         uint16_t max_rx_rings = bp->max_rx_rings;
>         uint16_t max_cp_rings = bp->max_cp_rings;
> @@ -861,6 +862,18 @@ inline uint16_t bnxt_max_rings(struct bnxt *bp)
>                                        bp->max_stat_ctx / 2U);
>         }
>
> +       if (BNXT_CHIP_P5(bp)) {
> +               /* RSS table size in Thor is 512.
> +                * Cap max Rx rings to the same value for RSS.
> +                * For non-RSS case cap it to the max VNIC count.
> +                */
> +               if(dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
> +                       max_rx_rings = RTE_MIN(max_rx_rings,
> +                                              BNXT_RSS_TBL_SIZE_P5);
> +               else
> +                       max_rx_rings = RTE_MIN(max_rx_rings, bp->max_vnics);
> +       }
> +
>         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 dc3b04110f..9da817f487 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -422,12 +422,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_P5) {
>                         PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n",
>                                     bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_P5);
> -                       PMD_DRV_LOG(ERR,
> -                                   "Only queues 0-%d will be in RSS table\n",
> -                                   BNXT_RSS_TBL_SIZE_P5 - 1);
> +                       goto err_out;
>                 }
>
>                 rc = 0;
> --
> 2.21.1 (Apple Git-122.3)
>

  reply	other threads:[~2021-04-19 23:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 19:28 [dpdk-dev] [PATCH 1/2] net/bnxt: fix resource cleanup Ajit Khaparde
2021-04-19 19:28 ` [dpdk-dev] [PATCH 2/2] net/bnxt: cap max Rx rings for Thor Ajit Khaparde
2021-04-19 23:56   ` Ajit Khaparde [this message]
2021-04-19 23:56 ` [dpdk-dev] [PATCH 1/2] net/bnxt: fix resource cleanup Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACZ4nhu-NwGPoKNpTUaKbWxTXmcYnOFkr4H563C6=Xo7mUtP2A@mail.gmail.com' \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=lance.richardson@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/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 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

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


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