diff options
| author | David S. Miller <davem@davemloft.net> | 2016-11-07 21:24:42 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-11-07 21:24:42 +0300 |
| commit | fc13fd3986257882a69581c3c8203221053f474d (patch) | |
| tree | b6e4dd83dcf3ac82c3d7517b035583b44cc9f655 /include/linux | |
| parent | cd2c0f454039ad303b54653c56ebc22ffd856200 (diff) | |
| parent | 7c13f97ffde63cc792c49ec1513f3974f2f05229 (diff) | |
| download | linux-fc13fd3986257882a69581c3c8203221053f474d.tar.xz | |
Merge branch 'udp-fwd-mem-sched-on-dequeue'
Paolo Abeni says:
====================
udp: do fwd memory scheduling on dequeue
After commit 850cbaddb52d ("udp: use it's own memory accounting schema"),
the udp code needs to acquire twice the receive queue spinlock on dequeue.
This patch series remove the need for the second lock at skb free time,
moving the udp memory scheduling inside the dequeue operation; the skb
destructor field is not used anymore and an additional sk argument is added
to ip_cmsg_recv_offset() to cope with null skb->sk after dequeue.
Many thanks to Eric Dumazed for suggesting pretty all much the above.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/skbuff.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index cc6e23eaac91..a4aeeca7e805 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -3033,9 +3033,13 @@ static inline void skb_frag_list_init(struct sk_buff *skb) int __skb_wait_for_more_packets(struct sock *sk, int *err, long *timeo_p, const struct sk_buff *skb); struct sk_buff *__skb_try_recv_datagram(struct sock *sk, unsigned flags, + void (*destructor)(struct sock *sk, + struct sk_buff *skb), int *peeked, int *off, int *err, struct sk_buff **last); struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, + void (*destructor)(struct sock *sk, + struct sk_buff *skb), int *peeked, int *off, int *err); struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err); |
