net: datagram: drop 'destructor' argument from several helpers
The only users for such argument are the UDP protocol and the UNIX socket family. We can safely reclaim the accounted memory directly from the UDP code and, after the previous patch, we can do scm stats accounting outside the datagram helpers. Overall this cleans up a bit some datagram-related helpers, and avoids an indirect call per packet in the UDP receive path. v1 -> v2: - call scm_stat_del() only when not peeking - Kirill - fix build issue with CONFIG_INET_ESPINTCP Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7782040b95
commit
e427cad6ee
@@ -3514,23 +3514,15 @@ int __skb_wait_for_more_packets(struct sock *sk, struct sk_buff_head *queue,
|
||||
struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
|
||||
struct sk_buff_head *queue,
|
||||
unsigned int flags,
|
||||
void (*destructor)(struct sock *sk,
|
||||
struct sk_buff *skb),
|
||||
int *off, int *err,
|
||||
struct sk_buff **last);
|
||||
struct sk_buff *__skb_try_recv_datagram(struct sock *sk,
|
||||
struct sk_buff_head *queue,
|
||||
unsigned int flags,
|
||||
void (*destructor)(struct sock *sk,
|
||||
struct sk_buff *skb),
|
||||
int *off, int *err,
|
||||
unsigned int flags, int *off, int *err,
|
||||
struct sk_buff **last);
|
||||
struct sk_buff *__skb_recv_datagram(struct sock *sk,
|
||||
struct sk_buff_head *sk_queue,
|
||||
unsigned int flags,
|
||||
void (*destructor)(struct sock *sk,
|
||||
struct sk_buff *skb),
|
||||
int *off, int *err);
|
||||
unsigned int flags, int *off, int *err);
|
||||
struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
|
||||
int *err);
|
||||
__poll_t datagram_poll(struct file *file, struct socket *sock,
|
||||
|
Reference in New Issue
Block a user