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

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



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1287578107 -3600
# Node ID 06feba5976f3ad23d5cd73156e5dbbaa5237535a
# Parent  4262d8dbd9582ee84834c5d0a6d5052efb94046c
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>
xen-unstable changeset:   22236:6e8dd34122e7
xen-unstable date:        Tue Oct 12 10:27:56 2010 +0100
---
 extras/mini-os/netfront.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff -r 4262d8dbd958 -r 06feba5976f3 extras/mini-os/netfront.c
--- a/extras/mini-os/netfront.c Wed Oct 20 13:34:36 2010 +0100
+++ b/extras/mini-os/netfront.c Wed Oct 20 13:35:07 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®.