Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: lucas.nussbaum@loria.fr, netdev@vger.kernel.org, sha2@ncsu.edu
Subject: Re: [PATCH] tcp_cubic: enable TCP timestamps
Date: Tue, 8 Mar 2011 11:17:57 -0800	[thread overview]
Message-ID: <20110308111757.7db14e58@nehalam> (raw)
In-Reply-To: <20110308.105503.104060436.davem@davemloft.net>

On Tue, 08 Mar 2011 10:55:03 -0800 (PST)
David Miller <davem@davemloft.net> wrote:

Complete the sentence...

>  on old desktops.  

   But without it enabling RTT_STAMP, packets that
   get acked in less than a jiffie (1 - 10 ms) will 
   be processed with no rtt value (-1); this causes hystart
   never to be invoked on local connections.

Maybe the following would be better, it passes 0 as RTT
when not using RTT_STAMP for quick packets.

It turns out the Cubic ends up converting rtt_us back
to jiffies anyway, so RTT_STAMP is not really needed.

----
Subject: tcp: fix RTT for quick packets in congestion control

In the congestion control interface, the callback for each ACK
includes an estimated round trip time in microseconds.
Some algorithms need high resolution (Vegas style) but most only
need jiffie resolution.  If RTT is not accurate (like a retransmission)
-1 is used as a flag value.

When doing coarse resolution if RTT is less than a a jiffie
then 0 should be returned rather than no estimate. Otherwise algorithms
that expect good ack's to trigger slow start (like CUBIC Hystart)
will be confused.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/net/ipv4/tcp_input.c	2011-03-08 11:11:26.093183654 -0800
+++ b/net/ipv4/tcp_input.c	2011-03-08 11:11:46.641404939 -0800
@@ -3350,7 +3350,7 @@ static int tcp_clean_rtx_queue(struct so
 						 net_invalid_timestamp()))
 					rtt_us = ktime_us_delta(ktime_get_real(),
 								last_ackt);
-				else if (ca_seq_rtt > 0)
+				else if (ca_seq_rtt >= 0)
 					rtt_us = jiffies_to_usecs(ca_seq_rtt);
 			}
 

      parent reply	other threads:[~2011-03-08 19:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08  8:09 [PATCH] tcp_cubic: enable TCP timestamps Lucas Nussbaum
2011-03-08 18:42 ` Stephen Hemminger
2011-03-08 18:55   ` David Miller
2011-03-08 19:15     ` Sangtae Ha
2011-03-08 19:36       ` Lucas Nussbaum
2011-03-08 19:38         ` David Miller
2011-03-08 19:17     ` Stephen Hemminger [this message]

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=20110308111757.7db14e58@nehalam \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=lucas.nussbaum@loria.fr \
    --cc=netdev@vger.kernel.org \
    --cc=sha2@ncsu.edu \
    /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