This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FreeBSD Stack/ KeepAlive not working


On Tue, Oct 12, 2004 at 06:53:48PM +0200, Richard Rauch wrote:
> Hi All,
> 
> first we find out, that the stack is not using the configured values for the
> ticker from ecos ( e.g. CYGNUM_HAL_RTC_PERIOD ). The stack has fix values
> for it in support.c:
> int hz = 100;
> int tick = 10000;  // usec per "tick"

FreeBSD is pritty much hardcoded for 100 ticks per second. When this
code was ported from FreeBSD into eCos, the same limitation came with
it.

> 
> We are working with a ticker of 250 us. So we have changed the values to
> int hz = 4000;
> int tick = 250;  // usec per "tick"
> 
> 
> But now the KeepAlive-Time is over one hour. This is too much for our
> application.
> We found fix settings in tcp_timer.h for the values and changed it to:
> 
> #define	TCPTV_KEEP_INIT	( 10*hz)		/* initial connect keepalive */
> #define	TCPTV_KEEP_IDLE	(15*hz)		/* dflt time before probing */
> #define	TCPTV_KEEPINTVL	( 5*hz)		/* default probe interval */
> #define	TCPTV_KEEPCNT	3			/* max probes before drop */
> 
> But now, when communication is idle on an established connection, the stack
> is closing the connection after 20 seconds. We do not see a Keep Alive
> Telegram on Ethernet.

Have you checked to see if the timer is being added? How long it is
set for? This is probably your problem. Take a look at the code in
timeout.c

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]