netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] ss: add fastopen support
@ 2013-03-29 20:51 Eric Dumazet
  2013-03-29 20:56 ` David Miller
  2013-05-04  3:42 ` Stephen Hemminger
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Dumazet @ 2013-03-29 20:51 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Yuchung Cheng

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])

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ss: add fastopen support
  2013-03-29 20:51 [PATCH iproute2] ss: add fastopen support Eric Dumazet
@ 2013-03-29 20:56 ` David Miller
  2013-05-04  0:08   ` Yuchung Cheng
  2013-05-04  3:42 ` Stephen Hemminger
  1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2013-03-29 20:56 UTC (permalink / raw)
  To: eric.dumazet; +Cc: stephen, netdev, ycheng

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 29 Mar 2013 13:51:57 -0700

> 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>

Reviewed-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ss: add fastopen support
  2013-03-29 20:56 ` David Miller
@ 2013-05-04  0:08   ` Yuchung Cheng
  2013-05-04  1:04     ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: Yuchung Cheng @ 2013-05-04  0:08 UTC (permalink / raw)
  To: David Miller; +Cc: Eric Dumazet, Stephen Hemminger, netdev

On Fri, Mar 29, 2013 at 1:56 PM, David Miller <davem@davemloft.net> wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Fri, 29 Mar 2013 13:51:57 -0700
>
>> 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>
>
> Reviewed-by: David S. Miller <davem@davemloft.net>
Acked-by: Yuchung Cheng <ycheng@google.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ss: add fastopen support
  2013-05-04  0:08   ` Yuchung Cheng
@ 2013-05-04  1:04     ` Eric Dumazet
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2013-05-04  1:04 UTC (permalink / raw)
  To: Yuchung Cheng; +Cc: David Miller, Stephen Hemminger, netdev

On Fri, 2013-05-03 at 17:08 -0700, Yuchung Cheng wrote:
> On Fri, Mar 29, 2013 at 1:56 PM, David Miller <davem@davemloft.net> wrote:
> > From: Eric Dumazet <eric.dumazet@gmail.com>
> > Date: Fri, 29 Mar 2013 13:51:57 -0700
> >
> >> 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>
> >
> > Reviewed-by: David S. Miller <davem@davemloft.net>
> Acked-by: Yuchung Cheng <ycheng@google.com>

Oh well, it seems this patch got lost.

Stephen, tell me if you want me to resend it, thanks !

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ss: add fastopen support
  2013-03-29 20:51 [PATCH iproute2] ss: add fastopen support Eric Dumazet
  2013-03-29 20:56 ` David Miller
@ 2013-05-04  3:42 ` Stephen Hemminger
  2013-05-04  3:53   ` Eric Dumazet
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2013-05-04  3:42 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, Yuchung Cheng

On Fri, 29 Mar 2013 13:51:57 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> 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>

Ok, but the header stuff needs work.

The headers from iproute2 come from the kernel sanitized headers (ie make headers_install)
The only definition of TCPI_OPT_ECN_SEEN in those headers is in <linux/tcp.h>
I will tweak the ss to use linux/tcp.h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH iproute2] ss: add fastopen support
  2013-05-04  3:42 ` Stephen Hemminger
@ 2013-05-04  3:53   ` Eric Dumazet
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2013-05-04  3:53 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Yuchung Cheng

On Fri, 2013-05-03 at 20:42 -0700, Stephen Hemminger wrote:

> Ok, but the header stuff needs work.
> 
> The headers from iproute2 come from the kernel sanitized headers (ie make headers_install)
> The only definition of TCPI_OPT_ECN_SEEN in those headers is in <linux/tcp.h>
> I will tweak the ss to use linux/tcp.h

Thanks, this seems good to me.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-04  3:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-29 20:51 [PATCH iproute2] ss: add fastopen support Eric Dumazet
2013-03-29 20:56 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).