On Tue, 2007-07-03 at 11:03 -0400, Patrick Dubois wrote: > My problem is that I seem to only be able to send a few packets in > UDP, after that my code hangs. I am not sure yet where the problem is > but I have clues. It seems related to ARP packet reception. If I > unplug the ethernet cable the code doesn't hang at all and data > transmission "seems" successful (it's hard to know without a cable > connected!).
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 _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
