aboutsummaryrefslogtreecommitdiffstats
path: root/examples/eventdev_pipeline/pipeline_worker_tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/eventdev_pipeline/pipeline_worker_tx.c')
-rw-r--r--examples/eventdev_pipeline/pipeline_worker_tx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c
index b254b03f..3dbde92d 100644
--- a/examples/eventdev_pipeline/pipeline_worker_tx.c
+++ b/examples/eventdev_pipeline/pipeline_worker_tx.c
@@ -422,7 +422,7 @@ setup_eventdev_worker_tx(struct cons_data *cons_data,
const uint8_t dev_id = 0;
const uint8_t nb_ports = cdata.num_workers;
uint8_t nb_slots = 0;
- uint8_t nb_queues = rte_eth_dev_count();
+ uint8_t nb_queues = rte_eth_dev_count_avail();
/*
* In case where all type queues are not enabled, use queues equal to
@@ -431,7 +431,7 @@ setup_eventdev_worker_tx(struct cons_data *cons_data,
*/
if (!atq) {
nb_queues *= cdata.num_stages;
- nb_queues += rte_eth_dev_count();
+ nb_queues += rte_eth_dev_count_avail();
}
struct rte_event_dev_config config = {
@@ -735,7 +735,7 @@ worker_tx_opt_check(void)
rte_exit(EXIT_FAILURE,
"Event dev doesn't support all type queues\n");
- for (i = 0; i < rte_eth_dev_count(); i++) {
+ RTE_ETH_FOREACH_DEV(i) {
ret = rte_event_eth_rx_adapter_caps_get(0, i, &cap);
if (ret)
rte_exit(EXIT_FAILURE,