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 73B23A0350; Tue, 12 May 2020 05:03:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C92681BFE6; Tue, 12 May 2020 05:03:31 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id DDA551BFE2 for ; Tue, 12 May 2020 05:03:29 +0200 (CEST) IronPort-SDR: 3Kje4hO4LOFBuu6pkcgYZo4U51WBW7QFanPmB07AzRmPScglpukqKHGy7lZguPfeFaq/Q2e7KG 04OtNeG1Pn9w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2020 20:03:28 -0700 IronPort-SDR: AhQG1ipj7IZ2FOw3OiMmk5xMUJeZlloFoKKwSEdJ9yaDA/5POIEV3BqnB+74bLfvAmODotmhY8 UF7dt2x2yjLw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,381,1583222400"; d="scan'208";a="409140856" Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.165]) ([10.67.68.165]) by orsmga004.jf.intel.com with ESMTP; 11 May 2020 20:03:27 -0700 To: alvinx.zhang@intel.com, dev@dpdk.org Cc: beilei.xing@intel.com, wenzhuo.lu@intel.com References: <20200429063724.17284-1-alvinx.zhang@intel.com> From: Jeff Guo Message-ID: Date: Tue, 12 May 2020 11:03:26 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200429063724.17284-1-alvinx.zhang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [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" hi, alvin On 4/29/2020 2:37 PM, alvinx.zhang@intel.com wrote: > 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; > I guess you mean pass through the process of the RTE_PROC_SECONDARY case when detach device, but what about the other case like RTE_PROC_INVALID or RTE_PROC_AUTO ? > 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); >