Neat example. Looks good overall, I just have a few questions. > +#define PROFILE_SERVICE_PER_CORE 8
Any reason not to use 5 here? That would remove a few zeroes from the profiles[] initializers. > +static int > +apply_profile(int profile_id) > +{ > + uint32_t i; > + uint32_t s; > + int ret; > + struct profile *p = &profiles[profile_id]; > + const uint8_t core_off = 1; > + > + for (i = 0; i < p->num_cores; i++) { > + ret = rte_service_lcore_add(i + core_off); > + if (ret && ret != -EALREADY) > + printf("core %d added ret %d\n", i + > core_off, ret); I'm wondering if this and the other printfs in this function should be rte_panics? These seem like fatal errors. > + > + ret = rte_service_lcore_start(i + core_off); > + if (ret && ret != -EALREADY) > + printf("core %d start ret %d\n", i + > core_off, ret); > + > + for (s = 0; s < NUM_SERVICES; s++) { > + if (rte_service_map_lcore_set(s, i + > core_off, > + > p->cores[i].mapped_services[s])) > + rte_panic("failed to > map lcore to 1\n"); What does '1' refer to here? Perhaps it should be: rte_panic("failed to map lcore %d to %s\n", i + core_off, services[s].name);