[Top][All Lists]

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

RE: [lwip-users] sys_timeout

From: Christiaan Simons
Subject: RE: [lwip-users] sys_timeout
Date: Wed, 8 Mar 2006 09:25:15 +0100

Curt McDowell wrote:

> I see what you and Derek are getting at, with sys_timeout being used
> only by lwip and i/f threads.  But I still fail to see why it
> should be in src/core instead of cleanly separated, and implemented
> this way especially if it results in inelegant code and common
> misunderstandings.

Maybe it should go to lwip/src/api instead ??
BTW a file move will also break paths in makefiles.

> Suppose I want to implement timeouts using a hardware timer
> interrupt?  Or suppose I want them to be handled by a separate thread?
> Or suppose I want to implement them as a setitimer and SIGALRM?  I'm
> out of luck?

Yes, this is common for the raw-API case.

> Not to change the subject, but there is one NO_SYS violation where
> src/core makes use of sys_timeout, for the periodic
> ip_reass_timer() in ip_frag.c.  I regard that as a bug and solved it
> by adding an ip_tmr() function analogous to tcp_tmr(), to be
> called once per second from tcpip_timer():

I removed the sys_timeout() calls in ip_frag.c
to remove the dependency on sys.c...

> This new routine ipv4/ip.c:ip_tmr() then calls ipv4/ip_frag.c:
> ip_frag_tmr(), which replaces ip_reass_timer():

Why this wrapper function ip_tmr() ?

My intention was to call ip_reass_tmr()
directly from the tcpip timeout.

However, I found the sys_timeout() wasn't
periodically called for the unix port on an old 2.4 linux box.
It runs just fine on BSD. I wasn't able to trace origin of this

The work on src/api is work in (slow) progress.
IP reassembly and general performace improvements
have my priority now.


Christiaan Simons

Hardware Designer
Axon Digital Design


This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
This message contains confidential information and is intended only for the
individual named.  If you are not the named addressee you should not
disseminate, distribute or copy this e-mail.

reply via email to

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