[dpdk-dev] [PATCH 2/7] event/sw: extend service capability

Pavan Nikhilesh pbhagavatula at caviumnetworks.com
Wed Oct 11 11:09:45 CEST 2017


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 at caviumnetworks.com>
---
 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



More information about the dev mailing list