From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Ajit Khaparde <ajit.khaparde@broadcom.com>
Subject: [dpdk-dev] [PATCH 4/4] net/bnxt: fix ring count calculation
Date: Fri, 30 Apr 2021 13:14:13 -0700 [thread overview]
Message-ID: <1619813653-5161-5-git-send-email-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <1619813653-5161-1-git-send-email-ajit.khaparde@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]
Fix ring count calculation for Thor. VNIC count does not have a
direct bearing on the number of rings that can be used.
Fixes: fe8dd26f86c78 ("net/bnxt: cap max Rx rings for Thor")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index bd2dec4..013e291 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -836,7 +836,6 @@ 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;
@@ -854,17 +853,12 @@ 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);
- }
+ /*
+ * RSS table size in Thor is 512.
+ * Cap max Rx rings to the same value for RSS.
+ */
+ if (BNXT_CHIP_P5(bp))
+ max_rx_rings = RTE_MIN(max_rx_rings, BNXT_RSS_TBL_SIZE_P5);
max_tx_rings = RTE_MIN(max_tx_rings, max_rx_rings);
if (max_cp_rings > BNXT_NUM_ASYNC_CPR(bp))
--
1.8.3.1
next prev parent reply other threads:[~2021-04-30 20:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 20:14 [dpdk-dev] [PATCH 0/4] bnxt PMD fixes Ajit Khaparde
2021-04-30 20:14 ` [dpdk-dev] [PATCH 1/4] net/bnxt: fix mismatched type comparison Ajit Khaparde
2021-04-30 20:14 ` [dpdk-dev] [PATCH 2/4] net/bnxt: fix unchecked return value Ajit Khaparde
2021-04-30 20:14 ` [dpdk-dev] [PATCH 3/4] net/bnxt: fix mismatched comparison Ajit Khaparde
2021-04-30 20:14 ` Ajit Khaparde [this message]
2021-05-02 22:34 ` [dpdk-dev] [PATCH 0/4] bnxt PMD fixes 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=1619813653-5161-5-git-send-email-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).