struct thread_params *p)
{
int ret;
- const unsigned int iter_shift = 23;
+ const unsigned int iter_shift = 15;
const unsigned int iterations = 1 << iter_shift;
struct rte_ring *r = p->r;
unsigned int bsize = p->size;
return 0;
}
-static rte_atomic32_t synchro;
+static uint32_t synchro;
static uint64_t queue_count[RTE_MAX_LCORE];
#define TIME_MS 100
/* wait synchro for workers */
if (lcore != rte_get_main_lcore())
- while (rte_atomic32_read(&synchro) == 0)
- rte_pause();
+ rte_wait_until_equal_32(&synchro, 1, __ATOMIC_RELAXED);
begin = rte_get_timer_cycles();
while (time_diff < hz * TIME_MS / 1000) {
param.r = r;
/* clear synchro and start workers */
- rte_atomic32_set(&synchro, 0);
+ __atomic_store_n(&synchro, 0, __ATOMIC_RELAXED);
if (rte_eal_mp_remote_launch(lcore_f, ¶m, SKIP_MAIN) < 0)
return -1;
/* start synchro and launch test on main */
- rte_atomic32_set(&synchro, 1);
+ __atomic_store_n(&synchro, 1, __ATOMIC_RELAXED);
lcore_f(¶m);
rte_eal_mp_wait_lcore();