From: Stephen Hemminger <shemminger@osdl.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@helsinki.fi>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] [TCP]: Fixes IW > 2 cases when TCP is application limited
Date: Thu, 3 Aug 2006 18:45:34 -0700 [thread overview]
Message-ID: <20060803184534.1ecb8546@localhost.localdomain> (raw)
In-Reply-To: <11546407561210-git-send-email-ilpo.jarvinen@helsinki.fi>
On Fri, 04 Aug 2006 00:32:36 +0300
Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> wrote:
> Whenever a transfer is application limited, we are allowed at least
> initial window worth of data per window unless cwnd is previously
> less than that.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
> ---
> net/ipv4/tcp_input.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 738dad9..104af5d 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -3541,7 +3541,8 @@ void tcp_cwnd_application_limited(struct
> if (inet_csk(sk)->icsk_ca_state == TCP_CA_Open &&
> sk->sk_socket && !test_bit(SOCK_NOSPACE, &sk->sk_socket->flags)) {
> /* Limited by application or receiver window. */
> - u32 win_used = max(tp->snd_cwnd_used, 2U);
> + u32 init_win = tcp_init_cwnd(tp, __sk_dst_get(sk));
> + u32 win_used = max(tp->snd_cwnd_used, init_win);
> if (win_used < tp->snd_cwnd) {
> tp->snd_ssthresh = tcp_current_ssthresh(sk);
> tp->snd_cwnd = (tp->snd_cwnd + win_used) >> 1;
This looks correct.
Some code reorganization would help. This function is only called on the
output side and could be moved over to tcp_output.c and made static.
This would allow for a greater possibility of compiler inlining (if it wants).
next prev parent reply other threads:[~2006-08-04 1:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-03 21:32 [PATCH] [TCP]: Fixes IW > 2 cases when TCP is application limited Ilpo Järvinen
2006-08-04 1:45 ` Stephen Hemminger [this message]
2006-08-04 23:57 ` David Miller
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=20060803184534.1ecb8546@localhost.localdomain \
--to=shemminger@osdl.org \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=netdev@vger.kernel.org \
/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).