From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 32532A00C5; Fri, 8 May 2020 05:59:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 36F341DC5A; Fri, 8 May 2020 05:59:24 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id B792B1DC37 for ; Fri, 8 May 2020 05:59:22 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id x15so273015pfa.1 for ; Thu, 07 May 2020 20:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GnTOqG+DF8HIeT+1HdR98H24KAboY8LQKGLinJ5Mc4I=; b=i6sDeIpOAGEdKUtRtNUr6LlC9L9a2hc/+CTW01T//SUDFVccJw4UbmT3kgyzoelOBr vMCZbWvw2StJTaI3r+tIH7bh1YgY1jeCNTeuDWqqy7x26iY1wdlFK8kKuDN98VgZKaI2 lXL5YFWRsRucHTb7fYkQ4RUsDG+9xYuUe2+0NQ+ZFq/tVe+GAfDFzLC1NN2AuUECriNc 9Ad4Yaux/H7C+MSiJmI+9ggzR4zMMB2GsEb8v1QStmKI1myrcprzjORsIBsPmKlFEFtE Pl3NxQ0ZGjw+m2F6H0vRE+bxqKswKbwM/Lszn5krPkMYsI+SHqGujUgPIwWEC66jOCe6 bF2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GnTOqG+DF8HIeT+1HdR98H24KAboY8LQKGLinJ5Mc4I=; b=ugjYr9gtjMIjVBxgMqzoFmt6huKoKVpXSHvLIuyStzpHiOUzsxH32KUrsqSqZg/sai KFL6g6JlM3ui0ZG8e5aWCsQE8WRHXbs4lDFzPGpE27ye9BbnVFhGBeUEqbceBicFdVv8 AF5YDqcNf20khb7RnRNt7DvRPU3ozM7MXW6edM2Q5RrzrBxcJ1Z99aZGt5UdWJ05F7mt CPFff0nSkrS5K/DuRirXGZvImAo5Q4DJ4AHINyvTpCr8PepUeEfBjhW7fW6Al5zEPPqa NsHseVmSo2gLJeOl8G1GXCT5DGVTPIFg8Exf4Q3s5radZn0h+2eGgHhHrucIC7lurLAT zwKg== X-Gm-Message-State: AGi0Pua/m7ICMrpG0/KoAYi3k43P58c/JwNiYS8pnm1LuI6AEk7vUkgL 602ErYl1qYpB7Y5ZQB5qRMMy9vQOuRFxbg== X-Google-Smtp-Source: APiQypLdfXktjYKNV8ty+S6yEfdZ8DECRZGCdUSQIouzlA5PnI5bf3AIpeiUsp44T7GcyfXo/vfcAw== X-Received: by 2002:a62:3383:: with SMTP id z125mr685613pfz.271.1588910361427; Thu, 07 May 2020 20:59:21 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id fv14sm1130694pjb.47.2020.05.07.20.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 20:59:20 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Thu, 7 May 2020 20:59:06 -0700 Message-Id: <20200508035906.18359-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200508035906.18359-1-stephen@networkplumber.org> References: <20200508035906.18359-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC 3/3] net/netvsc: automatically enable hotplug support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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