Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev <netdev@vger.kernel.org>, Yuchung Cheng <ycheng@google.com>
Subject: [PATCH iproute2] ss: add fastopen support
Date: Fri, 29 Mar 2013 13:51:57 -0700	[thread overview]
Message-ID: <1364590317.5113.63.camel@edumazet-glaptop> (raw)

From: Eric Dumazet <edumazet@google.com>

ss -i can output "fastopen" attribute if socket used Fast Open

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
---
 include/netinet/tcp.h |    5 +++--
 misc/ss.c             |    2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index 3f890a1..ba79c63 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -171,8 +171,9 @@ 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_SEEN	16
+# 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 */
+# define TCPI_OPT_SYN_DATA	32 /* SYN-ACK acked data in SYN sent or rcvd */
 
 /* Values for tcpi_state.  */
 enum tcp_ca_state
diff --git a/misc/ss.c b/misc/ss.c
index da9d32c..b7bcd80 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1392,6 +1392,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r)
 				printf(" ecn");
 			if (info->tcpi_options & TCPI_OPT_ECN_SEEN)
 				printf(" ecnseen");
+			if (info->tcpi_options & TCPI_OPT_SYN_DATA)
+				printf(" fastopen");
 		}
 
 		if (tb[INET_DIAG_CONG])

             reply	other threads:[~2013-03-29 20:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29 20:51 Eric Dumazet [this message]
2013-03-29 20:56 ` [PATCH iproute2] ss: add fastopen support David Miller
2013-05-04  0:08   ` Yuchung Cheng
2013-05-04  1:04     ` Eric Dumazet
2013-05-04  3:42 ` Stephen Hemminger
2013-05-04  3:53   ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364590317.5113.63.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox