[RFC,3/3] net/netvsc: automatically enable hotplug support
diff mbox series

Message ID 20200508035906.18359-4-stephen@networkplumber.org
State New
Delegated to: Thomas Monjalon
Headers show
Series
  • Auto enable hotplug with netvsc devices
Related show

Checks

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

Commit Message

Stephen Hemminger May 8, 2020, 3:59 a.m. UTC
In Hyper-V/Azure with accelerated networking the VF device
maybe added or removed at anytime. Automatically enable hotplug
support (in case application has forgot to).

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 05f1a25a1abc..cf10fc24b37b 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1074,8 +1074,10 @@  static int eth_hn_probe(struct rte_vmbus_driver *drv __rte_unused,
 	ret = eth_hn_dev_init(eth_dev);
 	if (ret)
 		eth_dev_vmbus_release(eth_dev);
-	else
+	else {
 		rte_eth_dev_probing_finish(eth_dev);
+		rte_dev_event_monitor_stop();
+	}
 
 	return ret;
 }
@@ -1096,6 +1098,7 @@  static int eth_hn_remove(struct rte_vmbus_device *dev)
 		return ret;
 
 	eth_dev_vmbus_release(eth_dev);
+	rte_dev_event_monitor_stop();
 	return 0;
 }