X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_ethdev%2Frte_ethdev.c;h=b262190a84ab2f2258cace6c068f6cc398868c71;hb=a52aa40b4161a027ce1b31bde7c6f47b93bb26b7;hp=8032be92f6cc987c17f8360ddbc527c7b13040a4;hpb=0b259b8e965575cdbd622c48b6ae5b04bed7aa73;p=dpdk.git diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 8032be92f6..b262190a84 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -330,8 +330,7 @@ uint16_t rte_eth_find_next(uint16_t port_id) { while (port_id < RTE_MAX_ETHPORTS && - rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED && - rte_eth_devices[port_id].state != RTE_ETH_DEV_REMOVED) + rte_eth_devices[port_id].state == RTE_ETH_DEV_UNUSED) port_id++; if (port_id >= RTE_MAX_ETHPORTS) @@ -567,8 +566,7 @@ uint64_t rte_eth_find_next_owned_by(uint16_t port_id, const uint64_t owner_id) { while (port_id < RTE_MAX_ETHPORTS && - ((rte_eth_devices[port_id].state != RTE_ETH_DEV_ATTACHED && - rte_eth_devices[port_id].state != RTE_ETH_DEV_REMOVED) || + (rte_eth_devices[port_id].state == RTE_ETH_DEV_UNUSED || rte_eth_devices[port_id].data->owner.id != owner_id)) port_id++;