netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Somnath Kotur <somnath.kotur@emulex.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH] net-2.6 be2net: fix to get RX IDs 0 and 1
Date: Thu, 16 Sep 2010 17:09:02 +0530	[thread overview]
Message-ID: <20100916113842.GA3937@serverengines.com> (raw)

Change made to allocate RX IDs 0 and 1 for the two ports.
To get RX Q IDs 0 and 1 enable RSS Capability for that interface.
RX IDs 0 and 1 have 32 bit drop counters which will take a long time
to wrap around thereby presenting a consistent stats display.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
---
 drivers/net/benet/be_hw.h   |    6 ++++++
 drivers/net/benet/be_main.c |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/benet/be_hw.h b/drivers/net/benet/be_hw.h
index a2ec5df..e836ca6 100644
--- a/drivers/net/benet/be_hw.h
+++ b/drivers/net/benet/be_hw.h
@@ -52,6 +52,12 @@
  */
 #define MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK	(1 << 29) /* bit 29 */
 
+/********* PCI Function Capability ************/
+#define BE_FUNCTION_CAPS_UNCLASSIFIED_STATS	0x1
+#define BE_FUNCTION_CAPS_RSS			0x2
+#define BE_FUNCTION_CAPS_PROMISCUOUS		0x4
+#define BE_FUNCTION_CAPS_LEGACY_MODE		0x8
+
 /********* Power management (WOL) **********/
 #define PCICFG_PM_CONTROL_OFFSET		0x44
 #define PCICFG_PM_CONTROL_MASK			0x108	/* bits 3 & 8 */
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 6eda7a0..f3cfb7b 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -2094,6 +2094,8 @@ static int be_setup(struct be_adapter *adapter)
 	cap_flags = en_flags = BE_IF_FLAGS_UNTAGGED | BE_IF_FLAGS_BROADCAST;
 
 	if (be_physfn(adapter)) {
+		if (adapter->function_caps & BE_FUNCTION_CAPS_RSS)
+			cap_flags |= BE_IF_FLAGS_RSS;
 		cap_flags |= BE_IF_FLAGS_MCAST_PROMISCUOUS |
 				BE_IF_FLAGS_PROMISCUOUS |
 				BE_IF_FLAGS_PASS_L3L4_ERRORS;
-- 
1.5.6.1


             reply	other threads:[~2010-09-16 11:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16 11:39 Somnath Kotur [this message]
2010-09-17  4:50 ` [PATCH] net-2.6 be2net: fix to get RX IDs 0 and 1 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=20100916113842.GA3937@serverengines.com \
    --to=somnath.kotur@emulex.com \
    --cc=davem@davemloft.net \
    --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).