lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Patch for bug 23119


From: address@hidden
Subject: Re: [lwip-users] Patch for bug 23119
Date: Fri, 13 Mar 2009 17:04:19 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Ken Smith schrieb:
Also, in looking at my ethernet driver the way it interfaces with
lwIP, I noticed some meaningful differences between my implementation
and the reference implementation in CVS HEAD.

The infinite loop is not a problem for the stack (I'd expect the thread waits on a semaphore that is signaled by an RX interrupt). The real problem with your code (I think that was what it was like before 1.3.0) is that you call directly into the etharp module instead of doing this in the lwip_thread, which leads to a concurrent access problem in the module.

The new code calls netif->input for *all* accepted packets (with p->payload pointing to the start of the packet/ethernet header). An ethernet netif should be initialized with the correct flag and with tcpip_input as ->input function. This way, all code is called from one thread only (the tcpip_thread), other threads only use the 2 sequential APIs or sys/pbuf/mem/memp functions.

Simon




reply via email to

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