#include <rte_version.h>
#include <rte_atomic.h>
#include <malloc_heap.h>
-#include <rte_eth_ring.h>
#include "eal_private.h"
#include "eal_thread.h"
struct shared_driver *solib = NULL;
const char *logid;
char cpuset[RTE_CPU_AFFINITY_STR_LEN];
+ char thread_name[RTE_MAX_THREAD_NAME_LEN];
if (!rte_atomic32_test_and_set(&run_once))
return -1;
if (rte_eal_alarm_init() < 0)
rte_panic("Cannot init interrupt-handling thread\n");
- if (rte_eal_intr_init() < 0)
- rte_panic("Cannot init interrupt-handling thread\n");
-
if (rte_eal_timer_init() < 0)
rte_panic("Cannot init HPET or TSC timers\n");
rte_eal_mcfg_complete();
TAILQ_FOREACH(solib, &solib_list, next) {
- RTE_LOG(INFO, EAL, "open shared lib %s\n", solib->name);
+ RTE_LOG(DEBUG, EAL, "open shared lib %s\n", solib->name);
solib->lib_handle = dlopen(solib->name, RTLD_NOW);
if (solib->lib_handle == NULL)
RTE_LOG(WARNING, EAL, "%s\n", dlerror());
if (rte_eal_dev_init() < 0)
rte_panic("Cannot init pmd devices\n");
+ if (rte_eal_intr_init() < 0)
+ rte_panic("Cannot init interrupt-handling thread\n");
+
RTE_LCORE_FOREACH_SLAVE(i) {
/*
eal_thread_loop, NULL);
if (ret != 0)
rte_panic("Cannot create thread\n");
+
+ /* Set thread_name for aid in debugging. */
+ snprintf(thread_name, RTE_MAX_THREAD_NAME_LEN,
+ "lcore-slave-%d", i);
+ ret = pthread_setname_np(lcore_config[i].thread_id,
+ thread_name);
+ if (ret != 0)
+ RTE_LOG(ERR, EAL,
+ "Cannot set name for lcore thread\n");
}
/*
enum rte_lcore_role_t
rte_eal_lcore_role(unsigned lcore_id)
{
- return (rte_config.lcore_role[lcore_id]);
+ return rte_config.lcore_role[lcore_id];
}
enum rte_proc_type_t
rte_eal_process_type(void)
{
- return (rte_config.process_type);
+ return rte_config.process_type;
}
int rte_eal_has_hugepages(void)