[Ns-developers] bug in tcp.cc?
Andrés Arcia
ae.arcia at telecom-bretagne.eu
Tue Feb 5 02:22:23 PST 2008
Hi David,
Well, I think wnd_ is intended to represent the announced window by
the receiver to do the flow control, at least is what I understand
from the FullTcp code. However, it still happens if, for example, you
set wnd_ to a high value and you want a smaller ssthresh_.
Shouldn't the ssthresh_ initialization be independent from the value
of wnd_ and let the user do it?
Look:
% set ns [new Simulator]
_o4
% Agent/TCP/FullTcp set window_ 1000
1000
% Agent/TCP/FullTcp set ssthresh_ 500
500
% set save [new Agent/TCP/FullTcp]
_o11
% $save set ssthresh_
1000
Thanks,
On Feb 5, 2008, at 10:40 AM, Xiaoliang David Wei wrote:
> Hi Andres,
>
> You are right on what is in the code. But why do you think this
> is a bug?
> I think wnd_ is the maximum window size for a TCP connection. So,
> setting slow start threshold to wnd_ effectively allowing the slow
> start goes to the maximum window size.
>
> (Yes, I am not sure why wnd_ has a default value of 20 in the
> first hand though...)
>
> -David
>
> On Tue, Feb 5, 2008 at 1:17 AM, Andrés Arcia <ae.arcia at telecom-bretagne.eu
> > wrote:
> Greetings,
>
> I think there is a bug in the initialization of the slow start
> threshold for TCP (at tcp.cc). If you simply try this code you'll
> reproduce it:
>
> $ ns-2.30
> % set ns [new Simulator]
> _o4
> % Agent/TCP/FullTcp set ssthresh_ 1000
> 1000
> % set save [new Agent/TCP/FullTcp]
> _o11
> % $save set ssthresh_
> 20
>
> The problem may be at the TcpAgent::reset() method in:
>
> ssthresh_ = int(wnd_);
>
> Since each variable have a TCL bind, the direct setting of ssthresh_
> does not represent a problem and then it is silently overwritten in
> reset() at the instantiation of a TcpAgent.
>
> Thanks,
>
> --
> Andrés Arcia
>
>
>
>
>
>
> --
> Xiaoliang "David" Wei
> http://davidwei.org
> ***********************************************
--
Andrés Arcia
More information about the Ns-developers
mailing list