[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] MiniOS: Fix continue; in netfront receive loop



# HG changeset patch
# User Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
# Date 1286875676 -3600
# Node ID 6e8dd34122e765eb069701092726fc2a8a3c19cc
# Parent  b8cc53d22545706b28c7a26dffd24f192a76541a
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@xxxxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
committer: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 extras/mini-os/netfront.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff -r b8cc53d22545 -r 6e8dd34122e7 extras/mini-os/netfront.c
--- a/extras/mini-os/netfront.c Mon Oct 11 17:54:53 2010 +0100
+++ b/extras/mini-os/netfront.c Tue Oct 12 10:27:56 2010 +0100
@@ -105,9 +105,9 @@ moretodo:
     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 @@ moretodo:
 #endif
                dev->netif_rx(page+rx->offset,rx->status);
         }
-
-        nr_consumed++;
-
-        ++cons;
     }
     dev->rx.rsp_cons=cons;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.