]> git.droids-corp.org - dpdk.git/commitdiff
event/sw: extend service capability
authorPavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Wed, 25 Oct 2017 14:50:28 +0000 (20:20 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 26 Oct 2017 22:53:07 +0000 (00:53 +0200)
Extend the service capability of the sw event device by exposing service id
to the application.
The application can use service id to configure service cores to run event
scheduling.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
drivers/event/sw/sw_evdev.c

index 522cd71aabb8ba074251030ca0071163e7569ff1..92fd07b7b954f59ca475cb77c637060f8eb4b187 100644 (file)
@@ -861,6 +861,15 @@ sw_probe(struct rte_vdev_device *vdev)
                return -ENOEXEC;
        }
 
+       ret = rte_service_component_runstate_set(sw->service_id, 1);
+       if (ret) {
+               SW_LOG_ERR("Unable to enable service component");
+               return -ENOEXEC;
+       }
+
+       dev->data->service_inited = 1;
+       dev->data->service_id = sw->service_id;
+
        return 0;
 }