From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [RFC 2/3] net/vdev_netvsc: automatically enable hotplug support
Date: Thu, 7 May 2020 20:59:05 -0700 [thread overview]
Message-ID: <20200508035906.18359-3-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/vdev_netvsc/vdev_netvsc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 9ed74a1d6a2e..f99909ad800f 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -729,6 +729,7 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
if (kvargs)
rte_kvargs_free(kvargs);
++vdev_netvsc_ctx_inst;
+ rte_dev_event_monitor_start();
return 0;
}
@@ -749,7 +750,10 @@ vdev_netvsc_vdev_remove(__rte_unused struct rte_vdev_device *dev)
{
if (--vdev_netvsc_ctx_inst)
return 0;
+
rte_eal_alarm_cancel(vdev_netvsc_alarm, NULL);
+ rte_dev_event_monitor_stop();
+
while (!LIST_EMPTY(&vdev_netvsc_ctx_list)) {
struct vdev_netvsc_ctx *ctx = LIST_FIRST(&vdev_netvsc_ctx_list);
--
2.20.1
next 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 ` Stephen Hemminger [this message]
2020-05-08 3:59 ` [dpdk-dev] [RFC 3/3] net/netvsc: automatically enable hotplug support Stephen Hemminger
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-3-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).