aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-04-28 11:58:44 +0100
committerDavid S. Miller <davem@davemloft.net>2022-04-30 12:58:44 +0100
commitde32bc6aad09131a30b4a9a738e2bf2ba5a9a5aa (patch)
tree88629ee0c129dbf388db04a031238c64575471f2 /include/net/sock.h
parentMerge branch 'tcp-pass-back-data-left-in-socket-after-receive' of git://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux (diff)
downloadlinux-dev-de32bc6aad09131a30b4a9a738e2bf2ba5a9a5aa.tar.xz
linux-dev-de32bc6aad09131a30b4a9a738e2bf2ba5a9a5aa.zip
net: inline sock_alloc_send_skb
sock_alloc_send_skb() is simple and just proxying to another function, so we can inline it and cut associated overhead. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h10
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);