Files
android_kernel_xiaomi_sm8450/include/linux
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-22 16:48:47 +09:00
2014-10-03 15:28:18 -06:00
2014-10-14 09:00:44 -06:00
2014-09-26 15:05:15 -04:00
2014-09-19 09:29:32 -04:00
2014-10-21 00:51:01 +02:00
2014-08-01 22:35:55 +08:00
2014-07-08 13:36:52 -07:00
2014-06-26 15:46:55 -03:00
2014-09-23 11:10:20 -07:00
2014-09-26 15:05:15 -04:00
2014-10-09 11:35:48 +03:00
2014-10-08 16:01:41 -04:00
2014-08-07 14:40:08 -04:00
2014-08-06 18:01:24 -07:00
2014-05-20 10:30:40 +09:00
2014-09-25 16:07:15 +02:00
2014-06-06 16:08:13 -07:00
2014-09-29 15:37:01 -04:00
2014-06-02 14:56:01 -07:00
2014-09-01 13:48:59 +02:00
2014-07-22 21:55:45 +01:00
2014-10-14 02:18:13 +02:00
2014-05-27 17:38:11 -07:00
2014-10-09 22:25:58 -04:00
2014-09-24 14:07:58 +02:00
2014-10-24 00:14:36 +02:00
2014-09-30 16:24:56 -04:00
2014-09-30 16:24:56 -04:00
2014-07-09 14:58:37 +01:00
2014-08-26 13:45:56 -04:00
2014-11-12 13:52:52 -05:00
2014-06-04 16:54:07 -07:00
2014-10-07 01:18:12 +02:00
2014-07-15 22:40:22 +02:00
2014-09-13 12:30:26 -04:00
2014-08-08 15:57:26 -07:00
2014-08-08 15:57:31 -07:00
2014-11-05 15:52:45 -05:00
2014-06-12 00:21:11 -04:00
2014-06-04 16:53:57 -07:00
2014-08-08 15:57:24 -07:00
2014-10-29 15:05:15 -04:00
2014-06-04 16:53:56 -07:00
2014-09-23 21:40:48 -07:00
2014-09-25 17:05:12 +02:00
2014-08-08 15:57:22 -07:00
2014-09-16 15:02:55 -06:00
2014-06-04 16:53:57 -07:00