From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id C4D785592 for ; Tue, 11 Apr 2017 17:44:29 +0200 (CEST) Received: by mail-wm0-f54.google.com with SMTP id u2so4113230wmu.0 for ; Tue, 11 Apr 2017 08:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=jwsoYqBEcYuSsC82krQCzXH7y9Gz31DHo/p162BrIqo=; b=S91SmdUdOlraReon/1FSqyPtzO7ONSssdkmRci51E228KEqFkMqL1VMr5mfv9UbkeP Xl8ydtCuA8dpeZlvS5YmZ1dDzW0BNLrGYGUtw++6FYdDFcbi5Ezk31WaiNs/8RNW843e nvfdbWVN7NVO1o2+5s94oX1tXlLVS6NMyjj8mh26FdCslda/QGZrgNksV9pCKRO74y4W hGU12/wzlwalaDBq2dUG2J0gqYXUMRs45qiz5uIg2bCnuy9VmURcVtWYyFJlZ45vve6T 7qq5oIbezsmPY0W1N+xxA6250WKz/PI5VuwiqWycunvLXlDv0J3ZF0jfMehtqVEyAwO/ 2Nig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=jwsoYqBEcYuSsC82krQCzXH7y9Gz31DHo/p162BrIqo=; b=Yi+032qeR0NyjfKm4Y6BnMCq5wtQ3u/+W4AjyNNEDW6AKIQFSNOvGyRfEoHh1nGebs dYTx/UP6SeLMW/lAhGMaHbjpHnz1QRs5U5xKJUVwQl4w4GX+LEORQugsYNNSD5aIAnFb 8T8MQIJ/r1CPNFK8oRBPINhntPfg7upwFJVx+zex2yVCDAgT0q92MUm4mnMxj4ZHLyR8 5IyDJjNQs0OFzyRjAp/0x7L8q2kLI8LtCGB+sdSIKwz+C6wIntuYzJyZ5k7fK/sbscOH oUHDWf320cE+z8BhCN0C602PXwKWhhdxT5MwahAf4CicWRv2e+CoIo4PBduUnSX7RCML r50Q== X-Gm-Message-State: AN3rC/6Pr+WqUvnrilnLKqCYGjInF2n7yYgtOXOijAMDaIxgFyDFRio4 46fJ5K8Zua6YUcy8 X-Received: by 10.28.156.13 with SMTP id f13mr3101156wme.44.1491925469442; Tue, 11 Apr 2017 08:44:29 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id v14sm2936830wmv.24.2017.04.11.08.44.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Apr 2017 08:44:28 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Jan Blunck Date: Tue, 11 Apr 2017 17:44:05 +0200 Message-Id: <55e5903ca95c5d586657fc78605e9362cb62f074.1491925092.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: <1488797809-12917-1-git-send-email-jblunck@infradead.org> In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 01/12] 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: Tue, 11 Apr 2017 15:44:30 -0000 From: Jan Blunck 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.1.4