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 608CBA0531; Tue, 4 Feb 2020 10:17:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 769101C00D; Tue, 4 Feb 2020 10:17:30 +0100 (CET) Received: from relay.smtp.broadcom.com (unknown [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id 4759B1BFA5 for ; Tue, 4 Feb 2020 10:17:29 +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 2093A1B91B8; Tue, 4 Feb 2020 01:17:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 2093A1B91B8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1580807844; bh=jSfqRL06JD/YxFQ3zkkWC1bGZTsQXaSulZaWmBBzBWY=; h=From:To:Cc:Subject:Date:From; b=rjxoW+ub3v6CbQ53O0CCjIlKyNXHa6Je0RIFezEHzMWStwlPosM9BcUf7yT7Nqgy+ xJIXDP05YYd8o21Utu6E0PWyOXe0Jtpmrg7GvXdM/yDznVkSw9cxIK4JT+9nPnLLlC ++2VLSt4X/WV5Sh84mgTMA1TmQ8o8jLZwRvROLiw= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Tue, 4 Feb 2020 14:45:48 +0530 Message-Id: <20200204091548.2861-1-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 Subject: [dpdk-dev] [PATCH] 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(the parent device for the representor) as part of adding a representor port to an OVS switch(OVS-DPDK) like so: ovs-vsctl add-port ovsbr0 vfrep1 -- set Interface vfrep1 type=dpdk \ options:dpdk-devargs=0000:06:02.0,representor=[1] Fixes: 7e8b26650146 ("eal: fix hotplug add / remove") Signed-off-by: Somnath Kotur --- lib/librte_eal/common/eal_common_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index 9e4f09d..311eef5 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -171,6 +171,7 @@ static int cmp_dev_name(const struct rte_device *dev, const void *_name) * those devargs shouldn't be removed manually anymore. */ + dev->devargs = da; ret = dev->bus->plug(dev); if (ret > 0) ret = -ENOTSUP; -- 1.8.3.1