summaryrefslogtreecommitdiffstats
path: root/net/packet/internal.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-06-12 18:52:30 +0200
committerDavid S. Miller <davem@davemloft.net>2019-06-15 03:52:14 +0200
commit8e8e2951e3095732d7e780c241f61ea130955a57 (patch)
tree41257e97418486993cb2ea69aaadbc0524eef7f3 /net/packet/internal.h
parentnet/packet: constify __packet_rcv_has_room() (diff)
downloadlinux-8e8e2951e3095732d7e780c241f61ea130955a57.tar.xz
linux-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.h1
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)