mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 13:34:38 +08:00

This optimizes the netif_loop_output to only schedule a call to poll when the first packet is enqueued. This ensures netif_poll is ran once per burst of packets that are sent (which is typical in a TCP transfer) The old behavior scheduled a call to poll for every packet that was enqueued and this lead to exhaustion of the MEMP_TCPIP_MSG_API memory pool and tcpip_mbox (if port is using static mbox size). The extra callbacks are wasted work because netif_poll drains the entire queue when ran This issue presented itself when large TCP transfer go across the loopback netif