From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id DE1C11B1F2 for ; Thu, 12 Oct 2017 00:34:13 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9561221B62; Wed, 11 Oct 2017 18:34:13 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 11 Oct 2017 18:34:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=RdWt6Ar2b+vHFOw29CmcHQuO79 gbF45i0ahEuHb+d4o=; b=Lqpqdfdhzlan2zMQBeU7mvGelr3JRc6jEIYgQma476 OieoCxX3xxV5Yp9BlpmF7bhc2/LO3wsxah8Khot/LAsdqDfOrZlQYgzpbqw441mQ iwg07m56e5jbXfsDIvJFDKfeDpX2fum1W7veV6gAnRzNY0YeuKnaNKuRVePo6hak g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=RdWt6A r2b+vHFOw29CmcHQuO79gbF45i0ahEuHb+d4o=; b=dYMiKEJfqiW25Mv3z5Owg6 HurXpJFMqG6iAnnSUlOPocNRjODYLFgJBKOHiIAXSP8l6Dn8Cb5JBCABRB1sNz57 uqIOUpL3QfKmmCsdRVDMYSAp68vKc+612hjJPU18TO568xu2R2kDVXMvYQXt0kMO YlxCIP1DA2yF1jUAo/ADeNvJxDWtQIXlG+bzQ7g1AAShsZpsBd7Z4XgxP8ADfYr+ F4uaITbPbhbYm6mshoFlwFeEmHSML2s7DwSJe9hzaGNnE2B8BLcvjW+TW2hozfAo yDUCT/+Y+i7APevQtSCY38cwmlavzk3NyNyrI8/nrK8ItBj+dtyx7WFPWaK6Ikwg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 48B7C24735; Wed, 11 Oct 2017 18:34:13 -0400 (EDT) From: Thomas Monjalon To: Aaron Conole Cc: dev@dpdk.org, Shreyansh Jain , Don Provan , Jan Blunck , Hemant Agrawal Date: Thu, 12 Oct 2017 00:34:12 +0200 Message-ID: <9319977.0ApbdN8Evs@xps> In-Reply-To: References: <20170812102220.27773-1-shreyansh.jain@nxp.com> <83a3c6c6-8d50-8106-7c7f-9b5c8263ce96@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Wed, 11 Oct 2017 22:34:14 -0000 10/10/2017 18:00, Aaron Conole: > Shreyansh Jain writes: > > > Hello Don, > > > > On Monday 09 October 2017 11:51 PM, Don Provan wrote: > >>> -----Original Message----- > >>> From: Shreyansh Jain [mailto:shreyansh.jain@nxp.com] > >>> Sent: Monday, October 09, 2017 4:10 AM > >>> To: Jan Blunck ; Thomas Monjalon > >>> > >>> Cc: dev ; Hemant Agrawal > >>> Subject: Re: [dpdk-dev] [PATCH] eal: bus scan and probe never fail > >>> > >>> ... > >>> This is where I have disagreement/doubt. > >>> Reporting error code from rte_bus_scan would do two things: > >>> > >>> 1. rte_eal_init is not designed to ignore/log-only these errors - it > >>> would quit initialization. (But, this can be changed) > >>> 2. What should rte_eal_init do with this error? rte_bus_scan would have > >>> already printed the problematic bus->scan() failure. > >> > >> These practical problems confirm to me that the failure of a bus > >> scan is more of a strategic issue: when asking "which devices can > >> I use?", "none" is a perfectly valid answer that does not seem > >> like an error to me even when a failed bus scan is the reason for > >> that answer. > > > > I agree with this. > > > >> > >> From the application's point of view, the potential error here > >> is that the device it wants to use isn't available. I don't see that > >> either the init function or the probe function will have enough > >> information to understand that application-level problem, so > >> they should leave it to the application to detect it. > > > > I think I understand you comment but just want to cross check again: > > Scan or probe error should simply be ignored by EAL layer and let the > > application take stance when it detects that the device it was looking > > for is missing. Is my understanding correct? > > > > I am trying to come a conclusion so that this patch can either be > > modified or pushed as it is. If the above understanding is correct, I > > don't see any changes required in the patch. > > Does it make sense to introduce a way to query the results of the > various bus types for their status? That way we can give the relevant > information to the application if it wants, and make the bus scanning > code *always* succeed? This version shouldn't be an ABI breakage, > either (confirm?). > > half-baked below (not tested or suitable - just an example): We are going to need notification callbacks for scan and probe anyway. I think errors could be also notified with callbacks?