Optimize Qemu installation to speed up vhost tests
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk.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 | PDRCHK
19 | ... | NIC_Intel-X520-DA2 | DOT1Q | L2BDMACLRN | BASE | VHOST | VM | VHOST_1024
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 pdrchk test with vhost and VM with dpdk-testpmd
27 | ... | ${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 verifies throughput PDR (Partial Drop
46 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
47 | ... | of packets transmitted. Ref-PDR value is periodically updated acording to
48 | ... | formula: ref-PDR = 0.9x PDR, where PDR is found in RFC2544 long
49 | ... | performance tests for the same DUT configuration. Test packets are
50 | ... | generated by TG on links to DUTs. TG traffic profile contains two L3
51 | ... | flow-groups (flow-group per direction, 253 flows per flow-group) with
52 | ... | all packets containing Ethernet header, IPv4 header with IP protocol=61
53 | ... | and static payload. MAC addresses are matching MAC addresses of the
54 | ... | TG node interfaces.
55 | ... | *[Ref] Applicable standard specifications:* RFC2544.
56
57 *** Variables ***
58 | ${perf_qemu_qsz}= | 1024
59 | ${subid}= | 10
60 | ${tag_rewrite}= | pop-1
61 # Socket names
62 | ${bd_id1}= | 1
63 | ${bd_id2}= | 2
64 | ${sock1}= | /tmp/sock-1-${bd_id1}
65 | ${sock2}= | /tmp/sock-1-${bd_id2}
66 # Traffic profile:
67 | ${traffic_profile}= | trex-sl-3n-ethip4-ip4src254
68
69 *** Keywords ***
70 | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
71 | | [Documentation]
72 | | ... | [Cfg] DUT runs L2BD switching config with ${wt} thread, ${wt} phy\
73 | | ... | core, ${rxq} receive queue per NIC port.
74 | | ... | [Ver] Verify ref-PDR for ${framesize} Byte frames using single trial\
75 | | ... | throughput test at 2x ${rate}.
76 | | ...
77 | | [Arguments] | ${framesize} | ${rate} | ${wt} | ${rxq}
78 | | ...
79 | | # Test Variables required for test and test teardown
80 | | Set Test Variable | ${framesize}
81 | | Set Test Variable | ${rate}
82 | | ${get_framesize}= | Get Frame Size | ${framesize}
83 | | ${dut1_vm_refs}= | Create Dictionary
84 | | ${dut2_vm_refs}= | Create Dictionary
85 | | Set Test Variable | ${dut1_vm_refs}
86 | | Set Test Variable | ${dut2_vm_refs}
87 | | ...
88 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
89 | | And Add PCI devices to DUTs in 3-node single link topology
90 | | And Run Keyword If | ${get_framesize} < ${1522}
91 | | ... | Add no multi seg to all DUTs
92 | | And Apply startup configuration on all VPP DUTs
93 | | When Initialize L2 bridge domains with Vhost-User and VLAN in a 3-node circular topology
94 | | ... | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
95 | | ... | ${tag_rewrite}
96 | | ${vm1}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
97 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1
98 | | Set To Dictionary | ${dut1_vm_refs} | DUT1_VM1 | ${vm1}
99 | | ${vm2}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
100 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
101 | | Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
102 | | Then Traffic should pass with partial loss | ${perf_trial_duration}
103 | | ... | ${rate} | ${framesize} | ${traffic_profile}
104 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
105
106 *** Test Cases ***
107 | tc01-64B-1t1c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
108 | | [Documentation]
109 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy\
110 | | ... | core, 1 receive queue per NIC port.
111 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
112 | | ... | throughput test at 2x ${rate}.
113 | | ...
114 | | [Tags] | 64B | 1T1C | STHREAD
115 | | ...
116 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
117 | | framesize=${64} | rate=1.2mpps | wt=1 | rxq=1
118
119 | tc02-1518B-1t1c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
120 | | [Documentation]
121 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy\
122 | | ... | core, 1 receive queue per NIC port.
123 | | ... | [Ver] Verify ref-PDR for 1518 Byte frames using single trial\
124 | | ... | throughput test at 2x ${rate}.
125 | | ...
126 | | [Tags] | 1518B | 1T1C | STHREAD
127 | | ...
128 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
129 | | framesize=${1518} | rate=350000pps | wt=1 | rxq=1
130
131 | tc03-IMIX-1t1c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
132 | | [Documentation]
133 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy\
134 | | ... | core, 1 receive queue per NIC port.
135 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
136 | | ... | throughput test at 2x ${rate}.
137 | | ...
138 | | [Tags] | IMIX | 1T1C | STHREAD
139 | | ...
140 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
141 | | framesize=IMIX_v4_1 | rate=0.9mpps | wt=1 | rxq=1
142
143 | tc04-64B-2t2c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
144 | | [Documentation]
145 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy\
146 | | ... | cores, 1 receive queue per NIC port.
147 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
148 | | ... | throughput test at 2x ${rate}.
149 | | ...
150 | | [Tags] | 64B | 2T2C | MTHREAD
151 | | ...
152 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
153 | | framesize=${64} | rate=2.2mpps | wt=2 | rxq=1
154
155 | tc05-1518B-2t2c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
156 | | [Documentation]
157 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy\
158 | | ... | cores, 1 receive queue per NIC port.
159 | | ... | [Ver] Verify ref-PDR for 1518 Byte frames using single trial\
160 | | ... | throughput test at 2x ${rate}.
161 | | ...
162 | | [Tags] | 1518B | 2T2C | MTHREAD
163 | | ...
164 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
165 | | framesize=${1518} | rate=0.6mpps | wt=2 | rxq=1
166
167 | tc06-IMIX-2t2c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
168 | | [Documentation]
169 | | ... | [Cfg] DUT runs L2BD switching config with 2 threads, 2 phy\
170 | | ... | cores, 1 receive queue per NIC port.
171 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
172 | | ... | throughput test at 2x ${rate}.
173 | | ...
174 | | [Tags] | IMIX | 2T2C | MTHREAD
175 | | ...
176 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
177 | | framesize=IMIX_v4_1 | rate=1.5pps | wt=2 | rxq=1
178
179 | tc07-64B-4t4c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
180 | | [Documentation]
181 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy\
182 | | ... | cores, 2 receive queues per NIC port.
183 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
184 | | ... | throughput test at 2x ${rate}.
185 | | ...
186 | | [Tags] | 64B | 4T4C | MTHREAD
187 | | ...
188 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
189 | | framesize=${64} | rate=3.4mpps | wt=4 | rxq=2
190
191 | tc08-1518B-4t4c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
192 | | [Documentation]
193 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy\
194 | | ... | cores, 2 receive queues per NIC port.
195 | | ... | [Ver] Verify ref-PDR for 1518 Byte frames using single trial\
196 | | ... | throughput test at 2x ${rate}.
197 | | ...
198 | | [Tags] | 1518B | 4T4C | MTHREAD
199 | | ...
200 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
201 | | framesize=${1518} | rate=0.7mpps | wt=4 | rxq=2
202
203 | tc09-IMIX-4t4c-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrchk
204 | | [Documentation]
205 | | ... | [Cfg] DUT runs L2BD switching config with 4 threads, 4 phy\
206 | | ... | cores, 2 receive queues per NIC port.
207 | | ... | [Ver] Verify ref-PDR for 64 Byte frames using single trial\
208 | | ... | throughput test at 2x ${rate}.
209 | | ...
210 | | [Tags] | IMIX | 4T4C | MTHREAD
211 | | ...
212 | | [Template] | Check PDR for L2 bridge domain with vhost and VM with dpdk-testpmd
213 | | framesize=IMIX_v4_1 | rate=2.2mpps | wt=4 | rxq=2