Support accelerated network plugin modules
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.
Signed-off-by Kieran Mansley <[email protected]>
Backend net driver acceleration
linux-2.6-xen-sparse/drivers/xen/netback/common.h +25 -0
@@ -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