lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Code hangs on UDP send on Virtex-4 PPC


From: Patrick Dubois
Subject: Re: [lwip-users] Code hangs on UDP send on Virtex-4 PPC
Date: Fri, 6 Jul 2007 09:29:53 -0400



On 7/6/07, Kieran Mansley <address@hidden> wrote:

The most common problem with lwIP (and it sounds like a plausible
explanation in your case) is that two threads end up active in the core
stack at the same time, which results in rather undefined behaviour.  It
is assumed that the porter will protect the stack to ensure that only
one thread accesses lwIP at one time.  The most common way to do this is
for the stack to be processed by one thread, and messages are passed to
it by interrupt handlers or from applications to get it to process
packets.  In your case, I would guess that when you have just the TX
interrupt, things are OK as there is just one thread, and when you also
enable the RX interrupt, you get two things happening concurrently.  If
I had to guess further, I would expect that it's pbuf allocation that
might be the problem (as this is a common thing to try after an RX
interrupt).  You may find you can get better performance by polling
rather than using interrupt driven operation.

Hope that helps point in the right direction.

Kieran

It most certainly helps. Thanks for the explanation, that seems like a plausible explanation indeed. When I come back from vacation, I'll try to simply raise a flag when a RX interrupt occurs, and then process it only after the TX "process" is finished (I'm not using an OS).

Patrick



reply via email to

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