ss: tcp: Provide visibilty of Fast Open child creation
Subsystems (3)
cover ss: tcp: Provide visibilty of Fast Open child creation
ss -oi can output "fastopen_child" attribute if the passive-open
socket was created as a fastopen child
Note: this is dependent on the acceptance of a kernel patch, submitted as
"[PATCH v2 0/2] tcp: fastopen: observability"
Jeremy Harris (1):
ss: tcp: observability of fastopen child creation
include/uapi/linux/tcp.h | 1 + misc/ss.c | 4 ++++ 2 files changed, 5 insertions(+)
base-commit: 866e1d107b7de68ca1fcd1d4d5ffecf9d96bff30
Signature · 1 line
2.49.0
PATCH 1/1 ss: tcp: observability of fastopen child creation
ss -oi can output "fastopen_child" attribute if the passive-open socket was created as a fastopen child
Signed-off-by Jeremy Harris <[email protected]>
--- include/uapi/linux/tcp.h | 1 + misc/ss.c | 4 ++++ 2 files changed, 5 insertions(+)
include/uapi/linux/tcp.h +1 -0
@@ -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
misc/ss.c +4 -0
@@ -891,6 +891,7 @@ struct tcpstat {bool has_ecn_opt;bool has_ecnseen_opt;bool has_fastopen_opt; +bool has_fastopen_child_opt;bool has_wscale_opt;bool app_limited;struct dctcpstat *dctcp;
@@ -2613,6 +2614,8 @@ static void tcp_stats_print(struct tcpstat *s)out (" ecnseen" );if (s->has_fastopen_opt)out (" fastopen" ); +if (s->has_fastopen_child_opt) +out (" fastopen_child" );if (s->cong_alg[0 ])out (" %s" , s->cong_alg);if (s->has_wscale_opt)
@@ -3099,6 +3102,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, s.has_ecn_opt =TCPI_HAS_OPT (info,TCPI_OPT_ECN ); s.has_ecnseen_opt =TCPI_HAS_OPT (info,TCPI_OPT_ECN_SEEN ); s.has_fastopen_opt =TCPI_HAS_OPT (info,TCPI_OPT_SYN_DATA ); + s.has_fastopen_child_opt =TCPI_HAS_OPT (info,TCPI_OPT_TFO_CHILD ); }if (tb[INET_DIAG_CONG ])
Signature · 1 line
2.49.0