Commit 2b13042d authored by Jeremy Harris's avatar Jeremy Harris Committed by Jakub Kicinski
Browse files

tcp: fastopen: pass TFO child indication through getsockopt



tcp: fastopen: pass TFO child indication through getsockopt

Note that this uses up the last bit of a field in struct tcp_info

Signed-off-by: default avatarJeremy Harris <jgh@exim.org>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarNeal Cardwell <ncardwell@google.com>
Link: https://patch.msgid.link/20250423124334.4916-3-jgh@exim.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent bc2550b4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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_CHILD	128 /* child from a Fast Open option on SYN */

/*
 * Sender's congestion state indicating normal or abnormal situations
+2 −0
Original line number Diff line number Diff line
@@ -4165,6 +4165,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_child)
		info->tcpi_options |= TCPI_OPT_TFO_CHILD;

	info->tcpi_rto = jiffies_to_usecs(icsk->icsk_rto);
	info->tcpi_ato = jiffies_to_usecs(min_t(u32, icsk->icsk_ack.ato,