> -----Original Message----- > From: Shreyansh Jain [mailto:shreyansh.j...@nxp.com] > Sent: Monday, October 09, 2017 4:10 AM > To: Jan Blunck <jblu...@infradead.org>; Thomas Monjalon > <tho...@monjalon.net> > Cc: dev <dev@dpdk.org>; Hemant Agrawal <hemant.agra...@nxp.com> > 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. 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. -don provan dpro...@bivio.net