diff options
author | David S. Miller <davem@davemloft.net> | 2022-04-30 12:58:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-30 12:58:45 +0100 |
commit | 8fd813441e78f1fc7918f55dba6553943eaf1085 (patch) | |
tree | 3ede1eed90b7a1d12d39264815720e018424af54 /include/net/sock.h | |
parent | 0813aeee0d02d80912c86b2b3a1ebdb4ee4476ba (diff) | |
parent | 58f71be58b8713e41f8568938a0199190f723d1d (diff) |
Merge branch 'ipv6-net-opts'
Pavel Begunkov says:
====================
generic net and ipv6 minor optimisations
1-3 inline simple functions that only reshuffle arguments possibly adding
extra zero args, and call another function. It was benchmarked before with
a bunch of extra patches, see for details
https://lore.kernel.org/netdev/cover.1648981570.git.asml.silence@gmail.com/
It may increase the binary size, but it's the right thing to do and at least
without modules it actually sheds some bytes for some standard-ish config.
text data bss dec hex filename
9627200 0 0 9627200 92e640 ./arch/x86_64/boot/bzImage
text data bss dec hex filename
9627104 0 0 9627104 92e5e0 ./arch/x86_64/boot/bzImage
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 663041b92c21..73063c88a249 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1823,11 +1823,17 @@ int sock_getsockopt(struct socket *sock, int level, int op, char __user *optval, int __user *optlen); int sock_gettstamp(struct socket *sock, void __user *userstamp, bool timeval, bool time32); -struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, - int noblock, int *errcode); struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len, unsigned long data_len, int noblock, int *errcode, int max_page_order); + +static inline struct sk_buff *sock_alloc_send_skb(struct sock *sk, + unsigned long size, + int noblock, int *errcode) +{ + return sock_alloc_send_pskb(sk, size, 0, noblock, errcode, 0); +} + void *sock_kmalloc(struct sock *sk, int size, gfp_t priority); void sock_kfree_s(struct sock *sk, void *mem, int size); void sock_kzfree_s(struct sock *sk, void *mem, int size); |