diff mbox series

[RFC,mptcp-next,v12,6/7] mptcp: add TCP_FASTOPEN option

Message ID 20220927225341.14165-7-dmytro@shytyi.net (mailing list archive)
State Superseded, archived
Delegated to: Paolo Abeni
Headers show
Series mptcp: Fast Open Mechanism | expand

Checks

Context Check Description
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 21 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
We add the TCP_FASTOPEN socket option in this patch that is going to
 be set by the listener side.

Signed-off-by: Dmytro Shytyi <dmytro@shytyi.net>
---
 net/mptcp/sockopt.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Paolo Abeni Sept. 28, 2022, 9:28 a.m. UTC | #1
On Tue, 2022-09-27 at 22:53 +0000, Dmytro Shytyi wrote:
> We add the TCP_FASTOPEN socket option in this patch that is going to
>  be set by the listener side.
> 
> Signed-off-by: Dmytro Shytyi <dmytro@shytyi.net>
> ---
>  net/mptcp/sockopt.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
> index 1857281a0dd5..ab3ba8558efd 100644
> --- a/net/mptcp/sockopt.c
> +++ b/net/mptcp/sockopt.c
> @@ -559,6 +559,7 @@ static bool mptcp_supported_sockopt(int level, int optname)
>  		case TCP_NOTSENT_LOWAT:
>  		case TCP_TX_DELAY:
>  		case TCP_INQ:
> +		case TCP_FASTOPEN:
>  		case TCP_FASTOPEN_CONNECT:
>  		case TCP_FASTOPEN_NO_COOKIE:
>  			return true;

You should additionally update the comment below that describe
TCP_FASTOPEN as not supported.

/P
Dmytro Shytyi Oct. 1, 2022, 2:49 a.m. UTC | #2
Hello,

Updated in v13.

Dmytro

On 9/28/2022 11:28 AM, Paolo Abeni wrote:
> On Tue, 2022-09-27 at 22:53 +0000, Dmytro Shytyi wrote:
>> We add the TCP_FASTOPEN socket option in this patch that is going to
>>   be set by the listener side.
>>
>> Signed-off-by: Dmytro Shytyi <dmytro@shytyi.net>
>> ---
>>   net/mptcp/sockopt.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
>> index 1857281a0dd5..ab3ba8558efd 100644
>> --- a/net/mptcp/sockopt.c
>> +++ b/net/mptcp/sockopt.c
>> @@ -559,6 +559,7 @@ static bool mptcp_supported_sockopt(int level, int optname)
>>   		case TCP_NOTSENT_LOWAT:
>>   		case TCP_TX_DELAY:
>>   		case TCP_INQ:
>> +		case TCP_FASTOPEN:
>>   		case TCP_FASTOPEN_CONNECT:
>>   		case TCP_FASTOPEN_NO_COOKIE:
>>   			return true;
> You should additionally update the comment below that describe
> TCP_FASTOPEN as not supported.
>
> /P
>
>
diff mbox series

Patch

diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c
index 1857281a0dd5..ab3ba8558efd 100644
--- a/net/mptcp/sockopt.c
+++ b/net/mptcp/sockopt.c
@@ -559,6 +559,7 @@  static bool mptcp_supported_sockopt(int level, int optname)
 		case TCP_NOTSENT_LOWAT:
 		case TCP_TX_DELAY:
 		case TCP_INQ:
+		case TCP_FASTOPEN:
 		case TCP_FASTOPEN_CONNECT:
 		case TCP_FASTOPEN_NO_COOKIE:
 			return true;
@@ -811,6 +812,7 @@  static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
 		return mptcp_setsockopt_sol_tcp_nodelay(msk, optval, optlen);
 	case TCP_DEFER_ACCEPT:
 		return mptcp_setsockopt_sol_tcp_defer(msk, optval, optlen);
+	case TCP_FASTOPEN:
 	case TCP_FASTOPEN_CONNECT:
 	case TCP_FASTOPEN_NO_COOKIE:
 		return mptcp_setsockopt_first_sf_only(msk, SOL_TCP, optname,
@@ -1176,6 +1178,7 @@  static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
 	case TCP_INFO:
 	case TCP_CC_INFO:
 	case TCP_DEFER_ACCEPT:
+	case TCP_FASTOPEN:
 	case TCP_FASTOPEN_CONNECT:
 	case TCP_FASTOPEN_NO_COOKIE:
 		return mptcp_getsockopt_first_sf_only(msk, SOL_TCP, optname,