* [PATCH iproute2] ss: print tcpi_rcv_mss
@ 2017-02-02 0:36 Eric Dumazet
2017-02-02 13:44 ` Eric Dumazet
2017-02-02 13:47 ` [PATCH v2 iproute2] ss: print tcpi_rcv_mss and tcpi_advmss Eric Dumazet
0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2017-02-02 0:36 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
tcpi_rcv_mss tcp info field was not yet reported by ss.
While adding GRO support to packetdrill, I found this was useful.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
misc/ss.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/misc/ss.c b/misc/ss.c
index 4454bd1..6e4f84a 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -707,6 +707,7 @@ struct tcpstat {
int snd_wscale;
int rcv_wscale;
int mss;
+ int rcv_mss;
unsigned int cwnd;
unsigned int lastsnd;
unsigned int lastrcv;
@@ -1872,6 +1873,8 @@ static void tcp_stats_print(struct tcpstat *s)
if (s->mss)
printf(" mss:%d", s->mss);
+ if (s->rcv_mss)
+ printf(" rcvmss:%d", s->rcv_mss);
if (s->cwnd)
printf(" cwnd:%u", s->cwnd);
if (s->ssthresh)
@@ -2189,6 +2192,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
s.rttvar = (double)info->tcpi_rttvar / 1000;
s.ato = (double)info->tcpi_ato / 1000;
s.mss = info->tcpi_snd_mss;
+ s.rcv_mss = info->tcpi_rcv_mss;
s.rcv_space = info->tcpi_rcv_space;
s.rcv_rtt = (double)info->tcpi_rcv_rtt / 1000;
s.lastsnd = info->tcpi_last_data_sent;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH iproute2] ss: print tcpi_rcv_mss
2017-02-02 0:36 [PATCH iproute2] ss: print tcpi_rcv_mss Eric Dumazet
@ 2017-02-02 13:44 ` Eric Dumazet
2017-02-02 13:47 ` [PATCH v2 iproute2] ss: print tcpi_rcv_mss and tcpi_advmss Eric Dumazet
1 sibling, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2017-02-02 13:44 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
On Wed, 2017-02-01 at 16:36 -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> tcpi_rcv_mss tcp info field was not yet reported by ss.
>
> While adding GRO support to packetdrill, I found this was useful.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
Will send a V2, also adding advmss.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 iproute2] ss: print tcpi_rcv_mss and tcpi_advmss
2017-02-02 0:36 [PATCH iproute2] ss: print tcpi_rcv_mss Eric Dumazet
2017-02-02 13:44 ` Eric Dumazet
@ 2017-02-02 13:47 ` Eric Dumazet
2017-02-06 21:51 ` Stephen Hemminger
1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2017-02-02 13:47 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
tcpi_rcv_mss and tcpi_advmss tcp info fields were not yet reported
by ss.
While adding GRO support to packetdrill, I found this was useful.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
misc/ss.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/misc/ss.c b/misc/ss.c
index 4454bd1..7f79eea 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -707,6 +707,8 @@ struct tcpstat {
int snd_wscale;
int rcv_wscale;
int mss;
+ int rcv_mss;
+ int advmss;
unsigned int cwnd;
unsigned int lastsnd;
unsigned int lastrcv;
@@ -1872,6 +1874,10 @@ static void tcp_stats_print(struct tcpstat *s)
if (s->mss)
printf(" mss:%d", s->mss);
+ if (s->rcv_mss)
+ printf(" rcvmss:%d", s->rcv_mss);
+ if (s->advmss)
+ printf(" advmss:%d", s->advmss);
if (s->cwnd)
printf(" cwnd:%u", s->cwnd);
if (s->ssthresh)
@@ -2189,6 +2195,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
s.rttvar = (double)info->tcpi_rttvar / 1000;
s.ato = (double)info->tcpi_ato / 1000;
s.mss = info->tcpi_snd_mss;
+ s.rcv_mss = info->tcpi_rcv_mss;
+ s.advmss = info->tcpi_advmss;
s.rcv_space = info->tcpi_rcv_space;
s.rcv_rtt = (double)info->tcpi_rcv_rtt / 1000;
s.lastsnd = info->tcpi_last_data_sent;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 iproute2] ss: print tcpi_rcv_mss and tcpi_advmss
2017-02-02 13:47 ` [PATCH v2 iproute2] ss: print tcpi_rcv_mss and tcpi_advmss Eric Dumazet
@ 2017-02-06 21:51 ` Stephen Hemminger
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-02-06 21:51 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
On Thu, 02 Feb 2017 05:47:27 -0800
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> tcpi_rcv_mss and tcpi_advmss tcp info fields were not yet reported
> by ss.
>
> While adding GRO support to packetdrill, I found this was useful.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-06 21:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-02 0:36 [PATCH iproute2] ss: print tcpi_rcv_mss Eric Dumazet
2017-02-02 13:44 ` Eric Dumazet
2017-02-02 13:47 ` [PATCH v2 iproute2] ss: print tcpi_rcv_mss and tcpi_advmss Eric Dumazet
2017-02-06 21:51 ` Stephen Hemminger
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).