doc: fix section layout of the flow perf app guide
[dpdk.git] / doc / guides / tools / flow-perf.rst
1 .. SPDX-License-Identifier: BSD-3-Clause
2    Copyright 2020 Mellanox Technologies, Ltd
3
4 Flow Performance Tool
5 =====================
6
7 Application for rte_flow performance testing.
8 The application provide the ability to test insertion rate of specific
9 rte_flow rule, by stressing it to the NIC, and calculate the insertion
10 rate.
11
12 The application offers some options in the command line, to configure
13 which rule to apply.
14
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.
18
19
20 Known Limitations
21 -----------------
22
23 The current version has limitations which can be removed in future:
24
25 * Support outer items up to tunnel layer only.
26 * Single core insertion only.
27 * Only one instance of same action can be added in one rule.
28
29 The application also provide the ability to measure rte flow deletion rate,
30 in addition to memory consumption before and after the flows creation.
31
32 The app supports single and multi core performance measurements.
33
34
35 Compiling the Application
36 -------------------------
37
38 The ``test-flow-perf`` application is compiled as part of the main compilation
39 of the DPDK libraries and tools.
40
41 Refer to the DPDK Getting Started Guides for details.
42
43
44 Running the Application
45 -----------------------
46
47 EAL Command-line Options
48 ~~~~~~~~~~~~~~~~~~~~~~~~
49
50 Please refer to :doc:`EAL parameters (Linux) <../linux_gsg/linux_eal_parameters>`
51 or :doc:`EAL parameters (FreeBSD) <../freebsd_gsg/freebsd_eal_parameters>` for
52 a list of available EAL command-line options.
53
54
55 Flow Performance Options
56 ~~~~~~~~~~~~~~~~~~~~~~~~
57
58 The following are the command-line options for the flow performance application.
59 They must be separated from the EAL options, shown in the previous section,
60 with a ``--`` separator:
61
62 .. code-block:: console
63
64         sudo ./dpdk-test-flow_perf -n 4 -w 08:00.0 -- --ingress --ether --ipv4 --queue --flows-count=1000000
65
66 The command line options are:
67
68 *       ``--help``
69         Display a help message and quit.
70
71 *       ``--flows-count=N``
72         Set the number of needed flows to insert,
73         where 1 <= N <= "number of flows".
74         The default value is 4,000,000.
75
76 *       ``--dump-iterations``
77         Print rates for each iteration of flows.
78         Default iteration is 1,00,000.
79
80 *       ``--deletion-rate``
81         Enable deletion rate calculations.
82
83 *       ``--dump-socket-mem``
84         Dump the memory stats for each socket before the insertion and after.
85
86 *       ``--enable-fwd``
87         Enable packets forwarding after insertion/deletion operations.
88
89
90 Attributes:
91
92 *       ``--ingress``
93         Set Ingress attribute to all flows attributes.
94
95 *       ``--egress``
96         Set Egress attribute to all flows attributes.
97
98 *       ``--transfer``
99         Set Transfer attribute to all flows attributes.
100
101 *       ``--group=N``
102         Set group for all flows, where N >= 0.
103         Default group is 0.
104
105 Items:
106
107 *       ``--ether``
108         Add Ether item to all flows items, This item have open mask.
109
110 *       ``--vlan``
111         Add VLAN item to all flows items,
112         This item have VLAN value defined in user_parameters.h
113         under ``VNI_VALUE`` with full mask, default value = 1.
114         Other fields are open mask.
115
116 *       ``--ipv4``
117         Add IPv4 item to all flows items,
118         This item have incremental source IP, with full mask.
119         Other fields are open mask.
120
121 *       ``--ipv6``
122         Add IPv6 item to all flows item,
123         This item have incremental source IP, with full mask.
124         Other fields are open mask.
125
126 *       ``--tcp``
127         Add TCP item to all flows items, This item have open mask.
128
129 *       ``--udp``
130         Add UDP item to all flows items, This item have open mask.
131
132 *       ``--vxlan``
133         Add VXLAN item to all flows items,
134         This item have VNI value defined in user_parameters.h
135         under ``VNI_VALUE`` with full mask, default value = 1.
136         Other fields are open mask.
137
138 *       ``--vxlan-gpe``
139         Add VXLAN-GPE item to all flows items,
140         This item have VNI value defined in user_parameters.h
141         under ``VNI_VALUE`` with full mask, default value = 1.
142         Other fields are open mask.
143
144 *       ``--gre``
145         Add GRE item to all flows items,
146         This item have protocol value defined in user_parameters.h
147         under ``GRE_PROTO`` with full mask, default protocol = 0x6558 "Ether"
148         Other fields are open mask.
149
150 *       ``--geneve``
151         Add GENEVE 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.
155
156 *       ``--gtp``
157         Add GTP item to all flows items,
158         This item have TEID value defined in user_parameters.h
159         under ``TEID_VALUE`` with full mask, default value = 1.
160         Other fields are open mask.
161
162 *       ``--meta``
163         Add Meta item to all flows items,
164         This item have data value defined in user_parameters.h
165         under ``META_DATA`` with full mask, default value = 1.
166         Other fields are open mask.
167
168 *       ``--tag``
169         Add Tag item to all flows items,
170         This item have data value defined in user_parameters.h
171         under ``META_DATA`` with full mask, default value = 1.
172
173         Also it have tag value defined in user_parameters.h
174         under ``TAG_INDEX`` with full mask, default value = 0.
175         Other fields are open mask.
176
177
178 Actions:
179
180 *       ``--port-id``
181         Add port redirection action to all flows actions.
182         Port redirection destination is defined in user_parameters.h
183         under PORT_ID_DST, default value = 1.
184
185 *       ``--rss``
186         Add RSS action to all flows actions,
187         The queues in RSS action will be all queues configured
188         in the app.
189
190 *       ``--queue``
191         Add queue action to all flows items,
192         The queue will change in round robin state for each flow.
193
194         For example:
195                 The app running with 4 RX queues
196                 Flow #0: queue index 0
197                 Flow #1: queue index 1
198                 Flow #2: queue index 2
199                 Flow #3: queue index 3
200                 Flow #4: queue index 0
201                 ...
202
203 *       ``--jump``
204         Add jump action to all flows actions.
205         Jump action destination is defined in user_parameters.h
206         under ``JUMP_ACTION_TABLE``, default value = 2.
207
208 *       ``--mark``
209         Add mark action to all flows actions.
210         Mark action id is defined in user_parameters.h
211         under ``MARK_ID``, default value = 1.
212
213 *       ``--count``
214         Add count action to all flows actions.
215
216 *       ``--set-meta``
217         Add set-meta action to all flows actions.
218         Meta data is defined in user_parameters.h under ``META_DATA``
219         with full mask, default value = 1.
220
221 *       ``--set-tag``
222         Add set-tag action to all flows actions.
223         Meta data is defined in user_parameters.h under ``META_DATA``
224         with full mask, default value = 1.
225
226         Tag index is defined in user_parameters.h under ``TAG_INDEX``
227         with full mask, default value = 0.
228
229 *       ``--drop``
230         Add drop action to all flows actions.
231
232 *       ``--hairpin-queue=N``
233         Add hairpin queue action to all flows actions.
234         The queue will change in round robin state for each flow.
235
236         For example:
237                 The app running with 4 RX hairpin queues and 4 normal RX queues
238                 Flow #0: queue index 4
239                 Flow #1: queue index 5
240                 Flow #2: queue index 6
241                 Flow #3: queue index 7
242                 Flow #4: queue index 4
243                 ...
244
245 *       ``--hairpin-rss=N``
246         Add hairpin RSS action to all flows actions.
247         The queues in RSS action will be all hairpin queues configured
248         in the app.