question about the set tcp window size in iperf 1.6.3


Hi,
I am new to Iperf and hope some one could explain my following question:

I installed Iperf 1.6.3 on RH7.2(linux 2.4.7-10) but I couldn't setup the
window size:

%./iperf -v
iperf version 1.6.3 (3 Oct 2002) pthreads

% ./iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------

% ./iperf -s -w 100k
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (WARNING: requested  100 KByte)
------------------------------------------------------------

In lib/tcp_window_size.c there is a setsock_tcp_windowsize(...).
But the PerfSocket::SetSocketOptions(...) in src/PerfSocket.cpp
doesn't call setsock_tcp_windowsize().

Although in PerfSocket_TCP.cpp, the PerfSocket::Client_Recv_TCP(...)
calls setsock_tcp_windowsize(), but Client_Recv_TCP(...) only is called
by PerfSocket::Send_TCP() if -W option is used.

So I think that's the reason why I can't use -w to set the window size.

I tried add a line in PerfSocket.cpp
void PerfSocket::SetSocketOptions(void){
..
...
  if ( ! mUDP){
    /* Do I need this? */
     setsock_tcp_windowsize(mSock, gSettings->GetTCPWindowSize());
     ......
  }
}//end SetSocketOptions

Then I got the following:
%./iperf -s -w 100K
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  200 KByte (WARNING: requested  100 KByte)
------------------------------------------------------------

I think that the 200K instead of 100k returned by getsockopt() is because
the linux kernel
doubles the size in setsockopt(... SO_RCVBUF ...)..

On the iperf web-site, all the manual and samples looks different from my
result
using the -w option. Am I doing something wrong with the installation?

Thanks very much for any suggestion,
-Chong



--
Mitch Kutzko | mitch --at-- dast.nlanr.net | mitch --at-- ncsa.uiuc.edu | 217-333-1199
http://hobbes.ncsa.uiuc.edu/



Other Mailing lists | Author Index | Date Index | Subject Index | Thread Index