vhost: rename ops registering function

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>
This commit is contained in:
Huawei Xie 2014-10-09 02:54:50 +08:00 committed by Thomas Monjalon
parent e5c2ded503
commit 28689ff04d
2 changed files with 3 additions and 12 deletions

View File

@ -119,8 +119,6 @@ struct virtio_net_device_ops {
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.
@ -147,6 +145,8 @@ gpa_to_vva(struct virtio_net *dev, uint64_t guest_pa)
/* 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);

View File

@ -964,18 +964,9 @@ get_virtio_net_callbacks(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;
}