Files
linux/net/core
Eric Dumazet f3483c8e1d net: rfs: hash function change
RFS is using two kinds of hash tables.

First one is controlled by /proc/sys/net/core/rps_sock_flow_entries = 2^N
and using the N low order bits of the l4 hash is good enough.

Then each RX queue has its own hash table, controlled by
/sys/class/net/eth1/queues/rx-$q/rps_flow_cnt = 2^X

Current hash function, using the X low order bits is suboptimal,
because RSS is usually using Func(hash) = (hash % power_of_two);

For example, with 32 RX queues, 6 low order bits have no entropy
for a given queue.

Switch this hash function to hash_32(hash, log) to increase
chances to use all possible slots and reduce collisions.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250321171309.634100-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-03-25 08:24:13 -07:00
..
2025-03-19 18:52:00 +01:00
2025-03-25 08:24:13 -07:00
2024-03-07 21:12:41 -08:00
2024-04-01 10:49:28 +01:00
2025-03-25 08:24:13 -07:00
2024-09-11 20:44:31 -07:00
2025-02-17 16:43:04 -08:00
2025-03-19 18:52:00 +01:00
2025-02-14 13:09:39 -08:00
2025-01-29 13:32:23 -08:00
2024-06-06 11:52:52 +02:00
2024-08-26 09:37:23 -07:00
2025-02-27 14:03:52 +01:00