s->internal_flags &= ~(SERVICE_F_REGISTERED);
for (i = 0; i < RTE_MAX_LCORE; i++)
- lcore_states[i].service_mask &= ~(1 << service_id);
+ lcore_states[i].service_mask &= ~(UINT64_C(1) << service_id);
memset(&rte_services[service_id], 0,
sizeof(struct rte_service_spec_impl));
for (i = 0; i < rte_service_count; i++) {
struct rte_service_spec_impl *s = &rte_services[i];
if (s->runstate != RUNSTATE_RUNNING ||
- !(service_mask & (1 << i)))
+ !(service_mask & (UINT64_C(1) << i)))
continue;
/* check do we need cmpset, if MT safe or <= 1 core
if (!lcore_states[lcore].is_service_core)
return -EINVAL;
+ uint64_t sid_mask = UINT64_C(1) << sid;
if (set) {
if (*set) {
- lcore_states[lcore].service_mask |= (1 << sid);
+ lcore_states[lcore].service_mask |= sid_mask;
rte_services[sid].num_mapped_cores++;
} else {
- lcore_states[lcore].service_mask &= ~(1 << sid);
+ lcore_states[lcore].service_mask &= ~(sid_mask);
rte_services[sid].num_mapped_cores--;
}
}
if (enabled)
- *enabled = (lcore_states[lcore].service_mask & (1 << sid));
+ *enabled = (lcore_states[lcore].service_mask & (sid_mask));
rte_smp_wmb();
uint32_t i;
for (i = 0; i < RTE_SERVICE_NUM_MAX; i++) {
- int32_t enabled = lcore_states[i].service_mask & (1 << i);
+ int32_t enabled =
+ lcore_states[i].service_mask & (UINT64_C(1) << i);
int32_t service_running = rte_services[i].runstate !=
RUNSTATE_STOPPED;
int32_t only_core = rte_services[i].num_mapped_cores == 1;