From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 02/10] eal: probe new virtual bus after other bus devices Date: Mon, 13 Mar 2017 18:42:30 +0100 Message-ID: <2110405.8QBbQtcLXQ@xps13> References: <1488797809-12917-1-git-send-email-jblunck@infradead.org> <1488797809-12917-3-git-send-email-jblunck@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, david.marchand@6wind.com, shreyansh.jain@nxp.com, ferruh.yigit@intel.com To: Jan Blunck Return-path: Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by dpdk.org (Postfix) with ESMTP id 580D61396 for ; Mon, 13 Mar 2017 18:42:33 +0100 (CET) Received: by mail-wr0-f182.google.com with SMTP id l37so108710382wrc.1 for ; Mon, 13 Mar 2017 10:42:33 -0700 (PDT) In-Reply-To: <1488797809-12917-3-git-send-email-jblunck@infradead.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-03-06 11:56, Jan Blunck: > @@ -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; > + } Why this special handling? [...] > + if (vbus) { > + ret = vbus->probe(); > + if (ret) { > + RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n", > + vbus->name); > + return ret; > + } > + } We should not have any special code in this function.