Samuel Thibault
2010-Oct-11 21:46 UTC
[Xen-devel] [PATCH] MiniOS: Fix continue; in netfront receive loop
To properly ignore some requests through the use of continue;, indexes need to be updated. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> diff -r aecf092da748 extras/mini-os/netfront.c --- a/extras/mini-os/netfront.c Wed Jun 30 22:12:54 2010 +0100 +++ b/extras/mini-os/netfront.c Tue Aug 31 23:34:10 2010 +0200 @@ -105,9 +105,9 @@ rmb(); /* Ensure we see queued responses up to ''rp''. */ cons = dev->rx.rsp_cons; - nr_consumed = 0; - some = 0; - while ((cons != rp) && !some) + for (nr_consumed = 0, some = 0; + (cons != rp) && !some; + nr_consumed++, cons++) { struct net_buffer* buf; unsigned char* page; @@ -146,10 +146,6 @@ #endif dev->netif_rx(page+rx->offset,rx->status); } - - nr_consumed++; - - ++cons; } dev->rx.rsp_cons=cons; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefano Stabellini
2010-Oct-12 09:28 UTC
Re: [Xen-devel] [PATCH] MiniOS: Fix continue; in netfront receive loop
On Mon, 11 Oct 2010, Samuel Thibault wrote:> To properly ignore some requests through the use of continue;, indexes need to > be updated. > > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>applied, thanks _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel