From: Neal Cardwell <ncardwell@google.com>
To: Yuchung Cheng <ycheng@google.com>
Cc: davem@davemloft.net, ilpo.jarvinen@helsinki.fi,
nanditad@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH] tcp: fix infinite cwnd in tcp_complete_cwr()
Date: Sun, 29 Apr 2012 23:49:01 -0400 [thread overview]
Message-ID: <CADVnQymtZq7BwKkidYWbNK-Yq0OgzcAWP0RodYeLup-foOKtdw@mail.gmail.com> (raw)
In-Reply-To: <1335639894-18569-1-git-send-email-ycheng@google.com>
On Sat, Apr 28, 2012 at 3:04 PM, Yuchung Cheng <ycheng@google.com> wrote:
> When the cwnd reduction is done, ssthresh may be infinite
> if TCP enters CWR via ECN or F-RTO. If cwnd is not undone, i.e.,
> undo_marker is set, tcp_complete_cwr() falsely set cwnd to the
> infinite ssthresh value. The correct operation is to keep cwnd
> intact because it has been updated in ECN or F-RTO.
>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> ---
> net/ipv4/tcp_input.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index c93b0cb..ac417de 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -2868,11 +2868,13 @@ static inline void tcp_complete_cwr(struct sock *sk)
>
> /* Do not moderate cwnd if it's already undone in cwr or recovery. */
> if (tp->undo_marker) {
> - if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR)
> + if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR) {
> tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh);
In this TCP_CA_CWR case the patch needs to add the assignment:
tp->snd_cwnd_stamp = tcp_time_stamp;
I know that was in earlier versions of your patch; looks like it just
got accidentally dropped on this latest version.
Otherwise, looks good to me.
neal
prev parent reply other threads:[~2012-04-30 3:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-28 19:04 [PATCH] tcp: fix infinite cwnd in tcp_complete_cwr() Yuchung Cheng
2012-04-30 3:49 ` Neal Cardwell [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=CADVnQymtZq7BwKkidYWbNK-Yq0OgzcAWP0RodYeLup-foOKtdw@mail.gmail.com \
--to=ncardwell@google.com \
--cc=davem@davemloft.net \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=nanditad@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).