From 8d01b9cd70a67cdafd5b965a70420c3bd7fb3f82 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 1 Nov 2018 11:59:50 +0000 Subject: New upstream version 18.11-rc1 Change-Id: Iaa71986dd6332e878d8f4bf493101b2bbc6313bb Signed-off-by: Luca Boccassi --- examples/service_cores/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples/service_cores/main.c') diff --git a/examples/service_cores/main.c b/examples/service_cores/main.c index 2cd57290..c7c79281 100644 --- a/examples/service_cores/main.c +++ b/examples/service_cores/main.c @@ -118,6 +118,12 @@ apply_profile(int profile_id) struct profile *p = &profiles[profile_id]; const uint8_t core_off = 1; + if (p->num_cores > rte_lcore_count() + 1) { + printf("insufficent cores to run (%s)", + p->name); + return; + } + for (i = 0; i < p->num_cores; i++) { uint32_t core = i + core_off; ret = rte_service_lcore_add(core); -- cgit 1.2.3-korg