Thread (82 messages) 82 messages, 5 authors, 2017-07-19

Re: [PATCH 3/6] service cores: EAL init changes

From: Van Haaren, Harry <hidden>
Date: 2017-06-29 11:14:15

-----Original Message-----
From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
<snip>
quoted
This commit shows the changes required in rte_eal_init()
to transparently launch the service threads. The threads
are launched into the service worker functions here because
after rte_eal_init() the application is not gauranteed to
call any other DPDK API.

As the registration of services happens at initialization
time, the services that require CPU time are already available
when we reach the end of rte_eal_init().

Signed-off-by: Harry van Haaren <redacted>
---
 lib/librte_eal/linuxapp/eal/eal.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
Need to add bsdapp implementation for the same.
Done.
quoted
+	/* initialize service core threads and default service-core mapping */
+	struct rte_config *config = rte_eal_get_configuration();
+	uint32_t service_cores[RTE_MAX_LCORE];
+	int count = rte_service_core_list(service_cores, RTE_MAX_LCORE);
+	for (i = 0; i < count; i++) {
+		config->lcore_role[service_cores[i]] = ROLE_SERVICE;
Can we move this change inside rte_service_core_start() itself?
otherwise every application needs to the same. Right?
Done, nice, this removes the requirement to access rte_config, which I didn't like having there.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help