public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "m k" <mk_26@hotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Linux TCP implementation
Date: Mon, 22 Mar 2004 20:58:46 +0000	[thread overview]
Message-ID: <BAY15-F28psNhnM7kl300089ffe@hotmail.com> (raw)

Hello:

      I am working with 2.4.21 kernel for iSCSI performance study. I have a 
question
regarding the congestion avoidance algorithm used in the linux TCP 
implementation.
After dumping the value of the snd_cwnd, snd_ssthresh and snd_cwnd_clamp 
when
the tcp_cong_avoid function is called, I observed that the value of 
snd_ssthresh
was always set to a value of 2147483647 and the value of snd_cwnd_clamp was 
set to 65535.
If the snd_cwnd is not be more than the snd_cwnd_clamp, the else part of the
function is never executed, as snd_cwnd is never going to be more than 
snd_ssthresh.
	Also, if the snd_cwnd is maintained in terms of packets and snd_ssthresh 
and
snd_cwnd_clamp is maintained in terms of bytes, how come the comparison 
between them.


static __inline__ void tcp_cong_avoid(struct tcp_opt *tp)
{
         if (tp->snd_cwnd <= tp->snd_ssthresh) {
                 /* In "safe" area, increase. */
                 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
                         tp->snd_cwnd++;
         } else {
                 /* In dangerous area, increase slowly.
                  * In theory this is tp->snd_cwnd += 1 / tp->snd_cwnd
                  */
                 if (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
                         if (tp->snd_cwnd < tp->snd_cwnd_clamp)
                                 tp->snd_cwnd++;
                         tp->snd_cwnd_cnt=0;
                 } else
                         tp->snd_cwnd_cnt++;
         }
         tp->snd_cwnd_stamp = tcp_time_stamp;
}

var/log/messages:
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 2, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 3, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 4, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 5, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 6, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 7, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 8, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 9, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 10, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 11, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 12, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 13, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 14, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 15, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 16, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 17, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 18, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 19, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 20, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 21, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535
Mar 22 15:08:20 jupiter kernel: snd_cwnd: 22, snd_ssthresh: 2147483647, 
snd_cwnd_clamp: 65535


Any insight on this topic would be appreciated.

Thanks,
k

_________________________________________________________________
Get rid of annoying pop-up ads with the new MSN Toolbar – FREE! 
http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/


             reply	other threads:[~2004-03-22 21:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-22 20:58 m k [this message]
2004-03-23  2:28 ` Linux TCP implementation David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2004-02-18 19:12 Maciej Soltysiak
2004-02-18 22:45 ` Stephen Hemminger
2004-02-17  0:40 Diwaker Gupta

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=BAY15-F28psNhnM7kl300089ffe@hotmail.com \
    --to=mk_26@hotmail.com \
    --cc=linux-kernel@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