* [PATCH v2 iproute2 1/1] ss: add missing path MTU parameter
@ 2017-12-14 19:59 Roman Mashak
2017-12-15 5:15 ` Stephen Hemminger
2017-12-15 8:45 ` Stefano Brivio
0 siblings, 2 replies; 4+ messages in thread
From: Roman Mashak @ 2017-12-14 19:59 UTC (permalink / raw)
To: stephen; +Cc: netdev, jhs, Roman Mashak
v2:
Print the path MTU immediately after the MSS, as it is easier to parse
for humans (suggested by Neal Cardwell).
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
---
man/man8/ss.8 | 4 ++++
misc/ss.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/man/man8/ss.8 b/man/man8/ss.8
index 6d06383..0d52673 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -184,6 +184,10 @@ max segment size
congestion window size
.P
.TP
+.B pmtu:<pmtu>
+path MTU value
+.P
+.TP
.B ssthresh:<ssthresh>
tcp congestion window slow start threshold
.P
diff --git a/misc/ss.c b/misc/ss.c
index da52d5e..b43bd0b 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -727,6 +727,7 @@ struct tcpstat {
int mss;
int rcv_mss;
int advmss;
+ unsigned int pmtu;
unsigned int cwnd;
unsigned int lastsnd;
unsigned int lastrcv;
@@ -1959,6 +1960,8 @@ static void tcp_stats_print(struct tcpstat *s)
if (s->mss)
printf(" mss:%d", s->mss);
+ if (s->pmtu)
+ printf(" pmtu:%u", s->pmtu);
if (s->rcv_mss)
printf(" rcvmss:%d", s->rcv_mss);
if (s->advmss)
@@ -2308,6 +2311,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
s.reordering = info->tcpi_reordering;
s.rcv_ssthresh = info->tcpi_rcv_ssthresh;
s.cwnd = info->tcpi_snd_cwnd;
+ s.pmtu = info->tcpi_pmtu;
if (info->tcpi_snd_ssthresh < 0xFFFF)
s.ssthresh = info->tcpi_snd_ssthresh;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2 iproute2 1/1] ss: add missing path MTU parameter
2017-12-14 19:59 [PATCH v2 iproute2 1/1] ss: add missing path MTU parameter Roman Mashak
@ 2017-12-15 5:15 ` Stephen Hemminger
2017-12-15 8:45 ` Stefano Brivio
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-12-15 5:15 UTC (permalink / raw)
To: Roman Mashak; +Cc: netdev, jhs
On Thu, 14 Dec 2017 14:59:11 -0500
Roman Mashak <mrv@mojatatu.com> wrote:
> v2:
> Print the path MTU immediately after the MSS, as it is easier to parse
> for humans (suggested by Neal Cardwell).
>
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Thanks for the patch, it looks like a good field to show.
Unfortunately, it does not apply cleanly to current iproute2 master.
Please rebase and resubmit.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 iproute2 1/1] ss: add missing path MTU parameter
2017-12-14 19:59 [PATCH v2 iproute2 1/1] ss: add missing path MTU parameter Roman Mashak
2017-12-15 5:15 ` Stephen Hemminger
@ 2017-12-15 8:45 ` Stefano Brivio
2017-12-15 13:58 ` Roman Mashak
1 sibling, 1 reply; 4+ messages in thread
From: Stefano Brivio @ 2017-12-15 8:45 UTC (permalink / raw)
To: Roman Mashak; +Cc: stephen, netdev, jhs
Hi Roman,
On Thu, 14 Dec 2017 14:59:11 -0500
Roman Mashak <mrv@mojatatu.com> wrote:
> @@ -1959,6 +1960,8 @@ static void tcp_stats_print(struct tcpstat *s)
>
> if (s->mss)
> printf(" mss:%d", s->mss);
> + if (s->pmtu)
> + printf(" pmtu:%u", s->pmtu);
You'll simply need to change this to out() now, as this print will be
buffered.
--
Stefano
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2 iproute2 1/1] ss: add missing path MTU parameter
2017-12-15 8:45 ` Stefano Brivio
@ 2017-12-15 13:58 ` Roman Mashak
0 siblings, 0 replies; 4+ messages in thread
From: Roman Mashak @ 2017-12-15 13:58 UTC (permalink / raw)
To: Stefano Brivio; +Cc: stephen, netdev, jhs
Stefano Brivio <sbrivio@redhat.com> writes:
> On Thu, 14 Dec 2017 14:59:11 -0500
> Roman Mashak <mrv@mojatatu.com> wrote:
>
>> @@ -1959,6 +1960,8 @@ static void tcp_stats_print(struct tcpstat *s)
>>
>> if (s->mss)
>> printf(" mss:%d", s->mss);
>> + if (s->pmtu)
>> + printf(" pmtu:%u", s->pmtu);
>
> You'll simply need to change this to out() now, as this print will be
> buffered.
Oh I see why it does not apply, I'll resubmit. Thanks Stefano.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-15 13:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 19:59 [PATCH v2 iproute2 1/1] ss: add missing path MTU parameter Roman Mashak
2017-12-15 5:15 ` Stephen Hemminger
2017-12-15 8:45 ` Stefano Brivio
2017-12-15 13:58 ` Roman Mashak
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).