LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-22-2004, 04:05 PM   #1
mk_26
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
Question Linux TCP implementation


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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tcp implementation in linux kskkumar Linux - Networking 1 08-24-2005 05:45 AM
How to modify TCP implementation in kernel?? karanld Linux - Networking 3 03-02-2005 07:15 AM
Questions on Linux 2.4.20 TCP fast recovery and ECN implementation enjoyzj Linux - Networking 0 07-16-2004 07:57 AM
tcp linux implementation mk_26 Linux - Networking 0 03-22-2004 08:10 PM
linux security implementation klog2_k Linux - Security 3 07-17-2003 09:56 AM


All times are GMT -5. The time now is 10:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration