netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH 2.6] BIC tcp congestion calculation timestamp
Date: Thu, 29 Jul 2004 16:01:14 -0700	[thread overview]
Message-ID: <20040729160114.050adaae.davem@redhat.com> (raw)
In-Reply-To: <20040729112934.32002c24@dell_ss3.pdx.osdl.net>

On Thu, 29 Jul 2004 11:29:34 -0700
Stephen Hemminger <shemminger@osdl.org> 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)"?

      reply	other threads:[~2004-07-29 23:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-29 18:29 [PATCH 2.6] BIC tcp congestion calculation timestamp Stephen Hemminger
2004-07-29 23:01 ` David S. Miller [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=20040729160114.050adaae.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.org \
    /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;
as well as URLs for NNTP newsgroup(s).