summaryrefslogtreecommitdiff
path: root/net/core/dev.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-04-07 16:36:00 +0000
committerJakub Kicinski <kuba@kernel.org>2025-04-08 12:30:55 -0700
commit7b6f0a852da34379a304d7020d70049ba5d1f0f3 (patch)
tree7dfb396686dab3189b36f237f97d57f521ec6685 /net/core/dev.h
parentc3025e94daa9ce84ef0e53df983b5bf2fbd76ea6 (diff)
net: rps: annotate data-races around (struct sd_flow_limit)->count
softnet_seq_show() can read fl->count while another cpu updates this field from skb_flow_limit(). Make this field an 'unsigned int', as its only consumer only deals with 32 bit. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250407163602.170356-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/dev.h')
-rw-r--r--net/core/dev.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.h b/net/core/dev.h
index b1cd44b5f009..e855e1cb43fd 100644
--- a/net/core/dev.h
+++ b/net/core/dev.h
@@ -15,7 +15,7 @@ struct cpumask;
/* Random bits of netdevice that don't need to be exposed */
#define FLOW_LIMIT_HISTORY (1 << 7) /* must be ^2 and !overflow buckets */
struct sd_flow_limit {
- u64 count;
+ unsigned int count;
u8 log_buckets;
unsigned int history_head;
u16 history[FLOW_LIMIT_HISTORY];