Support accelerated network plugin modules
PATCH 3/4 Support accelerated network plugin modules
Backend net driver acceleration
Signed-off-by Kieran Mansley <[email protected]>
drivers/xen/netback/Makefile +1 -1
@@ -1,5 +1,5 @@ obj-$(CONFIG_XEN_NETDEV_BACKEND) := netb obj-$(CONFIG_XEN_NETDEV_BACKEND) := netbk.o obj-$(CONFIG_XEN_NETDEV_LOOPBACK) += netloop.o -netbk-y := netback.o xenbus.o interface.o +netbk-y := netback.o xenbus.o interface.o accel.o netloop-y := loopback.o
drivers/xen/netback/accel.c new file +207 -0
207 lines not on this page · raw message
drivers/xen/netback/common.h +44 -0
56 lines not on this page · raw message
drivers/xen/netback/netback.c +2 -0
@@ -1587,6 +1587,8 @@ static int __init netback_init(void) netbk_copy_skb_mode =NETBK_DELAYED_COPY_SKB ; } +netif_accel_init (); +netif_xenbus_init ();#ifdef NETBE_DEBUG_INTERRUPT
drivers/xen/netback/xenbus.c +4 -5
@@ -28,11 +28,6 @@ printk("netback/xenbus (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args) #endif -struct backend_info { -struct xenbus_device *dev; -netif_t *netif; -enum xenbus_state frontend_state; -}; static int connect_rings(struct backend_info *); static void connect(struct backend_info *);
@@ -41,6 +36,8 @@ static int netback_remove(struct xenbus_static int netback_remove (struct xenbus_device *dev) {struct backend_info *be = dev->dev.driver_data; + +netback_remove_accelerators (be, dev);if (be->netif) {netif_disconnect (be->netif);
@@ -125,6 +122,8 @@ static int netback_probe(struct xenbus_d goto fail; } +netback_probe_accelerators (be, dev); + err =xenbus_switch_state (dev, XenbusStateInitWait);if (err) goto fail;
Backend net driver acceleration
drivers/xen/netback/Makefile +1 -1
@@ -1,5 +1,5 @@ obj-$(CONFIG_XEN_NETDEV_BACKEND) := netb obj-$(CONFIG_XEN_NETDEV_BACKEND) := netbk.o obj-$(CONFIG_XEN_NETDEV_LOOPBACK) += netloop.o -netbk-y := netback.o xenbus.o interface.o +netbk-y := netback.o xenbus.o interface.o accel.o netloop-y := loopback.o
drivers/xen/netback/accel.c new file +207 -0
207 lines not on this page · raw message
drivers/xen/netback/common.h +44 -0
56 lines not on this page · raw message
drivers/xen/netback/netback.c +2 -0
@@ -1587,6 +1587,8 @@ static int __init netback_init(void) netbk_copy_skb_mode =NETBK_DELAYED_COPY_SKB ; } +netif_accel_init (); +netif_xenbus_init ();#ifdef NETBE_DEBUG_INTERRUPT
drivers/xen/netback/xenbus.c +4 -5
@@ -28,11 +28,6 @@ printk("netback/xenbus (%s:%d) " fmt ".\n", __FUNCTION__, __LINE__, ##args) #endif -struct backend_info { -struct xenbus_device *dev; -netif_t *netif; -enum xenbus_state frontend_state; -}; static int connect_rings(struct backend_info *); static void connect(struct backend_info *);
@@ -41,6 +36,8 @@ static int netback_remove(struct xenbus_static int netback_remove (struct xenbus_device *dev) {struct backend_info *be = dev->dev.driver_data; + +netback_remove_accelerators (be, dev);if (be->netif) {netif_disconnect (be->netif);
@@ -125,6 +122,8 @@ static int netback_probe(struct xenbus_d goto fail; } +netback_probe_accelerators (be, dev); + err =xenbus_switch_state (dev, XenbusStateInitWait);if (err) goto fail;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel