All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] be2net: hash key for rss-config cmd not set
@ 2011-05-24  6:29 Sathya Perla
  2011-05-24 13:12 ` Flavio Leitner
  2011-05-24 17:34 ` David Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Sathya Perla @ 2011-05-24  6:29 UTC (permalink / raw)
  To: netdev; +Cc: Sathya Perla

A non-zero, non-descript value is needed as the hash key. The hash variable was left un-initialized; but sometimes it gets a zero value
and hashing is not effective. The constant value used now (not of any significance) seems to work fine.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
 drivers/net/benet/be_cmds.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 2463b1c..81654ae 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1703,7 +1703,8 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
 {
 	struct be_mcc_wrb *wrb;
 	struct be_cmd_req_rss_config *req;
-	u32 myhash[10];
+	u32 myhash[10] = {0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF,
+			0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF};
 	int status;
 
 	if (mutex_lock_interruptible(&adapter->mbox_lock))
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] be2net: hash key for rss-config cmd not set
@ 2011-05-23 12:25 Sathya Perla
  2011-05-23 15:48 ` Ben Hutchings
  2011-05-23 19:52 ` David Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Sathya Perla @ 2011-05-23 12:25 UTC (permalink / raw)
  To: netdev; +Cc: Sathya Perla

Need a random hash key to effectively hash incoming connections into
multiple RX rings.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
 drivers/net/benet/be_cmds.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 2463b1c..81654ae 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1703,7 +1703,8 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
 {
 	struct be_mcc_wrb *wrb;
 	struct be_cmd_req_rss_config *req;
-	u32 myhash[10];
+	u32 myhash[10] = {0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF,
+			0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF};
 	int status;
 
 	if (mutex_lock_interruptible(&adapter->mbox_lock))
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-24 17:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24  6:29 [PATCH] be2net: hash key for rss-config cmd not set Sathya Perla
2011-05-24 13:12 ` Flavio Leitner
2011-05-24 17:34 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2011-05-23 12:25 Sathya Perla
2011-05-23 15:48 ` Ben Hutchings
2011-05-23 19:52 ` David Miller
2011-05-24  5:46   ` Sathya.Perla
2011-05-24  6:22     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.