From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [RFC 3/3] net/netvsc: automatically enable hotplug support
Date: Thu, 7 May 2020 20:59:06 -0700 [thread overview]
Message-ID: <20200508035906.18359-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20200508035906.18359-1-stephen@networkplumber.org>
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(-)
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;
}
--
2.20.1
prev parent reply other threads:[~2020-05-08 3:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 3:59 [dpdk-dev] [RFC 0/3] Auto enable hotplug with netvsc devices Stephen Hemminger
2020-05-08 3:59 ` [dpdk-dev] [RFC 1/3] eal/hotplug: allow monitor to be setup by multiple places Stephen Hemminger
2020-05-08 3:59 ` [dpdk-dev] [RFC 2/3] net/vdev_netvsc: automatically enable hotplug support Stephen Hemminger
2020-05-08 3:59 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200508035906.18359-4-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).