mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Benjamin Hesmans <benjamin.hesmans@tessares.net>
To: mptcp@lists.linux.dev
Cc: Benjamin Hesmans <benjamin.hesmans@tessares.net>
Subject: [PATCH mptcp-next v1 2/5] tcp: export tcp_sendmsg_fastopen
Date: Wed, 21 Sep 2022 17:25:36 +0200	[thread overview]
Message-ID: <20220921152539.1851441-3-benjamin.hesmans@tessares.net> (raw)
In-Reply-To: <20220921152539.1851441-1-benjamin.hesmans@tessares.net>

It will be used to support TCP FastOpen with MPTCP in the following
commit.

Signed-off-by: Benjamin Hesmans <benjamin.hesmans@tessares.net>
---
 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 27e8d378c70a..4f71cc15ff8e 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 5702ca9b952d..5237a3f08c94 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.25.1


-- 


Disclaimer: https://www.tessares.net/mail-disclaimer/ 
<https://www.tessares.net/mail-disclaimer/>



  parent reply	other threads:[~2022-09-21 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 15:25 [PATCH mptcp-next v1 0/5] mptcp: add support for TFO, sender side only Benjamin Hesmans
2022-09-21 15:25 ` [PATCH mptcp-next v1 1/5] mptcp: add TCP_FASTOPEN_CONNECT socket option Benjamin Hesmans
2022-09-21 15:25 ` Benjamin Hesmans [this message]
2022-09-21 15:25 ` [PATCH mptcp-next v1 3/5] mptcp: handle defer connect in mptcp_sendmsg Benjamin Hesmans
2022-09-21 17:41   ` Paolo Abeni
2022-09-21 15:25 ` [PATCH mptcp-next v1 4/5] mptcp: add MSG_FASTOPEN support Benjamin Hesmans
2022-09-21 15:25 ` [PATCH mptcp-next v1 5/5] mptcp: poll allow write call before actual connect Benjamin Hesmans
2022-09-21 16:52   ` mptcp: poll allow write call before actual connect: Tests Results MPTCP CI
2022-09-21 17:43   ` [PATCH mptcp-next v1 5/5] mptcp: poll allow write call before actual connect Paolo Abeni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220921152539.1851441-3-benjamin.hesmans@tessares.net \
    --to=benjamin.hesmans@tessares.net \
    --cc=mptcp@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).