From: David Miller <davem@davemloft.net>
To: roel.kluin@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [TCP]: min_t/max_t confusion in tcp_select_initial_window()?
Date: Tue, 22 Dec 2009 19:47:47 -0800 (PST) [thread overview]
Message-ID: <20091222.194747.193724694.davem@davemloft.net> (raw)
In-Reply-To: <4B3179B8.5000403@gmail.com>
From: Roel Kluin <roel.kluin@gmail.com>
Date: Wed, 23 Dec 2009 03:00:24 +0100
> I could be confused, but in net/ipv4/tcp_output.c:217:
>
> space = max_t(u32, sysctl_tcp_rmem[2], sysctl_rmem_max);
> space = min_t(u32, space, *window_clamp);
> ------------------------^^^^^
>
> shouldn't the min_t and max_t be exchanged? i.e.
>
> space = min_t(u32, sysctl_tcp_rmem[2], sysctl_rmem_max);
> space = max_t(u32, space, *window_clamp);
It looks correct to me.
Globally, the largest window we could ever end up advertising
is the maximum of the sysctl_tcp_rmem[2] threshold and
sysctl_rmem_max.
But for this connection, the window clamp is our upper bound.
next prev parent reply other threads:[~2009-12-23 3:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 2:00 [TCP]: min_t/max_t confusion in tcp_select_initial_window()? Roel Kluin
2009-12-23 3:47 ` David Miller [this message]
2009-12-23 19:45 ` Ilpo Järvinen
2009-12-23 21:15 ` David Miller
2009-12-23 21:23 ` Ilpo Järvinen
2010-08-18 14:09 ` Hagen Paul Pfeifer
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=20091222.194747.193724694.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=roel.kluin@gmail.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).