From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=4e3iX7HbGfvtLNIlHQ2X1EuyGHZz4SzOox/wuqBGNgE=; b=lWEdKTLgbPXpcgZeF8r1pCRgu/istj9/jnHhzTpnkCwbytXLy3zOlh/1rKKFI0q05F 0EwOqApWxHh5yr9zDyDbB979f5EG1BAEDM3LQ9Ym4MqYCoey5v/vN8zYXv3Z95r5ppuc oRqZR8NEKGrruzZ2onv4o2l/EsYzNy9sAqcYz2W1r9xQbnW5Zdoi2l4z+xwnvl5tbqJZ T/Dk5OLwagxEJUPDi8BcL0VhCTaOKnbDVuWlcdlcAKDV0hcE6Rb1SRhfQSxDVfnosS4Y fkaPSc+jiAWy2DgtAXPCgS7sT1b+OayaDF2rlLco3s/iAC2WVXVb1RE92PAWhx/YR75q lA2Q== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=4e3iX7HbGfvtLNIlHQ2X1EuyGHZz4SzOox/wuqBGNgE=; b=LhaHGC3OHxJAk2Er5JmRvH/kLe3yrL927k6UJfObLvoVgvwIGOamdcTWPG+Ng3uH43 ImtkVaGMoK1F5kKjwaLRWjFg7g9UhbPPdDIMHM2ckf3ZL0bhqfLlnuli9qy8rp2UNeVm 6Hu+9fV6TjUmFMKYer/uCqA3FkhyIWTjHGGlPJk86BhqOa6EwRCE69ckjC/iQAg0GgJe 03atJrvSSc6VqpW0NR/N6Uqk6Cypesxc8ae0An3HDByvnfPcg/1Ufyujq1AmBqFBZX5i 0niz19Ps5Sn/hfSITdjwkq5ffiPd/rFvIk4L8+zDgjb/v9l1JssZMrfEsBnfW5Da228J W2Dw== X-Gm-Message-State: AMke39ncSbiUamkNQCwWrPaEK7s7VxrW3rfieHwTCdMem1Q/ngiSj9i4B1h9bOniaba2/Ey5 X-Received: by 10.223.151.5 with SMTP id r5mr32055136wrb.97.1489426952826; Mon, 13 Mar 2017 10:42:32 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id m186sm12151089wmd.21.2017.03.13.10.42.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Mar 2017 10:42:31 -0700 (PDT) From: Thomas Monjalon To: Jan Blunck Cc: dev@dpdk.org, david.marchand@6wind.com, shreyansh.jain@nxp.com, ferruh.yigit@intel.com Date: Mon, 13 Mar 2017 18:42:30 +0100 Message-ID: <2110405.8QBbQtcLXQ@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1488797809-12917-3-git-send-email-jblunck@infradead.org> References: <1488797809-12917-1-git-send-email-jblunck@infradead.org> <1488797809-12917-3-git-send-email-jblunck@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [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, 13 Mar 2017 17:42:33 -0000 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.