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