cc91353e886912a1580f6eae568ae977ca5062dd
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-eth-l2bdscale100kmaclrn-eth-2vhostvr1024-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 | SCALE | FIB_100K | VHOST | VM
20 | ... | VHOST_1024 | 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.\
37 | ... | 802.1q 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=1024, burst=64. Scheduler policy is set to SCHED_RR with\
45 | ... | priority 1 for all Qemu CPUs. DUT1, DUT2 are tested with 2p10GE NIC\
46 | ... | X520 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, 500k flows per flow-group) with all packets\
56 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static\
57 | ... | payload. MAC addresses ranges are incremented as follows:
58 | ... | port01_src ca:fe:00:00:00:00 - port01_src ca:fe:00:00:c3:4f,\
59 | ... | port01_dst fa:ce:00:00:00:00 - port01_dst fa:ce:00:00:c3:4f,\
60 | ... | port02_src fa:ce:00:00:00:00 - port02_src fa:ce:00:00:c3:4f,\
61 | ... | port02_dst ca:fe:00:00:00:00 - port02_dst ca:fe:00:00:c3:4f,\
62 | ... | *[Ref] Applicable standard specifications:* RFC2544.
63
64 *** Variables ***
65 | ${avg_imix_framesize}= | ${357.833}
66 # X520-DA2 bandwidth limit
67 | ${s_limit} | ${10000000000}
68 # Socket names
69 | ${bd_id1}= | 1
70 | ${bd_id2}= | 2
71 | ${sock1}= | /tmp/sock-1-${bd_id1}
72 | ${sock2}= | /tmp/sock-1-${bd_id2}
73 # Traffic profile:
74 | ${traffic_profile} | trex-sl-3n-ethip4-macsrc50kdst50k
75
76 *** Keywords ***
77 | Discover NDR or PDR for L2 Bridge Domain with VM
78 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
79 | | ...
80 | | Set Test Variable | ${use_tuned_cfs} | ${True}
81 | | Set Test Variable | ${framesize}
82 | | Set Test Variable | ${min_rate}
83 | | ${get_framesize}= | Set Variable If
84 | | ... | "${framesize}" == "IMIX_v4_1" | ${avg_imix_framesize}
85 | | ... |  ${framesize}
86 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
87 | | ${binary_min}= | Set Variable | ${min_rate}
88 | | ${binary_max}= | Set Variable | ${max_rate}
89 | | ${threshold}= | Set Variable | ${min_rate}
90 | | ${dut1_vm_refs}= | Create Dictionary
91 | | ${dut2_vm_refs}= | Create Dictionary
92 | | Set Test Variable | ${dut1_vm_refs}
93 | | Set Test Variable | ${dut2_vm_refs}
94 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
95 | | And Add PCI devices to DUTs in 3-node single link topology
96 | | And Run Keyword If | ${get_framesize} < ${1522} | Add no multi seg to all DUTs
97 | | And Apply startup configuration on all VPP DUTs
98 | | When Initialize L2 bridge domains with Vhost-User in 3-node circular topology
99 | | ... | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2}
100 | | ${vm1}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
101 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1
102 | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM1 | ${vm1}
103 | | ${vm2}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
104 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
105 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
106 | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built}
107 | | ... | ${True}
108 | | Setup Scheduler Policy for Vpp On All DUTs
109 | | Run Keyword If | '${search_type}' == 'NDR'
110 | | ... | Find NDR using binary search and pps
111 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
112 | | ... | ${min_rate} | ${max_rate} | ${threshold}
113 | | ... | ELSE IF | '${search_type}' == 'PDR'
114 | | ... | Find PDR using binary search and pps
115 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
116 | | ... | ${min_rate} | ${max_rate} | ${threshold}
117 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
118
119 *** Test Cases ***
120 | tc01-64B-1t1c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
121 | | [Documentation]
122 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
123 | | ... | 1 receive queue per NIC port.
124 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
125 | | ... | linerate, step 10kpps.
126 | | ...
127 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
128 | | ...
129 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
130 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
131
132 | tc02-64B-1t1c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
133 | | [Documentation]
134 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
135 | | ... | 1 receive queue per NIC port.
136 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
137 | | ... | linerate, step 10kpps, LT=0.5%.
138 | | ...
139 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
140 | | ...
141 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
142 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
143
144 | tc03-1518B-1t1c-etc-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
145 | | [Documentation]
146 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
147 | | ... | 1 receive queue per NIC port.
148 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
149 | | ... | linerate, step 10kpps.
150 | | ...
151 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
152 | | ...
153 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
154 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
155
156 | tc04-1518B-1t1c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
157 | | [Documentation]
158 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
159 | | ... | 1 receive queue per NIC port.
160 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
161 | | ... | linerate, step 10kpps, LT=0.5%.
162 | | ...
163 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
164 | | ...
165 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
166 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
167
168 | tc05-IMIX-1t1c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
169 | | [Documentation]
170 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
171 | | ... | 1 receive queue per NIC port.
172 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
173 | | ... | 10GE linerate, step 10kpps.
174 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
175 | | ...
176 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
177 | | ...
178 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
179 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
180
181 | tc06-IMIX-1t1c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
182 | | [Documentation]
183 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
184 | | ... | 1 receive queue per NIC port.
185 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
186 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
187 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
188 | | ...
189 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
190 | | ...
191 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
192 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
193
194 | tc07-64B-2t2c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
195 | | [Documentation]
196 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
197 | | ... | 1 receive queue per NIC port.
198 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
199 | | ... | linerate, step 10kpps.
200 | | ...
201 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC
202 | | ...
203 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
204 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
205
206 | tc08-64B-2t2c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
207 | | [Documentation]
208 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
209 | | ... | 1 receive queue per NIC port.
210 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
211 | | ... | linerate, step 10kpps, LT=0.5%.
212 | | ...
213 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
214 | | ...
215 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
216 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
217
218 | tc09-1518B-2t2c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
219 | | [Documentation]
220 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
221 | | ... | 1 receive queue per NIC port.
222 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
223 | | ... | linerate, step 10kpps.
224 | | ...
225 | | [Tags] | 1518B | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
226 | | ...
227 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
228 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
229
230 | tc10-1518B-2t2c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
231 | | [Documentation]
232 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
233 | | ... | 1 receive queue per NIC port.
234 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
235 | | ... | linerate, step 10kpps, LT=0.5%.
236 | | ...
237 | | [Tags] | 1518B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
238 | | ...
239 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
240 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
241
242 | tc11-IMIX-2t2c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
243 | | [Documentation]
244 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
245 | | ... | 1 receive queue per NIC port.
246 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
247 | | ... | 10GE linerate, step 10kpps.
248 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
249 | | ...
250 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
251 | | ...
252 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
253 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
254
255 | tc12-IMIX-2t2c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
256 | | [Documentation]
257 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
258 | | ... | 1 receive queue per NIC port.
259 | | ... | [Ver] Find PDR 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 | PDRDISC | SKIP_PATCH
264 | | ...
265 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
266 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
267
268 | tc13-64B-4t4c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
269 | | [Documentation]
270 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
271 | | ... | 2 receive queues per NIC port.
272 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
273 | | ... | linerate, step 10kpps.
274 | | ...
275 | | [Tags] | 64B | 4T4C | STHREAD | NDRDISC
276 | | ...
277 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
278 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=NDR
279
280 | tc14-64B-4t4c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
281 | | [Documentation]
282 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
283 | | ... | 2 receive queues per NIC port.
284 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
285 | | ... | linerate, step 10kpps, LT=0.5%.
286 | | ...
287 | | [Tags] | 64B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
288 | | ...
289 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
290 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=PDR
291
292 | tc15-1518B-4t4c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
293 | | [Documentation]
294 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
295 | | ... | 2 receive queues per NIC port.
296 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
297 | | ... | linerate, step 10kpps.
298 | | ...
299 | | [Tags] | 1518B | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
300 | | ...
301 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
302 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=NDR
303
304 | tc16-1518B-4t4c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
305 | | [Documentation]
306 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
307 | | ... | 2 receive queues per NIC port.
308 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
309 | | ... | linerate, step 10kpps, LT=0.5%.
310 | | ...
311 | | [Tags] | 1518B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
312 | | ...
313 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
314 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=PDR
315
316 | tc17-IMIX-4t4c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
317 | | [Documentation]
318 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
319 | | ... | 2 receive queues per NIC port.
320 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
321 | | ... | 10GE linerate, step 10kpps.
322 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
323 | | ...
324 | | [Tags] | IMIX | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
325 | | ...
326 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
327 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
328
329 | tc18-IMIX-4t4c-eth-l2dbscale100kmaclrn-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
330 | | [Documentation]
331 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
332 | | ... | 2 receive queues per NIC port.
333 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
334 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
335 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
336 | | ...
337 | | [Tags] | IMIX | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
338 | | ...
339 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
340 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR