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