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 3435FA00BE; Wed, 29 Apr 2020 08:39:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D728F1D8E2; Wed, 29 Apr 2020 08:39:36 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id CFC061D8E1 for ; Wed, 29 Apr 2020 08:39:35 +0200 (CEST) IronPort-SDR: Kpj0Fk6R2NbPv5vPVeYoTcuJ3XBvUEvVzHkrbTb5FCataZhopGBxWjeE2gN3lP66MS29Sl1NIT AoNitvNKxIgQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2020 23:39:34 -0700 IronPort-SDR: qtG0Qoig9ASdyuFaWy8ijSLEh2+woEWaMKPPPR+yaAONvIxFbb6aIQnaW+QgVkTVTqR2HugPuG c+b/MzYaLEBg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,330,1583222400"; d="scan'208";a="293112878" Received: from shwdenpg235.ccr.corp.intel.com ([10.240.182.60]) by fmsmga002.fm.intel.com with ESMTP; 28 Apr 2020 23:39:31 -0700 From: alvinx.zhang@intel.com To: dev@dpdk.org Cc: beilei.xing@intel.com, wenzhuo.lu@intel.com Date: Wed, 29 Apr 2020 14:37:24 +0800 Message-Id: <20200429063724.17284-1-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/e1000: fix port hotplug for multi-process 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" From: Alvin Zhang Enable detach device on secondary process. Fixes: b9eee2cb8c29 (e1000: support port hotplug) Cc: bernard.iremonger@intel.com Cc: stable@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 188cda3..902b1cd 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -321,7 +321,7 @@ static int eth_em_set_mc_addr_list(struct rte_eth_dev *dev, PMD_INIT_FUNC_TRACE(); if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; eth_em_close(eth_dev); diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 520fba8..a5551e8 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -923,7 +923,7 @@ static int igb_flex_filter_uninit(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; eth_igb_close(eth_dev); @@ -1044,7 +1044,7 @@ static int igb_flex_filter_uninit(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return -EPERM; + return 0; igbvf_dev_close(eth_dev); -- 1.8.3.1