From: Somnath Kotur <somnath.kotur@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH] net/bnxt: fix max ring count calculation
Date: Fri, 24 Apr 2020 16:30:54 +0530 [thread overview]
Message-ID: <20200424110054.2668-1-somnath.kotur@broadcom.com> (raw)
Max Rx Ring count could be < Max stat contexts. While accounting
for stat contexts, this should be also considered and
the max ring count adjusted accordingly.
Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
drivers/net/bnxt/bnxt.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 586d3f5..12fed1e 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -653,10 +653,10 @@ struct bnxt {
#define MAX_STINGRAY_RINGS 128U
/* For sake of symmetry, max Tx rings == max Rx rings, one stat ctx for each */
#define BNXT_MAX_RX_RINGS(bp) \
- (BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings, \
+ (BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings / 2U, \
MAX_STINGRAY_RINGS), \
bp->max_stat_ctx / 2U) : \
- RTE_MIN(bp->max_rx_rings, \
+ RTE_MIN(bp->max_rx_rings / 2U, \
bp->max_stat_ctx / 2U))
#define BNXT_MAX_TX_RINGS(bp) \
(RTE_MIN((bp)->max_tx_rings, BNXT_MAX_RX_RINGS(bp)))
--
1.8.3.1
next reply other threads:[~2020-04-24 11:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 11:00 Somnath Kotur [this message]
2020-04-24 17:58 ` Ajit Khaparde
2020-06-10 11:43 Somnath Kotur
2020-06-10 11:56 ` Somnath Kotur
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=20200424110054.2668-1-somnath.kotur@broadcom.com \
--to=somnath.kotur@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).