[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0f5578fd-9f0b-4541-aff8-f882850ee01d@redhat.com>
Date: Tue, 22 Apr 2025 12:41:03 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jeremy Harris <jgh@...m.org>, netdev@...r.kernel.org
Cc: edumazet@...gle.com, ncardwell@...gle.com
Subject: Re: [RESEND PATCH 2/2] TCP: pass accepted-TFO indication through
getsockopt
On 4/16/25 11:15 AM, Jeremy Harris wrote:
> Signed-off-by: Jeremy Harris <jgh@...m.org>
The commit message is missing.
> ---
> include/uapi/linux/tcp.h | 1 +
> net/ipv4/tcp.c | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
> index dc8fdc80e16b..ae8c5a8af0e5 100644
> --- a/include/uapi/linux/tcp.h
> +++ b/include/uapi/linux/tcp.h
> @@ -184,6 +184,7 @@ enum tcp_fastopen_client_fail {
> #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
> #define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
> #define TCPI_OPT_USEC_TS 64 /* usec timestamps */
> +#define TCPI_OPT_TFO_SEEN 128 /* we accepted a Fast Open option on SYN */
>
> /*
> * Sender's congestion state indicating normal or abnormal situations
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index e0e96f8fd47c..b45eb7cb2909 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -4164,6 +4164,8 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
> info->tcpi_options |= TCPI_OPT_SYN_DATA;
> if (tp->tcp_usec_ts)
> info->tcpi_options |= TCPI_OPT_USEC_TS;
> + if (tp->syn_fastopen_in)
> + info->tcpi_options |= TCPI_OPT_TFO_SEEN;
I guess a paired iproute2 change is needed to really observe the new info.
And it would be nice to leverage such thing to later add a paired
self-test for this feature.
Thanks,
Paolo
Powered by blists - more mailing lists