43 #include <rte_config.h>
52 #define LCORE_ID_ANY UINT32_MAX
54 #if defined(__linux__)
55 typedef cpu_set_t rte_cpuset_t;
56 #elif defined(__FreeBSD__)
57 #include <pthread_np.h>
58 typedef cpuset_t rte_cpuset_t;
93 static inline unsigned
105 static inline unsigned
117 static inline unsigned
136 if (lcore_id >= RTE_MAX_LCORE)
159 static inline unsigned
178 if (lcore_id >= RTE_MAX_LCORE)
196 static inline unsigned
203 while (i < RTE_MAX_LCORE) {
218 #define RTE_LCORE_FOREACH(i) \
219 for (i = rte_get_next_lcore(-1, 0, 0); \
221 i = rte_get_next_lcore(i, 0, 0))
226 #define RTE_LCORE_FOREACH_SLAVE(i) \
227 for (i = rte_get_next_lcore(-1, 1, 0); \
229 i = rte_get_next_lcore(i, 1, 0))
void rte_thread_get_affinity(rte_cpuset_t *cpusetp)
static unsigned rte_lcore_to_socket_id(unsigned lcore_id)
static int rte_lcore_index(int lcore_id)
int rte_thread_setname(pthread_t id, const char *name)
static unsigned rte_lcore_count(void)
int rte_lcore_has_role(unsigned int lcore_id, enum rte_lcore_role_t role)
static int rte_lcore_is_enabled(unsigned lcore_id)
enum rte_lcore_state_t state
static unsigned rte_lcore_id(void)
enum rte_lcore_role_t lcore_role[RTE_MAX_LCORE]
struct rte_config * rte_eal_get_configuration(void)
lcore_function_t *volatile f
static unsigned rte_get_master_lcore(void)
int( lcore_function_t)(void *)
#define RTE_PER_LCORE(name)
RTE_DECLARE_PER_LCORE(unsigned, _lcore_id)
int rte_thread_set_affinity(rte_cpuset_t *cpusetp)
unsigned rte_socket_id(void)
static unsigned rte_get_next_lcore(unsigned i, int skip_master, int wrap)