[RFC,3/3] net/netvsc: automatically enable hotplug support
Checks
Commit Message
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(-)
@@ -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;
}