lwIP - A Lightweight TCP/IP stack - Bugs: bug #27996, Thread-safety of tcp_timer_needed()
You are not allowed to post comments on this tracker with your current authentication level.
bug #27996: Thread-safety of tcp_timer_needed()
Submitter: | Albert Bartel <albertb> | ||
Submitted: | Wed 11 Nov 2009 01:53:00 PM UTC | ||
Category: | TCP | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Invalid |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | CVS Head |
Wed 11 Nov 2009 03:58:35 PM UTC, comment #5: |
Simon Goldschmidt <goldsimon> |
Wed 11 Nov 2009 03:27:48 PM UTC, comment #4: Something should be calling tcpip_input() instead of ip_input() directly. That is most likely your bug. |
Kieran Mansley <kieranm> |
Wed 11 Nov 2009 03:17:33 PM UTC, comment #3: I have got an ATMEL AVR32 UC3 port for FreeRTOS. In this port the ethernetif.c creates a thread for ethernetif_input.
|
Albert Bartel <albertb> |
Wed 11 Nov 2009 02:05:19 PM UTC, comment #2: I don't think this is necessary because tcp_timer_needed() is only called from tcpip_thread. If not, that's the bug. |
Simon Goldschmidt <goldsimon> |
Wed 11 Nov 2009 01:56:07 PM UTC, comment #1: Can you give a bit more detail about the problem you're seeing that this change fixes?
|
Kieran Mansley <kieranm> |
Wed 11 Nov 2009 01:53:00 PM UTC, original submission:
The function tcp_timer_needed(void) should not call
|
Albert Bartel <albertb> |
No files currently attached
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 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2009-11-11 | goldsimon | Status | None | Invalid | |
Open/Closed | Open | Closed |
Powered by Savane 3.13-caa5.
Corresponding source code
Yes, in two ways:
1) ethernet_input() (as any other function from the core files - except for some pbuf/mem/memp functions) must not be called from any other thread than the tcpip_thread
2) the port should not call ethernet_input() but instead initialize the netif correctly with the netif_add() call, set the flag NETIF_FLAG_ETHARP in its _init() function (see example ethernetif.c) and then call netif->input() instead of ethernet_input() (also, see example ethernetif.c), which takes care of getting into the correct thread and caling ethernet_input().
As you see, the example ethernetif.c would have been a good guidance :-)