lkml.org 
[lkml]   [2012]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: resurrecting tcphealth
Date
On Monday 16 July 2012 17:12:26 Piotr Sawuk wrote:
> + seq_printf(seq, "%d: %-21pI4:%u %-21pI4:%u "
> + "%8u %8lu %8lu %8lu %8lu%n",
> + st->num,
> + &inet->inet_rcv_saddr,
> + ntohs(inet->inet_sport),
> + &inet->inet_daddr,
> + ntohs(inet->inet_dport),
> + jiffies_to_msecs(tp->srtt),

This still doesn't gives you the correct RTT.
srtt is in jiffies * 8.

You should do jiffies_to_msecs(tp->srtt) >> 3.

The RTT is already exposed by tcp_info anyway... (see tcp_get_info() - where
you also see the bitshift)


Christoph

--
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://mptcp.info.ucl.ac.be
Université Catholique de Louvain
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-07-16 18:21    [W:0.048 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site