[dpdk-dev] [PATCH v6 16/25] lib/librte_vhost: rename init_virtio_net to rte_vhost_callback_register
Huawei Xie
huawei.xie at intel.com
Wed Oct 8 20:54:50 CEST 2014
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 at intel.com>
---
lib/librte_vhost/rte_virtio_net.h | 4 ++--
lib/librte_vhost/virtio-net.c | 11 +----------
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h
index 3ca1d63..2766133 100644
--- a/lib/librte_vhost/rte_virtio_net.h
+++ b/lib/librte_vhost/rte_virtio_net.h
@@ -119,13 +119,13 @@ 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);
/* 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);
#endif /* _VIRTIO_NET_H_ */
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c
index ee37a40..14e657b 100644
--- a/lib/librte_vhost/virtio-net.c
+++ b/lib/librte_vhost/virtio-net.c
@@ -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;
-}
--
1.8.1.4
More information about the dev
mailing list