summaryrefslogtreecommitdiff
path: root/doc/guides/eventdevs/opdl.rst
blob: 0262a337a0763dd8796e77be5dd5dac438bef812 (plain)
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
..  BSD LICENSE
    Copyright(c) 2017 Intel Corporation. All rights reserved.

OPDL Eventdev Poll Mode Driver
==================================

The OPDL (Ordered Packet Distribution Library) eventdev is a specific\
implementation of the eventdev API. It is particularly suited to packet\
processing workloads that have high throughput and low latency requirements.\
All packets follow the same path through the device. The order in which\
packets  follow is determinted by the order in which queues are set up.\
Events are left on the ring until they are transmitted. As a result packets\
do not go out of order


Features
--------

The OPDL  eventdev implements a subset of features of the eventdev API;

Queues
 * Atomic
 * Ordered (Parallel is supported as parallel is a subset of Ordered)
 * Single-Link

Ports
 * Load balanced (for Atomic, Ordered, Parallel queues)
 * Single Link (for single-link queues)


Configuration and Options
-------------------------

The software eventdev is a vdev device, and as such can be created from the
application code, or from the EAL command line:

* Call ``rte_vdev_init("event_opdl0")`` from the application

* Use ``--vdev="event_opdl0"`` in the EAL options, which will call
  rte_vdev_init() internally

Example:

.. code-block:: console

    ./your_eventdev_application --vdev="event_opdl0"


Single Port Queue
~~~~~~~~~~~~~~~~~

It is possible to create a Single Port Queue ``RTE_EVENT_QUEUE_CFG_SINGLE_LINK``.
Packets dequeued from this queue do not need to be re-enqueued (as is the
case with an ordered queue). The purpose of this queue is to allow for
asynchronous handling of packets in the middle of a pipeline. Ordered
queues in the middle of a pipeline cannot delete packets.


Queue Dependencies
~~~~~~~~~~~~~~~~~~

As stated the order in which packets travel through queues is static in
nature. They go through the queues in the order the queues are setup at
initialisation ``rte_event_queue_setup()``. For example if an application
sets up 3 queues, Q0, Q1, Q2 and has 3 associated ports P0, P1, P2 and
P3 then packets must be

 * Enqueued onto Q0 (typically through P0), then

 * Dequeued from Q0 (typically through P1), then

 * Enqueued onto Q1 (also through P1), then

 * Dequeued from Q2 (typically through P2),  then

 * Enqueued onto Q3 (also through P2), then

 * Dequeued from Q3 (typically through P3) and then transmitted on the relevant \
   eth port


Limitations
-----------

The opdl implementation has a number of limitations. These limitations are
due to the static nature of the underlying queues. It is because of this
that the implementation can achieve such high throughput and low latency

The following list is a comprehensive outline of the what is supported and
the limitations / restrictions imposed by the opdl pmd

 - The order in which packets moved between queues is static and fixed \
   (dynamic scheduling is not supported).

 - NEW, RELEASE are not explicitly supported. RX (first enqueue) implicitly \
   adds NEW event types, and TX (last dequeue) implicitly does RELEASE event types.

 - All packets follow the same path through device queues.

 - Flows within queues are NOT supported.

 - Event priority is NOT supported.

 - Once the device is stopped all inflight events are lost. Applications should \
   clear all inflight events before stopping it.

 - Each port can only be associated with one queue.

 - Each queue can have multiple ports associated with it.

 - Each worker core has to dequeue the maximum burst size for that port.

 - For performance, the rte_event flow_id should not be updated once packet\
   is enqueued on RX.



Validation & Statistics
~~~~~~~~~~~~~~~~~~~~~~~

Validation can be turned on through a command line parameter

.. code-block:: console

    --vdev="event_opdl0,do_validation=1,self_test=1"

If validation is turned on every packet (as opposed to just the first in
each burst), is validated to have come from the right queue. Statistics
are also produced in this mode. The statistics are available through the
eventdev xstats API. Statistics are per port as follows:

 - claim_pkts_requested
 - claim_pkts_granted
 - claim_non_empty
 - claim_empty
 - total_cycles