socket_id = eal_cpu_socket_id(lcore_id);
lcore_to_socket_id[lcore_id] = socket_id;
- /* in 1:1 mapping, record related cpu detected state */
- lcore_config[lcore_id].detected = eal_cpu_detected(lcore_id);
- if (lcore_config[lcore_id].detected == 0) {
+ if (eal_cpu_detected(lcore_id) == 0) {
config->lcore_role[lcore_id] = ROLE_OFF;
lcore_config[lcore_id].core_index = -1;
continue;
return -1;
}
- if (!lcore_config[idx].detected) {
+ if (eal_cpu_detected(idx) == 0) {
RTE_LOG(ERR, EAL,
"lcore %u unavailable\n", idx);
return -1;
for (i = 0; i < RTE_MAX_LCORE; i++) {
if (cores[i] != -1) {
- if (!lcore_config[i].detected) {
+ if (eal_cpu_detected(i) == 0) {
RTE_LOG(ERR, EAL, "lcore %u unavailable\n", i);
ret = -1;
continue;
if (!set[idx])
continue;
- if (!lcore_config[idx].detected) {
+ if (eal_cpu_detected(idx) == 0) {
RTE_LOG(ERR, EAL, "core %u "
"unavailable\n", idx);
return -1;
/* find the first available cpu */
for (idx = 0; idx < RTE_MAX_LCORE; idx++) {
- if (!lcore_config[idx].detected)
+ if (eal_cpu_detected(idx) == 0)
continue;
break;
}
sequence = 0;
for (idx++ ; idx < RTE_MAX_LCORE; idx++) {
- if (!lcore_config[idx].detected)
+ if (eal_cpu_detected(idx) == 0)
continue;
if (idx == previous + 1) {
unsigned int core_id; /**< core number on socket for this lcore */
int core_index; /**< relative index, starting from 0 */
uint8_t core_role; /**< role of core eg: OFF, RTE, SERVICE */
- uint8_t detected; /**< true if lcore was detected */
rte_cpuset_t cpuset; /**< cpu set which the lcore affinity to */
};