netdev
[Top] [All Lists]

Re: [PATCH 2.6] BIC tcp congestion calculation timestamp

To: Stephen Hemminger <shemminger@xxxxxxxx>
Subject: Re: [PATCH 2.6] BIC tcp congestion calculation timestamp
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Thu, 29 Jul 2004 16:01:14 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040729112934.32002c24@xxxxxxxxxxxxxxxxxxxxx>
References: <20040729112934.32002c24@xxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 29 Jul 2004 11:29:34 -0700
Stephen Hemminger <shemminger@xxxxxxxx> wrote:

> +             __u32   last_stamp;     /* time when updated last_cwnd */
 ...
> +static void init_bictcp(struct tcp_opt *tp)
> +{
> +     tp->bictcp.cnt = 0;
> +
> +     tp->bictcp.last_max_cwnd = 0;
> +     tp->bictcp.last_cwnd = 0;
> +     tp->bictcp.last_stamp = 0;
> +}
 ...
> +     if (tp->bictcp.last_cwnd == tp->snd_cwnd &&
> +        (s32)(tcp_time_stamp - tp->bictcp.last_stamp) <= (HZ>>5))
> +             return tp->bictcp.cnt;

What if tcp_time_stamp is zero the first time this code runs
after init_bictcp()?

Maybe a better initialization value in init_bictcp() would
be "tcp_time_stamp - ((HZ >> 5) + 1)"?

<Prev in Thread] Current Thread [Next in Thread>