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 2322EA0547; Fri, 14 Feb 2020 07:45:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 152DD1BECF; Fri, 14 Feb 2020 07:45:43 +0100 (CET) Received: from relay.smtp.broadcom.com (unknown [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id C1F9D1BE8E for ; Fri, 14 Feb 2020 07:45:40 +0100 (CET) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 82134290C59; Thu, 13 Feb 2020 22:45:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 82134290C59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1581662739; bh=N0kbxGWJN3MibH3lW3P/mmFmotR1UjpDAvBta/JPoW8=; h=From:To:Cc:Subject:Date:From; b=gfmmG4T0cY/lzrbBBVmGodAFtpWasW0WmaxdwPgUefAC+okxlqTSWAEIZXjJdbyHi UlrHUKEatdiZI91G6Pe5Xqoo59w3qppLdnw7yJYFnLhY2S0V3BPHYBfWEM7xpO+dj+ P6+yAi97zh78LfiIgdYb7dMdvW3KcFWsc0wwiypM= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 14 Feb 2020 12:13:53 +0530 Message-Id: <20200214064353.31022-1-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 Subject: [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" 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); } -- 1.8.3.1