[Ns-developers] bug in tcp.cc?
Xiaoliang "David" Wei
davidwei at acm.org
Tue Feb 5 03:00:25 PST 2008
Hi Andres,
On Tue, Feb 5, 2008 at 2:22 AM, Andrés Arcia <ae.arcia at telecom-bretagne.eu>
wrote:
> 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?
>
I think by default, slow start goes unlimited. If you want to limit the ss
threshold, you can set max_ssthresh_.
In my understanding, if wnd_ is interpreted as receiver window size, setting
ssthresh to be wnd_ still gets the right simulation results as cwnd will not
grow over wnd_ and hence setting ssthresh to wnd_ equals to setting ssthresh
to infinity.
-David
>
> 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
>
>
>
--
Xiaoliang "David" Wei
http://davidwei.org
***********************************************
More information about the Ns-developers
mailing list