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::
76 Set the socket id of the application resources.
80 Set the number of mbufs to be allocated from the mempool.
82 * ``--plcores <CORELIST>``
84 Set the list of cores to be used as producers.
86 * ``--wlcores <CORELIST>``
88 Set the list of cores to be used as workers.
90 * ``--stlist <type_list>``
92 Set the scheduled type of each stage where ``type_list`` size
93 determines the number of stages used in the test application.
94 Each type_list member can be one of the following::
96 P or p : Parallel schedule type
97 O or o : Ordered schedule type
98 A or a : Atomic schedule type
100 Application expects the ``type_list`` in comma separated form (i.e. ``--stlist o,a,a,a``)
104 Set the number of flows to produce.
108 Set the number of packets to produce. 0 implies no limit.
110 * ``--worker_deq_depth <n>``
112 Set the dequeue depth of the worker.
116 Perform forward latency measurement.
118 * ``--queue_priority``
120 Enable queue priority.
122 * ``--prod_type_ethdev``
124 Use ethernet device as producer.
132 This is a functional test case that aims at testing the following:
134 #. Verify the ingress order maintenance.
135 #. Verify the exclusive(atomic) access to given atomic flow per eventdev port.
137 .. _table_eventdev_order_queue_test:
139 .. table:: Order queue test eventdev configuration.
141 +---+--------------+----------------+------------------------+
142 | # | Items | Value | Comments |
144 +===+==============+================+========================+
145 | 1 | nb_queues | 2 | q0(ordered), q1(atomic)|
147 +---+--------------+----------------+------------------------+
148 | 2 | nb_producers | 1 | |
150 +---+--------------+----------------+------------------------+
151 | 3 | nb_workers | >= 1 | |
153 +---+--------------+----------------+------------------------+
154 | 4 | nb_ports | nb_workers + | Workers use port 0 to |
155 | | | 1 | port n-1. Producer uses|
157 +---+--------------+----------------+------------------------+
159 .. _figure_eventdev_order_queue_test:
161 .. figure:: img/eventdev_order_queue_test.*
163 order queue test operation.
165 The order queue test configures the eventdev with two queues and an event
166 producer to inject the events to q0(ordered) queue. Both q0(ordered) and
167 q1(atomic) are linked to all the workers.
169 The event producer maintains a sequence number per flow and injects the events
170 to the ordered queue. The worker receives the events from ordered queue and
171 forwards to atomic queue. Since the events from an ordered queue can be
172 processed in parallel on the different workers, the ingress order of events
173 might have changed on the downstream atomic queue enqueue. On enqueue to the
174 atomic queue, the eventdev PMD driver reorders the event to the original
175 ingress order(i.e producer ingress order).
177 When the event is dequeued from the atomic queue by the worker, this test
178 verifies the expected sequence number of associated event per flow by comparing
179 the free running expected sequence number per flow.
184 Supported application command line options are following::
200 Example command to run order queue test:
202 .. code-block:: console
204 sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- \
205 --test=order_queue --plcores 1 --wlcores 2,3
211 This test verifies the same aspects of ``order_queue`` test, the difference is
212 the number of queues used, this test operates on a single ``all types queue(atq)``
213 instead of two different queues for ordered and atomic.
215 .. _table_eventdev_order_atq_test:
217 .. table:: Order all types queue test eventdev configuration.
219 +---+--------------+----------------+------------------------+
220 | # | Items | Value | Comments |
222 +===+==============+================+========================+
223 | 1 | nb_queues | 1 | q0(all types queue) |
225 +---+--------------+----------------+------------------------+
226 | 2 | nb_producers | 1 | |
228 +---+--------------+----------------+------------------------+
229 | 3 | nb_workers | >= 1 | |
231 +---+--------------+----------------+------------------------+
232 | 4 | nb_ports | nb_workers + | Workers use port 0 to |
233 | | | 1 | port n-1.Producer uses |
235 +---+--------------+----------------+------------------------+
237 .. _figure_eventdev_order_atq_test:
239 .. figure:: img/eventdev_order_atq_test.*
241 order all types queue test operation.
246 Supported application command line options are following::
262 Example command to run order ``all types queue`` test:
264 .. code-block:: console
266 sudo build/app/dpdk-test-eventdev --vdev=event_octeontx -- \
267 --test=order_atq --plcores 1 --wlcores 2,3
273 This is a performance test case that aims at testing the following:
275 #. Measure the number of events can be processed in a second.
276 #. Measure the latency to forward an event.
278 .. _table_eventdev_perf_queue_test:
280 .. table:: Perf queue test eventdev configuration.
282 +---+--------------+----------------+-----------------------------------------+
283 | # | Items | Value | Comments |
285 +===+==============+================+=========================================+
286 | 1 | nb_queues | nb_producers * | Queues will be configured based on the |
287 | | | nb_stages | user requested sched type list(--stlist)|
288 +---+--------------+----------------+-----------------------------------------+
289 | 2 | nb_producers | >= 1 | Selected through --plcores command line |
291 +---+--------------+----------------+-----------------------------------------+
292 | 3 | nb_workers | >= 1 | Selected through --wlcores command line |
294 +---+--------------+----------------+-----------------------------------------+
295 | 4 | nb_ports | nb_workers + | Workers use port 0 to port n-1. |
296 | | | nb_producers | Producers use port n to port p |
297 +---+--------------+----------------+-----------------------------------------+
299 .. _figure_eventdev_perf_queue_test:
301 .. figure:: img/eventdev_perf_queue_test.*
303 perf queue test operation.
305 The perf queue test configures the eventdev with Q queues and P ports, where
306 Q and P is a function of the number of workers, the number of producers and
307 number of stages as mentioned in :numref:`table_eventdev_perf_queue_test`.
309 The user can choose the number of workers, the number of producers and number of
310 stages through the ``--wlcores``, ``--plcores`` and the ``--stlist`` application
311 command line arguments respectively.
313 The producer(s) injects the events to eventdev based the first stage sched type
314 list requested by the user through ``--stlist`` the command line argument.
316 Based on the number of stages to process(selected through ``--stlist``),
317 The application forwards the event to next upstream queue and terminates when it
318 reaches the last stage in the pipeline. On event termination, application
319 increments the number events processed and print periodically in one second
320 to get the number of events processed in one second.
322 When ``--fwd_latency`` command line option selected, the application inserts
323 the timestamp in the event on the first stage and then on termination, it
324 updates the number of cycles to forward a packet. The application uses this
325 value to compute the average latency to a forward packet.
327 When ``--prod_type_ethdev`` command line option is selected, the application
328 uses the probed ethernet devices as producers by configuring them as Rx
329 adapters instead of using synthetic producers.
334 Supported application command line options are following::
354 Example command to run perf queue test:
356 .. code-block:: console
358 sudo build/app/dpdk-test-eventdev -c 0xf -s 0x1 --vdev=event_sw0 -- \
359 --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0
361 Example command to run perf queue test with ethernet ports:
363 .. code-block:: console
365 sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- \
366 --test=perf_queue --plcores=2 --wlcore=3 --stlist=p --prod_type_ethdev
371 This is a performance test case that aims at testing the following with
372 ``all types queue`` eventdev scheme.
374 #. Measure the number of events can be processed in a second.
375 #. Measure the latency to forward an event.
377 .. _table_eventdev_perf_atq_test:
379 .. table:: Perf all types queue test eventdev configuration.
381 +---+--------------+----------------+-----------------------------------------+
382 | # | Items | Value | Comments |
384 +===+==============+================+=========================================+
385 | 1 | nb_queues | nb_producers | Queues will be configured based on the |
386 | | | | user requested sched type list(--stlist)|
387 +---+--------------+----------------+-----------------------------------------+
388 | 2 | nb_producers | >= 1 | Selected through --plcores command line |
390 +---+--------------+----------------+-----------------------------------------+
391 | 3 | nb_workers | >= 1 | Selected through --wlcores command line |
393 +---+--------------+----------------+-----------------------------------------+
394 | 4 | nb_ports | nb_workers + | Workers use port 0 to port n-1. |
395 | | | nb_producers | Producers use port n to port p |
396 +---+--------------+----------------+-----------------------------------------+
398 .. _figure_eventdev_perf_atq_test:
400 .. figure:: img/eventdev_perf_atq_test.*
402 perf all types queue test operation.
405 The ``all types queues(atq)`` perf test configures the eventdev with Q queues
406 and P ports, where Q and P is a function of the number of workers and number of
407 producers as mentioned in :numref:`table_eventdev_perf_atq_test`.
410 The atq queue test functions as same as ``perf_queue`` test. The difference
411 is, It uses, ``all type queue scheme`` instead of separate queues for each
412 stage and thus reduces the number of queues required to realize the use case
413 and enables flow pinning as the event does not move to the next queue.
419 Supported application command line options are following::
438 Example command to run perf ``all types queue`` test:
440 .. code-block:: console
442 sudo build/app/dpdk-test-eventdev --vdev=event_octeontx -- \
443 --test=perf_atq --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0