7090c57d0ce09068fc5a2b1039524292a7bc65d2
[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
31
32 Compiling the Application
33 =========================
34
35 The ``test-flow-perf`` application is compiled as part of the main compilation
36 of the DPDK libraries and tools.
37
38 Refer to the DPDK Getting Started Guides for details.
39
40
41 Running the Application
42 =======================
43
44 EAL Command-line Options
45 ------------------------
46
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.
50
51
52 Flow Performance Options
53 ------------------------
54
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:
58
59 .. code-block:: console
60
61         sudo ./dpdk-test-flow_perf -n 4 -w 08:00.0 -- --ingress --ether --ipv4 --queue --flows-count=1000000
62
63 The command line options are:
64
65 *       ``--help``
66         Display a help message and quit.
67
68 *       ``--flows-count=N``
69         Set the number of needed flows to insert,
70         where 1 <= N <= "number of flows".
71         The default value is 4,000,000.
72
73 *       ``--dump-iterations``
74         Print rates for each iteration of flows.
75         Default iteration is 1,00,000.
76
77 *       ``--deletion-rate``
78         Enable deletion rate calculations.
79
80 Attributes:
81
82 *       ``--ingress``
83         Set Ingress attribute to all flows attributes.
84
85 *       ``--egress``
86         Set Egress attribute to all flows attributes.
87
88 *       ``--transfer``
89         Set Transfer attribute to all flows attributes.
90
91 *       ``--group=N``
92         Set group for all flows, where N >= 0.
93         Default group is 0.
94
95 Items:
96
97 *       ``--ether``
98         Add Ether item to all flows items, This item have open mask.
99
100 *       ``--vlan``
101         Add VLAN item to all flows items,
102         This item have VLAN value defined in user_parameters.h
103         under ``VNI_VALUE`` with full mask, default value = 1.
104         Other fields are open mask.
105
106 *       ``--ipv4``
107         Add IPv4 item to all flows items,
108         This item have incremental source IP, with full mask.
109         Other fields are open mask.
110
111 *       ``--ipv6``
112         Add IPv6 item to all flows item,
113         This item have incremental source IP, with full mask.
114         Other fields are open mask.
115
116 *       ``--tcp``
117         Add TCP item to all flows items, This item have open mask.
118
119 *       ``--udp``
120         Add UDP item to all flows items, This item have open mask.
121
122 *       ``--vxlan``
123         Add VXLAN item to all flows items,
124         This item have VNI value defined in user_parameters.h
125         under ``VNI_VALUE`` with full mask, default value = 1.
126         Other fields are open mask.
127
128 *       ``--vxlan-gpe``
129         Add VXLAN-GPE item to all flows items,
130         This item have VNI value defined in user_parameters.h
131         under ``VNI_VALUE`` with full mask, default value = 1.
132         Other fields are open mask.
133
134 *       ``--gre``
135         Add GRE item to all flows items,
136         This item have protocol value defined in user_parameters.h
137         under ``GRE_PROTO`` with full mask, default protocol = 0x6558 "Ether"
138         Other fields are open mask.
139
140 *       ``--geneve``
141         Add GENEVE item to all flows items,
142         This item have VNI value defined in user_parameters.h
143         under ``VNI_VALUE`` with full mask, default value = 1.
144         Other fields are open mask.
145
146 *       ``--gtp``
147         Add GTP item to all flows items,
148         This item have TEID value defined in user_parameters.h
149         under ``TEID_VALUE`` with full mask, default value = 1.
150         Other fields are open mask.
151
152 *       ``--meta``
153         Add Meta item to all flows items,
154         This item have data value defined in user_parameters.h
155         under ``META_DATA`` with full mask, default value = 1.
156         Other fields are open mask.
157
158 *       ``--tag``
159         Add Tag item to all flows items,
160         This item have data value defined in user_parameters.h
161         under ``META_DATA`` with full mask, default value = 1.
162
163         Also it have tag value defined in user_parameters.h
164         under ``TAG_INDEX`` with full mask, default value = 0.
165         Other fields are open mask.
166
167
168 Actions:
169
170 *       ``--port-id``
171         Add port redirection action to all flows actions.
172         Port redirection destination is defined in user_parameters.h
173         under PORT_ID_DST, default value = 1.
174
175 *       ``--rss``
176         Add RSS action to all flows actions,
177         The queues in RSS action will be all queues configured
178         in the app.
179
180 *       ``--queue``
181         Add queue action to all flows items,
182         The queue will change in round robin state for each flow.
183
184         For example:
185                 The app running with 4 RX queues
186                 Flow #0: queue index 0
187                 Flow #1: queue index 1
188                 Flow #2: queue index 2
189                 Flow #3: queue index 3
190                 Flow #4: queue index 0
191                 ...
192
193 *       ``--jump``
194         Add jump action to all flows actions.
195         Jump action destination is defined in user_parameters.h
196         under ``JUMP_ACTION_TABLE``, default value = 2.
197
198 *       ``--mark``
199         Add mark action to all flows actions.
200         Mark action id is defined in user_parameters.h
201         under ``MARK_ID``, default value = 1.
202
203 *       ``--count``
204         Add count action to all flows actions.
205
206 *       ``--set-meta``
207         Add set-meta action to all flows actions.
208         Meta data is defined in user_parameters.h under ``META_DATA``
209         with full mask, default value = 1.
210
211 *       ``--set-tag``
212         Add set-tag action to all flows actions.
213         Meta data is defined in user_parameters.h under ``META_DATA``
214         with full mask, default value = 1.
215
216         Tag index is defined in user_parameters.h under ``TAG_INDEX``
217         with full mask, default value = 0.
218
219 *       ``--drop``
220         Add drop action to all flows actions.
221
222 *       ``--hairpin-queue=N``
223         Add hairpin queue action to all flows actions.
224         The queue will change in round robin state for each flow.
225
226         For example:
227                 The app running with 4 RX hairpin queues and 4 normal RX queues
228                 Flow #0: queue index 4
229                 Flow #1: queue index 5
230                 Flow #2: queue index 6
231                 Flow #3: queue index 7
232                 Flow #4: queue index 4
233                 ...
234
235 *       ``--hairpin-rss=N``
236         Add hairpin RSS action to all flows actions.
237         The queues in RSS action will be all hairpin queues configured
238         in the app.