Message ID | 55dcdba34b9d9fbd2a95257de7916560e1a6b7b1.1646308584.git.dcaratti@redhat.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | David Ahern |
Headers | show |
Series | [iproute2-next] ss: display advertised TCP receive window and out-of-order counter | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
On Thu, Mar 3, 2022 at 6:58 AM Davide Caratti <dcaratti@redhat.com> wrote: > > these members of TCP_INFO have been included in v5.4. > > tested with: > # ss -nti > > Signed-off-by: Davide Caratti <dcaratti@redhat.com> > --- > misc/ss.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/misc/ss.c b/misc/ss.c > index f7d369142d93..d77b7f10dc43 100644 > --- a/misc/ss.c > +++ b/misc/ss.c > @@ -854,6 +854,8 @@ struct tcpstat { > unsigned int reord_seen; > double rcv_rtt; > double min_rtt; > + unsigned int rcv_ooopack; > + unsigned int snd_wnd; > int rcv_space; > unsigned int rcv_ssthresh; > unsigned long long busy_time; > @@ -2654,6 +2656,10 @@ static void tcp_stats_print(struct tcpstat *s) > out(" notsent:%u", s->not_sent); > if (s->min_rtt) > out(" minrtt:%g", s->min_rtt); > + if (s->rcv_ooopack) > + out(" rcv_oopack:%u", s->rcv_ooopack); It seems there may be a typo where there is a missing 'o' in the 'rcv_oopack' field name that is printed?; probably this should be: + out(" rcv_ooopack:%u", s->rcv_ooopack); best, neal
On Thu, Mar 3, 2022 at 2:51 PM Neal Cardwell <ncardwell@google.com> wrote: > [...] > > It seems there may be a typo where there is a missing 'o' in the > 'rcv_oopack' field name that is printed?; probably this should be: > > + out(" rcv_ooopack:%u", s->rcv_ooopack); hi Neal, thanks for spotting this. Yes, it's a typo, I will send a v2 right now. -- davide
diff --git a/misc/ss.c b/misc/ss.c index f7d369142d93..d77b7f10dc43 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -854,6 +854,8 @@ struct tcpstat { unsigned int reord_seen; double rcv_rtt; double min_rtt; + unsigned int rcv_ooopack; + unsigned int snd_wnd; int rcv_space; unsigned int rcv_ssthresh; unsigned long long busy_time; @@ -2654,6 +2656,10 @@ static void tcp_stats_print(struct tcpstat *s) out(" notsent:%u", s->not_sent); if (s->min_rtt) out(" minrtt:%g", s->min_rtt); + if (s->rcv_ooopack) + out(" rcv_oopack:%u", s->rcv_ooopack); + if (s->snd_wnd) + out(" snd_wnd:%u", s->snd_wnd); } static void tcp_timer_print(struct tcpstat *s) @@ -3088,6 +3094,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, s.reord_seen = info->tcpi_reord_seen; s.bytes_sent = info->tcpi_bytes_sent; s.bytes_retrans = info->tcpi_bytes_retrans; + s.rcv_ooopack = info->tcpi_rcv_ooopack; + s.snd_wnd = info->tcpi_snd_wnd; tcp_stats_print(&s); free(s.dctcp); free(s.bbr_info);
these members of TCP_INFO have been included in v5.4. tested with: # ss -nti Signed-off-by: Davide Caratti <dcaratti@redhat.com> --- misc/ss.c | 8 ++++++++ 1 file changed, 8 insertions(+)