1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright 2020 Mellanox Technologies, Ltd
7 Application for rte_flow performance testing.
8 The application provides the ability to test insertion rate of specific
9 rte_flow rule, by stressing it to the NIC, and calculates the insertion
12 The application allows to configure which rule to apply through several
13 options of the command line.
15 After that the application will start producing rules with same pattern
16 but increasing the outer IP source address by 1 each time, thus it will
17 give different flow each time, and all other items will have open masks.
19 To assess the rule insertion rate, the flow performance tool breaks
20 down the entire number of flow rule operations into windows of fixed size
21 (defaults to 100000 flow rule operations per window, but can be configured).
22 Then, the flow performance tool measures the total time per window and
23 computes an average time across all windows.
25 The application also provides the ability to measure rte flow deletion rate,
26 in addition to memory consumption before and after the flow rules' creation.
28 The app supports single and multiple core performance measurements, and
29 support multiple cores insertion/deletion as well.
32 Compiling the Application
33 -------------------------
35 The ``test-flow-perf`` application is compiled as part of the main compilation
36 of the DPDK libraries and tools.
38 Refer to the DPDK Getting Started Guides for details.
41 Running the Application
42 -----------------------
44 EAL Command-line Options
45 ~~~~~~~~~~~~~~~~~~~~~~~~
47 Please refer to :doc:`EAL parameters (Linux) <../linux_gsg/linux_eal_parameters>`
48 or :doc:`EAL parameters (FreeBSD) <../freebsd_gsg/freebsd_eal_parameters>` for
49 a list of available EAL command-line options.
52 Flow Performance Options
53 ~~~~~~~~~~~~~~~~~~~~~~~~
55 The following are the command-line options for the flow performance application.
56 They must be separated from the EAL options, shown in the previous section,
57 with a ``--`` separator:
59 .. code-block:: console
61 sudo ./dpdk-test-flow_perf -n 4 -a 08:00.0 -- --ingress --ether --ipv4 --queue --rules-count=1000000
63 The command line options are:
66 Display a help message and quit.
69 Set the total number of flow rules to insert,
70 where 1 <= N <= "number of flow rules".
71 The default value is 4,000,000.
74 Set the number of flow rules to insert per iteration window,
75 where 1 <= N <= "number of flow rules per iteration window".
76 The default value is 100,000 flow rules per iteration window.
77 For a total of --rules-count=1000000 flow rules to be inserted
78 and an iteration window size of --rules-batch=100000 flow rules,
79 the application will measure the insertion rate 10 times
80 (i.e., once every 100000 flow rules) and then report an average
81 insertion rate across the 10 measurements.
83 * ``--dump-iterations``
84 Print rates for each iteration window.
85 Default iteration window equals to the rules-batch size (i.e., 100,000).
88 Enable deletion rate calculations.
90 * ``--dump-socket-mem``
91 Dump the memory stats for each socket before the insertion and after.
94 Enable packets forwarding after insertion/deletion operations.
97 hexadecimal bitmask of ports to be used.
100 Set the number of needed cores to insert/delete rte_flow rules.
101 Default cores count is 1.
104 Flag to set using unique data for all actions that support data,
105 Such as header modify and encap actions. Default is using fixed
106 data for any action that support data for all flows.
111 Set Ingress attribute to all flows attributes.
114 Set Egress attribute to all flows attributes.
117 Set Transfer attribute to all flows attributes.
120 Set group for all flows, where N >= 0.
126 Add Ether item to all flows items, This item have open mask.
129 Add VLAN item to all flows items,
130 This item have VLAN value defined in user_parameters.h
131 under ``VNI_VALUE`` with full mask, default value = 1.
132 Other fields are open mask.
135 Add IPv4 item to all flows items,
136 This item have incremental source IP, with full mask.
137 Other fields are open mask.
140 Add IPv6 item to all flows item,
141 This item have incremental source IP, with full mask.
142 Other fields are open mask.
145 Add TCP item to all flows items, This item have open mask.
148 Add UDP item to all flows items, This item have open mask.
151 Add VXLAN item to all flows items,
152 This item have VNI value defined in user_parameters.h
153 under ``VNI_VALUE`` with full mask, default value = 1.
154 Other fields are open mask.
157 Add VXLAN-GPE item to all flows items,
158 This item have VNI value defined in user_parameters.h
159 under ``VNI_VALUE`` with full mask, default value = 1.
160 Other fields are open mask.
163 Add GRE item to all flows items,
164 This item have protocol value defined in user_parameters.h
165 under ``GRE_PROTO`` with full mask, default protocol = 0x6558 "Ether"
166 Other fields are open mask.
169 Add GENEVE item to all flows items,
170 This item have VNI value defined in user_parameters.h
171 under ``VNI_VALUE`` with full mask, default value = 1.
172 Other fields are open mask.
175 Add GTP item to all flows items,
176 This item have TEID value defined in user_parameters.h
177 under ``TEID_VALUE`` with full mask, default value = 1.
178 Other fields are open mask.
181 Add Meta item to all flows items,
182 This item have data value defined in user_parameters.h
183 under ``META_DATA`` with full mask, default value = 1.
184 Other fields are open mask.
187 Add Tag item to all flows items,
188 This item have data value defined in user_parameters.h
189 under ``META_DATA`` with full mask, default value = 1.
191 Also it have tag value defined in user_parameters.h
192 under ``TAG_INDEX`` with full mask, default value = 0.
193 Other fields are open mask.
196 Add icmpv4 item to all flows items, This item have open mask.
199 Add icmpv6 item to all flows items, This item have open mask.
205 Add port redirection action to all flows actions.
206 Port redirection destination is defined in user_parameters.h
207 under PORT_ID_DST, default value = 1.
210 Add RSS action to all flows actions,
211 The queues in RSS action will be all queues configured
215 Add queue action to all flows items,
216 The queue will change in round robin state for each flow.
219 The app running with 4 RX queues
220 Flow #0: queue index 0
221 Flow #1: queue index 1
222 Flow #2: queue index 2
223 Flow #3: queue index 3
224 Flow #4: queue index 0
228 Add jump action to all flows actions.
229 Jump action destination is defined in user_parameters.h
230 under ``JUMP_ACTION_TABLE``, default value = 2.
233 Add mark action to all flows actions.
234 Mark action id is defined in user_parameters.h
235 under ``MARK_ID``, default value = 1.
238 Add count action to all flows actions.
241 Add set-meta action to all flows actions.
242 Meta data is defined in user_parameters.h under ``META_DATA``
243 with full mask, default value = 1.
246 Add set-tag action to all flows actions.
247 Meta data is defined in user_parameters.h under ``META_DATA``
248 with full mask, default value = 1.
250 Tag index is defined in user_parameters.h under ``TAG_INDEX``
251 with full mask, default value = 0.
254 Add drop action to all flows actions.
256 * ``--hairpin-queue=N``
257 Add hairpin queue action to all flows actions.
258 The queue will change in round robin state for each flow.
261 The app running with 4 RX hairpin queues and 4 normal RX queues
262 Flow #0: queue index 4
263 Flow #1: queue index 5
264 Flow #2: queue index 6
265 Flow #3: queue index 7
266 Flow #4: queue index 4
269 * ``--hairpin-rss=N``
270 Add hairpin RSS action to all flows actions.
271 The queues in RSS action will be all hairpin queues configured
275 Add set source mac action to all flows actions.
276 The mac to be set is random each flow.
279 Add set destination mac action to all flows actions.
280 The mac to be set is random each flow.
283 Add set source ipv4 action to all flows actions.
284 The ipv4 header to be set is random each flow.
287 Add set destination ipv4 action to all flows actions.
288 The ipv4 header to be set is random each flow.
291 Add set source ipv6 action to all flows actions.
292 The ipv6 header to be set is random each flow.
295 Add set destination ipv6 action to all flows actions.
296 The ipv6 header to be set is random each flow.
299 Add set source tp action to all flows actions.
300 The tp sport header to be set is random each flow.
303 Add set destination tp action to all flows actions.
304 The tp dport header to be set is random each flow.
307 Add increment TCP acknowledgment by one to all flows actions.
310 Add decrement TCP acknowledgment by one to all flows actions.
313 Add increment TCP sequence by one to all flows actions.
316 Add decrement TCP sequence by one to all flows actions.
319 Add set IP ttl action to all flows actions.
320 The ttl value to be set is random each flow.
323 Add decrement IP ttl by one to all flows actions.
325 * ``--set-ipv4-dscp``
326 Add set IPv4 dscp action to all flows actions.
327 The dscp value to be is random each flow.
329 * ``--set-ipv6-dscp``
330 Add set IPv6 dscp action to all flows actions.
331 The dscp value to be is random each flow.
334 Add flag action to all flows actions.
336 * ``--raw-encap=<DATA>``
337 Add raw encap action to all flows actions.
338 Data is the data needed to be encaped, with fixed values.
339 Example: raw-encap=ether,ipv4,udp,vxlan
341 * ``--raw-decap=<DATA>``
342 Add raw decap action to all flows actions.
343 Data is the data needed to be decaped, with fixed values.
344 Example: raw-decap=ether,ipv4,gre
347 Add vxlan encap action to all flows actions.
348 Data to encap is fixed with pattern: ether,ipv4,udp,vxlan,
349 all encapped items have fixed values.
352 Add vxlan decap action to all flows actions.
355 Add meter action to all flows actions.
356 Currently, 1 meter profile -> N meter rules -> N rte flows.