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