netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexey.kodanev@oracle.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
	ycheng@google.com, ncardwell@google.com
Subject: Re: [PATCH] tcp: initialize max window for a new fastopen socket
Date: Thu, 19 Jan 2017 11:41:03 -0500 (EST)	[thread overview]
Message-ID: <20170119.114103.1784185156530691440.davem@davemloft.net> (raw)
In-Reply-To: <1484832999-1849-1-git-send-email-alexey.kodanev@oracle.com>

From: Alexey Kodanev <alexey.kodanev@oracle.com>
Date: Thu, 19 Jan 2017 16:36:39 +0300

> Found that if we run LTP netstress test with large MSS (65K),
> the first attempt from server to send data comparable to this
> MSS on fastopen connection will be delayed by the probe timer.
> 
> Here is an example:
> 
>      < S  seq 0:0 win 43690 options [mss 65495 wscale 7 tfo cookie] length 32
>      > S. seq 0:0 ack 1 win 43690 options [mss 65495 wscale 7] length 0
>      < .  ack 1 win 342 length 0
> 
> Inside tcp_sendmsg(), tcp_send_mss() returns max MSS in 'mss_now',
> as well as in 'size_goal'. This results the segment not queued for
> transmition until all the data copied from user buffer. Then, inside
> __tcp_push_pending_frames(), it breaks on send window test and
> continues with the check probe timer.
> 
> Fragmentation occurs in tcp_write_wakeup()...
> 
> +0.2 > P. seq 1:43777 ack 1 win 342 length 43776
>      < .  ack 43777, win 1365 length 0
>      > P. seq 43777:65001 ack 1 win 342 options [...] length 21224
>      ...
> 
> This also contradicts with the fact that we should bound to the half
> of the window if it is large.
> 
> Fix this flaw by correctly initializing max_window. Before that, it
> could have large values that affect further calculations of 'size_goal'.
> 
> Fixes: 168a8f58059a ("tcp: TCP Fast Open Server - main code path")
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>

Applied and queued up for -stable, thanks.

      parent reply	other threads:[~2017-01-19 16:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 13:36 [PATCH] tcp: initialize max window for a new fastopen socket Alexey Kodanev
2017-01-19 13:41 ` Eric Dumazet
2017-01-19 16:41 ` 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=20170119.114103.1784185156530691440.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexey.kodanev@oracle.com \
    --cc=eric.dumazet@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).