Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1461110

[PATCH v2 20/21] net: thunderx: Use netdev_rss_key_fill() helper

From sunil.kovvuri@gmail.com
Newsgroups linux.kernel
Subject [PATCH v2 20/21] net: thunderx: Use netdev_rss_key_fill() helper
Date 2016-08-12 13:30 +0200
Message-ID <s5iP0-Yf-51@gated-at.bofh.it> (permalink)
References <s5iOZ-Yf-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Sunil Goutham <sgoutham@cavium.com>

Use standard API to generate a random RSS hash key
on every boot.

Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
---
 drivers/net/ethernet/cavium/thunder/nicvf_main.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
index eb48d33..06c014e 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
@@ -366,13 +366,7 @@ static int nicvf_rss_init(struct nicvf *nic)
 
 	rss->enable = true;
 
-	/* Using the HW reset value for now */
-	rss->key[0] = 0xFEED0BADFEED0BADULL;
-	rss->key[1] = 0xFEED0BADFEED0BADULL;
-	rss->key[2] = 0xFEED0BADFEED0BADULL;
-	rss->key[3] = 0xFEED0BADFEED0BADULL;
-	rss->key[4] = 0xFEED0BADFEED0BADULL;
-
+	netdev_rss_key_fill(rss->key, RSS_HASH_KEY_SIZE * sizeof(u64));
 	nicvf_set_rss_key(nic);
 
 	rss->cfg = RSS_IP_HASH_ENA | RSS_TCP_HASH_ENA | RSS_UDP_HASH_ENA;
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/21] net: thunderx: Support for newer chips and miscellaneous patches sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 01/21] net: thunderx: Moved HW capability info from macros to structure sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 11/21] net: thunderx: Add support for 16 LMACs of 83xx sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 02/21] net: thunderx: Add VNIC's PCI devid on future chips sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 10/21] net: thunderx: Add RGMII interface type support sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 20/21] net: thunderx: Use netdev_rss_key_fill() helper sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 15/21] net: thunderx: Improvement for MBX interface debug messages sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  [PATCH v2 09/21] net: thunderx: Add QSGMII interface type support sunil.kovvuri@gmail.com - 2016-08-12 13:30 +0200
  Re: [PATCH v2 00/21] net: thunderx: Support for newer chips and  miscellaneous patches David Miller <davem@davemloft.net> - 2016-08-14 11:10 +0200

csiph-web