When investigating the low performance of lwIP that Xilinx ships, I found a spin loop in the Xilinx Ethernet adapter for lwip_3_00_a.
Why is there a spin loop in the code?
The function xemacif_input_thread in file $XILINX_EDK\sw\ThirdParty\sw_services\lwip_v3_00_a\src\contrib/ports\xilinx\netif\xadapter.c contains a spinloop.
This reduces the performance of lwIP in socket mode drastically, and is the reason why socket mode performance is limited to 1 Mbps.
The correct implementation should use a counting semaphore to awaken this thread only when there are packets to process.
However, the counting semaphore mechanism has not been implemented in lwip_v3_00_a since this resulted in an unstable stack. We attribute this to issues in lwIP 1.2.0's socket API. This layer has been significantly improved in lwIP 1.3.0; as a result, this spinlock is no longer necessary in lwIP 1.3.0.
The Xilinx lwIP 1.3.0 adapter will be fixed to use a counting semaphore in EDK 11.1