[dpdk-dev] [PATCH v2] eal: fix positive error codes from probe/remove

Thomas Monjalon thomas at monjalon.net
Wed Jun 26 23:03:34 CEST 2019


07/06/2019 10:32, David Marchand:
> Thomas,
> 
> - Calling unplug on a device that is not attached is a bit weird to me, all
> the more so that we have rte_dev_probed().
> But there might be users calling directly the bus unplug api and not the
> official api...
> Does this enter the ABI stability perimeter?
> If not, I would be for changing unplug api so that we only deal with 0 or <
> 0 on remove path.

Where the positive value is documented?
If it's only a non-documented usage, I tend to think it can be changed.

> On the plug side, is there a reason why we do not check for
> rte_dev_probed() and let the bus replies that the device is already probed?

A device can be re-probed to allow discovering new ports.

> Does it have something to do with representors ?
> Only guessing.

Yes representors are a case of ports which can appear on a new probe.

> - On the plug side again, can't we have an indication from the buses that
> they have a driver that can handle the device rather than this odd (and
> historical) > 0 return code?
> This should not change the current behavior, just make the code a bit
> easier to understand.

The positive code is also used for white/blacklist.
And I think we may need to try probing in order to give a final answer,
in general case.





More information about the dev mailing list