]> xenbits.xensource.com Git - unikraft/libs/lwip.git/commit
uknetdev: Yield receive thread on full stack queue
authorSimon Kuenzer <simon.kuenzer@neclab.eu>
Thu, 13 Feb 2020 22:50:54 +0000 (23:50 +0100)
committerSimon Kuenzer <simon.kuenzer@neclab.eu>
Fri, 14 Feb 2020 09:14:17 +0000 (10:14 +0100)
commitc58229f3f9e99c7b4ea29ae7b6a37b3e5d7322b8
tree4f38994bae84139759e6ed0a411d433cffe27356
parent669e3007bad2ca60f882a7b954f27864bb3938e1
uknetdev: Yield receive thread on full stack queue

When a too high rate of network traffic is received, the netdev's receive
thread may never yield and only forwards packets to the lwip stack
thread. This works as expected until the input queue runs full. If the
the stack is never able to process them, the stack becomes completely
unresponsive. Instead of dropping just a few packets all successive
packets are dropped.

This commit introduces a thread yield when this condition is met and
gives the chance to process queued packets.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
uknetdev.c