From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 515CF2BCD for ; Fri, 10 Aug 2018 02:41:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Aug 2018 17:41:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,217,1531810800"; d="scan'208";a="62025588" Received: from dpdk51.sh.intel.com ([10.67.110.190]) by fmsmga008.fm.intel.com with ESMTP; 09 Aug 2018 17:41:39 -0700 From: Qi Zhang To: thomas@monjalon.net, gaetan.rivet@6wind.com, anatoly.burakov@intel.com, arybchenko@solarflare.com Cc: konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com, Qi Zhang Date: Fri, 10 Aug 2018 08:42:12 +0800 Message-Id: <20180810004213.44497-6-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180810004213.44497-1-qi.z.zhang@intel.com> References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180810004213.44497-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v14 5/6] drivers/net: enable device detach on secondary 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: , X-List-Received-Date: Fri, 10 Aug 2018 00:41:42 -0000 With the enabling for hotplug on multi-process, it is not necessary to prevent detaching a device from a secondary process. Signed-off-by: Qi Zhang --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/ena/ena_ethdev.c | 2 +- drivers/net/liquidio/lio_ethdev.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index cc7e4391c..dff9c70e2 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -3468,7 +3468,7 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev) int rc; if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; PMD_DRV_LOG(DEBUG, "Calling Device uninit\n"); bnxt_disable_int(bp); diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index c255dc6db..c29a581e8 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1703,7 +1703,7 @@ static int eth_ena_dev_uninit(struct rte_eth_dev *eth_dev) (struct ena_adapter *)(eth_dev->data->dev_private); if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; if (adapter->state != ENA_ADAPTER_STATE_CLOSED) ena_close(eth_dev); diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index 93e89007a..0f59e4475 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -2038,7 +2038,7 @@ lio_eth_dev_uninit(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; /* lio_free_sc_buffer_pool */ lio_free_sc_buffer_pool(lio_dev); diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 614357da7..0f110fde7 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1697,7 +1697,7 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); if (rte_eal_process_type() == RTE_PROC_SECONDARY) - return -EPERM; + return 0; virtio_dev_stop(eth_dev); virtio_dev_close(eth_dev); -- 2.13.6