netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* a question on tcp_highspeed.c (in 2.6.16)
@ 2006-05-04 14:03 Xiaoliang (David) Wei
  2006-05-04 19:06 ` [PATCH] " John Heffner
  0 siblings, 1 reply; 3+ messages in thread
From: Xiaoliang (David) Wei @ 2006-05-04 14:03 UTC (permalink / raw)
  To: netdev

Hi gurus,

    I am reading the code of tcp_highspeed.c in the kernel and have a
question on the hstcp_cong_avoid function, specifically the following
AI part (line 136~143 in net/ipv4/tcp_highspeed.c ):

                /* Do additive increase */
                if (tp->snd_cwnd < tp->snd_cwnd_clamp) {
                        tp->snd_cwnd_cnt += ca->ai;
                        if (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
                                tp->snd_cwnd++;
                                tp->snd_cwnd_cnt -= tp->snd_cwnd;
                        }
                }

    In this part, when (tp->snd_cwnd_cnt == tp->snd_cwnd),
snd_cwnd_cnt will be -1... snd_cwnd_cnt is defined as u16, will this
small chance of getting -1 becomes a problem?
Shall we change it by reversing the order of the cwnd++ and cwnd_cnt -= cwnd?

    Thanks.

-David

--
Xiaoliang (David) Wei      Graduate Student, CS@Caltech
http://davidwei.org
***********************************************

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-06  0:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-04 14:03 a question on tcp_highspeed.c (in 2.6.16) Xiaoliang (David) Wei
2006-05-04 19:06 ` [PATCH] " John Heffner
2006-05-06  0:42   ` David S. Miller

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).