From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH] tcp: /proc/net/tcp rto,ato values not scaled properly
Date: Fri, 20 Jun 2008 11:56:03 -0700 [thread overview]
Message-ID: <20080620115603.5c494cab@extreme> (raw)
I found another case where we are sending information to userspace
in the wrong HZ scale. This should have been fixed back in 2.5 :-(
This means an ABI change but as it stands there is no way for an application
like ss to get the right value.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/ipv4/tcp_ipv4.c 2008-06-20 11:44:10.000000000 -0700
+++ b/net/ipv4/tcp_ipv4.c 2008-06-20 11:46:35.000000000 -0700
@@ -2201,8 +2201,8 @@ static void get_tcp4_sock(struct sock *s
icsk->icsk_probes_out,
sock_i_ino(sk),
atomic_read(&sk->sk_refcnt), sk,
- icsk->icsk_rto,
- icsk->icsk_ack.ato,
+ jiffies_to_clock_t(icsk->icsk_rto),
+ jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
tp->snd_cwnd,
tp->snd_ssthresh >= 0xFFFF ? -1 : tp->snd_ssthresh,
--- a/net/ipv6/tcp_ipv6.c 2008-06-20 11:46:48.000000000 -0700
+++ b/net/ipv6/tcp_ipv6.c 2008-06-20 11:47:10.000000000 -0700
@@ -1962,8 +1962,8 @@ static void get_tcp6_sock(struct seq_fil
icsk->icsk_probes_out,
sock_i_ino(sp),
atomic_read(&sp->sk_refcnt), sp,
- icsk->icsk_rto,
- icsk->icsk_ack.ato,
+ jiffies_to_clock_t(icsk->icsk_rto),
+ jiffies_to_clock_t(icsk->icsk_ack.ato),
(icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong,
tp->snd_cwnd, tp->snd_ssthresh>=0xFFFF?-1:tp->snd_ssthresh
);
next reply other threads:[~2008-06-20 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 18:56 Stephen Hemminger [this message]
2008-06-20 19:05 ` [PATCH] tcp: /proc/net/tcp rto,ato values not scaled properly David Miller
2008-06-20 19:31 ` Stephen Hemminger
2008-06-21 5:19 ` David Miller
2008-06-23 18:16 ` [PATCH] tcp: /proc/net/tcp rto,ato values not scaled properly (v2) Stephen Hemminger
2008-06-28 3:00 ` David Miller
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=20080620115603.5c494cab@extreme \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).