[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1342796195.2626.7363.camel@edumazet-glaptop>
Date: Fri, 20 Jul 2012 16:56:35 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: John Heffner <johnwheffner@...il.com>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Tom Herbert <therbert@...gle.com>,
Yuchung Cheng <ycheng@...gle.com>,
Neal Cardwell <ncardwell@...gle.com>,
Nandita Dukkipati <nanditad@...gle.com>,
Stephen Hemminger <shemminger@...tta.com>
Subject: Re: [PATCH net-next] tcp: fix ABC in tcp_slow_start()
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists