netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcp: /proc/net/tcp rto,ato values not scaled properly
@ 2008-06-20 18:56 Stephen Hemminger
  2008-06-20 19:05 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stephen Hemminger @ 2008-06-20 18:56 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

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

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

end of thread, other threads:[~2008-06-28  3:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20 18:56 [PATCH] tcp: /proc/net/tcp rto,ato values not scaled properly Stephen Hemminger
2008-06-20 19:05 ` 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

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