netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rick Jones <rick.jones2@hp.com>
To: Yuchung Cheng <ycheng@google.com>, Neal Cardwell <ncardwell@google.com>
Cc: John Heffner <johnwheffner@gmail.com>, Netdev <netdev@vger.kernel.org>
Subject: Re: TCP being hoodwinked into spurious retransmissions by lack of timestamps?
Date: Tue, 04 Mar 2014 15:14:10 -0800	[thread overview]
Message-ID: <53165E42.8070904@hp.com> (raw)
In-Reply-To: <CAK6E8=eBUUx4v11VTVQMKHWZdbCsut4zzr-LXJWd=fJTYsb39A@mail.gmail.com>

On 03/04/2014 02:23 PM, Yuchung Cheng wrote:
> On Tue, Mar 4, 2014 at 12:35 PM, Neal Cardwell <ncardwell@google.com> wrote:
>> What's the receiver OS in this trace? It's reneging on SACKs. :-) Take
>> a look at this ACK:
>>
>> 18:20:46.800063 IP 75.236.145.7.443 > 91.216.86.7.56064: .
>> 4262:4262(0) ack 3171368 win 32716 <nop,nop,sack 1 {3171368:3177208}>
>>
>> Note that it's ACKing 3171368 and SACKing the adjacent sequence range:
>> {3171368:3177208}. That's not cool.
>>
>> I think that's causing the Linux sender to enter the
>> tcp_check_sack_reneging() code path, which calls tcp_enter_loss().
>>
>> It seems that the Linux sender did not enable FRTO for that
>> tcp_enter_loss() invocation. Maybe there is some way we can revise the
>> logic to enable FRTO in cases like this, so we can detect that the
>> retransmission was not needed, and abort the stream of spurious
>> retransmissions...
> Sure we can try:
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 6e48093..735ece6 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -1972,7 +1972,7 @@ void tcp_enter_loss(struct sock *sk, int how)
>           * the same SND.UNA (sec 3.2). Disable F-RTO on path MTU probing
>           */
>          tp->frto = sysctl_tcp_frto &&
> -                  (new_recovery || icsk->icsk_retransmits) &&
> +                  (new_recovery || icsk->icsk_retransmits || how) &&
>                     !inet_csk(sk)->icsk_mtup.probe_size;
>   }
>
>
> However that only works if we got new data to send. For a better
> solution, with the lack of TS option or DSACK support, we can
> 1) use Neal's neat idea to send a different size packet on the first
> retransmission after timeout, and use that to distinguish if the ACK
> is for the original or retry.

What would one do if the ACK arriving after the short retransmission was 
farther to the right than the end of the original packet?  Won't that be 
ambiguous?

> 2) Do not blindly marked any packet unsacked lost in tcp_enter_loss;
> My idea would be to do that only if the packet was sent min_rtt ago;
>
> I can try to implement these ideas if people are interested.

If these near-heroics are unnecessary if timestamps are present, I'm not 
sure I'd push too hard.  Unless you think that timestamps not being 
present is sufficiently common.

rick

  reply	other threads:[~2014-03-04 23:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04  0:29 TCP being hoodwinked into spurious retransmissions by lack of timestamps? Rick Jones
2014-03-04  3:22 ` John Heffner
2014-03-04 18:50   ` Rick Jones
2014-03-04 19:14     ` John Heffner
2014-03-04 19:33       ` Rick Jones
2014-03-04 20:35         ` Neal Cardwell
2014-03-04 21:56           ` Rick Jones
2014-03-04 22:23           ` Yuchung Cheng
2014-03-04 23:14             ` Rick Jones [this message]
2014-03-21 21:53   ` Rick Jones
2014-03-25 17:39 ` Rick Jones

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=53165E42.8070904@hp.com \
    --to=rick.jones2@hp.com \
    --cc=johnwheffner@gmail.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.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).