47 #include <sys/queue.h>
59 #define RTE_TAILQ_NAMESIZE 32
71 char name[RTE_TAILQ_NAMESIZE];
74 struct rte_tailq_elem {
80 TAILQ_ENTRY(rte_tailq_elem) next;
81 const
char name[RTE_TAILQ_NAMESIZE];
87 #define RTE_TAILQ_CAST(tailq_entry, struct_name) \
88 (struct struct_name *)&(tailq_entry)->tailq_head
106 #define RTE_TAILQ_LOOKUP(name, struct_name) \
107 RTE_TAILQ_CAST(rte_eal_tailq_lookup(name), struct_name)
150 #define EAL_REGISTER_TAILQ(t) \
151 RTE_INIT(tailqinitfn_ ##t); \
152 static void tailqinitfn_ ##t(void) \
154 if (rte_eal_tailq_register(&t) < 0) \
155 rte_panic("Cannot initialize tailq: %s\n", t.name); \
159 #ifndef TAILQ_FOREACH_SAFE
160 #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
161 for ((var) = TAILQ_FIRST((head)); \
162 (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \