From: Eric Dumazet <eric.dumazet@gmail.com>
To: John Heffner <johnwheffner@gmail.com>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Tom Herbert <therbert@google.com>,
Yuchung Cheng <ycheng@google.com>,
Neal Cardwell <ncardwell@google.com>,
Nandita Dukkipati <nanditad@google.com>,
Stephen Hemminger <shemminger@vyatta.com>
Subject: Re: [PATCH net-next] tcp: fix ABC in tcp_slow_start()
Date: Fri, 20 Jul 2012 16:56:35 +0200 [thread overview]
Message-ID: <1342796195.2626.7363.camel@edumazet-glaptop> (raw)
In-Reply-To: <CABrhC0kdw7Uv-67t7fFcfh-Pve1LsNAQ3HGnUmCOJVB7b0dUVQ@mail.gmail.com>
On Fri, 2012-07-20 at 10:41 -0400, John Heffner wrote:
> It might be clearer to instead introduce a temporary variable to
> calculate the snd_cwnd change in the while loop. That is:
>
> unsigned int snd_cwnd_delta = 0;
> ...
> tp->snd_cwnd_cnt += cnt;
> while (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
> tp->snd_cwnd_cnt -= tp->snd_cwnd;
> snd_cwnd_delta++;
> }
> tp->snd_cwnd = min(tp->snd_cwnd + snd_cwnd_delta, tp->snd_cwnd_clamp);
>
Good idea, thanks, I'll send a v2
prev parent reply other threads:[~2012-07-20 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 5:40 [PATCH net-next] tcp: fix ABC in tcp_slow_start() Eric Dumazet
2012-07-20 14:41 ` John Heffner
2012-07-20 14:56 ` Eric Dumazet [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=1342796195.2626.7363.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=johnwheffner@gmail.com \
--cc=nanditad@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=therbert@google.com \
--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