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:
parent
e5c2ded503
commit
28689ff04d
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user