On 05/10/2018 01:43 AM, Thomas Monjalon wrote:
The port was set to the state ATTACHED during allocation. The consequence was to iterate over ports which are not initialized.The state ATTACHED is now set as the last step of probing. The uniqueness of port name is now checked before the availability of a port id for allocation (order reversed). As the state is not set on allocation anymore, it is also not checked in the function telling whether a port is allocated or not. The name of the port is set on allocation, so it is enough as a check. Fixes: 5588909af21b ("ethdev: add device iterator") Cc: [email protected] Signed-off-by: Thomas Monjalon <[email protected]> Signed-off-by: Matan Azrad <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>

