netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yuval Mintz" <yuvalmin@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: eilong@broadcom.com, "Yuval Mintz" <yuvalmin@broadcom.com>,
	"Sathya Perla" <sathya.perla@emulex.com>,
	"Subbu Seetharaman" <subbu.seetharaman@emulex.com>,
	"Ajit Khaparde" <ajit.khaparde@emulex.com>
Subject: [PATCH net-next 11/11] be2net: set maximal number of default RSS queues
Date: Sun, 1 Jul 2012 16:19:00 +0300	[thread overview]
Message-ID: <1341148740-7375-12-git-send-email-yuvalmin@broadcom.com> (raw)
In-Reply-To: <1341148740-7375-1-git-send-email-yuvalmin@broadcom.com>

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_main.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index edce7af..2141bd7 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -2172,12 +2172,14 @@ static void be_msix_disable(struct be_adapter *adapter)
 
 static uint be_num_rss_want(struct be_adapter *adapter)
 {
+	u32 num = 0;
 	if ((adapter->function_caps & BE_FUNCTION_CAPS_RSS) &&
 	     !sriov_want(adapter) && be_physfn(adapter) &&
-	     !be_is_mc(adapter))
-		return (adapter->be3_native) ? BE3_MAX_RSS_QS : BE2_MAX_RSS_QS;
-	else
-		return 0;
+	     !be_is_mc(adapter)) {
+		num = (adapter->be3_native) ? BE3_MAX_RSS_QS : BE2_MAX_RSS_QS;
+		num = min_t(u32, num, (u32)netif_get_num_default_rss_queues());
+	}
+	return num;
 }
 
 static void be_msix_enable(struct be_adapter *adapter)
-- 
1.7.9.rc2

  parent reply	other threads:[~2012-07-01 13:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-01 13:18 [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 01/11] net-next: Add netif_get_num_default_rss_queues Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 02/11] mlx4: set maximal number of default RSS queues Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 03/11] vxge: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 04/11] qlge: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 05/11] cxgb3: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 06/11] cxgb4: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 07/11] myri10ge: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 08/11] tg3: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 09/11] bnx2: " Yuval Mintz
2012-07-01 13:18 ` [PATCH net-next 10/11] bnx2x: " Yuval Mintz
2012-07-01 13:19 ` Yuval Mintz [this message]
2012-07-01 15:01 ` [PATCH net-next 00/11] default maximal number of RSS queues in mq drivers Or Gerlitz
2012-07-02  4:55   ` Yuval Mintz
2012-07-05 10:07 ` David Miller

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=1341148740-7375-12-git-send-email-yuvalmin@broadcom.com \
    --to=yuvalmin@broadcom.com \
    --cc=ajit.khaparde@emulex.com \
    --cc=davem@davemloft.net \
    --cc=eilong@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=sathya.perla@emulex.com \
    --cc=subbu.seetharaman@emulex.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).