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

[Xen-devel] [6/11] [NET] front: Added feature-rx-notify



Hi:

[NET] front: Added feature-rx-notify

This patch adds support to the frontend for notifying the backend whenever
the rx ring is refilled.  This is required in order for the backend to get
a tx queue.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff -r 9fa8689fc0e9 -r 2ac3f7b0e0fc 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Fri Jul 07 
23:36:16 2006 +1000
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Fri Jul 07 
23:36:20 2006 +1000
@@ -326,6 +326,12 @@ again:
                goto abort_transaction;
        }
 
+       err = xenbus_printf(xbt, dev->nodename, "feature-rx-notify", "%d", 1);
+       if (err) {
+               message = "writing feature-rx-notify";
+               goto abort_transaction;
+       }
+
        err = xenbus_transaction_end(xbt, 0);
        if (err) {
                if (err == -EAGAIN)
@@ -683,6 +689,7 @@ static void network_alloc_rx_buffers(str
        np->rx.req_prod_pvt = req_prod + i;
 push:
        RING_PUSH_REQUESTS(&np->rx);
+       notify_remote_via_irq(np->irq);
 }
 
 static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev,
@@ -1224,7 +1231,6 @@ static void network_connect(struct net_d
         * packets.
         */
        netif_carrier_on(dev);
-       notify_remote_via_irq(np->irq);
        network_tx_buf_gc(dev);
        network_alloc_rx_buffers(dev);
 

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


 


Rackspace

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