Re: [dpdk-dev] [PATCH 1/2] ethdev: avoid explicit check of valid port state

2019-04-18 Thread Ferruh Yigit
On 4/17/2019 11:59 PM, Thomas Monjalon wrote: > Some port iterations are manually checking against RTE_ETH_DEV_UNUSED > instead of using the iterators based on rte_eth_find_next(). > > A new macro RTE_ETH_FOREACH_VALID_DEV() is introduced, but kept private > because there should be no need of iter

Re: [dpdk-dev] [PATCH 1/2] ethdev: avoid explicit check of valid port state

2019-04-18 Thread Thomas Monjalon
18/04/2019 14:47, Thomas Monjalon: > 18/04/2019 13:50, Ferruh Yigit: > > On 4/17/2019 11:59 PM, Thomas Monjalon wrote: > > > Some port iterations are manually checking against RTE_ETH_DEV_UNUSED > > > instead of using the iterators based on rte_eth_find_next(). > > > > > > A new macro RTE_ETH_FORE

Re: [dpdk-dev] [PATCH 1/2] ethdev: avoid explicit check of valid port state

2019-04-18 Thread Thomas Monjalon
18/04/2019 13:50, Ferruh Yigit: > On 4/17/2019 11:59 PM, Thomas Monjalon wrote: > > Some port iterations are manually checking against RTE_ETH_DEV_UNUSED > > instead of using the iterators based on rte_eth_find_next(). > > > > A new macro RTE_ETH_FOREACH_VALID_DEV() is introduced, but kept private

Re: [dpdk-dev] [PATCH 1/2] ethdev: avoid explicit check of valid port state

2019-04-18 Thread Ferruh Yigit
On 4/17/2019 11:59 PM, Thomas Monjalon wrote: > Some port iterations are manually checking against RTE_ETH_DEV_UNUSED > instead of using the iterators based on rte_eth_find_next(). > > A new macro RTE_ETH_FOREACH_VALID_DEV() is introduced, but kept private > because there should be no need of iter

[dpdk-dev] [PATCH 1/2] ethdev: avoid explicit check of valid port state

2019-04-17 Thread Thomas Monjalon
Some port iterations are manually checking against RTE_ETH_DEV_UNUSED instead of using the iterators based on rte_eth_find_next(). A new macro RTE_ETH_FOREACH_VALID_DEV() is introduced, but kept private because there should be no need of iterating over all devices in the API. The public iterators