858f427a030bd12c407a79dfcde29b3d7dc65c36
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-eth-l2xcbase-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 | L2XCFWD | 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 L2XC 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 cross-
39 | ... | connect. Qemu Guest is connected to VPP via vhost-user interfaces.
40 | ... | Guest is running DPDK testpmd interconnecting vhost-user interfaces
41 | ... | using 5 cores pinned to cpus 5-9 and 2048M memory. Testpmd is using
42 | ... | socket-mem=1024M (512x2M hugepages), 5 cores (1 main core and 4 cores
43 | ... | dedicated for io), forwarding mode is set to io, rxd/txd=256,
44 | ... | burst=64. Scheduler policy is set to SCHED_RR with priority 1 for all
45 | ... | Qemu CPUs. DUT1, DUT2 are tested with 2p10GE 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 # Traffic profile:
68 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
69
70 *** Keywords ***
71 | Discover NDR or PDR for L2 xconnect with VM
72 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
73 | | ...
74 | | [Documentation]
75 | | ... | [Cfg] DUT runs L2XC switching config with required number of threads,\
76 | | ... | phy cores and receive queues per NIC port.
77 | | ... | [Ver] Find NDR or PDR for defined frame size using binary search\
78 | | ... | start at 10GE linerate with specified step.
79 | | ...
80 | | ... | *Arguments:*
81 | | ... | - wt - Number of worker threads to be used. Type: integer
82 | | ... | - rxq - Number of Rx queues to be used. Type: integer
83 | | ... | - framesize - L2 Frame Size [B]. Type: integer
84 | | ... | - min_rate - Lower limit of search [pps]. Type: float
85 | | ... | - search_type - Type of the search - non drop rate (NDR) or partial
86 | | ... | drop rare (PDR). Type: string
87 | | ...
88 | | Set Test Variable | ${perf_qemu_qsz} | 256
89 | | Set Test Variable | ${use_tuned_cfs} | ${True}
90 | | Set Test Variable | ${framesize}
91 | | Set Test Variable | ${min_rate}
92 | | ${get_framesize}= | Set Variable If
93 | | ... | "${framesize}" == "IMIX_v4_1" | ${avg_imix_framesize}
94 | | ... |  ${framesize}
95 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
96 | | ${binary_min}= | Set Variable | ${min_rate}
97 | | ${binary_max}= | Set Variable | ${max_rate}
98 | | ${threshold}= | Set Variable | ${min_rate}
99 | | ${dut1_vm_refs}= | Create Dictionary
100 | | ${dut2_vm_refs}= | Create Dictionary
101 | | Set Test Variable | ${dut1_vm_refs}
102 | | Set Test Variable | ${dut2_vm_refs}
103 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
104 | | And Add PCI devices to DUTs in 3-node single link topology
105 | | And Run Keyword If | ${get_framesize} < ${1522} | Add no multi seg to all DUTs
106 | | And Apply startup configuration on all VPP DUTs
107 | | When Initialize L2 xconnect with Vhost-User in 3-node circular topology
108 | | ... | ${sock1} | ${sock2}
109 | | ${vm1}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
110 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1
111 | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM1 | ${vm1}
112 | | ${vm2}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
113 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
114 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
115 | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built}
116 | | ... | ${True}
117 | | Setup Scheduler Policy for Vpp On All DUTs
118 | | Run Keyword If | '${search_type}' == 'NDR'
119 | | ... | Find NDR using binary search and pps
120 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
121 | | ... | ${min_rate} | ${max_rate} | ${threshold}
122 | | ... | ELSE IF | '${search_type}' == 'PDR'
123 | | ... | Find PDR using binary search and pps
124 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
125 | | ... | ${min_rate} | ${max_rate} | ${threshold}
126 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
127
128 *** Test Cases ***
129 | tc01-64B-1t1c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
130 | | [Documentation]
131 | | ... | [Cfg] DUT runs L2XC switching config with 1 thread, 1 phy core,\
132 | | ... | 1 receive queue per NIC port.
133 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
134 | | ... | linerate, step 10kpps.
135 | | ...
136 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
137 | | ...
138 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
139 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
140
141 | tc02-64B-1t1c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
142 | | [Documentation]
143 | | ... | [Cfg] DUT runs L2XC switching config with 1 thread, 1 phy core,\
144 | | ... | 1 receive queue per NIC port.
145 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
146 | | ... | linerate, step 10kpps, LT=0.5%.
147 | | ...
148 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
149 | | ...
150 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
151 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
152
153 | tc03-1518B-1t1c-etc-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
154 | | [Documentation]
155 | | ... | [Cfg] DUT runs L2XC switching config with 1 thread, 1 phy core,\
156 | | ... | 1 receive queue per NIC port.
157 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
158 | | ... | linerate, step 10kpps.
159 | | ...
160 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
161 | | ...
162 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
163 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
164
165 | tc04-1518B-1t1c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
166 | | [Documentation]
167 | | ... | [Cfg] DUT runs L2XC switching config with 1 thread, 1 phy core,\
168 | | ... | 1 receive queue per NIC port.
169 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
170 | | ... | linerate, step 10kpps, LT=0.5%.
171 | | ...
172 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
173 | | ...
174 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
175 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
176
177 | tc05-IMIX-1t1c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
178 | | [Documentation]
179 | | ... | [Cfg] DUT runs L2XC switching config with 1 thread, 1 phy core,\
180 | | ... | 1 receive queue per NIC port.
181 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
182 | | ... | 10GE linerate, step 10kpps.
183 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
184 | | ...
185 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
186 | | ...
187 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
188 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
189
190 | tc06-IMIX-1t1c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
191 | | [Documentation]
192 | | ... | [Cfg] DUT runs L2XC switching config with 1 thread, 1 phy core,\
193 | | ... | 1 receive queue per NIC port.
194 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
195 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
196 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
197 | | ...
198 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
199 | | ...
200 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
201 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
202
203 | tc07-64B-2t2c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
204 | | [Documentation]
205 | | ... | [Cfg] DUT runs L2XC switching config with 2 threads, 2 phy cores,\
206 | | ... | 1 receive queue per NIC port.
207 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
208 | | ... | linerate, step 10kpps.
209 | | ...
210 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC
211 | | ...
212 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
213 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
214
215 | tc08-64B-2t2c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
216 | | [Documentation]
217 | | ... | [Cfg] DUT runs L2XC switching config with 2 threads, 2 phy cores,\
218 | | ... | 1 receive queue per NIC port.
219 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
220 | | ... | linerate, step 10kpps, LT=0.5%.
221 | | ...
222 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
223 | | ...
224 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
225 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
226
227 | tc09-1518B-2t2c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
228 | | [Documentation]
229 | | ... | [Cfg] DUT runs L2XC switching config with 2 threads, 2 phy cores,\
230 | | ... | 1 receive queue per NIC port.
231 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
232 | | ... | linerate, step 10kpps.
233 | | ...
234 | | [Tags] | 1518B | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
235 | | ...
236 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
237 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
238
239 | tc10-1518B-2t2c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
240 | | [Documentation]
241 | | ... | [Cfg] DUT runs L2XC switching config with 2 threads, 2 phy cores,\
242 | | ... | 1 receive queue per NIC port.
243 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
244 | | ... | linerate, step 10kpps, LT=0.5%.
245 | | ...
246 | | [Tags] | 1518B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
247 | | ...
248 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
249 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
250
251 | tc11-IMIX-2t2c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
252 | | [Documentation]
253 | | ... | [Cfg] DUT runs L2XC switching config with 2 threads, 2 phy cores,\
254 | | ... | 1 receive queue per NIC port.
255 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
256 | | ... | 10GE linerate, step 10kpps.
257 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
258 | | ...
259 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
260 | | ...
261 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
262 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
263
264 | tc12-IMIX-2t2c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
265 | | [Documentation]
266 | | ... | [Cfg] DUT runs L2XC switching config with 2 threads, 2 phy cores,\
267 | | ... | 1 receive queue per NIC port.
268 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
269 | | ... | 10GE linerate, step 10kpps.
270 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
271 | | ...
272 | | [Tags] | IMIX | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
273 | | ...
274 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
275 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
276
277 | tc13-64B-4t4c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
278 | | [Documentation]
279 | | ... | [Cfg] DUT runs L2XC switching config with 4 threads, 4 phy cores,\
280 | | ... | 2 receive queues per NIC port.
281 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
282 | | ... | linerate, step 10kpps.
283 | | ...
284 | | [Tags] | 64B | 4T4C | STHREAD | NDRDISC
285 | | ...
286 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
287 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=NDR
288
289 | tc14-64B-4t4c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
290 | | [Documentation]
291 | | ... | [Cfg] DUT runs L2XC switching config with 4 threads, 4 phy cores,\
292 | | ... | 2 receive queues per NIC port.
293 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
294 | | ... | linerate, step 10kpps, LT=0.5%.
295 | | ...
296 | | [Tags] | 64B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
297 | | ...
298 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
299 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=PDR
300
301 | tc15-1518B-4t4c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
302 | | [Documentation]
303 | | ... | [Cfg] DUT runs L2XC switching config with 4 threads, 4 phy cores,\
304 | | ... | 2 receive queues per NIC port.
305 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
306 | | ... | linerate, step 10kpps.
307 | | ...
308 | | [Tags] | 1518B | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
309 | | ...
310 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
311 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=NDR
312
313 | tc16-1518B-4t4c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
314 | | [Documentation]
315 | | ... | [Cfg] DUT runs L2XC switching config with 4 threads, 4 phy cores,\
316 | | ... | 2 receive queues per NIC port.
317 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
318 | | ... | linerate, step 10kpps, LT=0.5%.
319 | | ...
320 | | [Tags] | 1518B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
321 | | ...
322 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
323 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=PDR
324
325 | tc17-IMIX-4t4c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-ndrdisc
326 | | [Documentation]
327 | | ... | [Cfg] DUT runs L2XC switching config with 4 threads, 4 phy cores,\
328 | | ... | 2 receive queues per NIC port.
329 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
330 | | ... | 10GE linerate, step 10kpps.
331 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
332 | | ...
333 | | [Tags] | IMIX | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
334 | | ...
335 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
336 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
337
338 | tc18-IMIX-4t4c-eth-l2xcbase-eth-2vhostvr256-1vm-cfsrr1-pdrdisc
339 | | [Documentation]
340 | | ... | [Cfg] DUT runs L2XC switching config with 4 threads, 4 phy cores,\
341 | | ... | 2 receive queues per NIC port.
342 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
343 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
344 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
345 | | ...
346 | | [Tags] | IMIX | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
347 | | ...
348 | | [Template] | Discover NDR or PDR for L2 xconnect with VM
349 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR