diff options
author | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2016-07-06 09:22:35 +0200 |
---|---|---|
committer | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2016-07-06 16:15:13 +0200 |
commit | 809f08006d56e7ba4ce190b0a63d44acf62d8044 (patch) | |
tree | d93fbe3244ee0cff16a6af830c7efb15c26e5ef4 /app/test/test_timer.c | |
parent | b8ce7c38b99df118002fb460e680fabf16944f6c (diff) |
Imported Upstream version 16.07-rc1
Change-Id: If3f757dc95532706b04053286c6b54492169f1a3
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'app/test/test_timer.c')
-rw-r--r-- | app/test/test_timer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/test/test_timer.c b/app/test/test_timer.c index 944e2adc..bc07925e 100644 --- a/app/test/test_timer.c +++ b/app/test/test_timer.c @@ -137,7 +137,7 @@ #include <rte_random.h> #include <rte_malloc.h> -#define TEST_DURATION_S 20 /* in seconds */ +#define TEST_DURATION_S 1 /* in seconds */ #define NB_TIMER 4 #define RTE_LOGTYPE_TESTTIMER RTE_LOGTYPE_USER3 @@ -305,7 +305,7 @@ timer_stress2_main_loop(__attribute__((unused)) void *arg) { static struct rte_timer *timers; int i, ret; - uint64_t delay = rte_get_timer_hz() / 4; + uint64_t delay = rte_get_timer_hz() / 20; unsigned lcore_id = rte_lcore_id(); unsigned master = rte_get_master_lcore(); int32_t my_collisions = 0; @@ -346,7 +346,7 @@ timer_stress2_main_loop(__attribute__((unused)) void *arg) rte_atomic32_add(&collisions, my_collisions); /* wait long enough for timers to expire */ - rte_delay_ms(500); + rte_delay_ms(100); /* all cores rendezvous */ if (lcore_id == master) { @@ -396,7 +396,7 @@ timer_stress2_main_loop(__attribute__((unused)) void *arg) } /* wait long enough for timers to expire */ - rte_delay_ms(500); + rte_delay_ms(100); /* now check that we get the right number of callbacks */ if (lcore_id == master) { @@ -495,13 +495,13 @@ timer_basic_main_loop(__attribute__((unused)) void *arg) /* launch all timers on core 0 */ if (lcore_id == rte_get_master_lcore()) { - mytimer_reset(&mytiminfo[0], hz, SINGLE, lcore_id, + mytimer_reset(&mytiminfo[0], hz/4, SINGLE, lcore_id, timer_basic_cb); - mytimer_reset(&mytiminfo[1], hz*2, SINGLE, lcore_id, + mytimer_reset(&mytiminfo[1], hz/2, SINGLE, lcore_id, timer_basic_cb); - mytimer_reset(&mytiminfo[2], hz, PERIODICAL, lcore_id, + mytimer_reset(&mytiminfo[2], hz/4, PERIODICAL, lcore_id, timer_basic_cb); - mytimer_reset(&mytiminfo[3], hz, PERIODICAL, + mytimer_reset(&mytiminfo[3], hz/4, PERIODICAL, rte_get_next_lcore(lcore_id, 0, 1), timer_basic_cb); } @@ -591,7 +591,7 @@ test_timer(void) end_time = cur_time + (hz * TEST_DURATION_S); /* start other cores */ - printf("Start timer stress tests (%d seconds)\n", TEST_DURATION_S); + printf("Start timer stress tests\n"); rte_eal_mp_remote_launch(timer_stress_main_loop, NULL, CALL_MASTER); rte_eal_mp_wait_lcore(); @@ -612,7 +612,7 @@ test_timer(void) end_time = cur_time + (hz * TEST_DURATION_S); /* start other cores */ - printf("\nStart timer basic tests (%d seconds)\n", TEST_DURATION_S); + printf("\nStart timer basic tests\n"); rte_eal_mp_remote_launch(timer_basic_main_loop, NULL, CALL_MASTER); rte_eal_mp_wait_lcore(); |