All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
To: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>, Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net 2/5] tcp: prevent bogus FRTO undos with non-SACK flows
Date: Thu, 8 Mar 2018 00:19:15 +0200 (EET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1803072342180.32113@whs-18.cs.helsinki.fi> (raw)
In-Reply-To: <CAK6E8=f0MusOePWRz9q4fSO9avSziGbSiVemSYccwP+61phEhA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2859 bytes --]

On Wed, 7 Mar 2018, Yuchung Cheng wrote:
> On Wed, Mar 7, 2018 at 11:24 AM, Neal Cardwell <ncardwell@google.com> wrote:
> > On Wed, Mar 7, 2018 at 7:59 AM, Ilpo Jï¿œrvinen <ilpo.jarvinen@helsinki.fi> wrote:
> > >
> > > In a non-SACK case, any non-retransmitted segment acknowledged will
> > > set FLAG_ORIG_SACK_ACKED in tcp_clean_rtx_queue even if there is
> > > no indication that it would have been delivered for real (the
> > > scoreboard is not kept with TCPCB_SACKED_ACKED bits in the non-SACK
> > > case). This causes bogus undos in ordinary RTO recoveries where
> > > segments are lost here and there, with a few delivered segments in
> > > between losses. A cumulative ACKs will cover retransmitted ones at
> > > the bottom and the non-retransmitted ones following that causing
> > > FLAG_ORIG_SACK_ACKED to be set in tcp_clean_rtx_queue and results
> > > in a spurious FRTO undo.
> > >
> > > We need to make the check more strict for non-SACK case and check
> > > that none of the cumulatively ACKed segments were retransmitted,
> > > which would be the case for the last step of FRTO algorithm as we
> > > sent out only new segments previously. Only then, allow FRTO undo
> > > to proceed in non-SACK case.
> >
> > Hi Ilpo - Do you have a packet trace or (even better) packetdrill
> > script illustrating this issue? It would be nice to have a test case
> > or at least concrete example of this.
>
> a packetdrill or even a contrived example would be good ...

I've seen all but this for sure in packet traces. But I'm somewhat 
old-school that while looking for the burst issue I discovered this 
issue by reading the code only (making it more than _one_ issue).
However, I think that I later on saw also this issue from the traces
(as it seemed to not match to any of the other burst issues this whole 
series is trying to fix). But finding that dump afterwards would take 
really long time, I've more than enough of them from our recent
tests ;-)).

But anyway, that was before the recent moving for the condition into 
tp->frto block so it might no longer be triggerable. It clearly was 
triggerable beforehand without tp->frto guard (and I just forward-ported 
past that recent change without thinking it much).

To trigger it, ever-R and !ever-R skb would need to be cumulatively 
ACKed when tp->frto is non-zero. Do you think that is still possible
with FRTO? E.g., after some undo leaving some ever-R and then RTO 
resulting in FRTO procedure?

> also why not just avoid setting FLAG_ORIG_SACK_ACKED on non-sack? seems 
> a much clean fix.

I guess that would work now that the relevant FRTO condition got moved
into the tp->frto block. It wouldn't have been that simple earlier
as SACK wanted FLAG_ORIG_SACK_ACKED while non-SACK wants
FLAG_ONLY_ORIG_ACKED (that was already available through a combination
of the existing FLAGs).


-- 
 i.

  reply	other threads:[~2018-03-07 22:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 12:59 [PATCH net 0/5] tcp: fixes to non-SACK TCP Ilpo Järvinen
2018-03-07 12:59 ` [PATCH net 1/5] tcp: feed correct number of pkts acked to cc modules also in recovery Ilpo Järvinen
2018-03-07 12:59 ` [PATCH net 2/5] tcp: prevent bogus FRTO undos with non-SACK flows Ilpo Järvinen
2018-03-07 19:24   ` Neal Cardwell
2018-03-07 19:54     ` Yuchung Cheng
2018-03-07 22:19       ` Ilpo Järvinen [this message]
2018-03-07 12:59 ` [PATCH net 3/5] tcp: move false FR condition into tcp_false_fast_retrans_possible() Ilpo Järvinen
2018-03-07 15:50   ` Eric Dumazet
2018-03-07 12:59 ` [PATCH net 4/5] tcp: prevent bogus undos when SACK is not enabled Ilpo Järvinen
2018-03-07 20:19   ` Neal Cardwell
2018-03-07 23:48     ` Yuchung Cheng
2018-03-09 14:11       ` Ilpo Järvinen
2018-03-09 14:32         ` Eric Dumazet
2018-03-09 15:28           ` David Miller
2018-03-09 15:23         ` David Miller
2018-03-09 19:23           ` Ilpo Järvinen
2018-03-13 10:24           ` Ilpo Järvinen
2018-03-07 12:59 ` [PATCH net 5/5] tcp: send real dupACKs by locking advertized window for non-SACK flows Ilpo Järvinen
2018-03-07 15:58   ` Eric Dumazet
2018-03-07 20:09     ` Ilpo Järvinen
2018-03-07 20:13       ` Eric Dumazet
2018-03-07 21:39         ` Ilpo Järvinen
2018-03-07 22:01           ` Eric Dumazet

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=alpine.DEB.2.20.1803072342180.32113@whs-18.cs.helsinki.fi \
    --to=ilpo.jarvinen@helsinki.fi \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.