My LwIP application desc.: Lwip server receives TCP packets and starts processing from one remote client.
the problem :Program slows down over and over. after processing approx. 1200 packets (I've set counter in recv. callback) pcb returns 'packet dropped, no space' and stops working. while program is alive and other tasks (like xemacif_input()) are running. feels like RAM is filled up or smth.
I use pbuf_free after processing incoming packets.
Question: Is pbuf_free enough?
How to flush it or restart it?
MB port - 1.4
Thanks in advance.
I assume you are trying to mean that you actually know some pcb
somewhere is not freeing pbufs and you need to find out which one it
is... I don't think flushing or restarting the stack is a "solution".
If I'm in the right path, then I'd suggest you enable statistics and
print them on the functions where you'd usually free pbufs and pcbs and
check that everyone is freeing what is supposed to free.
grep -R "packet dropped, no space" * does not return any hits, so I also
suggest you take note of the actual error, search for it in the sources,
and then, with a clue of what to follow, someone here will try to help
you find where it can be lurking.
BTW, you wrote "other tasks", pay attention to lwIP rules for multiple
threads (same as Highlander: "there can be only one") and please
describe what are you doing with what (raw?, netconn?, ?)