1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
|
.. SPDX-License-Identifier: BSD-3-Clause
Copyright(c) 2017 Cavium, Inc
dpdk-test-eventdev Application
==============================
The ``dpdk-test-eventdev`` tool is a Data Plane Development Kit (DPDK)
application that allows exercising various eventdev use cases.
This application has a generic framework to add new eventdev based test cases to
verify functionality and measure the performance parameters of DPDK eventdev
devices.
Compiling the Application
-------------------------
**Build the application**
Execute the ``dpdk-setup.sh`` script to build the DPDK library together with the
``dpdk-test-eventdev`` application.
Initially, the user must select a DPDK target to choose the correct target type
and compiler options to use when building the libraries.
The user must have all libraries, modules, updates and compilers installed
in the system prior to this,
as described in the earlier chapters in this Getting Started Guide.
Running the Application
-----------------------
The application has a number of command line options:
.. code-block:: console
dpdk-test-eventdev [EAL Options] -- [application options]
EAL Options
~~~~~~~~~~~
The following are the EAL command-line options that can be used in conjunction
with the ``dpdk-test-eventdev`` application.
See the DPDK Getting Started Guides for more information on these options.
* ``-c <COREMASK>`` or ``-l <CORELIST>``
Set the hexadecimal bitmask of the cores to run on. The corelist is a
list of cores to use.
* ``--vdev <driver><id>``
Add a virtual eventdev device.
Application Options
~~~~~~~~~~~~~~~~~~~
The following are the application command-line options:
* ``--verbose``
Set verbose level. Default is 1. Value > 1 displays more details.
* ``--dev <n>``
Set the device id of the event device.
* ``--test <name>``
Set test name, where ``name`` is one of the following::
order_queue
order_atq
perf_queue
perf_atq
pipeline_atq
pipeline_queue
* ``--socket_id <n>``
Set the socket id of the application resources.
* ``--pool-sz <n>``
Set the number of mbufs to be allocated from the mempool.
* ``--plcores <CORELIST>``
Set the list of cores to be used as producers.
* ``--wlcores <CORELIST>``
Set the list of cores to be used as workers.
* ``--stlist <type_list>``
Set the scheduled type of each stage where ``type_list`` size
determines the number of stages used in the test application.
Each type_list member can be one of the following::
P or p : Parallel schedule type
O or o : Ordered schedule type
A or a : Atomic schedule type
Application expects the ``type_list`` in comma separated form (i.e. ``--stlist o,a,a,a``)
* ``--nb_flows <n>``
Set the number of flows to produce.
* ``--nb_pkts <n>``
Set the number of packets to produce. 0 implies no limit.
* ``--worker_deq_depth <n>``
Set the dequeue depth of the worker.
* ``--fwd_latency``
Perform forward latency measurement.
* ``--queue_priority``
Enable queue priority.
* ``--prod_type_ethdev``
Use ethernet device as producer.
* ``--prod_type_timerdev``
Use event timer adapter as producer.
* ``--prod_type_timerdev_burst``
Use burst mode event timer adapter as producer.
* ``--timer_tick_nsec``
Used to dictate number of nano seconds between bucket traversal of the
event timer adapter. Refer `rte_event_timer_adapter_conf`.
* ``--max_tmo_nsec``
Used to configure event timer adapter max arm timeout in nano seconds.
* ``--expiry_nsec``
Dictate the number of nano seconds after which the event timer expires.
* ``--nb_timers``
Number of event timers each producer core will generate.
* ``--nb_timer_adptrs``
Number of event timer adapters to be used. Each adapter is used in
round robin manner by the producer cores.
Eventdev Tests
--------------
ORDER_QUEUE Test
~~~~~~~~~~~~~~~~
This is a functional test case that aims at testing the following:
#. Verify the ingress order maintenance.
#. Verify the exclusive(atomic) access to given atomic flow per eventdev port.
.. _table_eventdev_order_queue_test:
.. table:: Order queue test eventdev configuration.
+---+--------------+----------------+------------------------+
| # | Items | Value | Comments |
| | | | |
+===+==============+================+========================+
| 1 | nb_queues | 2 | q0(ordered), q1(atomic)|
| | | | |
+---+--------------+----------------+------------------------+
| 2 | nb_producers | 1 | |
| | | | |
+---+--------------+----------------+------------------------+
| 3 | nb_workers | >= 1 | |
| | | | |
+---+--------------+----------------+------------------------+
| 4 | nb_ports | nb_workers + | Workers use port 0 to |
| | | 1 | port n-1. Producer uses|
| | | | port n |
+---+--------------+----------------+------------------------+
.. _figure_eventdev_order_queue_test:
.. figure:: img/eventdev_order_queue_test.*
order queue test operation.
The order queue test configures the eventdev with two queues and an event
producer to inject the events to q0(ordered) queue. Both q0(ordered) and
q1(atomic) are linked to all the workers.
The event producer maintains a sequence number per flow and injects the events
to the ordered queue. The worker receives the events from ordered queue and
forwards to atomic queue. Since the events from an ordered queue can be
processed in parallel on the different workers, the ingress order of events
might have changed on the downstream atomic queue enqueue. On enqueue to the
atomic queue, the eventdev PMD driver reorders the event to the original
ingress order(i.e producer ingress order).
When the event is dequeued from the atomic queue by the worker, this test
verifies the expected sequence number of associated event per flow by comparing
the free running expected sequence number per flow.
Application options
^^^^^^^^^^^^^^^^^^^
Supported application command line options are following::
--verbose
--dev
--test
--socket_id
--pool_sz
--plcores
--wlcores
--nb_flows
--nb_pkts
--worker_deq_depth
Example
^^^^^^^
Example command to run order queue test:
.. code-block:: console
sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- \
--test=order_queue --plcores 1 --wlcores 2,3
ORDER_ATQ Test
~~~~~~~~~~~~~~
This test verifies the same aspects of ``order_queue`` test, the difference is
the number of queues used, this test operates on a single ``all types queue(atq)``
instead of two different queues for ordered and atomic.
.. _table_eventdev_order_atq_test:
.. table:: Order all types queue test eventdev configuration.
+---+--------------+----------------+------------------------+
| # | Items | Value | Comments |
| | | | |
+===+==============+================+========================+
| 1 | nb_queues | 1 | q0(all types queue) |
| | | | |
+---+--------------+----------------+------------------------+
| 2 | nb_producers | 1 | |
| | | | |
+---+--------------+----------------+------------------------+
| 3 | nb_workers | >= 1 | |
| | | | |
+---+--------------+----------------+------------------------+
| 4 | nb_ports | nb_workers + | Workers use port 0 to |
| | | 1 | port n-1.Producer uses |
| | | | port n. |
+---+--------------+----------------+------------------------+
.. _figure_eventdev_order_atq_test:
.. figure:: img/eventdev_order_atq_test.*
order all types queue test operation.
Application options
^^^^^^^^^^^^^^^^^^^
Supported application command line options are following::
--verbose
--dev
--test
--socket_id
--pool_sz
--plcores
--wlcores
--nb_flows
--nb_pkts
--worker_deq_depth
Example
^^^^^^^
Example command to run order ``all types queue`` test:
.. code-block:: console
sudo build/app/dpdk-test-eventdev --vdev=event_octeontx -- \
--test=order_atq --plcores 1 --wlcores 2,3
PERF_QUEUE Test
~~~~~~~~~~~~~~~
This is a performance test case that aims at testing the following:
#. Measure the number of events can be processed in a second.
#. Measure the latency to forward an event.
.. _table_eventdev_perf_queue_test:
.. table:: Perf queue test eventdev configuration.
+---+--------------+----------------+-----------------------------------------+
| # | Items | Value | Comments |
| | | | |
+===+==============+================+=========================================+
| 1 | nb_queues | nb_producers * | Queues will be configured based on the |
| | | nb_stages | user requested sched type list(--stlist)|
+---+--------------+----------------+-----------------------------------------+
| 2 | nb_producers | >= 1 | Selected through --plcores command line |
| | | | argument. |
+---+--------------+----------------+-----------------------------------------+
| 3 | nb_workers | >= 1 | Selected through --wlcores command line |
| | | | argument |
+---+--------------+----------------+-----------------------------------------+
| 4 | nb_ports | nb_workers + | Workers use port 0 to port n-1. |
| | | nb_producers | Producers use port n to port p |
+---+--------------+----------------+-----------------------------------------+
.. _figure_eventdev_perf_queue_test:
.. figure:: img/eventdev_perf_queue_test.*
perf queue test operation.
The perf queue test configures the eventdev with Q queues and P ports, where
Q and P is a function of the number of workers, the number of producers and
number of stages as mentioned in :numref:`table_eventdev_perf_queue_test`.
The user can choose the number of workers, the number of producers and number of
stages through the ``--wlcores``, ``--plcores`` and the ``--stlist`` application
command line arguments respectively.
The producer(s) injects the events to eventdev based the first stage sched type
list requested by the user through ``--stlist`` the command line argument.
Based on the number of stages to process(selected through ``--stlist``),
The application forwards the event to next upstream queue and terminates when it
reaches the last stage in the pipeline. On event termination, application
increments the number events processed and print periodically in one second
to get the number of events processed in one second.
When ``--fwd_latency`` command line option selected, the application inserts
the timestamp in the event on the first stage and then on termination, it
updates the number of cycles to forward a packet. The application uses this
value to compute the average latency to a forward packet.
When ``--prod_type_ethdev`` command line option is selected, the application
uses the probed ethernet devices as producers by configuring them as Rx
adapters instead of using synthetic producers.
Application options
^^^^^^^^^^^^^^^^^^^
Supported application command line options are following::
--verbose
--dev
--test
--socket_id
--pool_sz
--plcores
--wlcores
--stlist
--nb_flows
--nb_pkts
--worker_deq_depth
--fwd_latency
--queue_priority
--prod_type_ethdev
--prod_type_timerdev_burst
--prod_type_timerdev
--timer_tick_nsec
--max_tmo_nsec
--expiry_nsec
--nb_timers
--nb_timer_adptrs
Example
^^^^^^^
Example command to run perf queue test:
.. code-block:: console
sudo build/app/dpdk-test-eventdev -c 0xf -s 0x1 --vdev=event_sw0 -- \
--test=perf_queue --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0
Example command to run perf queue test with ethernet ports:
.. code-block:: console
sudo build/app/dpdk-test-eventdev --vdev=event_sw0 -- \
--test=perf_queue --plcores=2 --wlcore=3 --stlist=p --prod_type_ethdev
Example command to run perf queue test with event timer adapter:
.. code-block:: console
sudo build/app/dpdk-test-eventdev --vdev="event_octeontx" -- \
--wlcores 4 --plcores 12 --test perf_queue --stlist=a \
--prod_type_timerdev --fwd_latency
PERF_ATQ Test
~~~~~~~~~~~~~~~
This is a performance test case that aims at testing the following with
``all types queue`` eventdev scheme.
#. Measure the number of events can be processed in a second.
#. Measure the latency to forward an event.
.. _table_eventdev_perf_atq_test:
.. table:: Perf all types queue test eventdev configuration.
+---+--------------+----------------+-----------------------------------------+
| # | Items | Value | Comments |
| | | | |
+===+==============+================+=========================================+
| 1 | nb_queues | nb_producers | Queues will be configured based on the |
| | | | user requested sched type list(--stlist)|
+---+--------------+----------------+-----------------------------------------+
| 2 | nb_producers | >= 1 | Selected through --plcores command line |
| | | | argument. |
+---+--------------+----------------+-----------------------------------------+
| 3 | nb_workers | >= 1 | Selected through --wlcores command line |
| | | | argument |
+---+--------------+----------------+-----------------------------------------+
| 4 | nb_ports | nb_workers + | Workers use port 0 to port n-1. |
| | | nb_producers | Producers use port n to port p |
+---+--------------+----------------+-----------------------------------------+
.. _figure_eventdev_perf_atq_test:
.. figure:: img/eventdev_perf_atq_test.*
perf all types queue test operation.
The ``all types queues(atq)`` perf test configures the eventdev with Q queues
and P ports, where Q and P is a function of the number of workers and number of
producers as mentioned in :numref:`table_eventdev_perf_atq_test`.
The atq queue test functions as same as ``perf_queue`` test. The difference
is, It uses, ``all type queue scheme`` instead of separate queues for each
stage and thus reduces the number of queues required to realize the use case
and enables flow pinning as the event does not move to the next queue.
Application options
^^^^^^^^^^^^^^^^^^^
Supported application command line options are following::
--verbose
--dev
--test
--socket_id
--pool_sz
--plcores
--wlcores
--stlist
--nb_flows
--nb_pkts
--worker_deq_depth
--fwd_latency
--prod_type_ethdev
--prod_type_timerdev_burst
--prod_type_timerdev
--timer_tick_nsec
--max_tmo_nsec
--expiry_nsec
--nb_timers
--nb_timer_adptrs
Example
^^^^^^^
Example command to run perf ``all types queue`` test:
.. code-block:: console
sudo build/app/dpdk-test-eventdev --vdev=event_octeontx -- \
--test=perf_atq --plcores=2 --wlcore=3 --stlist=p --nb_pkts=0
Example command to run perf ``all types queue`` test with event timer adapter:
.. code-block:: console
sudo build/app/dpdk-test-eventdev --vdev="event_octeontx" -- \
--wlcores 4 --plcores 12 --test perf_atq --verbose 20 \
--stlist=a --prod_type_timerdev --fwd_latency
PIPELINE_QUEUE Test
~~~~~~~~~~~~~~~~~~~
This is a pipeline test case that aims at testing the following:
#. Measure the end-to-end performance of an event dev with a ethernet dev.
#. Maintain packet ordering from Rx to Tx.
.. _table_eventdev_pipeline_queue_test:
.. table:: Pipeline queue test eventdev configuration.
+---+--------------+----------------+-----------------------------------------+
| # | Items | Value | Comments |
| | | | |
+===+==============+================+=========================================+
| 1 | nb_queues | (nb_producers | Queues will be configured based on the |
| | | * nb_stages) + | user requested sched type list(--stlist)|
| | | nb_producers | At the last stage of the schedule list |
| | | | the event is enqueued onto per port |
| | | | unique queue which is then Transmitted. |
+---+--------------+----------------+-----------------------------------------+
| 2 | nb_producers | >= 1 | Producers will be configured based on |
| | | | the number of detected ethernet devices.|
| | | | Each ethdev will be configured as an Rx |
| | | | adapter. |
+---+--------------+----------------+-----------------------------------------+
| 3 | nb_workers | >= 1 | Selected through --wlcores command line |
| | | | argument |
+---+--------------+----------------+-----------------------------------------+
| 4 | nb_ports | nb_workers + | Workers use port 0 to port n. |
| | | (nb_produces * | Producers use port n+1 to port n+m, |
| | | 2) | depending on the Rx adapter capability. |
| | | | Consumers use port n+m+1 to port n+o |
| | | | depending on the Tx adapter capability. |
+---+--------------+----------------+-----------------------------------------+
.. _figure_eventdev_pipeline_queue_test_generic:
.. figure:: img/eventdev_pipeline_queue_test_generic.*
.. _figure_eventdev_pipeline_queue_test_internal_port:
.. figure:: img/eventdev_pipeline_queue_test_internal_port.*
pipeline queue test operation.
The pipeline queue test configures the eventdev with Q queues and P ports,
where Q and P is a function of the number of workers, the number of producers
and number of stages as mentioned in :numref:`table_eventdev_pipeline_queue_test`.
The user can choose the number of workers and number of stages through the
``--wlcores`` and the ``--stlist`` application command line arguments
respectively.
The number of producers depends on the number of ethernet devices detected and
each ethernet device is configured as a event_eth_rx_adapter that acts as a
producer.
The producer(s) injects the events to eventdev based the first stage sched type
list requested by the user through ``--stlist`` the command line argument.
Based on the number of stages to process(selected through ``--stlist``),
The application forwards the event to next upstream queue and when it reaches
the last stage in the pipeline if the event type is ``atomic`` it is enqueued
onto ethdev Tx queue else to maintain ordering the event type is set to
``atomic`` and enqueued onto the last stage queue.
If the ethdev and eventdev pair have ``RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT``
capability then the worker cores enqueue the packets to the eventdev directly
using ``rte_event_eth_tx_adapter_enqueue`` else the worker cores enqueue the
packet onto the ``SINGLE_LINK_QUEUE`` that is managed by the Tx adapter.
The Tx adapter dequeues the packet and transmits it.
On packet Tx, application increments the number events processed and print
periodically in one second to get the number of events processed in one
second.
Application options
^^^^^^^^^^^^^^^^^^^
Supported application command line options are following::
--verbose
--dev
--test
--socket_id
--pool_sz
--wlcores
--stlist
--worker_deq_depth
--prod_type_ethdev
.. Note::
* The ``--prod_type_ethdev`` is mandatory for running this test.
Example
^^^^^^^
Example command to run pipeline queue test:
.. code-block:: console
sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
--test=pipeline_queue --wlcore=1 --prod_type_ethdev --stlist=a
PIPELINE_ATQ Test
~~~~~~~~~~~~~~~~~~~
This is a pipeline test case that aims at testing the following with
``all types queue`` eventdev scheme.
#. Measure the end-to-end performance of an event dev with a ethernet dev.
#. Maintain packet ordering from Rx to Tx.
.. _table_eventdev_pipeline_atq_test:
.. table:: Pipeline atq test eventdev configuration.
+---+--------------+----------------+-----------------------------------------+
| # | Items | Value | Comments |
| | | | |
+===+==============+================+=========================================+
| 1 | nb_queues | nb_producers + | Queues will be configured based on the |
| | | x | user requested sched type list(--stlist)|
| | | | where x = nb_producers in generic |
| | | | pipeline and 0 if all the ethdev |
| | | | being used have Internal port capability|
+---+--------------+----------------+-----------------------------------------+
| 2 | nb_producers | >= 1 | Producers will be configured based on |
| | | | the number of detected ethernet devices.|
| | | | Each ethdev will be configured as an Rx |
| | | | adapter. |
+---+--------------+----------------+-----------------------------------------+
| 3 | nb_workers | >= 1 | Selected through --wlcores command line |
| | | | argument |
+---+--------------+----------------+-----------------------------------------+
| 4 | nb_ports | nb_workers + | Workers use port 0 to port n. |
| | | nb_producers + | Producers use port n+1 to port n+m, |
| | | x | depending on the Rx adapter capability. |
| | | | x = nb_producers in generic pipeline and|
| | | | 0 if all the ethdev being used have |
| | | | Internal port capability. |
| | | | Consumers may use port n+m+1 to port n+o|
| | | | depending on the Tx adapter capability. |
+---+--------------+----------------+-----------------------------------------+
.. _figure_eventdev_pipeline_atq_test_generic:
.. figure:: img/eventdev_pipeline_atq_test_generic.*
.. _figure_eventdev_pipeline_atq_test_internal_port:
.. figure:: img/eventdev_pipeline_atq_test_internal_port.*
pipeline atq test operation.
The pipeline atq test configures the eventdev with Q queues and P ports,
where Q and P is a function of the number of workers, the number of producers
and number of stages as mentioned in :numref:`table_eventdev_pipeline_atq_test`.
The atq queue test functions as same as ``pipeline_queue`` test. The difference
is, It uses, ``all type queue scheme`` instead of separate queues for each
stage and thus reduces the number of queues required to realize the use case.
Application options
^^^^^^^^^^^^^^^^^^^
Supported application command line options are following::
--verbose
--dev
--test
--socket_id
--pool_sz
--wlcores
--stlist
--worker_deq_depth
--prod_type_ethdev
.. Note::
* The ``--prod_type_ethdev`` is mandatory for running this test.
Example
^^^^^^^
Example command to run pipeline queue test:
.. code-block:: console
sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
--test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=a
|