#include "common.h"
#include <linux/vmalloc.h>
#include <linux/rtnetlink.h>
static int connect_data_rings(struct backend_info *be,
struct xenvif_queue *queue);
static void connect(struct backend_info *be);
static int read_xenbus_vif_flags(struct backend_info *be);
static int backend_create_xenvif(struct backend_info *be);
static void unregister_hotplug_status_watch(struct backend_info *be);
static void xen_unregister_watchers(struct xenvif *vif);
static void set_backend_state(struct backend_info *be,
enum xenbus_state state);
#ifdef CONFIG_DEBUG_FS
struct dentry *xen_netback_dbg_root = …;
static int xenvif_read_io_ring(struct seq_file *m, void *v)
{ … }
#define XENVIF_KICK_STR …
#define BUFFER_SIZE …
static ssize_t
xenvif_write_io_ring(struct file *filp, const char __user *buf, size_t count,
loff_t *ppos)
{ … }
static int xenvif_io_ring_open(struct inode *inode, struct file *filp)
{ … }
static const struct file_operations xenvif_dbg_io_ring_ops_fops = …;
static int xenvif_ctrl_show(struct seq_file *m, void *v)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static void xenvif_debugfs_addif(struct xenvif *vif)
{ … }
static void xenvif_debugfs_delif(struct xenvif *vif)
{ … }
#endif
static int netback_uevent(const struct xenbus_device *xdev,
struct kobj_uevent_env *env)
{ … }
static int backend_create_xenvif(struct backend_info *be)
{ … }
static void backend_disconnect(struct backend_info *be)
{ … }
static void backend_connect(struct backend_info *be)
{ … }
static inline void backend_switch_state(struct backend_info *be,
enum xenbus_state state)
{ … }
static void set_backend_state(struct backend_info *be,
enum xenbus_state state)
{ … }
static void read_xenbus_frontend_xdp(struct backend_info *be,
struct xenbus_device *dev)
{ … }
static void frontend_changed(struct xenbus_device *dev,
enum xenbus_state frontend_state)
{ … }
static void xen_net_read_rate(struct xenbus_device *dev,
unsigned long *bytes, unsigned long *usec)
{ … }
static int xen_net_read_mac(struct xenbus_device *dev, u8 mac[])
{ … }
static void xen_net_rate_changed(struct xenbus_watch *watch,
const char *path, const char *token)
{ … }
static int xen_register_credit_watch(struct xenbus_device *dev,
struct xenvif *vif)
{ … }
static void xen_unregister_credit_watch(struct xenvif *vif)
{ … }
static void xen_mcast_ctrl_changed(struct xenbus_watch *watch,
const char *path, const char *token)
{ … }
static int xen_register_mcast_ctrl_watch(struct xenbus_device *dev,
struct xenvif *vif)
{ … }
static void xen_unregister_mcast_ctrl_watch(struct xenvif *vif)
{ … }
static void xen_register_watchers(struct xenbus_device *dev,
struct xenvif *vif)
{ … }
static void xen_unregister_watchers(struct xenvif *vif)
{ … }
static void unregister_hotplug_status_watch(struct backend_info *be)
{ … }
static void hotplug_status_changed(struct xenbus_watch *watch,
const char *path,
const char *token)
{ … }
static int connect_ctrl_ring(struct backend_info *be)
{ … }
static void connect(struct backend_info *be)
{ … }
static int connect_data_rings(struct backend_info *be,
struct xenvif_queue *queue)
{ … }
static int read_xenbus_vif_flags(struct backend_info *be)
{ … }
static void netback_remove(struct xenbus_device *dev)
{ … }
static int netback_probe(struct xenbus_device *dev,
const struct xenbus_device_id *id)
{ … }
static const struct xenbus_device_id netback_ids[] = …;
static struct xenbus_driver netback_driver = …;
int xenvif_xenbus_init(void)
{ … }
void xenvif_xenbus_fini(void)
{ … }