Skip to contentSkip to conversation

Support accelerated network plugin modules

PATCH In review Kieran Mansley 1 participant 1 message May 8, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 Support accelerated network plugin modules

Add hooks in the netback driver to allow an accelerated plugin module to attach and provide a fast path for network traffic in the presence of a virtualisable NIC.

Backend net driver acceleration

linux-2.6-xen-sparse/drivers/xen/netback/common.h +25 -0
diff -r 6362a643064a linux-2.6-xen-sparse/drivers/xen/netback/common.h
@@ -114,6 +114,31 @@ typedef struct netif_st {
 #define netback_carrier_off(netif)	((netif)->carrier = 0)
 #define netback_carrier_ok(netif)	((netif)->carrier)
 
+
+#include <xen/xenbus.h>
+struct netback_accel_hooks {
+        int  (*probe)(struct xenbus_device *dev);
+};
+
+/* Structure to track the state of a netback accelerator plugin */
+struct netback_accelerator {
+        int id;
+        char *frontend;
+        struct netback_accel_hooks *hooks;
+        struct netback_accelerator *next;
+};
+extern void netback_connect_accelerator(int id, const char *frontend, 
+                                        struct netback_accel_hooks *hooks);
+
+struct backend_info {
+	struct xenbus_device *dev;
+	netif_t *netif;
+	enum xenbus_state frontend_state;
+        void *netback_accel_priv;
+        struct netback_accelerator *accelerator;
+};
+
+
 #define NET_TX_RING_SIZE __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
 #define NET_RX_RING_SIZE __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE)
 
linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c +52 -5

75 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel