From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julian Anastasov Subject: Re: [PATCH net-next] tcp: switch rtt estimations to usec resolution Date: Sun, 23 Feb 2014 09:36:30 +0200 (EET) Message-ID: References: <1393137487.2316.48.camel@edumazet-glaptop2.roam.corp.google.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: David Miller , netdev , Yuchung Cheng , Neal Cardwell , Larry Brakmo To: Eric Dumazet Return-path: Received: from ja.ssi.bg ([178.16.129.10]:48979 "EHLO ja.home.ssi.bg" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750946AbaBWHgy (ORCPT ); Sun, 23 Feb 2014 02:36:54 -0500 In-Reply-To: <1393137487.2316.48.camel@edumazet-glaptop2.roam.corp.google.com> Sender: netdev-owner@vger.kernel.org List-ID: Hello, On Sat, 22 Feb 2014, Eric Dumazet wrote: > From: Eric Dumazet > > Upcoming congestion controls for TCP require usec resolution for RTT > estimations. Millisecond resolution is simply not enough these days. ... > --- a/net/ipv4/tcp_metrics.c > +++ b/net/ipv4/tcp_metrics.c ... > @@ -408,10 +395,10 @@ void tcp_update_metrics(struct sock *sk) > */ > if (!tcp_metric_locked(tm, TCP_METRIC_RTT)) { > if (m <= 0) > - rtt = tp->srtt; > + rtt = tp->srtt_us; > else > rtt -= (m >> 3); > - tcp_metric_set_msecs(tm, TCP_METRIC_RTT, rtt); > + tcp_metric_set(tm, TCP_METRIC_RTT, rtt); What is the way to handle this change of resolution in TCP_METRICS_ATTR_VALS? The ip tool has code in ip/tcp_metrics.c process_msg() that needs to know what we get, ms or us. Do we need to add some new attribute as flag or version? Or we need to increase TCP_METRICS_GENL_VERSION in kernel and to check it in process_msg ? > - tcp_metric_set_msecs(tm, TCP_METRIC_RTTVAR, var); > + tcp_metric_set(tm, TCP_METRIC_RTTVAR, var); Regards -- Julian Anastasov