aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-11-16 09:23:18 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-16 15:59:13 -0500
commit6bf79cdddd50e90cbba7471623c129dadf9c873b (patch)
tree3feae5512b57c55e708107e6c191fd5d611d17f9 /drivers/net/vmxnet3
parent7a20db379ce7baeb258631a4fd1971d18f3af422 (diff)
vmxnet3: use netdev_rss_key_fill() helper
Use of well known RSS key increases attack surface. Switch to a random one, using generic helper so that all ports share a common key. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 6dfcbf523936..afd295348ddb 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2199,13 +2199,6 @@ vmxnet3_setup_driver_shared(struct vmxnet3_adapter *adapter)
2199 2199
2200 if (adapter->rss) { 2200 if (adapter->rss) {
2201 struct UPT1_RSSConf *rssConf = adapter->rss_conf; 2201 struct UPT1_RSSConf *rssConf = adapter->rss_conf;
2202 static const uint8_t rss_key[UPT1_RSS_MAX_KEY_SIZE] = {
2203 0x3b, 0x56, 0xd1, 0x56, 0x13, 0x4a, 0xe7, 0xac,
2204 0xe8, 0x79, 0x09, 0x75, 0xe8, 0x65, 0x79, 0x28,
2205 0x35, 0x12, 0xb9, 0x56, 0x7c, 0x76, 0x4b, 0x70,
2206 0xd8, 0x56, 0xa3, 0x18, 0x9b, 0x0a, 0xee, 0xf3,
2207 0x96, 0xa6, 0x9f, 0x8f, 0x9e, 0x8c, 0x90, 0xc9,
2208 };
2209 2202
2210 devRead->misc.uptFeatures |= UPT1_F_RSS; 2203 devRead->misc.uptFeatures |= UPT1_F_RSS;
2211 devRead->misc.numRxQueues = adapter->num_rx_queues; 2204 devRead->misc.numRxQueues = adapter->num_rx_queues;
@@ -2216,7 +2209,7 @@ vmxnet3_setup_driver_shared(struct vmxnet3_adapter *adapter)
2216 rssConf->hashFunc = UPT1_RSS_HASH_FUNC_TOEPLITZ; 2209 rssConf->hashFunc = UPT1_RSS_HASH_FUNC_TOEPLITZ;
2217 rssConf->hashKeySize = UPT1_RSS_MAX_KEY_SIZE; 2210 rssConf->hashKeySize = UPT1_RSS_MAX_KEY_SIZE;
2218 rssConf->indTableSize = VMXNET3_RSS_IND_TABLE_SIZE; 2211 rssConf->indTableSize = VMXNET3_RSS_IND_TABLE_SIZE;
2219 memcpy(rssConf->hashKey, rss_key, sizeof(rss_key)); 2212 netdev_rss_key_fill(rssConf->hashKey, sizeof(rssConf->hashKey));
2220 2213
2221 for (i = 0; i < rssConf->indTableSize; i++) 2214 for (i = 0; i < rssConf->indTableSize; i++)
2222 rssConf->indTable[i] = ethtool_rxfh_indir_default( 2215 rssConf->indTable[i] = ethtool_rxfh_indir_default(