#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <sys/queue.h>
#define TIMER_RESOLUTION_CYCLES 20000000ULL
static void
timer0_cb(__attribute__((unused))
struct rte_timer *tim,
__attribute__((unused))
void *
arg)
{
static unsigned counter = 0;
printf("%s() on lcore %u\n", __func__, lcore_id);
if ((counter ++) == 20)
}
static void
timer1_cb(__attribute__((unused))
struct rte_timer *tim,
__attribute__((unused))
void *
arg)
{
uint64_t hz;
printf("%s() on lcore %u\n", __func__, lcore_id);
}
static __attribute__((noreturn)) int
lcore_mainloop(__attribute__((unused))
void *
arg)
{
uint64_t prev_tsc = 0, cur_tsc, diff_tsc;
unsigned lcore_id;
printf("Starting mainloop on core %u\n", lcore_id);
while (1) {
cur_tsc = rte_rdtsc();
diff_tsc = cur_tsc - prev_tsc;
if (diff_tsc > TIMER_RESOLUTION_CYCLES) {
prev_tsc = cur_tsc;
}
}
}
int
main(int argc, char **argv)
{
int ret;
uint64_t hz;
unsigned lcore_id;
if (ret < 0)
}
(void) lcore_mainloop(NULL);
return 0;
}