Rename init_virtio_net as rte_vhost_callback_register API.
rte_vhost_callback_register register the callbacks called when a
vhost device is created and ready to be added to data processing core
or is de-actived by guest.
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
void (* destroy_device) (volatile struct virtio_net *); /* Remove device. */
};
-int init_virtio_net(struct virtio_net_device_ops const * const);
-int deinit_virtio_net(void);
/**
* Function to convert guest physical addresses to vhost virtual addresses.
/* Register vhost driver. dev_name could be different for multiple instance support. */
int rte_vhost_driver_register(const char *dev_name);
+/* Register callbacks. */
+int rte_vhost_driver_callback_register(struct virtio_net_device_ops const * const);
/* Start vhost driver session blocking loop. */
int rte_vhost_driver_session_start(void);
* Register ops so that we can add/remove device to data core.
*/
int
-init_virtio_net(struct virtio_net_device_ops const * const ops)
+rte_vhost_driver_callback_register(struct virtio_net_device_ops const * const ops)
{
notify_ops = ops;
return 0;
}
-
-/*
- * Currently not used as we Ctrl+c to exit application.
- */
-int
-deinit_virtio_net(void)
-{
- return 0;
-}