On 03.06.2019 19:13, David Marchand wrote: > > > On Mon, Jun 3, 2019 at 5:37 PM Ilya Maximets <i.maxim...@samsung.com > <mailto:i.maxim...@samsung.com>> wrote: > > On 03.06.2019 11:50, David Marchand wrote: > > > > > > On Thu, May 30, 2019 at 3:26 PM Ilya Maximets <i.maxim...@samsung.com > <mailto:i.maxim...@samsung.com> <mailto:i.maxim...@samsung.com > <mailto:i.maxim...@samsung.com>>> wrote: > > > > According to API, 'rte_dev_probe()' and 'rte_dev_remove()' and their > > 'hotplug' equivalents must return 0 or negative error code. Bus code > > > > > > About this first part, existing callers in dpdk are not consistent with > the api which might explain why this was not seen earlier. > > How about fixing the existing callers? > > Do you mean replacing all the 'rte_dev_probe() != 0' with > 'rte_dev_probe() < 0' > around the codebase? > > > Yes. > It is not necessary to this patch so I can handle it if you don't have time. > But dpdk should show a good example by respecting its own apis description.
I agree. I'll send v2 with fixed users. > The problem is in local_dev_probe() (resp. local_dev_remove()) itself, since > this internal api announces it should return < 0 on error. Hmm. I missed that private internal API defined for local_* functions. I'll move the check from rte_dev_probe() to local_dev_probe(). Best regards, Ilya Maximets.