netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: daniel@iogearbox.net
Cc: ncardwell@google.com, netdev@vger.kernel.org, fw@strlen.de,
	glenn.judd@morganstanley.com, stephen@networkplumber.org,
	edumazet@google.com, ycheng@google.com
Subject: Re: [PATCH net] tcp: fix child sockets to use system default congestion control if not set
Date: Sun, 31 May 2015 21:50:10 -0700 (PDT)	[thread overview]
Message-ID: <20150531.215010.362645685156777606.davem@davemloft.net> (raw)
In-Reply-To: <5568AED9.2030905@iogearbox.net>

From: Daniel Borkmann <daniel@iogearbox.net>
Date: Fri, 29 May 2015 20:24:25 +0200

> On 05/29/2015 07:47 PM, Neal Cardwell wrote:
>> Linux 3.17 and earlier are explicitly engineered so that if the app
>> doesn't specifically request a CC module on a listener before the SYN
>> arrives, then the child gets the system default CC when the connection
>> is established. See tcp_init_congestion_control() in 3.17 or earlier,
>> which says "if no choice made yet assign the current value set as
>> default". The change ("net: tcp: assign tcp cong_ops when tcp sk is
>> created") altered these semantics, so that children got their parent
>> listener's congestion control even if the system default had changed
>> after the listener was created.
>>
>> This commit returns to those original semantics from 3.17 and earlier,
>> since they are the original semantics from 2007 in 4d4d3d1e8 ("[TCP]:
>> Congestion control initialization."), and some Linux congestion
>> control workflows depend on that.
>>
>> In summary, if a listener socket specifically sets TCP_CONGESTION to
>> "x", or the route locks the CC module to "x", then the child gets
>> "x". Otherwise the child gets current system default from
>> net.ipv4.tcp_congestion_control. That's the behavior in 3.17 and
>> earlier, and this commit restores that.
>>
>> Fixes: 55d8694fa82c ("net: tcp: assign tcp cong_ops when tcp sk is
>> created")
>> Cc: Florian Westphal <fw@strlen.de>
>> Cc: Daniel Borkmann <dborkman@redhat.com>
>> Cc: Glenn Judd <glenn.judd@morganstanley.com>
>> Cc: Stephen Hemminger <stephen@networkplumber.org>
>> Signed-off-by: Neal Cardwell <ncardwell@google.com>
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> 
> Ok, change looks good to me, thanks.
> 
> Acked-by: Daniel Borkmann <daniel@iogearbox.net>

Applied and queued up for -stable, thanks!

      reply	other threads:[~2015-06-01  4:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 17:47 [PATCH net] tcp: fix child sockets to use system default congestion control if not set Neal Cardwell
2015-05-29 18:24 ` Daniel Borkmann
2015-06-01  4:50   ` 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=20150531.215010.362645685156777606.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=glenn.judd@morganstanley.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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).