1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2017 Cavium, Inc
4 dpdk-test-eventdev Application
5 ==============================
7 The ``dpdk-test-eventdev`` tool is a Data Plane Development Kit (DPDK)
8 application that allows exercising various eventdev use cases.
9 This application has a generic framework to add new eventdev based test cases to
10 verify functionality and measure the performance parameters of DPDK eventdev
13 Compiling the Application
14 -------------------------
16 **Build the application**
18 Execute the ``dpdk-setup.sh`` script to build the DPDK library together with the
19 ``dpdk-test-eventdev`` application.
21 Initially, the user must select a DPDK target to choose the correct target type
22 and compiler options to use when building the libraries.
23 The user must have all libraries, modules, updates and compilers installed
24 in the system prior to this,
25 as described in the earlier chapters in this Getting Started Guide.
27 Running the Application
28 -----------------------
30 The application has a number of command line options:
32 .. code-block:: console
34 dpdk-test-eventdev [EAL Options] -- [application options]
39 The following are the EAL command-line options that can be used in conjunction
40 with the ``dpdk-test-eventdev`` application.
41 See the DPDK Getting Started Guides for more information on these options.
43 * ``-c <COREMASK>`` or ``-l <CORELIST>``
45 Set the hexadecimal bitmask of the cores to run on. The corelist is a
48 * ``--vdev <driver><id>``
50 Add a virtual eventdev device.
55 The following are the application command-line options:
59 Set verbose level. Default is 1. Value > 1 displays more details.
63 Set the device id of the event device.
67 Set test name, where ``name`` is one of the following::
78 Set the socket id of the application resources.
82 Set the number of mbufs to be allocated from the mempool.
84 * ``--plcores <CORELIST>``
86 Set the list of cores to be used as producers.
88 * ``--wlcores <CORELIST>``
90 Set the list of cores to be used as workers.
92 * ``--stlist <type_list>``
94 Set the scheduled type of each stage where ``type_list`` size
95 determines the number of stages used in the test application.
96 Each type_list member can be one of the following::
98 P or p : Parallel schedule type
99 O or o : Ordered schedule type
100 A or a : Atomic schedule type
102 Application expects the ``type_list`` in comma separated form (i.e. ``--stlist o,a,a,a``)
106 Set the number of flows to produce.
110 Set the number of packets to produce. 0 implies no limit.
112 * ``--worker_deq_depth <n>``
114 Set the dequeue depth of the worker.
118 Perform forward latency measurement.
120 * ``--queue_priority``
122 Enable queue priority.
124 * ``--prod_type_ethdev``
126 Use ethernet device as producer.
128 * ``--prod_type_timerdev``
130 Use event timer adapter as producer.
132 * ``--prod_type_timerdev_burst``
134 Use burst mode event timer adapter as producer.
136 * ``--timer_tick_nsec``
138 Used to dictate number of nano seconds between bucket traversal of the
139 event timer adapter. Refer `rte_event_timer_adapter_conf`.
143 Used to configure event timer adapter max arm timeout in nano seconds.
147 Dictate the number of nano seconds after which the event timer expires.
151 Number of event timers each producer core will generate.
153 * ``--nb_timer_adptrs``
155 Number of event timer adapters to be used. Each adapter is used in
156 round robin manner by the producer cores.
160 Global dequeue timeout for all the event ports if the provided dequeue
161 timeout is out of the supported range of event device it will be
162 adjusted to the highest/lowest supported dequeue timeout supported.
166 Set packet mbuf size. Can be used to configure Jumbo Frames. Only
167 applicable for `pipeline_atq` and `pipeline_queue` tests.
171 Set max packet mbuf size. Can be used configure Rx/Tx scatter gather.
172 Only applicable for `pipeline_atq` and `pipeline_queue` tests.
181 This is a functional test case that aims at testing the following:
183 #. Verify the ingress order maintenance.
184 #. Verify the exclusive(atomic) access to given atomic flow per eventdev port.
186 .. _table_eventdev_order_queue_test:
188 .. table:: Order queue test eventdev configuration.
190 +---+--------------+----------------+------------------------+
191 | # | Items | Value | Comments |
193 +===+==============+================+========================+
194 | 1 | nb_queues | 2 | q0(ordered), q1(atomic)|
196 +---+--------------+----------------+------------------------+
197 | 2 | nb_producers | 1 | |
199 +---+--------------+----------------+------------------------+
200 | 3 | nb_workers | >= 1 | |
202 +---+--------------+----------------+------------------------+
203 | 4 | nb_ports | nb_workers + | Workers use port 0 to |
204 | | | 1 | port n-1. Producer uses|
206 +---+--------------+----------------+------------------------+
208 .. _figure_eventdev_order_queue_test:
210 .. figure:: img/eventdev_order_queue_test.*
212 order queue test operation.
214 The order queue test configures the eventdev with two queues and an event
215 producer to inject the events to q0(ordered) queue. Both q0(ordered) and
216 q1(atomic) are linked to all the workers.
218 The event producer maintains a sequence number per flow and injects the events
219 to the ordered queue. The worker receives the events from ordered queue and
220 forwards to atomic queue. Since the events from an ordered queue can be
221 processed in parallel on the different workers, the ingress order of events
222 might have changed on the downstream atomic queue enqueue. On enqueue to the
223 atomic queue, the eventdev PMD driver reorders the event to the original
224 ingress order(i.e producer ingress order).
226 When the event is dequeued from the atomic queue by the worker, this test
227 verifies the expected sequence number of associated event per flow by comparing
228 the free running expected sequence number per flow.
233 Supported application command line options are following::
250 Example command to run order queue test:
252 .. code-block:: console
254 sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- \
255 --test=order_queue --plcores 1 --wlcores 2,3
261 This test verifies the same aspects of ``order_queue`` test, the difference is
262 the number of queues used, this test operates on a single ``all types queue(atq)``
263 instead of two different queues for ordered and atomic.
265 .. _table_eventdev_order_atq_test:
267 .. table:: Order all types queue test eventdev configuration.
269 +---+--------------+----------------+------------------------+
270 | # | Items | Value | Comments |
272 +===+==============+================+========================+
273 | 1 | nb_queues | 1 | q0(all types queue) |
275 +---+--------------+----------------+------------------------+
276 | 2 | nb_producers | 1 | |
278 +---+--------------+----------------+------------------------+
279 | 3 | nb_workers | >= 1 | |
281 +---+--------------+----------------+------------------------+
282 | 4 | nb_ports | nb_workers + | Workers use port 0 to |
283 | | | 1 | port n-1.Producer uses |
285 +---+--------------+----------------+------------------------+
287 .. _figure_eventdev_order_atq_test:
289 .. figure:: img/eventdev_order_atq_test.*
291 order all types queue test operation.
296 Supported application command line options are following::
313 Example command to run order ``all types queue`` test:
315 .. code-block:: console
317 sudo build/app/dpdk-test-eventdev --vdev=event_octeontx -- \
318 --test=order_atq --plcores 1 --wlcores 2,3
324 This is a performance test case that aims at testing the following:
326 #. Measure the number of events can be processed in a second.
327 #. Measure the latency to forward an event.
329 .. _table_eventdev_perf_queue_test:
331 .. table:: Perf queue test eventdev configuration.
333 +---+--------------+----------------+-----------------------------------------+
334 | # | Items | Value | Comments |
336 +===+==============+================+=========================================+
337 | 1 | nb_queues | nb_producers * | Queues will be configured based on the |
338 | | | nb_stages | user requested sched type list(--stlist)|
339 +---+--------------+----------------+-----------------------------------------+
340 | 2 | nb_producers | >= 1 | Selected through --plcores command line |
342 +---+--------------+----------------+-----------------------------------------+
343 | 3 | nb_workers | >= 1 | Selected through --wlcores command line |
345 +---+--------------+----------------+-----------------------------------------+
346 | 4 | nb_ports | nb_workers + | Workers use port 0 to port n-1. |
347 | | | nb_producers | Producers use port n to port p |
348 +---+--------------+----------------+-----------------------------------------+
350 .. _figure_eventdev_perf_queue_test:
352 .. figure:: img/eventdev_perf_queue_test.*
354 perf queue test operation.
356 The perf queue test configures the eventdev with Q queues and P ports, where
357 Q and P is a function of the number of workers, the number of producers and
358 number of stages as mentioned in :numref:`table_eventdev_perf_queue_test`.
360 The user can choose the number of workers, the number of producers and number of
361 stages through the ``--wlcores``, ``--plcores`` and the ``--stlist`` application
362 command line arguments respectively.
364 The producer(s) injects the events to eventdev based the first stage sched type
365 list requested by the user through ``--stlist`` the command line argument.
367 Based on the number of stages to process(selected through ``--stlist``),
368 The application forwards the event to next upstream queue and terminates when it
369 reaches the last stage in the pipeline. On event termination, application
370 increments the number events processed and print periodically in one second
371 to get the number of events processed in one second.
373 When ``--fwd_latency`` command line option selected, the application inserts
374 the timestamp in the event on the first stage and then on termination, it
375 updates the number of cycles to forward a packet. The application uses this
376 value to compute the average latency to a forward packet.
378 When ``--prod_type_ethdev`` command line option is selected, the application
379 uses the probed ethernet devices as producers by configuring them as Rx
380 adapters instead of using synthetic producers.
385 Supported application command line options are following::
401 --prod_type_timerdev_burst
413 Example command to run perf queue test:
415 .. code-block:: console
417 sudo build/app/dpdk-test-eventdev -c 0xf -s 0x1 --vdev=event_sw0 -- \
418 --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0
420 Example command to run perf queue test with ethernet ports:
422 .. code-block:: console
424 sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- \
425 --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --prod_type_ethdev
427 Example command to run perf queue test with event timer adapter:
429 .. code-block:: console
431 sudo build/app/dpdk-test-eventdev --vdev="event_octeontx" -- \
432 --wlcores 4 --plcores 12 --test perf_queue --stlist=a \
433 --prod_type_timerdev --fwd_latency
438 This is a performance test case that aims at testing the following with
439 ``all types queue`` eventdev scheme.
441 #. Measure the number of events can be processed in a second.
442 #. Measure the latency to forward an event.
444 .. _table_eventdev_perf_atq_test:
446 .. table:: Perf all types queue test eventdev configuration.
448 +---+--------------+----------------+-----------------------------------------+
449 | # | Items | Value | Comments |
451 +===+==============+================+=========================================+
452 | 1 | nb_queues | nb_producers | Queues will be configured based on the |
453 | | | | user requested sched type list(--stlist)|
454 +---+--------------+----------------+-----------------------------------------+
455 | 2 | nb_producers | >= 1 | Selected through --plcores command line |
457 +---+--------------+----------------+-----------------------------------------+
458 | 3 | nb_workers | >= 1 | Selected through --wlcores command line |
460 +---+--------------+----------------+-----------------------------------------+
461 | 4 | nb_ports | nb_workers + | Workers use port 0 to port n-1. |
462 | | | nb_producers | Producers use port n to port p |
463 +---+--------------+----------------+-----------------------------------------+
465 .. _figure_eventdev_perf_atq_test:
467 .. figure:: img/eventdev_perf_atq_test.*
469 perf all types queue test operation.
472 The ``all types queues(atq)`` perf test configures the eventdev with Q queues
473 and P ports, where Q and P is a function of the number of workers and number of
474 producers as mentioned in :numref:`table_eventdev_perf_atq_test`.
477 The atq queue test functions as same as ``perf_queue`` test. The difference
478 is, It uses, ``all type queue scheme`` instead of separate queues for each
479 stage and thus reduces the number of queues required to realize the use case
480 and enables flow pinning as the event does not move to the next queue.
486 Supported application command line options are following::
501 --prod_type_timerdev_burst
513 Example command to run perf ``all types queue`` test:
515 .. code-block:: console
517 sudo build/app/dpdk-test-eventdev --vdev=event_octeontx -- \
518 --test=perf_atq --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0
520 Example command to run perf ``all types queue`` test with event timer adapter:
522 .. code-block:: console
524 sudo build/app/dpdk-test-eventdev --vdev="event_octeontx" -- \
525 --wlcores 4 --plcores 12 --test perf_atq --verbose 20 \
526 --stlist=a --prod_type_timerdev --fwd_latency
532 This is a pipeline test case that aims at testing the following:
534 #. Measure the end-to-end performance of an event dev with a ethernet dev.
535 #. Maintain packet ordering from Rx to Tx.
537 .. _table_eventdev_pipeline_queue_test:
539 .. table:: Pipeline queue test eventdev configuration.
541 +---+--------------+----------------+-----------------------------------------+
542 | # | Items | Value | Comments |
544 +===+==============+================+=========================================+
545 | 1 | nb_queues | (nb_producers | Queues will be configured based on the |
546 | | | * nb_stages) + | user requested sched type list(--stlist)|
547 | | | nb_producers | At the last stage of the schedule list |
548 | | | | the event is enqueued onto per port |
549 | | | | unique queue which is then Transmitted. |
550 +---+--------------+----------------+-----------------------------------------+
551 | 2 | nb_producers | >= 1 | Producers will be configured based on |
552 | | | | the number of detected ethernet devices.|
553 | | | | Each ethdev will be configured as an Rx |
555 +---+--------------+----------------+-----------------------------------------+
556 | 3 | nb_workers | >= 1 | Selected through --wlcores command line |
558 +---+--------------+----------------+-----------------------------------------+
559 | 4 | nb_ports | nb_workers + | Workers use port 0 to port n. |
560 | | | (nb_produces * | Producers use port n+1 to port n+m, |
561 | | | 2) | depending on the Rx adapter capability. |
562 | | | | Consumers use port n+m+1 to port n+o |
563 | | | | depending on the Tx adapter capability. |
564 +---+--------------+----------------+-----------------------------------------+
566 .. _figure_eventdev_pipeline_queue_test_generic:
568 .. figure:: img/eventdev_pipeline_queue_test_generic.*
570 .. _figure_eventdev_pipeline_queue_test_internal_port:
572 .. figure:: img/eventdev_pipeline_queue_test_internal_port.*
574 pipeline queue test operation.
576 The pipeline queue test configures the eventdev with Q queues and P ports,
577 where Q and P is a function of the number of workers, the number of producers
578 and number of stages as mentioned in :numref:`table_eventdev_pipeline_queue_test`.
580 The user can choose the number of workers and number of stages through the
581 ``--wlcores`` and the ``--stlist`` application command line arguments
584 The number of producers depends on the number of ethernet devices detected and
585 each ethernet device is configured as a event_eth_rx_adapter that acts as a
588 The producer(s) injects the events to eventdev based the first stage sched type
589 list requested by the user through ``--stlist`` the command line argument.
591 Based on the number of stages to process(selected through ``--stlist``),
592 The application forwards the event to next upstream queue and when it reaches
593 the last stage in the pipeline if the event type is ``atomic`` it is enqueued
594 onto ethdev Tx queue else to maintain ordering the event type is set to
595 ``atomic`` and enqueued onto the last stage queue.
597 If the ethdev and eventdev pair have ``RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT``
598 capability then the worker cores enqueue the packets to the eventdev directly
599 using ``rte_event_eth_tx_adapter_enqueue`` else the worker cores enqueue the
600 packet onto the ``SINGLE_LINK_QUEUE`` that is managed by the Tx adapter.
601 The Tx adapter dequeues the packet and transmits it.
603 On packet Tx, application increments the number events processed and print
604 periodically in one second to get the number of events processed in one
611 Supported application command line options are following::
627 * The ``--prod_type_ethdev`` is mandatory for running this test.
632 Example command to run pipeline queue test:
634 .. code-block:: console
636 sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
637 --test=pipeline_queue --wlcore=1 --prod_type_ethdev --stlist=a
643 This is a pipeline test case that aims at testing the following with
644 ``all types queue`` eventdev scheme.
646 #. Measure the end-to-end performance of an event dev with a ethernet dev.
647 #. Maintain packet ordering from Rx to Tx.
649 .. _table_eventdev_pipeline_atq_test:
651 .. table:: Pipeline atq test eventdev configuration.
653 +---+--------------+----------------+-----------------------------------------+
654 | # | Items | Value | Comments |
656 +===+==============+================+=========================================+
657 | 1 | nb_queues | nb_producers + | Queues will be configured based on the |
658 | | | x | user requested sched type list(--stlist)|
659 | | | | where x = nb_producers in generic |
660 | | | | pipeline and 0 if all the ethdev |
661 | | | | being used have Internal port capability|
662 +---+--------------+----------------+-----------------------------------------+
663 | 2 | nb_producers | >= 1 | Producers will be configured based on |
664 | | | | the number of detected ethernet devices.|
665 | | | | Each ethdev will be configured as an Rx |
667 +---+--------------+----------------+-----------------------------------------+
668 | 3 | nb_workers | >= 1 | Selected through --wlcores command line |
670 +---+--------------+----------------+-----------------------------------------+
671 | 4 | nb_ports | nb_workers + | Workers use port 0 to port n. |
672 | | | nb_producers + | Producers use port n+1 to port n+m, |
673 | | | x | depending on the Rx adapter capability. |
674 | | | | x = nb_producers in generic pipeline and|
675 | | | | 0 if all the ethdev being used have |
676 | | | | Internal port capability. |
677 | | | | Consumers may use port n+m+1 to port n+o|
678 | | | | depending on the Tx adapter capability. |
679 +---+--------------+----------------+-----------------------------------------+
681 .. _figure_eventdev_pipeline_atq_test_generic:
683 .. figure:: img/eventdev_pipeline_atq_test_generic.*
685 .. _figure_eventdev_pipeline_atq_test_internal_port:
687 .. figure:: img/eventdev_pipeline_atq_test_internal_port.*
689 pipeline atq test operation.
691 The pipeline atq test configures the eventdev with Q queues and P ports,
692 where Q and P is a function of the number of workers, the number of producers
693 and number of stages as mentioned in :numref:`table_eventdev_pipeline_atq_test`.
695 The atq queue test functions as same as ``pipeline_queue`` test. The difference
696 is, It uses, ``all type queue scheme`` instead of separate queues for each
697 stage and thus reduces the number of queues required to realize the use case.
703 Supported application command line options are following::
719 * The ``--prod_type_ethdev`` is mandatory for running this test.
724 Example command to run pipeline queue test:
726 .. code-block:: console
728 sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
729 --test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=a