CSIT-661: re-add vring256 tuned CFS for vpp workers and guest-testpmd
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-eth-l2bdbasemaclrn-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 | DOT1Q | L2BDMACLRN | BASE | VHOST | VM
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 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 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 bridge-
38 | ... | domain and MAC learning enabled. Qemu Guest is connected to VPP via
39 | ... | vhost-user interfaces. Guest is running DPDK testpmd interconnecting
40 | ... | vhost-user interfaces using 5 cores pinned to cpus 5-9 and 2048M
41 | ... | memory. Testpmd is using socket-mem=1024M (512x2M hugepages), 5 cores
42 | ... | (1 main core and 4 cores dedicated for io), forwarding mode is set to
43 | ... | io, rxd/txd=256, burst=64. DUT1, DUT2 are tested with 2p10GE NIC X520
44 | ... | 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 | ${bd_id1}= | 1
65 | ${bd_id2}= | 2
66 | ${sock1}= | /tmp/sock-1-${bd_id1}
67 | ${sock2}= | /tmp/sock-1-${bd_id2}
68 # Traffic profile:
69 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
70
71 *** Keywords ***
72 | Discover NDR or PDR for L2 Bridge Domain with VM
73 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
74 | | ...
75 | | [Documentation]
76 | | ... | [Cfg] DUT runs L2BD switching config with required number of threads,\
77 | | ... | phy cores and receive queues per NIC port.
78 | | ... | [Ver] Find NDR or PDR for defined frame size using binary search\
79 | | ... | start at 10GE linerate with specified step.
80 | | ...
81 | | ... | *Arguments:*
82 | | ... | - wt - Number of worker threads to be used. Type: integer
83 | | ... | - rxq - Number of Rx queues to be used. Type: integer
84 | | ... | - framesize - L2 Frame Size [B]. Type: integer
85 | | ... | - min_rate - Lower limit of search [pps]. Type: float
86 | | ... | - search_type - Type of the search - non drop rate (NDR) or partial
87 | | ... | drop rare (PDR). Type: string
88 | | ...
89 | | Set Test Variable | ${perf_qemu_qsz} | 256
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 bridge domains with Vhost-User in 3-node circular topology
108 | | ... | ${bd_id1} | ${bd_id2} | ${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 If | '${search_type}' == 'NDR'
116 | | ... | Find NDR using binary search and pps
117 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
118 | | ... | ${min_rate} | ${max_rate} | ${threshold}
119 | | ... | ELSE IF | '${search_type}' == 'PDR'
120 | | ... | Find PDR using binary search and pps
121 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
122 | | ... | ${min_rate} | ${max_rate} | ${threshold}
123 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
124
125 *** Test Cases ***
126 | tc01-64B-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
127 | | [Documentation]
128 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
129 | | ... | 1 receive queue per NIC port.
130 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
131 | | ... | linerate, step 10kpps.
132 | | ...
133 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
134 | | ...
135 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
136 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
137
138 | tc02-64B-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
139 | | [Documentation]
140 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
141 | | ... | 1 receive queue per NIC port.
142 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
143 | | ... | linerate, step 10kpps, LT=0.5%.
144 | | ...
145 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
146 | | ...
147 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
148 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
149
150 | tc03-1518B-1t1c-etc-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
151 | | [Documentation]
152 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
153 | | ... | 1 receive queue per NIC port.
154 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
155 | | ... | linerate, step 10kpps.
156 | | ...
157 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
158 | | ...
159 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
160 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
161
162 | tc04-1518B-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
163 | | [Documentation]
164 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
165 | | ... | 1 receive queue per NIC port.
166 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
167 | | ... | linerate, step 10kpps, LT=0.5%.
168 | | ...
169 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
170 | | ...
171 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
172 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
173
174 | tc05-IMIX-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
175 | | [Documentation]
176 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
177 | | ... | 1 receive queue per NIC port.
178 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
179 | | ... | 10GE linerate, step 10kpps.
180 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
181 | | ...
182 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
183 | | ...
184 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
185 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
186
187 | tc06-IMIX-1t1c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
188 | | [Documentation]
189 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
190 | | ... | 1 receive queue per NIC port.
191 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
192 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
193 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
194 | | ...
195 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
196 | | ...
197 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
198 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
199
200 | tc07-64B-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
201 | | [Documentation]
202 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
203 | | ... | 1 receive queue per NIC port.
204 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
205 | | ... | linerate, step 10kpps.
206 | | ...
207 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC
208 | | ...
209 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
210 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=NDR
211
212 | tc08-64B-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
213 | | [Documentation]
214 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
215 | | ... | 1 receive queue per NIC port.
216 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
217 | | ... | linerate, step 10kpps, LT=0.5%.
218 | | ...
219 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
220 | | ...
221 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
222 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${10000} | search_type=PDR
223
224 | tc09-1518B-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
225 | | [Documentation]
226 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
227 | | ... | 1 receive queue per NIC port.
228 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
229 | | ... | linerate, step 10kpps.
230 | | ...
231 | | [Tags] | 1518B | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
232 | | ...
233 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
234 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=NDR
235
236 | tc10-1518B-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
237 | | [Documentation]
238 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
239 | | ... | 1 receive queue per NIC port.
240 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
241 | | ... | linerate, step 10kpps, LT=0.5%.
242 | | ...
243 | | [Tags] | 1518B | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
244 | | ...
245 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
246 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${10000} | search_type=PDR
247
248 | tc11-IMIX-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
249 | | [Documentation]
250 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
251 | | ... | 1 receive queue per NIC port.
252 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
253 | | ... | 10GE linerate, step 10kpps.
254 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
255 | | ...
256 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC | SKIP_PATCH
257 | | ...
258 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
259 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
260
261 | tc12-IMIX-2t2c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
262 | | [Documentation]
263 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy cores,\
264 | | ... | 1 receive queue per NIC port.
265 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
266 | | ... | 10GE linerate, step 10kpps.
267 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
268 | | ...
269 | | [Tags] | IMIX | 2T2C | STHREAD | PDRDISC | SKIP_PATCH
270 | | ...
271 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
272 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR
273
274 | tc13-64B-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
275 | | [Documentation]
276 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
277 | | ... | 2 receive queues per NIC port.
278 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
279 | | ... | linerate, step 10kpps.
280 | | ...
281 | | [Tags] | 64B | 4T4C | STHREAD | NDRDISC
282 | | ...
283 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
284 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=NDR
285
286 | tc14-64B-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
287 | | [Documentation]
288 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
289 | | ... | 2 receive queues per NIC port.
290 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
291 | | ... | linerate, step 10kpps, LT=0.5%.
292 | | ...
293 | | [Tags] | 64B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
294 | | ...
295 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
296 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${10000} | search_type=PDR
297
298 | tc15-1518B-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
299 | | [Documentation]
300 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
301 | | ... | 2 receive queues per NIC port.
302 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
303 | | ... | linerate, step 10kpps.
304 | | ...
305 | | [Tags] | 1518B | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
306 | | ...
307 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
308 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=NDR
309
310 | tc16-1518B-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
311 | | [Documentation]
312 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
313 | | ... | 2 receive queues per NIC port.
314 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
315 | | ... | linerate, step 10kpps, LT=0.5%.
316 | | ...
317 | | [Tags] | 1518B | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
318 | | ...
319 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
320 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${10000} | search_type=PDR
321
322 | tc17-IMIX-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-ndrdisc
323 | | [Documentation]
324 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
325 | | ... | 2 receive queues per NIC port.
326 | | ... | [Ver] Find NDR for IMIX_v4_1 framesize using binary search start at\
327 | | ... | 10GE linerate, step 10kpps.
328 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
329 | | ...
330 | | [Tags] | IMIX | 4T4C | STHREAD | NDRDISC | SKIP_PATCH
331 | | ...
332 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
333 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=NDR
334
335 | tc18-IMIX-4t4c-eth-l2bdbasemaclrn-eth-2vhostvr256-1vm-pdrdisc
336 | | [Documentation]
337 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy cores,\
338 | | ... | 2 receive queues per NIC port.
339 | | ... | [Ver] Find PDR for IMIX_v4_1 framesize using binary search start at\
340 | | ... | 10GE linerate, step 10kpps, LT=0.5%.
341 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
342 | | ...
343 | | [Tags] | IMIX | 4T4C | STHREAD | PDRDISC | SKIP_PATCH
344 | | ...
345 | | [Template] | Discover NDR or PDR for L2 Bridge Domain with VM
346 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${10000} | search_type=PDR