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

[Xen-changelog] [xen-unstable] [NET] front: Check for received packets in network_open0



# HG changeset patch
# User ack@xxxxxxxxxxxxxxxxxxxxx
# Node ID 7684f9032f9fb9521de665a277be23d52c87c2de
# Parent  e1a2a8029e9fbaa8f886c2e2fdfe656e4ade1a2c
[NET] front: Check for received packets in network_open0  

Because the backend brings up the interface long before the frontend
has booted up, it is possible that by the time we get here we already
have packets queued up for processing.

If we don't process them here, we may delay them more than what is
necessary.  Worse yet, it is possible to miss the notification
interrupt from the backend in such a way that we never get another
one until we bring the interface down and up.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c |    3 +++
 1 files changed, 3 insertions(+)

diff -r e1a2a8029e9f -r 7684f9032f9f 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Fri Aug 04 
11:36:07 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Fri Aug 04 
16:07:58 2006 +0100
@@ -497,6 +497,9 @@ static int network_open(struct net_devic
        network_alloc_rx_buffers(dev);
        np->rx.sring->rsp_event = np->rx.rsp_cons + 1;
 
+       if (RING_HAS_UNCONSUMED_RESPONSES(&np->rx))
+               netif_rx_schedule(dev);
+
        netif_start_queue(dev);
 
        return 0;

_______________________________________________
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®.