summaryrefslogtreecommitdiff
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-09-28 08:49:33 +0000
committerPaolo Abeni <pabeni@redhat.com>2025-09-30 15:45:53 +0200
commit844c9db7f7f5fe1b0b53ed9f1c2bc7313b3021c8 (patch)
tree9dd9c2e17b08ae6dd785ea2e7dbf7ac65c3f70f6 /include/linux/netdevice.h
parent9c94ae6bb0b2895024b6e29fcc1cbec968b4776a (diff)
net: use llist for sd->defer_list
Get rid of sd->defer_lock and adopt llist operations. We optimize skb_attempt_defer_free() for the common case, where the packet is queued. Otherwise sd->defer_count is increasing, until skb_defer_free_flush() clears it. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250928084934.3266948-3-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 27e3fa69253f..5c9aa16933d1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3537,10 +3537,10 @@ struct softnet_data {
struct numa_drop_counters drop_counters;
/* Another possibly contended cache line */
- spinlock_t defer_lock ____cacheline_aligned_in_smp;
- atomic_t defer_count;
- int defer_ipi_scheduled;
- struct sk_buff *defer_list;
+ struct llist_head defer_list ____cacheline_aligned_in_smp;
+ atomic_long_t defer_count;
+
+ int defer_ipi_scheduled ____cacheline_aligned_in_smp;
call_single_data_t defer_csd;
};