lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 3 Oct 2012 03:21:08 +0300 (EEST)
From:	Julian Anastasov <ja@....bg>
To:	Eric Dumazet <eric.dumazet@...il.com>
cc:	Stephen Hemminger <shemminger@...tta.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v2] iproute2: add support for tcp_metrics


	Hello,

On Tue, 2 Oct 2012, Eric Dumazet wrote:

> By the way, it seems kernel exports scaled srtt by 8, and rttvar by 4.
> 
> And tcp_get_info() correctly exports us, not ms.
> 
> info->tcpi_rtt = jiffies_to_usecs(tp->srtt)>>3;
> info->tcpi_rttvar = jiffies_to_usecs(tp->mdev)>>2;
> 
> IMHO we should use same unit than TCP_INFO (us for these values)

	Something like this in process_msg?:

case TCP_METRIC_RTT:
	fprintf(fp, "%lluus",
		((__u64) val * 1000) >> 3);
	break;
case TCP_METRIC_RTTVAR:
	fprintf(fp, "%lluus",
		((__u64) val * 1000) >> 2);
	break;

	And may be variant without __u64 should be fine?

Regards

--
Julian Anastasov <ja@....bg>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists