lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip stops work by fast data transmission


From: RAc
Subject: Re: [lwip-users] lwip stops work by fast data transmission
Date: Tue, 22 Jan 2013 01:49:14 -0800 (PST)

well, the preposterous answer would be - find the bug... your description is
way too vague to make educated guesses. Here are two shots in the dark,
nevertheless:

- Frequently this happens when you encounter 0 pointers. Add some code right
before the line that checks whether memp is 0 and enters some kind of
breakable state in that case. It may have happened that an allocation failed
and no check on 0 return was performed before accessing the memory chain
(the fact that this happens under load is a mild indication for that type of
problem).

- It may also be the case that there is unprotected concurrent access to the
data structures, ie two concurrent strands of execution (eg an ISR and
application code) access the linked list in an inconsistent state. You may
want to add some code that records the most recent memory chains in a global
ring buffer and analyse the ring buffer posthumously. 

Also keep in mind that the ST sample code is not very good. It is designed
to do exactly the minimum functionality to be accomplished with an eval
board, nothing more and nothing less, and it does that reasonably well, but
that's the best you can say about the code. It's a good starting point, but
there may well be bugs in the code.

Hope that helps.




--
View this message in context: 
http://lwip.100.n7.nabble.com/lwip-stops-work-by-fast-data-transmission-tp21026p21028.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

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