lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Lock-up issue with tcp_receive() and tcp_output()


From: Simon Goldschmidt
Subject: RE: [lwip-users] Lock-up issue with tcp_receive() and tcp_output()
Date: Fri, 21 Jan 2011 12:44:02 +0100

"Carr, Anthony" <address@hidden> wrote:
> In my application I have the reverse condition.
> tcp_slowtmr() is called periodically from main() with ethernetif_input()
> called from the Ethernet interrupt.
> I am assuming if the Ethernet interrupt occurs during tcp_slowtmr() this
> could possibly be the cause of the corrupted packet lists.

That should normally not be a problem but it depends on 2 things:
a) The pbuf.c and mem.c code must be protected againts concurrent access by 
using the correct defines (see the lwIP wiki for an explanation), but this 
should be OK with the defaults in opt.h, I think.
b) ethernetif_input() must *not* call into the stack directly. When using 
tcpip.c (in a multithreading environment), pass packets to tcpip_input(). When 
running without an OS, you have to put new packets on a linked list that is 
processed periodically from main() (just like the timers).

Simon
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



reply via email to

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