From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id E3F4C160 for ; Tue, 19 Sep 2017 20:51:34 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id x17so436289wmd.5 for ; Tue, 19 Sep 2017 11:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tPwjTugJTl9SFy2H7L2LHyymogSfHIKkj6Q5zTk88W0=; b=C1GGB5HM/mRXEF3sVvs3sjG1QAg8AfanD2So+a+ASl976UVsyheqjffzBZKwkYLFgH XkOLP8Ixmx8pJoplXRsjV9EV80vIomEGeDLmHPi463ZD8VEYsntnDDm3FGf+xw7W04hO UIex8mQRpod1V7vtShTBunhw8UkdU/YXqCp+gC+2cvhZTlS7QBo1YD/FDHEy3TRRZViS WrL3VtHi8QuNCxy1KhHeFdkrl+rw23ffKJ6I6ER0rwgzXpucsr8p1J2DVQRh0+981pzj N9ejcSlT1z6rzEeDeVZ7dWfNiRbh+kb4NnZXo1Kl65yTDCRj2AVspdgskvjhwmFRil2R ag6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=tPwjTugJTl9SFy2H7L2LHyymogSfHIKkj6Q5zTk88W0=; b=mEGLSHPfWwx5aDMRgAmg7BRAfKzQJYwe8lJJvBbEtiLmqIzBc4JiNJTIwq/rbDKPDp cxclcTY2fyxKR7HhcfO7sKbIw5B79H7nHyEbKwR7ovaRJ6m/79VUWcHnKwuVaIonLsl4 xHyAcUxrXKjCey4OgeYpq3ByyW+DtJ1CdHDWD5WluiLhd4DeKL/Mrablp34+pCanXuWt TrmEy1WhFtFfOJF+XAS/zv1w0kCNhAac3fOMWUul67DwOieRIMcRpfBbrt7ZpaVhNB0f ECtI417KyX8kJ5miSCNwf6n3RtKZXXgD3cdgoypjnapd4gUd7MxawAjwYSU1itVh4O9S O1IA== X-Gm-Message-State: AHPjjUj2pXYRn6yePL5n1qHSdEU/UqEI70J0Ax9mnhu5ctgM7L2m/gUI Mb5oly/t25YxQRd4x96pj/eri1d83RQj6r76f58= X-Google-Smtp-Source: AOwi7QAPjcoHMzLcpoPB87S1Ak2P4eBDOJ3ymv5x8oNit17A3yxdrcmr2FwrZ08YyjFYEYB+2cACWdKvX+EvR66ZQc8= X-Received: by 10.28.218.141 with SMTP id r135mr2062984wmg.63.1505847094477; Tue, 19 Sep 2017 11:51:34 -0700 (PDT) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.67.132 with HTTP; Tue, 19 Sep 2017 11:51:33 -0700 (PDT) In-Reply-To: <422ce0c6-7868-b601-2fe9-e361497d7b14@nxp.com> References: <20170812102220.27773-1-shreyansh.jain@nxp.com> <422ce0c6-7868-b601-2fe9-e361497d7b14@nxp.com> From: Jan Blunck Date: Tue, 19 Sep 2017 20:51:33 +0200 X-Google-Sender-Auth: MNF1NlMiVcXr-XmGngGG66yUAL0 Message-ID: To: Hemant Agrawal Cc: Shreyansh Jain , dev , Thomas Monjalon Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail 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, 19 Sep 2017 18:51:35 -0000 On Mon, Sep 18, 2017 at 1:36 PM, Hemant Agrawal wrote: > Tested-by: Hemant Agrawal > > > On 8/12/2017 3:52 PM, Shreyansh Jain wrote: >> >> Bus scan is responsible for finding devices over *all* buses. >> Some of these buses might not be able to scan but that should >> not prevent other buses to be scanned. >> If scanning the bus fails this is signaling an error. In that case we might even want to unregister the bus. >> Same is the case for probing. It is possible that some devices which >> were scanned didn't have a specific driver. That should not prevent >> other buses from being probed. Absolutely correct. >> >> Signed-off-by: Shreyansh Jain >> >> --- >> Until now, this decision was left onto author of bus specific scan and >> probe function. But, that is incorrect. >> --- >> lib/librte_eal/common/eal_common_bus.c | 12 +++--------- >> 1 file changed, 3 insertions(+), 9 deletions(-) >> >> diff --git a/lib/librte_eal/common/eal_common_bus.c >> b/lib/librte_eal/common/eal_common_bus.c >> index 08bec2d..58e1084 100644 >> --- a/lib/librte_eal/common/eal_common_bus.c >> +++ b/lib/librte_eal/common/eal_common_bus.c >> @@ -73,11 +73,9 @@ rte_bus_scan(void) >> >> TAILQ_FOREACH(bus, &rte_bus_list, next) { >> ret = bus->scan(); >> - if (ret) { >> + if (ret) >> RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n", >> bus->name); >> - return ret; >> - } >> } >> >> return 0; >> @@ -97,20 +95,16 @@ rte_bus_probe(void) >> } >> >> ret = bus->probe(); >> - if (ret) { >> + if (ret) >> RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n", >> bus->name); >> - return ret; >> - } >> } >> >> if (vbus) { >> ret = vbus->probe(); >> - if (ret) { >> + if (ret) >> RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n", >> vbus->name); >> - return ret; >> - } >> } >> >> return 0; >> >