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 716D3A0562; Tue, 31 Mar 2020 02:52:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ED08E1C033; Tue, 31 Mar 2020 02:52:55 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id DEACA2C6D for ; Tue, 31 Mar 2020 02:52:53 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 4C3395C00C3; Mon, 30 Mar 2020 20:52:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 30 Mar 2020 20:52:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=1dYJjy3t0E1tPm2kNr6uD57yMtkDnE+EesoxwPpkDmE=; b=cljk4KxgT7MR Fm4PutzzoKE0XiYiPuo5bJvKbpmsgSVROjUdfAg2eDl8abB7kNfQqs7yfSnWky/d MPDgy7gYC6T8BxkO81aRFBO7Mz+1oggnEPU6iHf8lu58dr7TeFWow/ReAaBdN/xi b1NrMv76bEw50NzZTKNAOJ7HFJpxcdQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=1dYJjy3t0E1tPm2kNr6uD57yMtkDnE+EesoxwPpkD mE=; b=qYxrhik81a7GSC8+JDM533YxGutxJLnyqkvWZAdaMCCgDJ3dgx9HUmIuA t0j+c/XfhZMlP/7yqTHXSWoZmZ+x6/USoduE1233LjwMbEwrXXvd3pRsJj6sMzq+ uQkWa+Y4ohNYOY6Prudmctsn7G5VjnoU6rSUv3DUO4a7IMhGgf7LakY1PKxvOdyQ yQqQ550xG7gfDQ4gf57LgFZgNxIQ307c/nw29ZNXPOSnBibak5RGAvgBfmb+kXrI t00LDQpGE015uvk3raq5aCDSFpyagn/NUEOSCKPV6l8Ri5DR7+v1mix78qc+UyKV kBDVt2RmHI3X0bRAOT489FI9S2fIQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeiiedggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 663B13280067; Mon, 30 Mar 2020 20:52:51 -0400 (EDT) From: Thomas Monjalon To: Somnath Kotur Cc: dev@dpdk.org, ferruh.yigit@intel.com, Gaetan Rivet Date: Tue, 31 Mar 2020 02:52:49 +0200 Message-ID: <9670412.U7f9L36N0a@xps> In-Reply-To: References: <20200214064353.31022-1-somnath.kotur@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 14/02/2020 09:24, Gaetan Rivet: > 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 > > --- > > --- a/drivers/bus/pci/linux/pci.c > > +++ b/drivers/bus/pci/linux/pci.c > > + else if (dev2->device.devargs != > > + dev->device.devargs) { > > + rte_devargs_remove(dev2->device.devargs); > > + pci_name_set(dev2); > > + } > > I see that this is already pretty similar in BSD (minus the rte_devargs_remove()), We really need to review this kind of code for Linux and FreeBSD, and share the common code. > 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 I don't like how complicate this function is becoming, but because it's tested and acked, Applied, thanks Title updated: bus/pci: fix devargs on probing again