I'm not calling lwIP from main() loop; the main loop is empty. I've verified
there's one entry point only, and actually right now the timeouts interrupt
handler is commented out. So the only way into lwIP is with ethernet RX
interrupt.
I've done more investigation and discovered something. I put a trap after
calling ethernet_input() in the ethernet Rx function to catch if p->ref is ever
not zero. When I ping or load the webpage manually, it never breaks. When I use
the load tester, it hits that breakpoint because p->ref = 1. However,
ethernet_input() also never returns anything but ERR_OK.
Looking into ethernet_input(), p->ref is sometimes 1 and p->tot_len = 63 after
ip_input(p, netif) (in my situation anyway) BUT p->tot_len was 107 before
ip_input(p, netif); was called! This seems odd to me as I thought the pbuf is
completely consumed and should be freed after ip_input(p, netif). Is this
correct?
On Monday, March 26, 2018, 3:25:54 PM CDT, Sergio R. Caprile
<[email protected]> wrote:
The "ping" does not call the application, the GET does.
I would argument your memory is getting freed slower than it is alloced,
but there have been numerous bug fixes and way so many enhancements in
the web server since 1.4.1 that you should really try git head.
Strange things can happen if you don't respect the threading rules. Are
you calling lwIP just from the main loop or do you use interrupts for rx
and the main loop for sys_check_timeouts() ? (don't!, either all main or
all interrupts, single thread, single context)
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users