X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=app%2Ftest-eventdev%2Ftest_pipeline_queue.c;h=ca5f4578ec39955d7737c6aa19d50a2270131746;hb=aed545af1b5ed6b7baa2eb41bad63486d6c95226;hp=835fe0782f8ba08dd6c10a409f133d3d2981d097;hpb=314bcf58ca8fcd3e013f36729f9e6323a412cd1a;p=dpdk.git diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c index 835fe0782f..ca5f4578ec 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -10,7 +10,7 @@ static __rte_always_inline int pipeline_queue_nb_event_queues(struct evt_options *opt) { - uint16_t eth_count = rte_eth_dev_count(); + uint16_t eth_count = rte_eth_dev_count_avail(); return (eth_count * opt->nb_stages) + eth_count; } @@ -333,7 +333,7 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) uint8_t nb_worker_queues = 0; nb_ports = evt_nr_active_lcores(opt->wlcores); - nb_queues = rte_eth_dev_count() * (nb_stages); + nb_queues = rte_eth_dev_count_avail() * (nb_stages); /* Extra port for Tx service. */ if (t->mt_unsafe) { @@ -341,7 +341,7 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) nb_ports++; nb_queues++; } else - nb_queues += rte_eth_dev_count(); + nb_queues += rte_eth_dev_count_avail(); rte_event_dev_info_get(opt->dev_id, &info); @@ -397,6 +397,9 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) } } + if (opt->wkr_deq_dep > info.max_event_port_dequeue_depth) + opt->wkr_deq_dep = info.max_event_port_dequeue_depth; + /* port configuration */ const struct rte_event_port_conf p_conf = { .dequeue_depth = opt->wkr_deq_dep,