| 522 | } |
| 523 | |
| 524 | static inline int |
| 525 | _arm_timers(uint64_t timeout_tcks, uint64_t timers) |
| 526 | { |
| 527 | uint64_t i; |
| 528 | struct rte_event_timer *ev_tim; |
| 529 | const struct rte_event_timer tim = { |
| 530 | .ev.op = RTE_EVENT_OP_NEW, |
| 531 | .ev.queue_id = 0, |
| 532 | .ev.sched_type = RTE_SCHED_TYPE_ATOMIC, |
| 533 | .ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL, |
| 534 | .ev.event_type = RTE_EVENT_TYPE_TIMER, |
| 535 | .state = RTE_EVENT_TIMER_NOT_ARMED, |
| 536 | .timeout_ticks = CALC_TICKS(timeout_tcks), |
| 537 | }; |
| 538 | |
| 539 | for (i = 0; i < timers; i++) { |
| 540 | |
| 541 | TEST_ASSERT_SUCCESS(rte_mempool_get(eventdev_test_mempool, |
| 542 | (void **)&ev_tim), |
| 543 | "mempool alloc failed"); |
| 544 | *ev_tim = tim; |
| 545 | ev_tim->ev.event_ptr = ev_tim; |
| 546 | |
| 547 | TEST_ASSERT_EQUAL(rte_event_timer_arm_burst(timdev, &ev_tim, |
| 548 | 1), 1, "Failed to arm timer %d", |
| 549 | rte_errno); |
| 550 | } |
| 551 | |
| 552 | return TEST_SUCCESS; |
| 553 | } |
| 554 | |
| 555 | static inline int |
| 556 | _wait_timer_triggers(uint64_t wait_sec, uint64_t arm_count, |
no test coverage detected