]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commit
Mini-OS: netfront: Fix rx ring starvation in network_rx
authorMartin Lucina <martin@lucina.net>
Thu, 4 Dec 2014 13:33:53 +0000 (14:33 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 13 Jan 2015 10:40:28 +0000 (10:40 +0000)
commit7c8f348390652a67e9356eec9cd2b0f76a9c7c72
treea9fe82ccd3e6b00d88d7d7b03f35aa09d978b91a
parent326d5632371365bd5df89629f97db43b3d7231fa
Mini-OS: netfront: Fix rx ring starvation in network_rx

In network_rx() we must push the same amount of requests back onto the
ring in the second loop that we consumed in the first loop. Otherwise
the ring will eventually starve itself of free request slots and no
packets will be delivered.

Further, we make the HAVE_LIBC codepath clearer to follow by removing
the "some" variable from the for loop initialisation and conditions.

Signed-off-by: Martin Lucina <martin@lucina.net>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
netfront.c