diff options
author | Eric Dumazet <edumazet@google.com> | 2025-04-07 16:35:59 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-04-08 12:30:55 -0700 |
commit | c3025e94daa9ce84ef0e53df983b5bf2fbd76ea6 (patch) | |
tree | ae27369d8f8e2ba0f96e7038fa7a996d7d9c8d28 /net/core/dev.h | |
parent | 34a07c5b257453b5fcadc2408719c7b075844014 (diff) |
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>
Diffstat (limited to 'net/core/dev.h')
-rw-r--r-- | net/core/dev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.h b/net/core/dev.h index 7ee203395d8e..b1cd44b5f009 100644 --- a/net/core/dev.h +++ b/net/core/dev.h @@ -16,7 +16,7 @@ struct cpumask; #define FLOW_LIMIT_HISTORY (1 << 7) /* must be ^2 and !overflow buckets */ struct sd_flow_limit { u64 count; - unsigned int num_buckets; + u8 log_buckets; unsigned int history_head; u16 history[FLOW_LIMIT_HISTORY]; u8 buckets[]; |