From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, soheil@google.com, ncardwell@google.com,
ycheng@google.com, edumazet@google.com,
alexandre.ferrieux@orange.com
Subject: Re: [PATCH net] tcp: fix receive window update in tcp_add_backlog()
Date: Tue, 06 Oct 2020 06:12:58 -0700 (PDT) [thread overview]
Message-ID: <20201006.061258.2191845903557820470.davem@davemloft.net> (raw)
In-Reply-To: <20201005134813.2051883-1-eric.dumazet@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 5 Oct 2020 06:48:13 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> We got reports from GKE customers flows being reset by netfilter
> conntrack unless nf_conntrack_tcp_be_liberal is set to 1.
>
> Traces seemed to suggest ACK packet being dropped by the
> packet capture, or more likely that ACK were received in the
> wrong order.
>
> wscale=7, SYN and SYNACK not shown here.
>
> This ACK allows the sender to send 1871*128 bytes from seq 51359321 :
> New right edge of the window -> 51359321+1871*128=51598809
...
> Now imagine ACK were delivered out of order and tcp_add_backlog() sets window based on wrong packet.
> New right edge of the window -> 51521241+859*128=51631193
>
> Normally TCP stack handles OOO packets just fine, but it
> turns out tcp_add_backlog() does not. It can update the window
> field of the aggregated packet even if the ACK sequence
> of the last received packet is too old.
>
> Many thanks to Alexandre Ferrieux for independently reporting the issue
> and suggesting a fix.
>
> Fixes: 4f693b55c3d2 ("tcp: implement coalescing on backlog queue")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Alexandre Ferrieux <alexandre.ferrieux@orange.com>
Applied and queued up for -stable, thank you.
prev parent reply other threads:[~2020-10-06 13:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 13:48 [PATCH net] tcp: fix receive window update in tcp_add_backlog() Eric Dumazet
2020-10-05 13:50 ` Soheil Hassas Yeganeh
2020-10-05 14:34 ` Neal Cardwell
2020-10-06 13:12 ` David Miller [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=20201006.061258.2191845903557820470.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexandre.ferrieux@orange.com \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=soheil@google.com \
--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).