netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Vagin <avagin@parallels.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Andrey Vagin <avagin@openvz.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Pavel Emelyanov <xemul@parallels.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] tcp: don't use timestamp from repaired skb-s to calculate RTT
Date: Tue, 12 Aug 2014 16:33:20 +0400	[thread overview]
Message-ID: <20140812123320.GA27421@paralelels.com> (raw)
In-Reply-To: <1407845701.10122.60.camel@edumazet-glaptop2.roam.corp.google.com>

On Tue, Aug 12, 2014 at 05:15:01AM -0700, Eric Dumazet wrote:
> On Tue, 2014-08-12 at 13:45 +0400, Andrey Vagin wrote:
> > We don't know right timestamp for repaired skb-s. Wrong RTT estimations
> > isn't good, because some congestion modules heavily depends on it.
> > 
> > This patch adds the TCPCB_REPAIRED flag, which is included in
> > TCPCB_RETRANS.
> 
> ...
> 
> > +
> > +				/* All packets are restored as if they have
> > +				 * already been sent. skb_mstamp isn't set to
> > +				 * avoid wrong rtt estimation.
> > +				 */
> > +				if (tp->repair) {
> > +					TCP_SKB_CB(skb)->sacked |= TCPCB_REPAIRED;
> > +					TCP_SKB_CB(skb)->when = tcp_time_stamp;
> > +				}
> >  			}
> >  
> >  			/* Try to append data to the end of skb. */
> 
> 
> Are you sure TCP_SKB_CB(skb)->when needs to be set ?

It's used in tcp_rearm_rto() for calculating a retransmit timeout.
...
	const u32 rto_time_stamp = TCP_SKB_CB(skb)->when + rto;
	s32 delta = (s32)(rto_time_stamp - tcp_time_stamp);
...

"when" is used as a start point, so I think it's acceptable here.

I will add a comment. Thanks.

> 
> It should not anymore.
> 
> If yes, I believe a comment would help a lot here.
> 
> Also, please include this tag to ease stable backports (3.15+) :
> 
> Fixes: 431a91242d8d ("tcp: timestamp SYN+DATA messages")
> Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution")

Thanks,
Andrew

  reply	other threads:[~2014-08-12 12:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12  9:45 [PATCH] tcp: don't use timestamp from repaired skb-s to calculate RTT Andrey Vagin
2014-08-12 12:15 ` Eric Dumazet
2014-08-12 12:33   ` Andrew Vagin [this message]
2014-08-12 13:14     ` Eric Dumazet
2014-08-12 14:34       ` Andrew Vagin
2014-08-12 14:53 ` Yuchung Cheng
2014-08-12 18:29   ` Andrew Vagin

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=20140812123320.GA27421@paralelels.com \
    --to=avagin@parallels.com \
    --cc=avagin@openvz.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@parallels.com \
    /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;
as well as URLs for NNTP newsgroup(s).