|
From: | address@hidden |
Subject: | Re: [lwip-users] LWIP - TCP receive assert failed |
Date: | Fri, 16 Jan 2015 21:47:06 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
Jackie:
There you got the bug: when lwIP's threading requirements are observed, this can't happen: tcp_output() can never be called twice and thus does not have to be designed reentrant. What you describe tells us that timers are checked from a different execution thread (thread or ISR) than output. But for the core lwIP code, you have to ensure this doesn't happen. That's all. Of course this raises the problem of what to do with TX packets when e.g. your DMA queue is full. Usually it's best to add a 2nd (larger) software-queue that fills the DMA queue and to keep an upper limit on it. You'd then return ERR_IF when this limit is reached. Simon |
[Prev in Thread] | Current Thread | [Next in Thread] |