[dpdk-dev,v2,07/11] vdev: implement hotplug functionality

Message ID 1356dd5e147f842e63e91c339e6d346e651973c5.1496235017.git.gaetan.rivet@6wind.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Gaëtan Rivet May 31, 2017, 1:17 p.m. UTC
  Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 lib/librte_eal/common/eal_common_vdev.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
index 46f2b74..813955e 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -350,10 +350,17 @@  vdev_find_device(rte_dev_match_t match, const void *data)
 	return NULL;
 }
 
+static int
+vdev_plug(struct rte_devargs *da)
+{
+	return rte_vdev_init(da->virt.drv_name, da->args);
+}
+
 static struct rte_bus rte_vdev_bus = {
 	.scan = vdev_scan,
 	.probe = vdev_probe,
 	.find_device = vdev_find_device,
+	.plug = vdev_plug,
 };
 
 RTE_INIT(rte_vdev_bus_register);