diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-11-16 08:42:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-16 20:27:28 -0500 |
commit | 00427a7387a1c91ddb6b69e50916173d8aca66e0 (patch) | |
tree | 5c2ec354d78667b4f781c774699baba5701e7b7a /drivers/net/ethernet/marvell | |
parent | b1cb82566242fbb54d5c655e23995a8f7bd37ecf (diff) |
sky2: used fixed RSS key
Rather than generating a different RSS key on each boot, just use
a predetermined value that will map same flow to same value on
every device.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r-- | drivers/net/ethernet/marvell/sky2.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 3777fb348b86..48c9e1281c7e 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -1275,6 +1275,14 @@ static void rx_set_checksum(struct sky2_port *sky2) | |||
1275 | ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM); | 1275 | ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM); |
1276 | } | 1276 | } |
1277 | 1277 | ||
1278 | /* | ||
1279 | * Fixed initial key as seed to RSS. | ||
1280 | */ | ||
1281 | static const uint32_t rss_init_key[10] = { | ||
1282 | 0x7c3351da, 0x51c5cf4e, 0x44adbdd1, 0xe8d38d18, 0x48897c43, | ||
1283 | 0xb1d60e7e, 0x6a3dd760, 0x01a2e453, 0x16f46f13, 0x1a0e7b30 | ||
1284 | }; | ||
1285 | |||
1278 | /* Enable/disable receive hash calculation (RSS) */ | 1286 | /* Enable/disable receive hash calculation (RSS) */ |
1279 | static void rx_set_rss(struct net_device *dev, u32 features) | 1287 | static void rx_set_rss(struct net_device *dev, u32 features) |
1280 | { | 1288 | { |
@@ -1290,12 +1298,9 @@ static void rx_set_rss(struct net_device *dev, u32 features) | |||
1290 | 1298 | ||
1291 | /* Program RSS initial values */ | 1299 | /* Program RSS initial values */ |
1292 | if (features & NETIF_F_RXHASH) { | 1300 | if (features & NETIF_F_RXHASH) { |
1293 | u32 key[nkeys]; | ||
1294 | |||
1295 | get_random_bytes(key, nkeys * sizeof(u32)); | ||
1296 | for (i = 0; i < nkeys; i++) | 1301 | for (i = 0; i < nkeys; i++) |
1297 | sky2_write32(hw, SK_REG(sky2->port, RSS_KEY + i * 4), | 1302 | sky2_write32(hw, SK_REG(sky2->port, RSS_KEY + i * 4), |
1298 | key[i]); | 1303 | rss_init_key[i]); |
1299 | 1304 | ||
1300 | /* Need to turn on (undocumented) flag to make hashing work */ | 1305 | /* Need to turn on (undocumented) flag to make hashing work */ |
1301 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), | 1306 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), |