From: Pavan Bhagavatula <[email protected]>

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 <[email protected]>
Acked-by: Harry van Haaren <[email protected]>
---
 drivers/event/sw/sw_evdev.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index aed8b72..9b7f4d4 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -875,6 +875,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;
 }
 
-- 
2.7.4

Reply via email to