From 0135945cc60469a6524eeec55a5f7f16b8508f39 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Mon, 3 Oct 2011 14:01:21 -0400 Subject: [PATCH] --- yaml --- r: 266408 b: refs/heads/master c: b5c5693bb723a019deac3cd1345f3e7233c8a67e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/tcp.h | 3 ++- trunk/net/ipv4/tcp.c | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 7a4f8b56a04b..8c06fccc3165 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0654011d900670884197d9a06ad17b378dfde831 +refs/heads/master: b5c5693bb723a019deac3cd1345f3e7233c8a67e diff --git a/trunk/include/linux/tcp.h b/trunk/include/linux/tcp.h index 6b63b310af36..7f59ee946983 100644 --- a/trunk/include/linux/tcp.h +++ b/trunk/include/linux/tcp.h @@ -111,7 +111,8 @@ enum { #define TCPI_OPT_TIMESTAMPS 1 #define TCPI_OPT_SACK 2 #define TCPI_OPT_WSCALE 4 -#define TCPI_OPT_ECN 8 +#define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */ +#define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ enum tcp_ca_state { TCP_CA_Open = 0, diff --git a/trunk/net/ipv4/tcp.c b/trunk/net/ipv4/tcp.c index 131c45f93373..4c0da24fb649 100644 --- a/trunk/net/ipv4/tcp.c +++ b/trunk/net/ipv4/tcp.c @@ -2455,8 +2455,10 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info) info->tcpi_rcv_wscale = tp->rx_opt.rcv_wscale; } - if (tp->ecn_flags&TCP_ECN_OK) + if (tp->ecn_flags & TCP_ECN_OK) info->tcpi_options |= TCPI_OPT_ECN; + if (tp->ecn_flags & TCP_ECN_SEEN) + info->tcpi_options |= TCPI_OPT_ECN_SEEN; info->tcpi_rto = jiffies_to_usecs(icsk->icsk_rto); info->tcpi_ato = jiffies_to_usecs(icsk->icsk_ack.ato);