Netdev List
 help / color / mirror / Atom feed
* The AI parameter of tcp_highspeed.c (in 2.6.18)
@ 2006-05-30  4:12 Xiaoliang (David) Wei
  2006-06-02 19:05 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Xiaoliang (David) Wei @ 2006-05-30  4:12 UTC (permalink / raw)
  To: netdev

Hi gurus,

    I am not sure if there is a problem in the additive increment (AI)
parameter of tcp_highspeed.c:

    When snd_cwnd is smaller than 38 and the connection is in
congestion avoidance phase (snd_cwnd > snd_ssthresh), the snd_cwnd
seems to stop growing. I guess the problem is in the function of
hstcp_cong_avoid (Ln 126~Ln 138 of tcp_highspeed.c):
--------------------------------
                if (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd) {
                        while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd &&
                               ca->ai < HSTCP_AIMD_MAX - 1)
                                ca->ai++;
                } else if (tp->snd_cwnd < hstcp_aimd_vals[ca->ai].cwnd) {
                        while (tp->snd_cwnd > hstcp_aimd_vals[ca->ai].cwnd &&
                               ca->ai > 0)
                                ca->ai--;
                }

                /* Do additive increase */
                if (tp->snd_cwnd < tp->snd_cwnd_clamp) {
                        tp->snd_cwnd_cnt += ca->ai;
--------------------------------
When snd_cwnd < snd_ssthresh, this part of code is effective. And
since snd_cwnd is smaller than 38, which is hstcp_aimd_vals[0].cwnd,
ca->ai will be equal to 0.

Hence, snd_cwnd_cnt will be unchanged for the rest of the connection.
As a result, snd_cwnd also freezes.

I guess we can add change the Line 138 to make the algorithm more reliable?

-                        tp->snd_cwnd_cnt += ca->ai;
+                       tp->snd_cwnd_cnt += (ca->ai+1);

Thanks.


-David
---------------------------------------------------------
Xiaoliang (David) Wei
http://davidwei.org    Graduate Student, Netlab, Caltech
======================================

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

end of thread, other threads:[~2006-06-12 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-30  4:12 The AI parameter of tcp_highspeed.c (in 2.6.18) Xiaoliang (David) Wei
2006-06-02 19:05 ` Stephen Hemminger
2006-06-03  0:51   ` David Miller
2006-06-12 17:10   ` Xiaoliang (David) Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox