diff options
author | Eric Dumazet <edumazet@google.com> | 2019-06-12 09:52:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-14 18:52:14 -0700 |
commit | 8e8e2951e3095732d7e780c241f61ea130955a57 (patch) | |
tree | 41257e97418486993cb2ea69aaadbc0524eef7f3 /net/packet/internal.h | |
parent | 0338a14523e3864524dafb6a66c7b82e94201317 (diff) | |
download | lwn-8e8e2951e3095732d7e780c241f61ea130955a57.tar.gz lwn-8e8e2951e3095732d7e780c241f61ea130955a57.zip |
net/packet: make tp_drops atomic
Under DDOS, we want to be able to increment tp_drops without
touching the spinlock. This will help readers to drain
the receive queue slightly faster :/
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/internal.h')
-rw-r--r-- | net/packet/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/packet/internal.h b/net/packet/internal.h index 3bb7c5fb3bff..b5bcff2b7a43 100644 --- a/net/packet/internal.h +++ b/net/packet/internal.h @@ -131,6 +131,7 @@ struct packet_sock { struct net_device __rcu *cached_dev; int (*xmit)(struct sk_buff *skb); struct packet_type prot_hook ____cacheline_aligned_in_smp; + atomic_t tp_drops ____cacheline_aligned_in_smp; }; static struct packet_sock *pkt_sk(struct sock *sk) |