[dpdk-dev] [PATCH] eal: don't crash if one pci device fails

David Marchand david.marchand at 6wind.com
Thu Dec 3 11:08:18 CET 2015


On Thu, Dec 3, 2015 at 2:38 AM, Stephen Hemminger <
stephen at networkplumber.org> wrote:

> If there is a failure to setup one pci device, there maybe other
> devices that can be initialized. Don't call rte_exit which
> is a forced crash, pass the error back to the
> application to decide what it wants to do.
>
> Might be good idea to return a positive value for the
> number of devices found, but that would break ABI.
>

I don't see how this return code will help the application do something
after this.
You don't know which device probe failed with just this.

rte_eal_pci_probe() returning a != 0 value will trigger a rte_panic in
rte_eal_init() anyway.
So I suppose you want to use rte_eal_pci_probe out of rte_eal_init.
In such a case, why don't you use rte_eal_pci_probe_one ?


-- 
David Marchand


More information about the dev mailing list