#define NUM_TEST 3
unsigned int core_cnt[NUM_TEST] = {2, 4, 8};
-unsigned int slave_core_ids[RTE_MAX_LCORE];
+unsigned int worker_core_ids[RTE_MAX_LCORE];
struct perf {
uint32_t single_read;
uint32_t single_write;
static rte_atomic64_t gwrites;
static int
-test_hash_readwrite_worker(__attribute__((unused)) void *arg)
+test_hash_readwrite_worker(__rte_unused void *arg)
{
uint64_t i, offset;
uint32_t lcore_id = rte_lcore_id();
ret = rte_malloc(NULL, sizeof(int) *
tbl_rw_test_param.num_insert, 0);
for (i = 0; i < rte_lcore_count(); i++) {
- if (slave_core_ids[i] == lcore_id)
+ if (worker_core_ids[i] == lcore_id)
break;
}
offset = tbl_rw_test_param.num_insert * i;
uint32_t duplicated_keys = 0;
uint32_t lost_keys = 0;
int use_jhash = 1;
- int slave_cnt = rte_lcore_count() - 1;
+ int worker_cnt = rte_lcore_count() - 1;
uint32_t tot_insert = 0;
rte_atomic64_init(&gcycles);
tot_insert = TOTAL_INSERT;
tbl_rw_test_param.num_insert =
- tot_insert / slave_cnt;
+ tot_insert / worker_cnt;
tbl_rw_test_param.rounded_tot_insert =
- tbl_rw_test_param.num_insert
- * slave_cnt;
+ tbl_rw_test_param.num_insert * worker_cnt;
printf("\nHTM = %d, RW-LF = %d, EXT-Table = %d\n",
use_htm, use_rw_lf, use_ext);
/* Fire all threads. */
rte_eal_mp_remote_launch(test_hash_readwrite_worker,
- NULL, SKIP_MASTER);
+ NULL, SKIP_MAIN);
rte_eal_mp_wait_lcore();
while (rte_hash_iterate(tbl_rw_test_param.h, &next_key,
uint64_t offset;
for (i = 0; i < rte_lcore_count(); i++) {
- if (slave_core_ids[i] == lcore_id)
+ if (worker_core_ids[i] == lcore_id)
break;
}
perf_results->single_read = end / i;
for (n = 0; n < NUM_TEST; n++) {
- unsigned int tot_slave_lcore = rte_lcore_count() - 1;
- if (tot_slave_lcore < core_cnt[n] * 2)
+ unsigned int tot_worker_lcore = rte_lcore_count() - 1;
+ if (tot_worker_lcore < core_cnt[n] * 2)
goto finish;
rte_atomic64_clear(&greads);
for (i = 0; i < core_cnt[n]; i++)
rte_eal_remote_launch(test_rw_reader,
(void *)(uintptr_t)read_cnt,
- slave_core_ids[i]);
+ worker_core_ids[i]);
rte_eal_mp_wait_lcore();
for (; i < core_cnt[n] * 2; i++)
rte_eal_remote_launch(test_rw_writer,
(void *)((uintptr_t)start_coreid),
- slave_core_ids[i]);
+ worker_core_ids[i]);
rte_eal_mp_wait_lcore();
for (i = core_cnt[n]; i < core_cnt[n] * 2; i++)
rte_eal_remote_launch(test_rw_writer,
(void *)((uintptr_t)start_coreid),
- slave_core_ids[i]);
+ worker_core_ids[i]);
for (i = 0; i < core_cnt[n]; i++)
rte_eal_remote_launch(test_rw_reader,
(void *)(uintptr_t)read_cnt,
- slave_core_ids[i]);
+ worker_core_ids[i]);
} else {
for (i = 0; i < core_cnt[n]; i++)
rte_eal_remote_launch(test_rw_reader,
(void *)(uintptr_t)read_cnt,
- slave_core_ids[i]);
+ worker_core_ids[i]);
for (; i < core_cnt[n] * 2; i++)
rte_eal_remote_launch(test_rw_writer,
(void *)((uintptr_t)start_coreid),
- slave_core_ids[i]);
+ worker_core_ids[i]);
}
rte_eal_mp_wait_lcore();
return TEST_SKIPPED;
}
- RTE_LCORE_FOREACH_SLAVE(core_id) {
- slave_core_ids[i] = core_id;
+ RTE_LCORE_FOREACH_WORKER(core_id) {
+ worker_core_ids[i] = core_id;
i++;
}
return TEST_SKIPPED;
}
- RTE_LCORE_FOREACH_SLAVE(core_id) {
- slave_core_ids[i] = core_id;
+ RTE_LCORE_FOREACH_WORKER(core_id) {
+ worker_core_ids[i] = core_id;
i++;
}