diff options
author | David S. Miller <davem@davemloft.net> | 2016-12-10 04:12:30 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-10 04:12:30 +0100 |
commit | 524a64c7268f8c8c7f22ab37ef0e72529de727c9 (patch) | |
tree | 7aea980802490b448bedac089074929b9c47d13b /include | |
parent | Merge branch 'qcom-emac' (diff) | |
parent | udp: udp_rmem_release() should touch sk_rmem_alloc later (diff) | |
download | linux-524a64c7268f8c8c7f22ab37ef0e72529de727c9.tar.xz linux-524a64c7268f8c8c7f22ab37ef0e72529de727c9.zip |
Merge branch 'udp-receive-path-optimizations'
Eric Dumazet says:
====================
udp: receive path optimizations
This patch series provides about 100 % performance increase under flood.
v2: added Paolo feedback on udp_rmem_release() for tiny sk_rcvbuf
added the last patch touching sk_rmem_alloc later
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/skbuff.h | 9 | ||||
-rw-r--r-- | include/linux/udp.h | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 0cd92b0f2af5..332e76756f54 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -645,8 +645,15 @@ struct sk_buff { struct rb_node rbnode; /* used in netem & tcp stack */ }; struct sock *sk; - struct net_device *dev; + union { + struct net_device *dev; + /* Some protocols might use this space to store information, + * while device pointer would be NULL. + * UDP receive path is one user. + */ + unsigned long dev_scratch; + }; /* * This is the control buffer. It is free to use for every * layer. Please put your private variables there. If you diff --git a/include/linux/udp.h b/include/linux/udp.h index d1fd8cd39478..c0f530809d1f 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h @@ -79,6 +79,9 @@ struct udp_sock { int (*gro_complete)(struct sock *sk, struct sk_buff *skb, int nhoff); + + /* This field is dirtied by udp_recvmsg() */ + int forward_deficit; }; static inline struct udp_sock *udp_sk(const struct sock *sk) |