netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Merav Sicron" <meravs@broadcom.com>
To: eilong@broadcom.com, davem@davemloft.net, netdev@vger.kernel.org
Cc: "Merav Sicron" <meravs@broadcom.com>
Subject: [net-next patch 8/12] bnx2x: Allow up to 63 RSS queues default 8 queues
Date: Wed, 13 Jun 2012 15:44:20 +0300	[thread overview]
Message-ID: <1339591464-10554-9-git-send-email-meravs@broadcom.com> (raw)
In-Reply-To: <1339591464-10554-1-git-send-email-meravs@broadcom.com>

This patch removed the limitation in the code for 16 RSS queues. The default
(without other instruction from the user) number of queues is determined
according to the number of MSI-X vectors supported for that function, the number
of CPUs in the system, and a maximum of 8 queues.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x.h      |    2 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h  |    4 +++-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |   13 +++----------
 3 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index 60a72f5..4dde45a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -1643,7 +1643,7 @@ extern int num_queues;
 
 #define BNX2X_MAX_QUEUES(bp)	BNX2X_MAX_RSS_COUNT(bp)
 /* #define is_eth_multi(bp)	(BNX2X_NUM_ETH_QUEUES(bp) > 1) */
-
+#define BNX2X_DEFAULT_NUM_QUEUES	8
 #define RSS_IPV4_CAP_MASK						\
 	TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_CAPABILITY
 
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 11afe5d..2865575 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -815,9 +815,11 @@ static inline void bnx2x_disable_msi(struct bnx2x *bp)
 
 static inline int bnx2x_calc_num_queues(struct bnx2x *bp)
 {
+	int num = min_t(int, num_online_cpus(), BNX2X_DEFAULT_NUM_QUEUES);
+
 	return  num_queues ?
 		 min_t(int, num_queues, BNX2X_MAX_QUEUES(bp)) :
-		 min_t(int, num_online_cpus(), BNX2X_MAX_QUEUES(bp));
+		 min_t(int, num, BNX2X_MAX_QUEUES(bp));
 }
 
 static inline void bnx2x_clear_sge_mask_next_elems(struct bnx2x_fastpath *fp)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index fbade5c..11bd0b6 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -11813,13 +11813,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
 
 	max_non_def_sbs = bnx2x_get_num_non_def_sbs(pdev);
 
-	/* !!! FIXME !!!
-	 * Do not allow the maximum SB count to grow above 16
-	 * since Special CIDs starts from 16*BNX2X_MULTI_TX_COS=48.
-	 * We will use the FP_SB_MAX_E1x macro for this matter.
-	 */
-	max_non_def_sbs = min_t(int, FP_SB_MAX_E1x, max_non_def_sbs);
-
 	WARN_ON(!max_non_def_sbs);
 
 	/* Maximum number of RSS queues: one IGU SB goes to CNIC */
@@ -11841,9 +11834,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
 
 	bp = netdev_priv(dev);
 
-	BNX2X_DEV_INFO("Allocated netdev with %d tx and %d rx queues\n",
-			  tx_count, rx_count);
-
 	bp->igu_sb_cnt = max_non_def_sbs;
 	bp->msg_enable = debug;
 	pci_set_drvdata(pdev, dev);
@@ -11856,6 +11846,9 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
 
 	BNX2X_DEV_INFO("max_non_def_sbs %d\n", max_non_def_sbs);
 
+	BNX2X_DEV_INFO("Allocated netdev with %d tx and %d rx queues\n",
+			  tx_count, rx_count);
+
 	rc = bnx2x_init_bp(bp);
 	if (rc)
 		goto init_one_exit;
-- 
1.7.10

  parent reply	other threads:[~2012-06-13  9:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 12:44 [net-next patch 0/12] bnx2x: ethtool and other enhancements Merav Sicron
2012-06-13 12:44 ` [net-next patch 1/12] bnx2x: Add support for external LB Merav Sicron
2012-06-13 18:17   ` Ben Hutchings
2012-06-13 12:44 ` [net-next patch 2/12] bnx2x: Return only online tests for MF Merav Sicron
2012-06-13 12:44 ` [net-next patch 3/12] bnx2x: Add support for 4-tupple UDP RSS Merav Sicron
2012-06-13 18:20   ` Ben Hutchings
2012-06-13 12:44 ` [net-next patch 4/12] bnx2x: Allow more than 64 L2 CIDs Merav Sicron
2012-06-13 12:44 ` [net-next patch 5/12] bnx2x: Make the transmission queues adjacent Merav Sicron
2012-06-13 12:44 ` [net-next patch 6/12] bnx2x: Move the CNIC L2 CIDs to be right after the RSS CIDs Merav Sicron
2012-06-13 12:44 ` [net-next patch 7/12] bnx2x: Split the FP structure Merav Sicron
2012-06-13 12:44 ` Merav Sicron [this message]
2012-06-13  9:52   ` [net-next patch 8/12] bnx2x: Allow up to 63 RSS queues default 8 queues Eric Dumazet
2012-06-13 15:14     ` Merav Sicron
2012-06-13 13:53       ` Eilon Greenstein
2012-06-13 13:59         ` Eric Dumazet
2012-06-13 22:35         ` David Miller
2012-06-14 15:34           ` Merav Sicron
2012-06-14 20:36             ` David Miller
2012-06-17  6:53               ` Eilon Greenstein
2012-06-17  8:08                 ` David Miller
2012-06-17  8:33                   ` Eilon Greenstein
2012-06-17  9:00                     ` David Miller
2012-06-17  9:31                       ` Eilon Greenstein
2012-06-13 12:44 ` [net-next patch 9/12] bnx2x: Add support for ethtool -L Merav Sicron
2012-06-15 17:03   ` Ben Hutchings
2012-06-13 12:44 ` [net-next patch 10/12] bnx2x: Support DCBX for all functions Merav Sicron
2012-06-13 12:44 ` [net-next patch 11/12] bnx2x: Add FCoE capabilities advertisement Merav Sicron
2012-06-13 12:44 ` [net-next patch 12/12] bnx2x: Change date and version to 1.72.51-0 Merav Sicron

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=1339591464-10554-9-git-send-email-meravs@broadcom.com \
    --to=meravs@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=eilong@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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).