lwip-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-members] Suggestion: define TMR constants in lwipopts.h instea


From: Chris Borrelli
Subject: Re: [lwip-members] Suggestion: define TMR constants in lwipopts.h instead of tcp.h
Date: Mon, 4 Nov 2002 17:12:53 -0800 (PST)

Adam,

I still use the TCP_TMR_FAST/SLOW values because I
have my own tcp_tmr function.  It is the same as the
lwIP function, but it also calls the ARP timer
function...

Anyway, I have added some ifndefs to the tcp.h file. 
I will commit these changes to CVS tomorrow, unless
someone has an objection...

So, if an application wants to play with these values,
they can be defined in the lwipopts.h.

Here is what it looks like in the tcp.h file:

#ifndef TCP_TMR_INTERVAL
#define TCP_TMR_INTERVAL       100  /* The TCP timer
interval in
                                       milliseconds.
*/
#endif /* TCP_TMR_INTERVAL */

#ifndef TCP_FAST_INTERVAL
#define TCP_FAST_INTERVAL      200  /* the fine
grained timeout in
                                       milliseconds */
#endif /* TCP_FAST_INTERVAL */

#ifndef TCP_SLOW_INTERVAL
#define TCP_SLOW_INTERVAL      500  /* the coarse
grained timeout in
                                       milliseconds */
#endif /* TCP_SLOW_INTERVAL */


--- Adam Dunkels <address@hidden> wrote:
> Hi!
> 
> On Thu, 2002-10-24 at 11:53, Kieran Mansley wrote:
> > > Suggestion: It would be nice if
> TCP_TMR_INTERVAL, TCP_FAST_INTERVAL, and
> > > TCP_SLOW_INTERVAL were defined in the lwipopts.h
> instead of (or as well
> > > as) tcp.h
> > >
> > > Decreasing these values really seems to increase
> the performance of the
> > > stack at 100Mbps.  I have these values set to 1,
> 2, and 5 respectively
> > > in my v2pro port and it dramatically increased
> transmit throughput.
> > 
> > Interesting.  It seems as though there is some
> problem with ACKs not being
> > sent if you really see such a large increase in
> performance.  It sounds as
> > if ACKs are being delayed waiting for data to
> piggyback on, none is
> > arriving, and so it waits for a fast timer timeout
> before sending it
> > anyway.  Is your application largely
> uni-directional traffic?
> 
> One reason for the large performance increase may
> also be that when
> reducing the fast timer interval to nearly zero,
> delayed ACKs will not
> be delayed more than a few milliseconds. This will
> ramp up the
> congestion window of the sender much quicker than
> with 200 ms delayed
> ACKs.
> 
> Also, TCP_FAST_INTERNAL and TCP_SLOW_INTERVAL are
> not used by TCP
> anymore, though the definitions are kept - perhaps
> they should be
> removed? All TCP timers go through the tcp_tmr()
> interface. (It is still
> possible to go via the tcp_slowtmr() and
> tcp_fasttmr() calls, however.)
> Earlier versions of lwIP let TCP manage its own
> timers, but this was
> dropped in order to make the protocol code less
> dependant of the
> underlying system.
> 
> In other words, this means is that the TCP code is
> not really in control
> of the timers. TCP expects the "system" to call
> tcp_tmr() every 100 ms.
> 
> But we could add TCP_TMR_INTERVAL as an option to
> lwipopts.h and have a
> default in tcp.h
> 
> /adam
> 
> 
> 
> 
> _______________________________________________
> lwip-members mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/lwip-members


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]