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