linux-next/Documentation
Eric Dumazet 960fb622f8 net: provide a per host RSS key generic infrastructure
RSS (Receive Side Scaling) typically uses Toeplitz hash and a 40 or 52 bytes
RSS key.

Some drivers use a constant (and well known key), some drivers use a random
key per port, making bonding setups hard to tune. Well known keys increase
attack surface, considering that number of queues is usually a power of two.

This patch provides infrastructure to help drivers doing the right thing.

netdev_rss_key_fill() should be used by drivers to initialize their RSS key,
even if they provide ethtool -X support to let user redefine the key later.

A new /proc/sys/net/core/netdev_rss_key file can be used to get the host
RSS key even for drivers not providing ethtool -x support, in case some
applications want to precisely setup flows to match some RX queues.

Tested:

myhost:~# cat /proc/sys/net/core/netdev_rss_key
11:63:99:bb:79:fb:a5:a7:07:45:b2:20:bf:02:42:2d:08:1a:dd:19:2b:6b:23:ac:56:28:9d:70:c3:ac:e8:16:4b:b7:c1:10:53:a4:78:41:36:40:74:b6:15:ca:27:44:aa:b3:4d:72

myhost:~# ethtool -x eth0
RX flow hash indirection table for eth0 with 8 RX ring(s):
    0:      0     1     2     3     4     5     6     7
RSS hash key:
11:63:99:bb:79:fb:a5:a7:07:45:b2:20:bf:02:42:2d:08:1a:dd:19:2b:6b:23:ac:56:28:9d:70:c3:ac:e8:16:4b:b7:c1:10:53:a4:78:41

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-16 15:59:11 -05:00
..
2014-09-26 08:24:05 +01:00
2014-10-08 17:22:23 -04:00
2014-10-09 22:26:02 -04:00
2014-05-05 15:32:05 +02:00
2014-02-28 15:12:08 -08:00
2014-08-25 03:28:09 -05:00
2014-02-10 16:01:40 -08:00
2014-08-06 23:36:12 -07:00
2014-06-11 08:35:34 -07:00
2013-01-10 01:27:46 +01:00
2014-10-23 23:02:36 +02:00
2014-06-19 17:45:14 -07:00
2014-04-18 14:20:48 +02:00
2014-05-12 17:08:33 -07:00
2014-08-26 09:35:54 +02:00
2014-05-05 15:32:05 +02:00
2013-11-14 11:04:40 -08:00
2014-03-21 13:16:58 +01:00
2013-12-02 14:48:28 +01:00
2014-03-21 13:16:58 +01:00
2013-12-02 14:45:19 +01:00
2014-08-08 15:57:24 -07:00
2014-05-05 15:32:05 +02:00
2014-05-05 15:32:05 +02:00
2014-05-05 15:32:05 +02:00
2014-09-23 23:44:16 -07:00