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 94406A0546; Fri, 14 Feb 2020 09:24:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C00E1BE80; Fri, 14 Feb 2020 09:24:13 +0100 (CET) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by dpdk.org (Postfix) with ESMTP id 220601BDAE for ; Fri, 14 Feb 2020 09:24:12 +0100 (CET) Received: from [10.0.3.185] (bny206.haproxy.com [37.58.153.206]) (Authenticated sender: grive@u256.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 67A54100017; Fri, 14 Feb 2020 08:24:10 +0000 (UTC) To: Somnath Kotur , dev@dpdk.org Cc: ferruh.yigit@intel.com References: <20200214064353.31022-1-somnath.kotur@broadcom.com> From: Gaetan Rivet Message-ID: Date: Fri, 14 Feb 2020 09:24:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200214064353.31022-1-somnath.kotur@broadcom.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] eal: fix to set the rte_device ptr's device args before hotplug 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" On 14/02/2020 07:43, Somnath Kotur wrote: > As per the comments in this code section, since there is a matching device, > it is now its responsibility to manage the devargs we've just inserted. > But the matching device ptr's devargs is still uninitialized or not pointing > to the newest dev_args that were passed as a parameter to local_dev_probe(). > This is needed particularly in the case when *probe is called again* on an > already probed device as part of adding a representor port to an OVS switch(OVS-DPDK) > > Fixes: 7e8b26650146 ("eal: fix hotplug add / remove") > Signed-off-by: Somnath Kotur > --- > v1->v2: Incorporated suggestions from Gaetan Rivet > drivers/bus/pci/linux/pci.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c > index 740a2cd..71b0a30 100644 > --- a/drivers/bus/pci/linux/pci.c > +++ b/drivers/bus/pci/linux/pci.c > @@ -377,6 +377,11 @@ > */ > RTE_LOG(ERR, EAL, "Unexpected device scan at %s!\n", > filename); > + else if (dev2->device.devargs != > + dev->device.devargs) { > + rte_devargs_remove(dev2->device.devargs); > + pci_name_set(dev2); > + } > } > free(dev); > } > Hi Somnath, I see that this is already pretty similar in BSD (minus the rte_devargs_remove()), so if you have tested and validated that this works properly I'm fine with this patch. This might miss a Cc: stable@dpdk.org, otherwise, Acked-by: Gaetan Rivet