Skip to contentSkip to conversation

net-2.6 be2net: fix to get RX IDs 0 and 1

PATCH In review Somnath Kotur 2 participants 2 messages Sep 16, 2010 – Sep 17, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net-2.6 be2net: fix to get RX IDs 0 and 1

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.

---
 drivers/net/benet/be_hw.h   |    6 ++++++
 drivers/net/benet/be_main.c |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/net/benet/be_hw.h +6 -0
index a2ec5df..e836ca6 100644
@@ -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 */
drivers/net/benet/be_main.c +2 -0
index 6eda7a0..f3cfb7b 100644
@@ -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;
Signature · 1 line
1.5.6.1
maintainer
#1 lore raw

From: Somnath Kotur <[email protected]>
Date: Thu, 16 Sep 2010 17:09:02 +0530

Quoted 6 lines

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.

I don't understand this commit message at all.

The patch looks like it's simply respecting capability flags stored in the chip, and thus will now enable RSS on more interfaces than it did before.

And that has absolutely nothing to do with allocating specific RX IDs or anything like that.

It also, therefore, has nothing to do with fixing any kind of serious regression in this driver. Therefore this patch is absolutely not appropriate for net-2.6

Please give a more accurate and understandable commit message for this patch, and target it for net-next-2.6 unless you can show that this fixes a very serious bug in 2.6.36