]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: rps: change skb_flow_limit() hash function
authorEric Dumazet <edumazet@google.com>
Mon, 7 Apr 2025 16:35:59 +0000 (16:35 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Apr 2025 19:30:55 +0000 (12:30 -0700)
commitc3025e94daa9ce84ef0e53df983b5bf2fbd76ea6
treeae27369d8f8e2ba0f96e7038fa7a996d7d9c8d28
parent34a07c5b257453b5fcadc2408719c7b075844014
net: rps: change skb_flow_limit() hash function

As explained in commit f3483c8e1da6 ("net: rfs: hash function change"),
masking low order bits of skb_get_hash(skb) has low entropy.

A NIC with 32 RX queues uses the 5 low order bits of rss key
to select a queue. This means all packets landing to a given
queue share the same 5 low order bits.

Switch to hash_32() to reduce hash collisions.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250407163602.170356-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c
net/core/dev.h
net/core/sysctl_net_core.c