test/eventdev: add octeontx multi queue and multi port
[dpdk.git] / test / test / test_eventdev_octeontx.c
1 /*-
2  *   BSD LICENSE
3  *
4  *   Copyright(c) 2017 Cavium networks. All rights reserved.
5  *
6  *   Redistribution and use in source and binary forms, with or without
7  *   modification, are permitted provided that the following conditions
8  *   are met:
9  *
10  *       * Redistributions of source code must retain the above copyright
11  *         notice, this list of conditions and the following disclaimer.
12  *       * Redistributions in binary form must reproduce the above copyright
13  *         notice, this list of conditions and the following disclaimer in
14  *         the documentation and/or other materials provided with the
15  *         distribution.
16  *       * Neither the name of Cavium networks nor the names of its
17  *         contributors may be used to endorse or promote products derived
18  *         from this software without specific prior written permission.
19  *
20  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32
33 #include <rte_atomic.h>
34 #include <rte_common.h>
35 #include <rte_cycles.h>
36 #include <rte_debug.h>
37 #include <rte_eal.h>
38 #include <rte_ethdev.h>
39 #include <rte_eventdev.h>
40 #include <rte_hexdump.h>
41 #include <rte_mbuf.h>
42 #include <rte_malloc.h>
43 #include <rte_memcpy.h>
44 #include <rte_launch.h>
45 #include <rte_lcore.h>
46 #include <rte_per_lcore.h>
47 #include <rte_random.h>
48
49 #include "test.h"
50
51 #define NUM_PACKETS (1 << 18)
52 #define MAX_EVENTS  (16 * 1024)
53
54 static int evdev;
55 static struct rte_mempool *eventdev_test_mempool;
56
57 struct event_attr {
58         uint32_t flow_id;
59         uint8_t event_type;
60         uint8_t sub_event_type;
61         uint8_t sched_type;
62         uint8_t queue;
63         uint8_t port;
64 };
65
66 static uint32_t seqn_list_index;
67 static int seqn_list[NUM_PACKETS];
68
69 static inline void
70 seqn_list_init(void)
71 {
72         RTE_BUILD_BUG_ON(NUM_PACKETS < MAX_EVENTS);
73         memset(seqn_list, 0, sizeof(seqn_list));
74         seqn_list_index = 0;
75 }
76
77
78 struct test_core_param {
79         rte_atomic32_t *total_events;
80         uint64_t dequeue_tmo_ticks;
81         uint8_t port;
82         uint8_t sched_type;
83 };
84
85 static int
86 testsuite_setup(void)
87 {
88         const char *eventdev_name = "event_octeontx";
89
90         evdev = rte_event_dev_get_dev_id(eventdev_name);
91         if (evdev < 0) {
92                 printf("%d: Eventdev %s not found - creating.\n",
93                                 __LINE__, eventdev_name);
94                 if (rte_eal_vdev_init(eventdev_name, NULL) < 0) {
95                         printf("Error creating eventdev %s\n", eventdev_name);
96                         return TEST_FAILED;
97                 }
98                 evdev = rte_event_dev_get_dev_id(eventdev_name);
99                 if (evdev < 0) {
100                         printf("Error finding newly created eventdev\n");
101                         return TEST_FAILED;
102                 }
103         }
104
105         return TEST_SUCCESS;
106 }
107
108 static void
109 testsuite_teardown(void)
110 {
111         rte_event_dev_close(evdev);
112 }
113
114 static inline void
115 devconf_set_default_sane_values(struct rte_event_dev_config *dev_conf,
116                         struct rte_event_dev_info *info)
117 {
118         memset(dev_conf, 0, sizeof(struct rte_event_dev_config));
119         dev_conf->dequeue_timeout_ns = info->min_dequeue_timeout_ns;
120         dev_conf->nb_event_ports = info->max_event_ports;
121         dev_conf->nb_event_queues = info->max_event_queues;
122         dev_conf->nb_event_queue_flows = info->max_event_queue_flows;
123         dev_conf->nb_event_port_dequeue_depth =
124                         info->max_event_port_dequeue_depth;
125         dev_conf->nb_event_port_enqueue_depth =
126                         info->max_event_port_enqueue_depth;
127         dev_conf->nb_event_port_enqueue_depth =
128                         info->max_event_port_enqueue_depth;
129         dev_conf->nb_events_limit =
130                         info->max_num_events;
131 }
132
133 enum {
134         TEST_EVENTDEV_SETUP_DEFAULT,
135         TEST_EVENTDEV_SETUP_PRIORITY,
136         TEST_EVENTDEV_SETUP_DEQUEUE_TIMEOUT,
137 };
138
139 static inline int
140 _eventdev_setup(int mode)
141 {
142         int i, ret;
143         struct rte_event_dev_config dev_conf;
144         struct rte_event_dev_info info;
145         const char *pool_name = "evdev_octeontx_test_pool";
146
147         /* Create and destrory pool for each test case to make it standalone */
148         eventdev_test_mempool = rte_pktmbuf_pool_create(pool_name,
149                                         MAX_EVENTS,
150                                         0 /*MBUF_CACHE_SIZE*/,
151                                         0,
152                                         512, /* Use very small mbufs */
153                                         rte_socket_id());
154         if (!eventdev_test_mempool) {
155                 printf("ERROR creating mempool\n");
156                 return TEST_FAILED;
157         }
158
159         ret = rte_event_dev_info_get(evdev, &info);
160         TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info");
161         TEST_ASSERT(info.max_num_events >= (int32_t)MAX_EVENTS,
162                         "max_num_events=%d < max_events=%d",
163                         info.max_num_events, MAX_EVENTS);
164
165         devconf_set_default_sane_values(&dev_conf, &info);
166         if (mode == TEST_EVENTDEV_SETUP_DEQUEUE_TIMEOUT)
167                 dev_conf.event_dev_cfg |= RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT;
168
169         ret = rte_event_dev_configure(evdev, &dev_conf);
170         TEST_ASSERT_SUCCESS(ret, "Failed to configure eventdev");
171
172         if (mode == TEST_EVENTDEV_SETUP_PRIORITY) {
173                 /* Configure event queues(0 to n) with
174                  * RTE_EVENT_DEV_PRIORITY_HIGHEST to
175                  * RTE_EVENT_DEV_PRIORITY_LOWEST
176                  */
177                 uint8_t step = (RTE_EVENT_DEV_PRIORITY_LOWEST + 1) /
178                                 rte_event_queue_count(evdev);
179                 for (i = 0; i < rte_event_queue_count(evdev); i++) {
180                         struct rte_event_queue_conf queue_conf;
181
182                         ret = rte_event_queue_default_conf_get(evdev, i,
183                                                 &queue_conf);
184                         TEST_ASSERT_SUCCESS(ret, "Failed to get def_conf%d", i);
185                         queue_conf.priority = i * step;
186                         ret = rte_event_queue_setup(evdev, i, &queue_conf);
187                         TEST_ASSERT_SUCCESS(ret, "Failed to setup queue=%d", i);
188                 }
189
190         } else {
191                 /* Configure event queues with default priority */
192                 for (i = 0; i < rte_event_queue_count(evdev); i++) {
193                         ret = rte_event_queue_setup(evdev, i, NULL);
194                         TEST_ASSERT_SUCCESS(ret, "Failed to setup queue=%d", i);
195                 }
196         }
197         /* Configure event ports */
198         for (i = 0; i < rte_event_port_count(evdev); i++) {
199                 ret = rte_event_port_setup(evdev, i, NULL);
200                 TEST_ASSERT_SUCCESS(ret, "Failed to setup port=%d", i);
201                 ret = rte_event_port_link(evdev, i, NULL, NULL, 0);
202                 TEST_ASSERT(ret >= 0, "Failed to link all queues port=%d", i);
203         }
204
205         ret = rte_event_dev_start(evdev);
206         TEST_ASSERT_SUCCESS(ret, "Failed to start device");
207
208         return TEST_SUCCESS;
209 }
210
211 static inline int
212 eventdev_setup(void)
213 {
214         return _eventdev_setup(TEST_EVENTDEV_SETUP_DEFAULT);
215 }
216
217 static inline int
218 eventdev_setup_priority(void)
219 {
220         return _eventdev_setup(TEST_EVENTDEV_SETUP_PRIORITY);
221 }
222
223 static inline void
224 eventdev_teardown(void)
225 {
226         rte_event_dev_stop(evdev);
227         rte_mempool_free(eventdev_test_mempool);
228 }
229
230 static inline void
231 update_event_and_validation_attr(struct rte_mbuf *m, struct rte_event *ev,
232                         uint32_t flow_id, uint8_t event_type,
233                         uint8_t sub_event_type, uint8_t sched_type,
234                         uint8_t queue, uint8_t port)
235 {
236         struct event_attr *attr;
237
238         /* Store the event attributes in mbuf for future reference */
239         attr = rte_pktmbuf_mtod(m, struct event_attr *);
240         attr->flow_id = flow_id;
241         attr->event_type = event_type;
242         attr->sub_event_type = sub_event_type;
243         attr->sched_type = sched_type;
244         attr->queue = queue;
245         attr->port = port;
246
247         ev->flow_id = flow_id;
248         ev->sub_event_type = sub_event_type;
249         ev->event_type = event_type;
250         /* Inject the new event */
251         ev->op = RTE_EVENT_OP_NEW;
252         ev->sched_type = sched_type;
253         ev->queue_id = queue;
254         ev->mbuf = m;
255 }
256
257 static inline int
258 inject_events(uint32_t flow_id, uint8_t event_type, uint8_t sub_event_type,
259                 uint8_t sched_type, uint8_t queue, uint8_t port,
260                 unsigned int events)
261 {
262         struct rte_mbuf *m;
263         unsigned int i;
264
265         for (i = 0; i < events; i++) {
266                 struct rte_event ev = {.event = 0, .u64 = 0};
267
268                 m = rte_pktmbuf_alloc(eventdev_test_mempool);
269                 TEST_ASSERT_NOT_NULL(m, "mempool alloc failed");
270
271                 m->seqn = i;
272                 update_event_and_validation_attr(m, &ev, flow_id, event_type,
273                         sub_event_type, sched_type, queue, port);
274                 rte_event_enqueue_burst(evdev, port, &ev, 1);
275         }
276         return 0;
277 }
278
279 static inline int
280 check_excess_events(uint8_t port)
281 {
282         int i;
283         uint16_t valid_event;
284         struct rte_event ev;
285
286         /* Check for excess events, try for a few times and exit */
287         for (i = 0; i < 32; i++) {
288                 valid_event = rte_event_dequeue_burst(evdev, port, &ev, 1, 0);
289
290                 TEST_ASSERT_SUCCESS(valid_event, "Unexpected valid event=%d",
291                                         ev.mbuf->seqn);
292         }
293         return 0;
294 }
295
296 static inline int
297 generate_random_events(const unsigned int total_events)
298 {
299         struct rte_event_dev_info info;
300         unsigned int i;
301         int ret;
302
303         ret = rte_event_dev_info_get(evdev, &info);
304         TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info");
305         for (i = 0; i < total_events; i++) {
306                 ret = inject_events(
307                         rte_rand() % info.max_event_queue_flows /*flow_id */,
308                         rte_rand() % (RTE_EVENT_TYPE_CPU + 1) /* event_type */,
309                         rte_rand() % 256 /* sub_event_type */,
310                         rte_rand() % (RTE_SCHED_TYPE_PARALLEL + 1),
311                         rte_rand() % rte_event_queue_count(evdev) /* queue */,
312                         0 /* port */,
313                         1 /* events */);
314                 if (ret)
315                         return TEST_FAILED;
316         }
317         return ret;
318 }
319
320
321 static inline int
322 validate_event(struct rte_event *ev)
323 {
324         struct event_attr *attr;
325
326         attr = rte_pktmbuf_mtod(ev->mbuf, struct event_attr *);
327         TEST_ASSERT_EQUAL(attr->flow_id, ev->flow_id,
328                         "flow_id mismatch enq=%d deq =%d",
329                         attr->flow_id, ev->flow_id);
330         TEST_ASSERT_EQUAL(attr->event_type, ev->event_type,
331                         "event_type mismatch enq=%d deq =%d",
332                         attr->event_type, ev->event_type);
333         TEST_ASSERT_EQUAL(attr->sub_event_type, ev->sub_event_type,
334                         "sub_event_type mismatch enq=%d deq =%d",
335                         attr->sub_event_type, ev->sub_event_type);
336         TEST_ASSERT_EQUAL(attr->sched_type, ev->sched_type,
337                         "sched_type mismatch enq=%d deq =%d",
338                         attr->sched_type, ev->sched_type);
339         TEST_ASSERT_EQUAL(attr->queue, ev->queue_id,
340                         "queue mismatch enq=%d deq =%d",
341                         attr->queue, ev->queue_id);
342         return 0;
343 }
344
345 typedef int (*validate_event_cb)(uint32_t index, uint8_t port,
346                                  struct rte_event *ev);
347
348 static inline int
349 consume_events(uint8_t port, const uint32_t total_events, validate_event_cb fn)
350 {
351         int ret;
352         uint16_t valid_event;
353         uint32_t events = 0, forward_progress_cnt = 0, index = 0;
354         struct rte_event ev;
355
356         while (1) {
357                 if (++forward_progress_cnt > UINT16_MAX) {
358                         printf("Detected deadlock\n");
359                         return TEST_FAILED;
360                 }
361
362                 valid_event = rte_event_dequeue_burst(evdev, port, &ev, 1, 0);
363                 if (!valid_event)
364                         continue;
365
366                 forward_progress_cnt = 0;
367                 ret = validate_event(&ev);
368                 if (ret)
369                         return TEST_FAILED;
370
371                 if (fn != NULL) {
372                         ret = fn(index, port, &ev);
373                         TEST_ASSERT_SUCCESS(ret,
374                                 "Failed to validate test specific event");
375                 }
376
377                 ++index;
378
379                 rte_pktmbuf_free(ev.mbuf);
380                 if (++events >= total_events)
381                         break;
382         }
383
384         return check_excess_events(port);
385 }
386
387 static int
388 validate_simple_enqdeq(uint32_t index, uint8_t port, struct rte_event *ev)
389 {
390         RTE_SET_USED(port);
391         TEST_ASSERT_EQUAL(index, ev->mbuf->seqn, "index=%d != seqn=%d", index,
392                                         ev->mbuf->seqn);
393         return 0;
394 }
395
396 static inline int
397 test_simple_enqdeq(uint8_t sched_type)
398 {
399         int ret;
400
401         ret = inject_events(0 /*flow_id */,
402                                 RTE_EVENT_TYPE_CPU /* event_type */,
403                                 0 /* sub_event_type */,
404                                 sched_type,
405                                 0 /* queue */,
406                                 0 /* port */,
407                                 MAX_EVENTS);
408         if (ret)
409                 return TEST_FAILED;
410
411         return consume_events(0 /* port */, MAX_EVENTS, validate_simple_enqdeq);
412 }
413
414 static int
415 test_simple_enqdeq_ordered(void)
416 {
417         return test_simple_enqdeq(RTE_SCHED_TYPE_ORDERED);
418 }
419
420 static int
421 test_simple_enqdeq_atomic(void)
422 {
423         return test_simple_enqdeq(RTE_SCHED_TYPE_ATOMIC);
424 }
425
426 static int
427 test_simple_enqdeq_parallel(void)
428 {
429         return test_simple_enqdeq(RTE_SCHED_TYPE_PARALLEL);
430 }
431
432 /*
433  * Generate a prescribed number of events and spread them across available
434  * queues. On dequeue, using single event port(port 0) verify the enqueued
435  * event attributes
436  */
437 static int
438 test_multi_queue_enq_single_port_deq(void)
439 {
440         int ret;
441
442         ret = generate_random_events(MAX_EVENTS);
443         if (ret)
444                 return TEST_FAILED;
445
446         return consume_events(0 /* port */, MAX_EVENTS, NULL);
447 }
448
449 /*
450  * Inject 0..MAX_EVENTS events over 0..rte_event_queue_count() with modulus
451  * operation
452  *
453  * For example, Inject 32 events over 0..7 queues
454  * enqueue events 0, 8, 16, 24 in queue 0
455  * enqueue events 1, 9, 17, 25 in queue 1
456  * ..
457  * ..
458  * enqueue events 7, 15, 23, 31 in queue 7
459  *
460  * On dequeue, Validate the events comes in 0,8,16,24,1,9,17,25..,7,15,23,31
461  * order from queue0(highest priority) to queue7(lowest_priority)
462  */
463 static int
464 validate_queue_priority(uint32_t index, uint8_t port, struct rte_event *ev)
465 {
466         uint32_t range = MAX_EVENTS / rte_event_queue_count(evdev);
467         uint32_t expected_val = (index % range) * rte_event_queue_count(evdev);
468
469         expected_val += ev->queue_id;
470         RTE_SET_USED(port);
471         TEST_ASSERT_EQUAL(ev->mbuf->seqn, expected_val,
472         "seqn=%d index=%d expected=%d range=%d nb_queues=%d max_event=%d",
473                         ev->mbuf->seqn, index, expected_val, range,
474                         rte_event_queue_count(evdev), MAX_EVENTS);
475         return 0;
476 }
477
478 static int
479 test_multi_queue_priority(void)
480 {
481         uint8_t queue;
482         struct rte_mbuf *m;
483         int i, max_evts_roundoff;
484
485         /* See validate_queue_priority() comments for priority validate logic */
486         max_evts_roundoff  = MAX_EVENTS / rte_event_queue_count(evdev);
487         max_evts_roundoff *= rte_event_queue_count(evdev);
488
489         for (i = 0; i < max_evts_roundoff; i++) {
490                 struct rte_event ev = {.event = 0, .u64 = 0};
491
492                 m = rte_pktmbuf_alloc(eventdev_test_mempool);
493                 TEST_ASSERT_NOT_NULL(m, "mempool alloc failed");
494
495                 m->seqn = i;
496                 queue = i % rte_event_queue_count(evdev);
497                 update_event_and_validation_attr(m, &ev, 0, RTE_EVENT_TYPE_CPU,
498                         0, RTE_SCHED_TYPE_PARALLEL, queue, 0);
499                 rte_event_enqueue_burst(evdev, 0, &ev, 1);
500         }
501
502         return consume_events(0, max_evts_roundoff, validate_queue_priority);
503 }
504
505 static int
506 worker_multi_port_fn(void *arg)
507 {
508         struct test_core_param *param = arg;
509         struct rte_event ev;
510         uint16_t valid_event;
511         uint8_t port = param->port;
512         rte_atomic32_t *total_events = param->total_events;
513         int ret;
514
515         while (rte_atomic32_read(total_events) > 0) {
516                 valid_event = rte_event_dequeue_burst(evdev, port, &ev, 1, 0);
517                 if (!valid_event)
518                         continue;
519
520                 ret = validate_event(&ev);
521                 TEST_ASSERT_SUCCESS(ret, "Failed to validate event");
522                 rte_pktmbuf_free(ev.mbuf);
523                 rte_atomic32_sub(total_events, 1);
524         }
525         return 0;
526 }
527
528 static inline int
529 wait_workers_to_join(int lcore, const rte_atomic32_t *count)
530 {
531         uint64_t cycles, print_cycles;
532
533         print_cycles = cycles = rte_get_timer_cycles();
534         while (rte_eal_get_lcore_state(lcore) != FINISHED) {
535                 uint64_t new_cycles = rte_get_timer_cycles();
536
537                 if (new_cycles - print_cycles > rte_get_timer_hz()) {
538                         printf("\r%s: events %d\n", __func__,
539                                 rte_atomic32_read(count));
540                         print_cycles = new_cycles;
541                 }
542                 if (new_cycles - cycles > rte_get_timer_hz() * 10) {
543                         printf("%s: No schedules for seconds, deadlock (%d)\n",
544                                 __func__,
545                                 rte_atomic32_read(count));
546                         rte_event_dev_dump(evdev, stdout);
547                         cycles = new_cycles;
548                         return TEST_FAILED;
549                 }
550         }
551         rte_eal_mp_wait_lcore();
552         return TEST_SUCCESS;
553 }
554
555
556 static inline int
557 launch_workers_and_wait(int (*master_worker)(void *),
558                         int (*slave_workers)(void *), uint32_t total_events,
559                         uint8_t nb_workers, uint8_t sched_type)
560 {
561         uint8_t port = 0;
562         int w_lcore;
563         int ret;
564         struct test_core_param *param;
565         rte_atomic32_t atomic_total_events;
566         uint64_t dequeue_tmo_ticks;
567
568         if (!nb_workers)
569                 return 0;
570
571         rte_atomic32_set(&atomic_total_events, total_events);
572         seqn_list_init();
573
574         param = malloc(sizeof(struct test_core_param) * nb_workers);
575         if (!param)
576                 return TEST_FAILED;
577
578         ret = rte_event_dequeue_timeout_ticks(evdev,
579                 rte_rand() % 10000000/* 10ms */, &dequeue_tmo_ticks);
580         if (ret)
581                 return TEST_FAILED;
582
583         param[0].total_events = &atomic_total_events;
584         param[0].sched_type = sched_type;
585         param[0].port = 0;
586         param[0].dequeue_tmo_ticks = dequeue_tmo_ticks;
587         rte_smp_wmb();
588
589         w_lcore = rte_get_next_lcore(
590                         /* start core */ -1,
591                         /* skip master */ 1,
592                         /* wrap */ 0);
593         rte_eal_remote_launch(master_worker, &param[0], w_lcore);
594
595         for (port = 1; port < nb_workers; port++) {
596                 param[port].total_events = &atomic_total_events;
597                 param[port].sched_type = sched_type;
598                 param[port].port = port;
599                 param[port].dequeue_tmo_ticks = dequeue_tmo_ticks;
600                 rte_smp_wmb();
601                 w_lcore = rte_get_next_lcore(w_lcore, 1, 0);
602                 rte_eal_remote_launch(slave_workers, &param[port], w_lcore);
603         }
604
605         ret = wait_workers_to_join(w_lcore, &atomic_total_events);
606         free(param);
607         return ret;
608 }
609
610 /*
611  * Generate a prescribed number of events and spread them across available
612  * queues. Dequeue the events through multiple ports and verify the enqueued
613  * event attributes
614  */
615 static int
616 test_multi_queue_enq_multi_port_deq(void)
617 {
618         const unsigned int total_events = MAX_EVENTS;
619         uint8_t nr_ports;
620         int ret;
621
622         ret = generate_random_events(total_events);
623         if (ret)
624                 return TEST_FAILED;
625
626         nr_ports = RTE_MIN(rte_event_port_count(evdev), rte_lcore_count() - 1);
627
628         if (!nr_ports) {
629                 printf("%s: Not enough ports=%d or workers=%d\n", __func__,
630                         rte_event_port_count(evdev), rte_lcore_count() - 1);
631                 return TEST_SUCCESS;
632         }
633
634         return launch_workers_and_wait(worker_multi_port_fn,
635                                         worker_multi_port_fn, total_events,
636                                         nr_ports, 0xff /* invalid */);
637 }
638
639 static struct unit_test_suite eventdev_octeontx_testsuite  = {
640         .suite_name = "eventdev octeontx unit test suite",
641         .setup = testsuite_setup,
642         .teardown = testsuite_teardown,
643         .unit_test_cases = {
644                 TEST_CASE_ST(eventdev_setup, eventdev_teardown,
645                         test_simple_enqdeq_ordered),
646                 TEST_CASE_ST(eventdev_setup, eventdev_teardown,
647                         test_simple_enqdeq_atomic),
648                 TEST_CASE_ST(eventdev_setup, eventdev_teardown,
649                         test_simple_enqdeq_parallel),
650                 TEST_CASE_ST(eventdev_setup, eventdev_teardown,
651                         test_multi_queue_enq_single_port_deq),
652                 TEST_CASE_ST(eventdev_setup_priority, eventdev_teardown,
653                         test_multi_queue_priority),
654                 TEST_CASE_ST(eventdev_setup, eventdev_teardown,
655                         test_multi_queue_enq_multi_port_deq),
656                 TEST_CASES_END() /**< NULL terminate unit test array */
657         }
658 };
659
660 static int
661 test_eventdev_octeontx(void)
662 {
663         return unit_test_suite_runner(&eventdev_octeontx_testsuite);
664 }
665
666 REGISTER_TEST_COMMAND(eventdev_octeontx_autotest, test_eventdev_octeontx);