be2net:use netdev_rss_key_fill() helper
authorEric Dumazet <edumazet@google.com>
Sun, 16 Nov 2014 14:23:10 +0000 (06:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 Nov 2014 20:59:12 +0000 (15:59 -0500)
Use netdev_rss_key_fill() helper, as it provides better support for some
bonding setups.
Rename rss_hkey local variable to rss_key to have consistent name among
drivers.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c

index 9a18e7930b31bea1cebc533d014655af5673c748..54160cc62656adc034ec24f5f75007bf0e27d16b 100644 (file)
@@ -2853,10 +2853,10 @@ static int be_close(struct net_device *netdev)
 
 static int be_rx_qs_create(struct be_adapter *adapter)
 {
+       struct rss_info *rss = &adapter->rss_info;
+       u8 rss_key[RSS_HASH_KEY_LEN];
        struct be_rx_obj *rxo;
        int rc, i, j;
-       u8 rss_hkey[RSS_HASH_KEY_LEN];
-       struct rss_info *rss = &adapter->rss_info;
 
        for_all_rx_queues(adapter, rxo, i) {
                rc = be_queue_alloc(adapter, &rxo->q, RX_Q_LEN,
@@ -2901,15 +2901,15 @@ static int be_rx_qs_create(struct be_adapter *adapter)
                rss->rss_flags = RSS_ENABLE_NONE;
        }
 
-       get_random_bytes(rss_hkey, RSS_HASH_KEY_LEN);
+       netdev_rss_key_fill(rss_key, RSS_HASH_KEY_LEN);
        rc = be_cmd_rss_config(adapter, rss->rsstable, rss->rss_flags,
-                              128, rss_hkey);
+                              128, rss_key);
        if (rc) {
                rss->rss_flags = RSS_ENABLE_NONE;
                return rc;
        }
 
-       memcpy(rss->rss_hkey, rss_hkey, RSS_HASH_KEY_LEN);
+       memcpy(rss->rss_hkey, rss_key, RSS_HASH_KEY_LEN);
 
        /* First time posting */
        for_all_rx_queues(adapter, rxo, i)