app/eventdev: fix order test service init
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Fri, 13 Jul 2018 08:51:14 +0000 (14:21 +0530)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Wed, 25 Jul 2018 12:28:25 +0000 (14:28 +0200)
Previous modification to evt_service_setup() broke order_queue/atq
tests.

Fixes: b0333c55dfa5 ("app/eventdev: add service core configuration")
Cc: stable@dpdk.org
Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
app/test-eventdev/test_order_atq.c
app/test-eventdev/test_order_queue.c

index c57fbbf..35debcf 100644 (file)
@@ -151,10 +151,14 @@ order_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
        if (ret)
                return ret;
 
-       ret = evt_service_setup(opt->dev_id);
-       if (ret) {
-               evt_err("No service lcore found to run event dev.");
-               return ret;
+       if (!evt_has_distributed_sched(opt->dev_id)) {
+               uint32_t service_id;
+               rte_event_dev_service_id_get(opt->dev_id, &service_id);
+               ret = evt_service_setup(service_id);
+               if (ret) {
+                       evt_err("No service lcore found to run event dev.");
+                       return ret;
+               }
        }
 
        ret = rte_event_dev_start(opt->dev_id);
index f603a02..17f7b98 100644 (file)
@@ -164,10 +164,14 @@ order_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)
        if (ret)
                return ret;
 
-       ret = evt_service_setup(opt->dev_id);
-       if (ret) {
-               evt_err("No service lcore found to run event dev.");
-               return ret;
+       if (!evt_has_distributed_sched(opt->dev_id)) {
+               uint32_t service_id;
+               rte_event_dev_service_id_get(opt->dev_id, &service_id);
+               ret = evt_service_setup(service_id);
+               if (ret) {
+                       evt_err("No service lcore found to run event dev.");
+                       return ret;
+               }
        }
 
        ret = rte_event_dev_start(opt->dev_id);