app/eventdev: fix capability check in pipeline ATQ test
[dpdk.git] / app / test-eventdev / test_pipeline_atq.c
index c60635b..0872b25 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "test_pipeline_common.h"
 
-/* See http://dpdk.org/doc/guides/tools/testeventdev.html for test details */
+/* See http://doc.dpdk.org/guides/tools/testeventdev.html for test details */
 
 static __rte_always_inline int
 pipeline_atq_nb_event_queues(struct evt_options *opt)
@@ -314,17 +314,7 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
 
        rte_event_dev_info_get(opt->dev_id, &info);
 
-       const struct rte_event_dev_config config = {
-               .nb_event_queues = nb_queues,
-               .nb_event_ports = nb_ports,
-               .nb_events_limit  = info.max_num_events,
-               .nb_event_queue_flows = opt->nb_flows,
-               .nb_event_port_dequeue_depth =
-                       info.max_event_port_dequeue_depth,
-               .nb_event_port_enqueue_depth =
-                       info.max_event_port_enqueue_depth,
-       };
-       ret = rte_event_dev_configure(opt->dev_id, &config);
+       ret = evt_configure_eventdev(opt, nb_queues, nb_ports);
        if (ret) {
                evt_err("failed to configure eventdev %d", opt->dev_id);
                return ret;
@@ -442,6 +432,13 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
                }
        }
 
+       ret = rte_event_dev_start(opt->dev_id);
+       if (ret) {
+               evt_err("failed to start eventdev %d", opt->dev_id);
+               return ret;
+       }
+
+
        RTE_ETH_FOREACH_DEV(prod) {
                ret = rte_eth_dev_start(prod);
                if (ret) {
@@ -451,12 +448,6 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
                }
        }
 
-       ret = rte_event_dev_start(opt->dev_id);
-       if (ret) {
-               evt_err("failed to start eventdev %d", opt->dev_id);
-               return ret;
-       }
-
        RTE_ETH_FOREACH_DEV(prod) {
                ret = rte_event_eth_rx_adapter_start(prod);
                if (ret) {
@@ -504,6 +495,8 @@ pipeline_atq_capability_check(struct evt_options *opt)
                        evt_nr_active_lcores(opt->wlcores),
                        dev_info.max_event_ports);
        }
+       if (!evt_has_all_types_queue(opt->dev_id))
+               return false;
 
        return true;
 }