From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id A05563772 for ; Mon, 6 Mar 2017 11:57:05 +0100 (CET) Received: by mail-wr0-f196.google.com with SMTP id u108so17250169wrb.2 for ; Mon, 06 Mar 2017 02:57:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=PfydLGQc3AYP44QIc62m63+m+f4h6kVP2gB++GENeSg=; b=hJLyMFT2xB4BA00nu5zF+1WkwMO+36QfIyQwDCSJ1SiU5Y6ECHUmyqF09sBj0GoCFi hBg7twBmzU+M5k+bZh1GmH4A2YdrTIVzjeufwX5XzqJcSlXzwEm20YGLX2DdOqBoL8Et C7Ndlvlcc8u7lh4ZpVBkHRabE/PPLzlVSHhcfCYQbbI52+BZXsKe8n34rFWDHlzG7EIb RRB6c7zKuZVczQaijtBR2dwQHCX+dZOGvED075G4MYkyLEkv2CORyOc6HdaYyc6qONTE 22ETktmXFcSBr5A/Wmi5ZPx3aPoEHmTrAjZ50vAs6B9iBpN+IBLuLN+VxUH+RVJ95yWd hsug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=PfydLGQc3AYP44QIc62m63+m+f4h6kVP2gB++GENeSg=; b=kvAMHwTvv4UpGGL6xPd0Vc38FYV077rGmr+FRFzcUmjUp6ZtHh59qhSqoATct8GlJ9 SQUnHb0ZEzelTnEJsNfDxBS5F2EPx7i8CFOsjXW4E1KGx6U55lWaaGa4TJbiY8Qv/tSD tXrLf3wYNoz7fws+qt3IbBAMqygkrP9ZlGswtar6Y1BE7lst3fjw8d1qfRDRl/is2lQ0 1fQ+a8V5d1YNVsrmsucmcKkky7qpduLBZ8gGaXzpfg87DmbehD27Cm5RTNGdraSOGYxx QL7M6AeK41i6jp3auF9qbw0488dAgdtwAQLQOdurxkpRGKVU3BkOGQEw2DTX85EBLR4q YQPQ== X-Gm-Message-State: AMke39ld5YCvH6U7hW3i76Vzg1Qq0T1XVQsNhaB+N7zl9CThkObidGDFv9Ydk4fcIb6w6A== X-Received: by 10.223.170.70 with SMTP id q6mr5859266wrd.162.1488797825477; Mon, 06 Mar 2017 02:57:05 -0800 (PST) Received: from weierstrass.local.net ([91.200.109.169]) by smtp.gmail.com with ESMTPSA id o63sm14277896wmo.30.2017.03.06.02.57.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Mar 2017 02:57:04 -0800 (PST) Sender: Jan Blunck From: Jan Blunck To: dev@dpdk.org Cc: david.marchand@6wind.com, shreyansh.jain@nxp.com, ferruh.yigit@intel.com Date: Mon, 6 Mar 2017 11:56:41 +0100 Message-Id: <1488797809-12917-3-git-send-email-jblunck@infradead.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488797809-12917-1-git-send-email-jblunck@infradead.org> References: <1488797809-12917-1-git-send-email-jblunck@infradead.org> In-Reply-To: <1488018496-995-1-git-send-email-jblunck@infradead.org> References: <1488018496-995-1-git-send-email-jblunck@infradead.org> Subject: [dpdk-dev] [PATCH v4 02/10] eal: probe new virtual bus after other bus devices 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: , X-List-Received-Date: Mon, 06 Mar 2017 10:57:05 -0000 Also see commit f4ce209a8ce5 ("eal: postpone vdev initialization"). Signed-off-by: Jan Blunck --- lib/librte_eal/common/eal_common_bus.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c index 4638e78..8f9baf8 100644 --- a/lib/librte_eal/common/eal_common_bus.c +++ b/lib/librte_eal/common/eal_common_bus.c @@ -86,9 +86,14 @@ int rte_bus_probe(void) { int ret; - struct rte_bus *bus; + struct rte_bus *bus, *vbus = NULL; TAILQ_FOREACH(bus, &rte_bus_list, next) { + if (!strcmp(bus->name, "virtual")) { + vbus = bus; + continue; + } + ret = bus->probe(); if (ret) { RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n", @@ -97,6 +102,15 @@ rte_bus_probe(void) } } + if (vbus) { + ret = vbus->probe(); + if (ret) { + RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n", + vbus->name); + return ret; + } + } + return 0; } -- 2.7.4