aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2012-10-19 11:14:44 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-22 15:16:06 -0400
commit6f73601efb35c7003f5c58c2bc6fd08f3652169c (patch)
treef77807af2f6bbe08104b4563eb150e9e425dfce6 /include
parente6e71054cd9f98c8ebb3a5f66f2776a9736afc87 (diff)
tcp: add SYN/data info to TCP_INFO
Add a bit TCPI_OPT_SYN_DATA (32) to the socket option TCP_INFO:tcpi_options. It's set if the data in SYN (sent or received) is acked by SYN-ACK. Server or client application can use this information to check Fast Open success rate. Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tcp.h3
-rw-r--r--include/uapi/linux/tcp.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 8a7fc4be2d7..60b7aac15e0 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -191,7 +191,8 @@ struct tcp_sock {
191 u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */ 191 u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */
192 early_retrans_delayed:1, /* Delayed ER timer installed */ 192 early_retrans_delayed:1, /* Delayed ER timer installed */
193 syn_data:1, /* SYN includes data */ 193 syn_data:1, /* SYN includes data */
194 syn_fastopen:1; /* SYN includes Fast Open option */ 194 syn_fastopen:1, /* SYN includes Fast Open option */
195 syn_data_acked:1;/* data in SYN is acked by SYN-ACK */
195 196
196/* RTT measurement */ 197/* RTT measurement */
197 u32 srtt; /* smoothed round trip time << 3 */ 198 u32 srtt; /* smoothed round trip time << 3 */
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index c4b89a5cb7d..e962faa5ab0 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -130,6 +130,7 @@ enum {
130#define TCPI_OPT_WSCALE 4 130#define TCPI_OPT_WSCALE 4
131#define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */ 131#define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */
132#define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ 132#define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
133#define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */
133 134
134enum tcp_ca_state { 135enum tcp_ca_state {
135 TCP_CA_Open = 0, 136 TCP_CA_Open = 0,