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 1B3D56932 for ; Sat, 25 Feb 2017 11:28:31 +0100 (CET) Received: by mail-wr0-f196.google.com with SMTP id o22so3976909wro.3 for ; Sat, 25 Feb 2017 02:28:31 -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=1JxJX/pv4LE9ygPljcGZOt5p3dpS21nPgJsRBJ+ZCjw=; b=A+o8SBDaVmza7Dl6ZSRfhdYixRRvTkM0h0YOcaii9xmxaJCPBkMgJDrOt5yr/CeDPP o+mS4V2GhY+/ph4dBGcNl0JkPKxIgwIxslUNoF2Lcr5eSOYcRae7yl1genT2+2s31Y8h 3lZ816cl15sLaktqL2YSHFESMmGzfDCrmYyrCjn5/mUvkcW4v7h4cBal+9edWeOf7MfR IVrsTneuoLMA3TVnIhQud/GvzJ7v+pbeSrNKAA9w+NhIbuXv81SEk594640HS/g30kXy OhzeUM1qZUe8deKBX8VCGayVuOSiiVJqQjtRCxCz10lpO1QgSJSNSWj2uQgf7La5ikK2 QVFA== 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=1JxJX/pv4LE9ygPljcGZOt5p3dpS21nPgJsRBJ+ZCjw=; b=HGzd43iRQFtYCOy8r/5Mmi9gaAgp/eeF4zbUF4ejxle34ZZZ2JZdPNnA/MS+tJDX2y Tthi4hh7A2PyUqeAr7A85ajfvUMA8vRRNbd1YC69rKcXhaAe6YaU86BRMieagohGxSft vbQXZYq+Ji1jitzmK/iFYaWxO0nGOlskuudXao/UyJ5ULUzi1arqv9hvguDKpS43A0Yn vIgHEVrR5DitQM9LMlKBovm17aF6YT6ilH5+ft9x49z58S2w+Sfmw+r7f27tBeoMs+eE ZkjjECqfAdHzDKE1Ek/i381ihUEs2TzxMmr5a0t4zDkBcSl809YOalwiLrCRi/LKjz71 SGKg== X-Gm-Message-State: AMke39lXvwUzfzVeu1TEVekMUUB83P0IcnzZH6xQcn6PElg7O1fWiQMThT3pY6SPk9B2kg== X-Received: by 10.223.170.194 with SMTP id i2mr7534797wrc.131.1488018510938; Sat, 25 Feb 2017 02:28:30 -0800 (PST) Received: from weierstrass.local.net ([91.200.109.169]) by smtp.gmail.com with ESMTPSA id e72sm5830893wma.16.2017.02.25.02.28.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Feb 2017 02:28:30 -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: Sat, 25 Feb 2017 11:28:08 +0100 Message-Id: <1488018496-995-3-git-send-email-jblunck@infradead.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488018496-995-1-git-send-email-jblunck@infradead.org> References: <1488018496-995-1-git-send-email-jblunck@infradead.org> In-Reply-To: <1487600262-14382-1-git-send-email-jblunck@infradead.org> References: <1487600262-14382-1-git-send-email-jblunck@infradead.org> Subject: [dpdk-dev] [PATCH v3 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: Sat, 25 Feb 2017 10:28:31 -0000 Also see commit f4ce209a ("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