170b24f85fb166daf1d2574f8b87e0de67098599
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrpdrdisc.robot
1 # Copyright (c) 2017 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/performance/performance_setup.robot
16 | Library | resources.libraries.python.QemuUtils
17 | ...
18 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
19 | ... | NIC_Intel-X520-DA2 | ETH | IP4FWD | BASE | VHOST | VM | VHOST_256
20 | ... | CFS_OPT
21 | ...
22 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
23 | ... | L3 | Intel-X520-DA2
24 | Suite Teardown | Tear down 3-node performance topology
25 | ...
26 | Test Setup | Set up performance test
27 | Test Teardown | Tear down performance test with vhost and VM with dpdk-testpmd
28 | ... | ${min_rate}pps | ${framesize} | ${traffic_profile}
29 | ... | dut1_node=${dut1} | dut1_vm_refs=${dut1_vm_refs}
30 | ... | dut2_node=${dut2} | dut2_vm_refs=${dut2_vm_refs}
31 | ...
32 | Documentation | *RFC2544: Packet throughput IP4 test cases with vhost*
33 | ...
34 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
35 | ... | with single links between nodes.
36 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing.
37 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
38 | ... | routing and two static IPv4 /24 route entries. Qemu Guest is connected
39 | ... | to VPP via vhost-user interfaces. Guest is running DPDK testpmd
40 | ... | interconnecting vhost-user interfaces using 5 cores pinned to cpus 5-9
41 | ... | and 2048M memory. Testpmd is using socket-mem=1024M (512x2M hugepages),
42 | ... | 5 cores (1 main core and 4 cores dedicated for io), forwarding mode is
43 | ... | set to mac, rxd/txd=256, burst=64. Scheduler policy is set to SCHED_RR
44 | ... | with priority 1 for all Qemu CPUs. DUT1, DUT2 are tested with 2p10GE
45 | ... | NIC X520 Niantic by Intel.
46 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
47 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
48 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
49 | ... | of packets transmitted. NDR and PDR are discovered for different
50 | ... | Ethernet L2 frame sizes using either binary search or linear search
51 | ... | algorithms with configured starting rate and final step that determines
52 | ... | throughput measurement resolution. Test packets are generated by TG on
53 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
54 | ... | (flow-group per direction, 253 flows per flow-group) with all packets
55 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static
56 | ... | payload. MAC addresses are matching MAC addresses of the TG node
57 | ... | interfaces.
58 | ... | *[Ref] Applicable standard specifications:* RFC2544.
59
60 *** Variables ***
61 | ${avg_imix_framesize}= | ${357.833}
62 # X520-DA2 bandwidth limit
63 | ${s_limit} | ${10000000000}
64 # Socket names
65 | ${sock1}= | /tmp/sock-1-1
66 | ${sock2}= | /tmp/sock-1-2
67 # FIB tables
68 | ${fib_table_1}= | 100
69 | ${fib_table_2}= | 101
70 # Traffic profile:
71 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src253
72
73 *** Keywords ***
74 | Discover NDR or PDR for IPv4 forwarding with VM
75 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
76 | | ...
77 | | [Documentation]
78 | | ... | [Cfg] DUT runs IP4 routing config with required number of threads,\
79 | | ... | phy cores and receive queues per NIC port.
80 | | ... | [Ver] Find NDR or PDR for defined frame size using binary search\
81 | | ... | start at 10GE linerate with specified step.
82 | | ...
83 | | ... | *Arguments:*
84 | | ... | - wt - Number of worker threads to be used. Type: integer
85 | | ... | - rxq - Number of Rx queues to be used. Type: integer
86 | | ... | - framesize - L2 Frame Size [B]. Type: integer
87 | | ... | - min_rate - Lower limit of search [pps]. Type: float
88 | | ... | - search_type - Type of the search - non drop rate (NDR) or partial
89 | | ... | drop rare (PDR). Type: string
90 | | ...
91 | | Set Test Variable | ${perf_qemu_qsz} | 256
92 | | Set Test Variable | ${use_tuned_cfs} | ${True}
93 | | Set Test Variable | ${framesize}
94 | | Set Test Variable | ${min_rate}
95 | | ${get_framesize}= | Set Variable If
96 | | ... | "${framesize}" == "IMIX_v4_1" | ${avg_imix_framesize}
97 | | ... |  ${framesize}
98 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
99 | | ${binary_min}= | Set Variable | ${min_rate}
100 | | ${binary_max}= | Set Variable | ${max_rate}
101 | | ${threshold}= | Set Variable | ${min_rate}
102 | | ${dut1_vm_refs}= | Create Dictionary
103 | | ${dut2_vm_refs}= | Create Dictionary
104 | | Set Test Variable | ${dut1_vm_refs}
105 | | Set Test Variable | ${dut2_vm_refs}
106 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
107 | | And Add PCI devices to DUTs in 3-node single link topology
108 | | And Run Keyword If | ${get_framesize} < ${1522} | Add no multi seg to all DUTs
109 | | And Apply startup configuration on all VPP DUTs
110 | | When Initialize IPv4 forwarding with vhost in 3-node circular topology
111 | | ... | ${sock1} | ${sock2}
112 | | ${vm1}= | And Configure guest VM with dpdk-testpmd-mac connected via vhost-user
113 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1 | ${dut1_vif1_mac}
114 | | ... | ${dut1_vif2_mac}
115 | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM1 | ${vm1}
116 | | ${vm2}= | And Configure guest VM with dpdk-testpmd-mac connected via vhost-user
117 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1 | ${dut2_vif1_mac}
118 | | ... | ${dut2_vif2_mac}
119 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
120 | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built}
121 | | ... | ${True}
122 | | Run Keyword If | '${search_type}' == 'NDR'
123 | | ... | Find NDR using binary search and pps
124 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
125 | | ... | ${min_rate} | ${max_rate} | ${threshold}
126 | | ... | ELSE IF | '${search_type}' == 'PDR'
127 | | ... | Find PDR using binary search and pps
128 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
129 | | ... | ${min_rate} | ${max_rate} | ${threshold}
130 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
131
132 *** Test Cases ***
133 | tc01-64B-1t1c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
134 | | [Documentation]
135 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
136 | | ... | 1 receive queue per NIC port.
137 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
138 | | ... | linerate, step 10kpps.
139 | | ...
140 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
141 | | ...
142 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
143 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
144
145 | tc02-64B-1t1c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
146 | | [Documentation]
147 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
148 | | ... | 1 receive queue per NIC port.
149 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
150 | | ... | linerate, step 10kpps, LT=0.5%.
151 | | ...
152 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
153 | | ...
154 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
155 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
156
157 | tc03-1518B-1t1c--ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
158 | | [Documentation]
159 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
160 | | ... | 1 receive queue per NIC port.
161 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
162 | | ... | linerate, step 10kpps.
163 | | ...
164 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
165 | | ...
166 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
167 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
168
169 | tc04-1518B-1t1c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
170 | | [Documentation]
171 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
172 | | ... | 1 receive queue per NIC port.
173 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
174 | | ... | linerate, step 10kpps, LT=0.5%.
175 | | ...
176 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
177 | | ...
178 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
179 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
180
181 | tc05-IMIX-1t1c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
182 | | [Documentation]
183 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
184 | | ... | 1 receive queue per NIC port.
185 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
186 | | ... | 10GE linerate, step 10kpps.
187 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
188 | | ...
189 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
190 | | ...
191 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
192 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
193
194 | tc06-IMIX-1t1c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
195 | | [Documentation]
196 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
197 | | ... | 1 receive queue per NIC port.
198 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
199 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
200 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
201 | | ...
202 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
203 | | ...
204 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
205 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
206
207 | tc07-64B-2t2c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
208 | | [Documentation]
209 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
210 | | ... | 1 receive queue per NIC port.
211 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
212 | | ... | linerate, step 10kpps.
213 | | ...
214 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC
215 | | ...
216 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
217 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
218
219 | tc08-64B-2t2c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
220 | | [Documentation]
221 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
222 | | ... | 1 receive queue per NIC port.
223 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
224 | | ... | linerate, step 10kpps, LT=0.5%.
225 | | ...
226 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
227 | | ...
228 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
229 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
230
231 | tc09-1518B-2t2c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
232 | | [Documentation]
233 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
234 | | ... | 1 receive queue per NIC port.
235 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
236 | | ... | linerate, step 10kpps.
237 | | ...
238 | | [Tags] | 1518B | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
239 | | ...
240 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
241 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
242
243 | tc10-1518B-2t2c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
244 | | [Documentation]
245 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
246 | | ... | 1 receive queue per NIC port.
247 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
248 | | ... | linerate, step 10kpps, LT=0.5%.
249 | | ...
250 | | [Tags] | 1518B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
251 | | ...
252 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
253 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
254
255 | tc11-IMIX-2t2c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
256 | | [Documentation]
257 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
258 | | ... | 1 receive queue per NIC port.
259 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
260 | | ... | 10GE linerate, step 10kpps.
261 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
262 | | ...
263 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
264 | | ...
265 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
266 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
267
268 | tc12-IMIX-2t2c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
269 | | [Documentation]
270 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
271 | | ... | 1 receive queue per NIC port.
272 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
273 | | ... | 10GE linerate, step 10kpps.
274 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
275 | | ...
276 | | [Tags] | IMIX | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
277 | | ...
278 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
279 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
280
281 | tc13-64B-4t4c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
282 | | [Documentation]
283 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
284 | | ... | 2 receive queues per NIC port.
285 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
286 | | ... | linerate, step 10kpps.
287 | | ...
288 | | [Tags] | 64B | 4T4C | STHREAD | NDRDISC
289 | | ...
290 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
291 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=NDR
292
293 | tc14-64B-4t4c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
294 | | [Documentation]
295 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
296 | | ... | 2 receive queues per NIC port.
297 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
298 | | ... | linerate, step 10kpps, LT=0.5%.
299 | | ...
300 | | [Tags] | 64B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
301 | | ...
302 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
303 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=PDR
304
305 | tc15-1518B-4t4c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
306 | | [Documentation]
307 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
308 | | ... | 2 receive queues per NIC port.
309 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
310 | | ... | linerate, step 10kpps.
311 | | ...
312 | | [Tags] | 1518B | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
313 | | ...
314 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
315 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=NDR
316
317 | tc16-1518B-4t4c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
318 | | [Documentation]
319 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
320 | | ... | 2 receive queues per NIC port.
321 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
322 | | ... | linerate, step 10kpps, LT=0.5%.
323 | | ...
324 | | [Tags] | 1518B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
325 | | ...
326 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
327 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=PDR
328
329 | tc17-IMIX-4t4c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
330 | | [Documentation]
331 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
332 | | ... | 2 receive queues per NIC port.
333 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
334 | | ... | 10GE linerate, step 10kpps.
335 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
336 | | ...
337 | | [Tags] | IMIX | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
338 | | ...
339 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
340 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
341
342 | tc18-IMIX-4t4c-ethip4-ip4base-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
343 | | [Documentation]
344 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
345 | | ... | 2 receive queues per NIC port.
346 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
347 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
348 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
349 | | ...
350 | | [Tags] | IMIX | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
351 | | ...
352 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
353 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR