X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=app%2Ftest%2Ftest_timer_secondary.c;h=16a9f1878b7571647ac9116fd4d332bebc6980c8;hb=12b253ee876f3e687524a12fd670ffc65f0aed4d;hp=790f1805215215c9a732b4727ad0fdded3d03ae9;hpb=e0f4a0ed4237e273b78728b7c7a3bf71d2d5218f;p=dpdk.git diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c index 790f180521..16a9f1878b 100644 --- a/app/test/test_timer_secondary.c +++ b/app/test/test_timer_secondary.c @@ -23,11 +23,10 @@ #define TEST_INFO_MZ_NAME "test_timer_info_mz" #define MSECPERSEC 1E3 -#define launch_proc(ARGV) \ - process_dup(ARGV, sizeof(ARGV)/(sizeof(ARGV[0])), __func__) +#define launch_proc(ARGV) process_dup(ARGV, RTE_DIM(ARGV), __func__) struct test_info { - unsigned int mstr_lcore; + unsigned int main_lcore; unsigned int mgr_lcore; unsigned int sec_lcore; uint32_t timer_data_id; @@ -126,9 +125,9 @@ test_timer_secondary(void) mz = rte_memzone_reserve(TEST_INFO_MZ_NAME, sizeof(*test_info), SOCKET_ID_ANY, 0); - test_info = mz->addr; - TEST_ASSERT_NOT_NULL(test_info, "Couldn't allocate memory for " + TEST_ASSERT_NOT_NULL(mz, "Couldn't allocate memory for " "test data"); + test_info = mz->addr; test_info->tim_mempool = rte_mempool_create("test_timer_mp", NUM_TIMERS, sizeof(struct rte_timer), 0, 0, @@ -138,12 +137,12 @@ test_timer_secondary(void) TEST_ASSERT_SUCCESS(ret, "Failed to allocate timer data " "instance"); - unsigned int *mstr_lcorep = &test_info->mstr_lcore; + unsigned int *main_lcorep = &test_info->main_lcore; unsigned int *mgr_lcorep = &test_info->mgr_lcore; unsigned int *sec_lcorep = &test_info->sec_lcore; - *mstr_lcorep = rte_get_master_lcore(); - *mgr_lcorep = rte_get_next_lcore(*mstr_lcorep, 1, 1); + *main_lcorep = rte_get_main_lcore(); + *mgr_lcorep = rte_get_next_lcore(*main_lcorep, 1, 1); *sec_lcorep = rte_get_next_lcore(*mgr_lcorep, 1, 1); ret = rte_eal_remote_launch(timer_manage_loop, @@ -172,9 +171,9 @@ test_timer_secondary(void) int i; mz = rte_memzone_lookup(TEST_INFO_MZ_NAME); - test_info = mz->addr; - TEST_ASSERT_NOT_NULL(test_info, "Couldn't lookup memzone for " + TEST_ASSERT_NOT_NULL(mz, "Couldn't lookup memzone for " "test info"); + test_info = mz->addr; for (i = 0; i < NUM_TIMERS; i++) { rte_mempool_get(test_info->tim_mempool, (void **)&tim);