Optimize Qemu installation to speed up vhost tests
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-eth-l2bdbasemaclrn-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 | L2BDMACLRN | BASE | VHOST | VM | VHOST_256
20 | ... | CFS_OPT
21 | ...
22 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
23 | ... | L2 | 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 L2BD 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 L2 switching of IPv4. 802.1q
37 | ... | tagging is applied on link between DUT1 and DUT2.
38 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 bridge-
39 | ... | domain and MAC learning enabled. Qemu Guest is connected to VPP via
40 | ... | vhost-user interfaces. Guest is running DPDK testpmd interconnecting
41 | ... | vhost-user interfaces using 5 cores pinned to cpus 5-9 and 2048M
42 | ... | memory. Testpmd is using socket-mem=1024M (512x2M hugepages), 5 cores
43 | ... | (1 main core and 4 cores dedicated for io), forwarding mode is set to
44 | ... | io, rxd/txd=256, burst=64. Scheduler policy is set to SCHED_RR with
45 | ... | priority 1 for all Qemu CPUs. DUT1, DUT2 are tested with 2p10GE NIC X520
46 | ... | Niantic by Intel.
47 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
48 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
49 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
50 | ... | of packets transmitted. NDR and PDR are discovered for different
51 | ... | Ethernet L2 frame sizes using either binary search or linear search
52 | ... | algorithms with configured starting rate and final step that determines
53 | ... | throughput measurement resolution. Test packets are generated by TG on
54 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
55 | ... | (flow-group per direction, 253 flows per flow-group) with all packets
56 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static
57 | ... | payload. MAC addresses are matching MAC addresses of the TG node
58 | ... | interfaces.
59 | ... | *[Ref] Applicable standard specifications:* RFC2544.
60
61 *** Variables ***
62 | ${perf_qemu_qsz}= | 256
63 | ${avg_imix_framesize}= | ${357.833}
64 # X520-DA2 bandwidth limit
65 | ${s_limit} | ${10000000000}
66 # Socket names
67 | ${bd_id1}= | 1
68 | ${bd_id2}= | 2
69 | ${sock1}= | /tmp/sock-1-${bd_id1}
70 | ${sock2}= | /tmp/sock-1-${bd_id2}
71 # Traffic profile:
72 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
73
74 *** Keywords ***
75 | Discover NDR or PDR for L2 Bridge Domain with VM
76 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
77 | | ...
78 | | [Documentation]
79 | | ... | [Cfg] DUT runs L2BD switching config with required number of threads,\
80 | | ... | phy cores and receive queues per NIC port.
81 | | ... | [Ver] Find NDR or PDR for defined frame size using binary search\
82 | | ... | start at 10GE linerate with specified step.
83 | | ...
84 | | ... | *Arguments:*
85 | | ... | - wt - Number of worker threads to be used. Type: integer
86 | | ... | - rxq - Number of Rx queues to be used. Type: integer
87 | | ... | - framesize - L2 Frame Size [B]. Type: integer
88 | | ... | - min_rate - Lower limit of search [pps]. Type: float
89 | | ... | - search_type - Type of the search - non drop rate (NDR) or partial
90 | | ... | drop rare (PDR). Type: string
91 | | ...
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 L2 bridge domains with Vhost-User in 3-node circular topology
111 | | ... | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
112 | | ${vm1}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
113 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1
114 | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM1 | ${vm1}
115 | | ${vm2}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
116 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
117 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
118 | | Setup Scheduler Policy for Vpp On All DUTs
119 | | Run Keyword If | '${search_type}' == 'NDR'
120 | | ... | Find NDR using binary search and pps
121 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
122 | | ... | ${min_rate} | ${max_rate} | ${threshold}
123 | | ... | ELSE IF | '${search_type}' == 'PDR'
124 | | ... | Find PDR using binary search and pps
125 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
126 | | ... | ${min_rate} | ${max_rate} | ${threshold}
127 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
128
129 *** Test Cases ***
130 | tc01-64B-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
131 | | [Documentation]
132 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
133 | | ... | 1 receive queue per NIC port.
134 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
135 | | ... | linerate, step 10kpps.
136 | | ...
137 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
138 | | ...
139 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
140 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
141
142 | tc02-64B-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
143 | | [Documentation]
144 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
145 | | ... | 1 receive queue per NIC port.
146 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
147 | | ... | linerate, step 10kpps, LT=0.5%.
148 | | ...
149 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
150 | | ...
151 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
152 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
153
154 | tc03-1518B-1t1c-etc-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
155 | | [Documentation]
156 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
157 | | ... | 1 receive queue per NIC port.
158 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
159 | | ... | linerate, step 10kpps.
160 | | ...
161 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
162 | | ...
163 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
164 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
165
166 | tc04-1518B-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
167 | | [Documentation]
168 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
169 | | ... | 1 receive queue per NIC port.
170 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
171 | | ... | linerate, step 10kpps, LT=0.5%.
172 | | ...
173 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
174 | | ...
175 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
176 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
177
178 | tc05-IMIX-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
179 | | [Documentation]
180 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
181 | | ... | 1 receive queue per NIC port.
182 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
183 | | ... | 10GE linerate, step 10kpps.
184 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
185 | | ...
186 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
187 | | ...
188 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
189 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
190
191 | tc06-IMIX-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
192 | | [Documentation]
193 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
194 | | ... | 1 receive queue per NIC port.
195 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
196 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
197 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
198 | | ...
199 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
200 | | ...
201 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
202 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
203
204 | tc07-64B-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
205 | | [Documentation]
206 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
207 | | ... | 1 receive queue per NIC port.
208 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
209 | | ... | linerate, step 10kpps.
210 | | ...
211 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC
212 | | ...
213 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
214 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
215
216 | tc08-64B-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
217 | | [Documentation]
218 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
219 | | ... | 1 receive queue per NIC port.
220 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
221 | | ... | linerate, step 10kpps, LT=0.5%.
222 | | ...
223 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
224 | | ...
225 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
226 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
227
228 | tc09-1518B-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
229 | | [Documentation]
230 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
231 | | ... | 1 receive queue per NIC port.
232 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
233 | | ... | linerate, step 10kpps.
234 | | ...
235 | | [Tags] | 1518B | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
236 | | ...
237 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
238 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
239
240 | tc10-1518B-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
241 | | [Documentation]
242 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
243 | | ... | 1 receive queue per NIC port.
244 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
245 | | ... | linerate, step 10kpps, LT=0.5%.
246 | | ...
247 | | [Tags] | 1518B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
248 | | ...
249 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
250 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
251
252 | tc11-IMIX-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
253 | | [Documentation]
254 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
255 | | ... | 1 receive queue per NIC port.
256 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
257 | | ... | 10GE linerate, step 10kpps.
258 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
259 | | ...
260 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
261 | | ...
262 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
263 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
264
265 | tc12-IMIX-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
266 | | [Documentation]
267 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
268 | | ... | 1 receive queue per NIC port.
269 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
270 | | ... | 10GE linerate, step 10kpps.
271 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
272 | | ...
273 | | [Tags] | IMIX | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
274 | | ...
275 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
276 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
277
278 | tc13-64B-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
279 | | [Documentation]
280 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
281 | | ... | 2 receive queues per NIC port.
282 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
283 | | ... | linerate, step 10kpps.
284 | | ...
285 | | [Tags] | 64B | 4T4C | STHREAD | NDRDISC
286 | | ...
287 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
288 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=NDR
289
290 | tc14-64B-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
291 | | [Documentation]
292 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
293 | | ... | 2 receive queues per NIC port.
294 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
295 | | ... | linerate, step 10kpps, LT=0.5%.
296 | | ...
297 | | [Tags] | 64B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
298 | | ...
299 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
300 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=PDR
301
302 | tc15-1518B-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
303 | | [Documentation]
304 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
305 | | ... | 2 receive queues per NIC port.
306 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
307 | | ... | linerate, step 10kpps.
308 | | ...
309 | | [Tags] | 1518B | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
310 | | ...
311 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
312 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=NDR
313
314 | tc16-1518B-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
315 | | [Documentation]
316 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
317 | | ... | 2 receive queues per NIC port.
318 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
319 | | ... | linerate, step 10kpps, LT=0.5%.
320 | | ...
321 | | [Tags] | 1518B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
322 | | ...
323 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
324 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=PDR
325
326 | tc17-IMIX-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
327 | | [Documentation]
328 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
329 | | ... | 2 receive queues per NIC port.
330 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
331 | | ... | 10GE linerate, step 10kpps.
332 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
333 | | ...
334 | | [Tags] | IMIX | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
335 | | ...
336 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
337 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
338
339 | tc18-IMIX-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
340 | | [Documentation]
341 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
342 | | ... | 2 receive queues per NIC port.
343 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
344 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
345 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
346 | | ...
347 | | [Tags] | IMIX | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
348 | | ...
349 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
350 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR