1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2010-2014 Intel Corporation.
4 Test Pipeline Application
5 =========================
7 The Test Pipeline application illustrates the use of the DPDK Packet Framework tool suite.
8 Its purpose is to demonstrate the performance of single-table DPDK pipelines.
13 The application uses three CPU cores:
15 * Core A ("RX core") receives traffic from the NIC ports and feeds core B with traffic through SW queues.
17 * Core B ("Pipeline core") implements a single-table DPDK pipeline
18 whose type is selectable through specific command line parameter.
19 Core B receives traffic from core A through software queues,
20 processes it according to the actions configured in the table entries that
21 are hit by the input packets and feeds it to core C through another set of software queues.
23 * Core C ("TX core") receives traffic from core B through software queues and sends it to the NIC ports for transmission.
25 .. _figure_test_pipeline_app:
27 .. figure:: img/test_pipeline_app.*
29 Test Pipeline Application
31 Compiling the Application
32 -------------------------
33 To compile the sample application see :doc:`compiling`
35 The application is located in the ``$RTE_SDK/app/test-pipeline`` directory.
38 Running the Application
39 -----------------------
41 Application Command Line
42 ~~~~~~~~~~~~~~~~~~~~~~~~
44 The application execution command line is:
46 .. code-block:: console
48 ./test-pipeline [EAL options] -- -p PORTMASK --TABLE_TYPE
50 The -c or -l EAL CPU coremask/corelist option has to contain exactly 3 CPU cores.
51 The first CPU core in the core mask is assigned for core A, the second for core B and the third for core C.
53 The PORTMASK parameter must contain 2 or 4 ports.
55 Table Types and Behavior
56 ~~~~~~~~~~~~~~~~~~~~~~~~
58 :numref:`table_test_pipeline_1` describes the table types used and how they are populated.
60 The hash tables are pre-populated with 16 million keys.
61 For hash tables, the following parameters can be selected:
63 * **Configurable key size implementation or fixed (specialized) key size implementation (e.g. hash-8-ext or hash-spec-8-ext).**
64 The key size specialized implementations are expected to provide better performance for 8-byte and 16-byte key sizes,
65 while the key-size-non-specialized implementation is expected to provide better performance for larger key sizes;
67 * **Key size (e.g. hash-spec-8-ext or hash-spec-16-ext).**
68 The available options are 8, 16 and 32 bytes;
70 * **Table type (e.g. hash-spec-16-ext or hash-spec-16-lru).**
71 The available options are ext (extendable bucket) or lru (least recently used).
73 .. _table_test_pipeline_1:
75 .. table:: Table Types
77 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
78 | **#** | **TABLE_TYPE** | **Description of Core B Table** | **Pre-added Table Entries** |
80 +=======+========================+==========================================================+=======================================================+
81 | 1 | none | Core B is not implementing a DPDK pipeline. | N/A |
82 | | | Core B is implementing a pass-through from its input set | |
83 | | | of software queues to its output set of software queues. | |
85 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
86 | 2 | stub | Stub table. Core B is implementing the same pass-through | N/A |
87 | | | functionality as described for the "none" option by | |
88 | | | using the DPDK Packet Framework by using one | |
89 | | | stub table for each input NIC port. | |
91 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
92 | 3 | hash-[spec]-8-lru | LRU hash table with 8-byte key size and 16 million | 16 million entries are successfully added to the |
93 | | | entries. | hash table with the following key format: |
95 | | | | [4-byte index, 4 bytes of 0] |
97 | | | | The action configured for all table entries is |
98 | | | | "Sendto output port", with the output port index |
99 | | | | uniformly distributed for the range of output ports. |
101 | | | | The default table rule (used in the case of a lookup |
102 | | | | miss) is to drop the packet. |
104 | | | | At run time, core A is creating the following lookup |
105 | | | | key and storing it into the packet meta data for |
106 | | | | core B to use for table lookup: |
108 | | | | [destination IPv4 address, 4 bytes of 0] |
110 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
111 | 4 | hash-[spec]-8-ext | Extendable bucket hash table with 8-byte key size | Same as hash-[spec]-8-lru table entries, above. |
112 | | | and 16 million entries. | |
114 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
115 | 5 | hash-[spec]-16-lru | LRU hash table with 16-byte key size and 16 million | 16 million entries are successfully added to the hash |
116 | | | entries. | table with the following key format: |
118 | | | | [4-byte index, 12 bytes of 0] |
120 | | | | The action configured for all table entries is |
121 | | | | "Send to output port", with the output port index |
122 | | | | uniformly distributed for the range of output ports. |
124 | | | | The default table rule (used in the case of a lookup |
125 | | | | miss) is to drop the packet. |
127 | | | | At run time, core A is creating the following lookup |
128 | | | | key and storing it into the packet meta data for core |
129 | | | | B to use for table lookup: |
131 | | | | [destination IPv4 address, 12 bytes of 0] |
133 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
134 | 6 | hash-[spec]-16-ext | Extendable bucket hash table with 16-byte key size | Same as hash-[spec]-16-lru table entries, above. |
135 | | | and 16 million entries. | |
137 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
138 | 7 | hash-[spec]-32-lru | LRU hash table with 32-byte key size and 16 million | 16 million entries are successfully added to the hash |
139 | | | entries. | table with the following key format: |
141 | | | | [4-byte index, 28 bytes of 0]. |
143 | | | | The action configured for all table entries is |
144 | | | | "Send to output port", with the output port index |
145 | | | | uniformly distributed for the range of output ports. |
147 | | | | The default table rule (used in the case of a lookup |
148 | | | | miss) is to drop the packet. |
150 | | | | At run time, core A is creating the following lookup |
151 | | | | key and storing it into the packet meta data for |
152 | | | | Lpmcore B to use for table lookup: |
154 | | | | [destination IPv4 address, 28 bytes of 0] |
156 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
157 | 8 | hash-[spec]-32-ext | Extendable bucket hash table with 32-byte key size | Same as hash-[spec]-32-lru table entries, above. |
158 | | | and 16 million entries. | |
160 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
161 | 9 | lpm | Longest Prefix Match (LPM) IPv4 table. | In the case of two ports, two routes |
162 | | | | are added to the table: |
164 | | | | [0.0.0.0/9 => send to output port 0] |
166 | | | | [0.128.0.0/9 => send to output port 1] |
168 | | | | In case of four ports, four entries are added to the |
171 | | | | [0.0.0.0/10 => send to output port 0] |
173 | | | | [0.64.0.0/10 => send to output port 1] |
175 | | | | [0.128.0.0/10 => send to output port 2] |
177 | | | | [0.192.0.0/10 => send to output port 3] |
179 | | | | The default table rule (used in the case of a lookup |
180 | | | | miss) is to drop the packet. |
182 | | | | At run time, core A is storing the IPv4 destination |
183 | | | | within the packet meta data to be later used by core |
184 | | | | B as the lookup key. |
186 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
187 | 10 | acl | Access Control List (ACL) table | In the case of two ports, two ACL rules are added to |
190 | | | | [priority = 0 (highest), |
192 | | | | IPv4 source = ANY, |
194 | | | | IPv4 destination = 0.0.0.0/9, |
196 | | | | L4 protocol = ANY, |
198 | | | | TCP source port = ANY, |
200 | | | | TCP destination port = ANY |
202 | | | | => send to output port 0] |
205 | | | | [priority = 0 (highest), |
207 | | | | IPv4 source = ANY, |
209 | | | | IPv4 destination = 0.128.0.0/9, |
211 | | | | L4 protocol = ANY, |
213 | | | | TCP source port = ANY, |
215 | | | | TCP destination port = ANY |
217 | | | | => send to output port 0]. |
220 | | | | The default table rule (used in the case of a lookup |
221 | | | | miss) is to drop the packet. |
223 +-------+------------------------+----------------------------------------------------------+-------------------------------------------------------+
228 Regardless of the table type used for the core B pipeline,
229 the same input traffic can be used to hit all table entries with uniform distribution,
230 which results in uniform distribution of packets sent out on the set of output NIC ports.
231 The profile for input traffic is TCP/IPv4 packets with:
233 * destination IP address as A.B.C.D with A fixed to 0 and B, C,D random
235 * source IP address fixed to 0.0.0.0
237 * destination TCP port fixed to 0
239 * source TCP port fixed to 0