LwIP: make TCPIP_THREAD_PRIO configurable #10980
Allow targets override TCPIP_THREAD_PRIO from features/lwipstack/mbed_lib.json.
Pull request type
kjbracey-arm left a comment
I'm a bit wary that if you find yourself needing to change priority you may have worse problems - I usually find thread priority isn't the answer. But may as well let people fiddle.
Just editorial suggestions.
I would like to have better understanding why this fixes any problems.
Having need to touch priorities to get some platforms to pass tests is a symptom of unstable platforms. Not a proper fix.
Network stack interfaces in Mbed OS effectively operate in event-based system. Unless other drivers consume 100% of CPU, then there should be eventually enough time to pass data through network stack. Having a need to raise network stack priority to high sounds like platform has busy-loops running on normal priority threads.
Cypress needs the LwIP TCP IP Thread priority configurable to set it to osPriorityHigh for some high throughput applicaitons such as iperf ( where the Throughput is sent at high rate of the order 40Mbps) from remote PC to Device.
We have several threads most importantly we have internal thread which gets signalled when SDIO IRQ is triggerred this is responsible for reading SDIO bus data from WLAN chip and this thread allocates its memory for the packet using pbuf ( LWIP buffer), this thread runs at osPriorityHigh, the LWIP threads gets data (UDP traffic) and it keeps the data in pbuf ( RAW pool) until the application reads the data, now if the application is slower running at lower priority then we see the LWIP TCP IP priroity running at < osPriorityHigh running out of its memory pool buffers.