From 3242abeb8da7071fa40d32346ed36343bee33b80 Mon Sep 17 00:00:00 2001 From: Benjamin Hesmans Date: Mon, 26 Sep 2022 16:27:37 -0700 Subject: [PATCH] tcp: export tcp_sendmsg_fastopen It will be used to support TCP FastOpen with MPTCP in the following commit. Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts Co-developed-by: Dmytro Shytyi Signed-off-by: Dmytro Shytyi Signed-off-by: Benjamin Hesmans Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski --- include/net/tcp.h | 2 ++ net/ipv4/tcp.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 27e8d37..4f71cc1 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -327,6 +327,8 @@ void tcp_remove_empty_skb(struct sock *sk); int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw); int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size); int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size); +int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, int *copied, + size_t size, struct ubuf_info *uarg); int tcp_sendpage(struct sock *sk, struct page *page, int offset, size_t size, int flags); int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset, diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index a109a4c..648b5c5 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1162,9 +1162,8 @@ void tcp_free_fastopen_req(struct tcp_sock *tp) } } -static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, - int *copied, size_t size, - struct ubuf_info *uarg) +int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, int *copied, + size_t size, struct ubuf_info *uarg) { struct tcp_sock *tp = tcp_sk(sk); struct inet_sock *inet = inet_sk(sk); -- 2.7.4