netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: jheffner@psc.edu
Cc: davidwei79@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] Re: a question on tcp_highspeed.c (in 2.6.16)
Date: Fri, 05 May 2006 17:42:03 -0700 (PDT)	[thread overview]
Message-ID: <20060505.174203.40998208.davem@davemloft.net> (raw)
In-Reply-To: <445A5098.6010306@psc.edu>

From: John Heffner <jheffner@psc.edu>
Date: Thu, 04 May 2006 15:06:00 -0400

> Xiaoliang (David) Wei wrote:
> > 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?
> 
> Absolutely correct.  Thanks.
> 
> Signed-off-by: John Heffner <jheffner@psc.edu>

Applied, thanks a lot everyone.

      reply	other threads:[~2006-05-06  0:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 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=20060505.174203.40998208.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=davidwei79@gmail.com \
    --cc=jheffner@psc.edu \
    --cc=netdev@vger.kernel.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).