diff mbox series

[RFC,mptcp-next,v12,4/7] mptcp: sockopt: make 'tcp_fastopen_connect' generic

Message ID 20220927225341.14165-5-dmytro@shytyi.net (mailing list archive)
State Superseded, archived
Commit ce72cdadf047164a616a4f6c521c9c9e84c1d436
Delegated to: Matthieu Baerts
Headers show
Series mptcp: Fast Open Mechanism | expand

Checks

Context Check Description
matttbe/checkpatch warning total: 0 errors, 1 warnings, 0 checks, 30 lines checked
matttbe/build fail Build error with: -Werror
matttbe/KVM_Validation__normal warning Unstable: 8 failed test(s): packetdrill_fastopen packetdrill_mp_join packetdrill_mp_prio packetdrill_sockopts packetdrill_syscalls selftest_mptcp_join selftest_mptfo selftest_simult_flows
matttbe/KVM_Validation__debug warning Unstable: 8 failed test(s): packetdrill_fastopen packetdrill_mp_join packetdrill_mp_prio packetdrill_sockopts packetdrill_syscalls selftest_mptcp_join selftest_mptfo selftest_simult_flows

Commit Message

Dmytro Shytyi Sept. 27, 2022, 10:53 p.m. UTC
From: Matthieu Baerts <matthieu.baerts@tessares.net>

This is patch provided by Matthieu. As it seems it not yet merged I
temprorarly integrated in into my series for compilation.
'https://lore.kernel.org/mptcp/
20220927150306.1552795-1-matthieu.baerts@tessares.net/T/'
When it will be merged I will delete it from this set of patches.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/sockopt.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Paolo Abeni Sept. 28, 2022, 9:26 a.m. UTC | #1
On Tue, 2022-09-27 at 22:53 +0000, Dmytro Shytyi wrote:
> From: Matthieu Baerts <matthieu.baerts@tessares.net>
> 
> This is patch provided by Matthieu. As it seems it not yet merged I
> temprorarly integrated in into my series for compilation.
> 'https://lore.kernel.org/mptcp/
> 20220927150306.1552795-1-matthieu.baerts@tessares.net/T/'
> When it will be merged I will delete it from this set of patches.
> 
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>

You don't need to include this patch into this series, just rebase the
series on top of Mat patches.


Cheers,

Paolo
Dmytro Shytyi Oct. 1, 2022, 2:50 a.m. UTC | #2
Hello,

Rebased on top of Mat patches.

On 9/28/2022 11:26 AM, Paolo Abeni wrote:
> On Tue, 2022-09-27 at 22:53 +0000, Dmytro Shytyi wrote:
>> From: Matthieu Baerts <matthieu.baerts@tessares.net>
>>
>> This is patch provided by Matthieu. As it seems it not yet merged I
>> temprorarly integrated in into my series for compilation.
>> 'https://lore.kernel.org/mptcp/
>> 20220927150306.1552795-1-matthieu.baerts@tessares.net/T/'
>> When it will be merged I will delete it from this set of patches.
>>
>> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> You don't need to include this patch into this series, just rebase the
> series on top of Mat patches.
>
>
> Cheers,
>
> Paolo
>
>
diff mbox series

Patch

diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
index c7cb68c725b2..8d3b09d75c3a 100644
--- a/net/mptcp/sockopt.c
+++ b/net/mptcp/sockopt.c
@@ -769,17 +769,17 @@  static int mptcp_setsockopt_sol_tcp_defer(struct mptcp_sock *msk, sockptr_t optv
 	return tcp_setsockopt(listener->sk, SOL_TCP, TCP_DEFER_ACCEPT, optval, optlen);
 }
 
-static int mptcp_setsockopt_sol_tcp_fastopen_connect(struct mptcp_sock *msk, sockptr_t optval,
-						     unsigned int optlen)
+static int mptcp_setsockopt_first_sf_only(struct mptcp_sock *msk, int level, int optname,
+					  sockptr_t optval, unsigned int optlen)
 {
 	struct socket *sock;
 
-	/* Limit to first subflow */
+	/* Limit to first subflow, before the connection establishment */
 	sock = __mptcp_nmpc_socket(msk);
 	if (!sock)
 		return -EINVAL;
 
-	return tcp_setsockopt(sock->sk, SOL_TCP, TCP_FASTOPEN_CONNECT, optval, optlen);
+	return tcp_setsockopt(sock->sk, level, optname, optval, optlen);
 }
 
 static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
@@ -811,7 +811,8 @@  static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
 	case TCP_DEFER_ACCEPT:
 		return mptcp_setsockopt_sol_tcp_defer(msk, optval, optlen);
 	case TCP_FASTOPEN_CONNECT:
-		return mptcp_setsockopt_sol_tcp_fastopen_connect(msk, optval, optlen);
+		return mptcp_setsockopt_first_sf_only(msk, SOL_TCP, optname,
+						      optval, optlen);
 	}
 
 	return -EOPNOTSUPP;