lwIP - A Lightweight TCP/IP stack - Tasks: task #7235, Create timeout framework for...
You are not allowed to post comments on this tracker with your current authentication level.
task #7235: Create timeout framework for NO_SYS=1
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Thu 23 Aug 2007 06:16:45 AM UTC | ||
Category: | None | Should Start On: | Thu 23 Aug 2007 12:00:00 AM UTC |
Should be Finished on: | Thu 23 Aug 2007 12:00:00 AM UTC | Priority: | 3 - Low |
Status: | Done | Privacy: | Public |
Assigned to: | goldsimon | Percent Complete: | 100% |
Open/Closed: | Closed | Planned Release: | 1.4.0 |
Effort: | 0.00 |
Jump to the original submission
Sun 10 Jan 2010 11:44:19 AM UTC, comment #22: |
Simon Goldschmidt <goldsimon> |
Thu 31 Dec 2009 04:30:47 PM UTC, comment #21: ...presses 'send' to early...:
|
Simon Goldschmidt <goldsimon> |
Thu 31 Dec 2009 04:23:39 PM UTC, comment #20: To get this started (and to get PPP running with NO_SYS==!), I've separated the timeout implementation from the sem/mbox implementation (timeout code moved to new file). I didn't change much on the timer semantics though:
|
Simon Goldschmidt <goldsimon> |
Tue 08 Dec 2009 07:50:09 AM UTC, comment #19: I'm currently inclined to jsut keep with the current implementation of a linked list of timeouts, as we can us that with NO_SYS=0, too, and sys_mbox_wait is easier to implement. However, we could introduce periodic timers to prevent deallocating and directly re-allocating the timeout struct via memp.
|
Simon Goldschmidt <goldsimon> |
Thu 03 Dec 2009 07:53:57 PM UTC, comment #18: I'd be happy to add this after releaseing 1.3.2. However, I'd like to merge this into sys.h/.c so that both configurations can share as much code as possible. Therefore, the attached files would only be a starter. |
Simon Goldschmidt <goldsimon> |
Fri 13 Nov 2009 02:59:32 PM UTC, comment #17: It's been quite a long time since this
|
Iordan Neshev <iordan_neshev> |
Wed 28 Nov 2007 03:55:45 PM UTC, comment #16: I'd prefer to wait till after 1.3.0 before merging this |
Kieran Mansley <kieranm> |
Mon 26 Nov 2007 11:44:05 AM UTC, comment #15: Even if I think that change current lwIP timers handling is a good idea, I thought it could be done in post-1.3.0, and provide the framework in pre-1.3.0.
|
Frédéric Bernon <fbernon> |
Mon 26 Nov 2007 11:34:33 AM UTC, comment #14: Oh, and something about the implementation of nosys_timers:
|
Simon Goldschmidt <goldsimon> |
Mon 26 Nov 2007 11:29:13 AM UTC, comment #13: Yes why not? Instead of all the timer callback functions in tcpip.c that call sys_timeout() to re-enqueue the timer, just use your table approach and call your nosys_timers(cur_time) function at the smallest interval.
|
Simon Goldschmidt <goldsimon> |
Mon 26 Nov 2007 10:30:12 AM UTC, comment #12:
|
Frédéric Bernon <fbernon> |
Mon 26 Nov 2007 08:42:01 AM UTC, comment #11: So we could do it the other way round and use the timers table for the lwIP internal periodic timers? Integrating that into tcpip.c should not be that difficult. |
Simon Goldschmidt <goldsimon> |
Mon 26 Nov 2007 08:23:01 AM UTC, comment #10: I think there is a problem to use "timeouts" for lwIP's "timers". These last one are periodic, the first are "one shot". Due to the initial purpose, I thought it was the idea, but it seems I'm wrong.
|
Frédéric Bernon <fbernon> |
Mon 26 Nov 2007 08:04:52 AM UTC, comment #9: Why don't we try to resemble the current API? Implementing the sys_timeout list like it is now but don't check it inside sys_sem_wait or sys_mbox_fetch but check it in your function nosys_timers(cur_time)?
|
Simon Goldschmidt <goldsimon> |
Mon 26 Nov 2007 12:23:12 AM UTC, comment #8: I attach nosys.c and nosys.h. I think we could add them here :
|
Frédéric Bernon <fbernon> |
Sat 03 Nov 2007 06:06:48 PM UTC, comment #7:
|
Frédéric Bernon <fbernon> |
Sat 03 Nov 2007 02:56:10 PM UTC, comment #6: Hmm, I thought we could somehow reuse the sys_timeout function for NO_SYS. But on the other hand, your implementation might be a lot smaller because it is not configurable at runtime...
|
Simon Goldschmidt <goldsimon> |
Fri 02 Nov 2007 06:31:57 PM UTC, comment #5: The only problem to use "contrib/ports/msvc6/test.c" like a timeout framework is the use of "sys_get_ms()". A simple change could be to replace...
|
Frédéric Bernon <fbernon> |
Fri 02 Nov 2007 04:36:19 PM UTC, comment #4: (extract contrib/ports/msvc6/test.c)
|
Frédéric Bernon <fbernon> |
Wed 29 Aug 2007 09:10:23 AM UTC, comment #3: AUTOIP_TMR_INTERVAL could be easily change to 250 (Dominik comments in autoip.c: "I recommend a value of 100. The value must divide 1000 with a remainder almost 0. Possible values are 1000, 500, 333, 250, 200, 166, 142, 125, 111, 100...", same for IGMP_TMR_INTERVAL (IGMP querier give several secondes to answer to a "Query message" most of time).
|
Frédéric Bernon <fbernon> |
Wed 29 Aug 2007 08:59:19 AM UTC, comment #2: I think we'd need 100ms as the common denominator of the timers, but this is a low priority task anyway. |
Kieran Mansley <kieranm> |
Thu 23 Aug 2007 07:12:26 AM UTC, comment #1: It's even a good idea that could be used to replace current "timers" in tcpip_thread based on "sys_timeouts". |
Frédéric Bernon <fbernon> |
Thu 23 Aug 2007 06:16:45 AM UTC, original submission:
I think we should create a functionality for NO_SYS=1 users so that they don't have to explicitly call every timer function in their main loop but instead something like timer_tick() which checks all timers (maybe based on 250ms, which seems to be the lowest timer interval, so all other timers could be multiplied from that). |
Simon Goldschmidt <goldsimon> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 14 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-01-10 | goldsimon | Status | None | Done | |
Percent Complete | 90% | 100% | |||
Open/Closed | Open | Closed | |||
2009-12-31 | goldsimon | Percent Complete | 10% | 90% | |
Assigned to | None | goldsimon | |||
2009-12-08 | goldsimon | Planned Release | None | 1.4.0 | |
2009-11-13 | iordan_neshev | Attached File | - | Added nosys.c, #19043 | |
Attached File | - | Added nosys.h, #19044 | |||
Attached File | - | Added nosys_timeouts.c, #19045 | |||
Attached File | - | Added nosys_timeouts.h, #19046 | |||
2007-11-26 | fbernon | Attached File | - | Added nosys.h, #14482 | |
Attached File | - | Added nosys.c, #14483 | |||
Percent Complete | 0% | 10% | |||
2007-08-29 | kieranm | Priority | 5 - Normal | 3 - Low |
Powered by Savane 3.13-f8d8.
Corresponding source code
Regarding this as done as we have task #7244 for the rest.