efa55b6e02720394ce023a803268aa2d7fd0ec5c
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-ethip4-ip4base-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 | IP4FWD | BASE | VHOST | VM | VHOST_1024
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 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 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=1024, 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 | | Set Test Variable | ${use_tuned_cfs} | ${True}
78 | | Set Test Variable | ${framesize}
79 | | Set Test Variable | ${min_rate}
80 | | ${get_framesize}= | Set Variable If
81 | | ... | "${framesize}" == "IMIX_v4_1" | ${avg_imix_framesize}
82 | | ... |  ${framesize}
83 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
84 | | ${binary_min}= | Set Variable | ${min_rate}
85 | | ${binary_max}= | Set Variable | ${max_rate}
86 | | ${threshold}= | Set Variable | ${min_rate}
87 | | ${dut1_vm_refs}= | Create Dictionary
88 | | ${dut2_vm_refs}= | Create Dictionary
89 | | Set Test Variable | ${dut1_vm_refs}
90 | | Set Test Variable | ${dut2_vm_refs}
91 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
92 | | And Add PCI devices to DUTs in 3-node single link topology
93 | | And Run Keyword If | ${get_framesize} < ${1522} | Add no multi seg to all DUTs
94 | | And Apply startup configuration on all VPP DUTs
95 | | When Initialize IPv4 forwarding with vhost in 3-node circular topology
96 | | ... | ${sock1} | ${sock2}
97 | | ${vm1}= | And Configure guest VM with dpdk-testpmd-mac connected via vhost-user
98 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1 | ${dut1_vif1_mac}
99 | | ... | ${dut1_vif2_mac}
100 | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM1 | ${vm1}
101 | | ${vm2}= | And Configure guest VM with dpdk-testpmd-mac connected via vhost-user
102 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1 | ${dut2_vif1_mac}
103 | | ... | ${dut2_vif2_mac}
104 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
105 | | Run Keyword Unless | ${qemu_built} | Set Suite Variable | ${qemu_built}
106 | | ... | ${True}
107 | | Run Keyword If | '${search_type}' == 'NDR'
108 | | ... | Find NDR using binary search and pps
109 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
110 | | ... | ${min_rate} | ${max_rate} | ${threshold}
111 | | ... | ELSE IF | '${search_type}' == 'PDR'
112 | | ... | Find PDR using binary search and pps
113 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
114 | | ... | ${min_rate} | ${max_rate} | ${threshold}
115 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
116
117 *** Test Cases ***
118 | tc01-64B-1t1c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
119 | | [Documentation]
120 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
121 | | ... | 1 receive queue per NIC port.
122 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
123 | | ... | linerate, step 10kpps.
124 | | ...
125 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
126 | | ...
127 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
128 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
129
130 | tc02-64B-1t1c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
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 PDR for 64 Byte frames using binary search start at 10GE\
135 | | ... | linerate, step 10kpps, LT=0.5%.
136 | | ...
137 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
138 | | ...
139 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
140 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
141
142 | tc03-1518B-1t1c-etc-l2bdbasemaclrn-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
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 NDR for 1518 Byte frames using binary search start at 10GE\
147 | | ... | linerate, step 10kpps.
148 | | ...
149 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
150 | | ...
151 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
152 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
153
154 | tc04-1518B-1t1c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
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 PDR for 1518 Byte frames using binary search start at 10GE\
159 | | ... | linerate, step 10kpps, LT=0.5%.
160 | | ...
161 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
162 | | ...
163 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
164 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
165
166 | tc05-IMIX-1t1c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
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 NDR for IMIX_v4_1 framesize using binary search start at\
171 | | ... | 10GE linerate, step 10kpps.
172 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
173 | | ...
174 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
175 | | ...
176 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
177 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
178
179 | tc06-IMIX-1t1c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
180 | | [Documentation]
181 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
182 | | ... | 1 receive queue per NIC port.
183 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
184 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
185 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
186 | | ...
187 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
188 | | ...
189 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
190 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
191
192 | tc07-64B-2t2c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
193 | | [Documentation]
194 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
195 | | ... | 1 receive queue per NIC port.
196 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
197 | | ... | linerate, step 10kpps.
198 | | ...
199 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC
200 | | ...
201 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
202 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
203
204 | tc08-64B-2t2c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
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 PDR for 64 Byte frames using binary search start at 10GE\
209 | | ... | linerate, step 10kpps, LT=0.5%.
210 | | ...
211 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
212 | | ...
213 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
214 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
215
216 | tc09-1518B-2t2c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
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 NDR for 1518 Byte frames using binary search start at 10GE\
221 | | ... | linerate, step 10kpps.
222 | | ...
223 | | [Tags] | 1518B | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
224 | | ...
225 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
226 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
227
228 | tc10-1518B-2t2c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
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 PDR for 1518 Byte frames using binary search start at 10GE\
233 | | ... | linerate, step 10kpps, LT=0.5%.
234 | | ...
235 | | [Tags] | 1518B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
236 | | ...
237 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
238 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
239
240 | tc11-IMIX-2t2c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
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 NDR for IMIX_v4_1 framesize using binary search start at\
245 | | ... | 10GE linerate, step 10kpps.
246 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
247 | | ...
248 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
249 | | ...
250 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
251 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
252
253 | tc12-IMIX-2t2c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
254 | | [Documentation]
255 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
256 | | ... | 1 receive queue per NIC port.
257 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
258 | | ... | 10GE linerate, step 10kpps.
259 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
260 | | ...
261 | | [Tags] | IMIX | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
262 | | ...
263 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
264 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
265
266 | tc13-64B-4t4c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
267 | | [Documentation]
268 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
269 | | ... | 2 receive queues per NIC port.
270 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
271 | | ... | linerate, step 10kpps.
272 | | ...
273 | | [Tags] | 64B | 4T4C | STHREAD | NDRDISC
274 | | ...
275 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
276 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=NDR
277
278 | tc14-64B-4t4c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
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 PDR for 64 Byte frames using binary search start at 10GE\
283 | | ... | linerate, step 10kpps, LT=0.5%.
284 | | ...
285 | | [Tags] | 64B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
286 | | ...
287 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
288 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=PDR
289
290 | tc15-1518B-4t4c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
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 NDR for 1518 Byte frames using binary search start at 10GE\
295 | | ... | linerate, step 10kpps.
296 | | ...
297 | | [Tags] | 1518B | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
298 | | ...
299 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
300 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=NDR
301
302 | tc16-1518B-4t4c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
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 PDR for 1518 Byte frames using binary search start at 10GE\
307 | | ... | linerate, step 10kpps, LT=0.5%.
308 | | ...
309 | | [Tags] | 1518B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
310 | | ...
311 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
312 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=PDR
313
314 | tc17-IMIX-4t4c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-ndrdisc
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 NDR for IMIX_v4_1 framesize using binary search start at\
319 | | ... | 10GE linerate, step 10kpps.
320 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
321 | | ...
322 | | [Tags] | IMIX | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
323 | | ...
324 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
325 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
326
327 | tc18-IMIX-4t4c-ethip4-ip4base-eth-2vhostvr1024-1vm-cfsrr1-pdrdisc
328 | | [Documentation]
329 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
330 | | ... | 2 receive queues per NIC port.
331 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
332 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
333 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
334 | | ...
335 | | [Tags] | IMIX | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
336 | | ...
337 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VM
338 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR