Refactor perf test cases
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrpdrdisc.robot
1 # Copyright (c) 2018 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 | ... | VHOST_1024 | LBOND | LBOND_DPDK | LBOND_MODE_XOR | LBOND_LB_L34
21 | ...
22 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
23 | ... | L2 | 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 | Test Template | Local template
33 | ...
34 | Documentation | *RFC2544: Packet throughput L2BD test cases with vhost and
35 | ... | dpdk link bonding*
36 | ...
37 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
38 | ... | with single links between nodes.
39 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for L2 switching of IPv4. 802.1q
40 | ... | tagging is applied on link between DUT1 and DUT2.
41 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with DPDK
42 | ... | link bonding (mode XOR, transmit policy l34) on link between DUT1 and
43 | ... | DUT2 and L2 bridge-domain with MAC learning enabled. Qemu Guest is
44 | ... | connected to VPP via vhost-user interfaces. Guest is running DPDK
45 | ... | testpmd interconnecting vhost-user interfaces using 5 cores pinned to
46 | ... | cpus 5-9 and 2048M memory. Testpmd is using socket-mem=1024M (512x2M
47 | ... | hugepages), 5 cores (1 main core and 4 cores dedicated for io),
48 | ... | forwarding mode is set to io, rxd/txd=1024, burst=64. DUT1, DUT2 are
49 | ... | tested with 2p10GE NIC X520 Niantic by Intel.
50 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
51 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
52 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
53 | ... | of packets transmitted. NDR and PDR are discovered for different
54 | ... | Ethernet L2 frame sizes using either binary search or linear search
55 | ... | algorithms with configured starting rate and final step that determines
56 | ... | throughput measurement resolution. Test packets are generated by TG on
57 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
58 | ... | (flow-group per direction, 253 flows per flow-group) with all packets
59 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static
60 | ... | payload. MAC addresses are matching MAC addresses of the TG node
61 | ... | interfaces.
62 | ... | *[Ref] Applicable standard specifications:* RFC2544.
63
64 *** Variables ***
65 | ${dut1_eth_bond_if1}= | eth_bond1
66 | ${dut1_eth_bond_if1_name}= | BondEthernet0
67 | ${dut2_eth_bond_if1}= | eth_bond1
68 | ${dut2_eth_bond_if1_name}= | BondEthernet0
69 | ${perf_qemu_qsz}= | 1024
70 | ${subid}= | 10
71 | ${tag_rewrite}= | pop-1
72 | ${vlan_overhead}= | ${4}
73 # X520-DA2 bandwidth limit
74 | ${s_limit}= | ${10000000000}
75 # Socket names
76 | ${bd_id1}= | 1
77 | ${bd_id2}= | 2
78 | ${sock1}= | /tmp/sock-1-${bd_id1}
79 | ${sock2}= | /tmp/sock-1-${bd_id2}
80 # Traffic profile:
81 | ${traffic_profile}= | trex-sl-3n-ethip4-ip4src254
82
83 *** Keywords ***
84 | Local template
85 | | [Arguments] | ${phy_cores} | ${framesize} | ${search_type} | ${rxq}=${None}
86 | | ... | ${min_rate}=${10000}
87 | | ...
88 | | Set Test Variable | ${framesize}
89 | | Set Test Variable | ${min_rate}
90 | | ${get_framesize}= | Get Frame Size | ${framesize}
91 | | ${max_rate}= | Calculate pps | ${s_limit}
92 | | ... | ${get_framesize + ${vlan_overhead}}
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 | | ${jumbo_frames}= | Set Variable If
101 | | ... | ${get_framesize + ${vlan_overhead}} < ${1522} | ${False} | ${True}
102 | | ...
103 | | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
104 | | And Add PCI devices to all DUTs
105 | | And Add VLAN Strip Offload switch off between DUTs in 3-node single link topology
106 | | And Add DPDK bonded Ethernet interfaces to DUTs in 3-node single link topology
107 | | And Run Keyword If | ${get_framesize + ${vlan_overhead}} < ${1522}
108 | | ... | Add no multi seg to all DUTs
109 | | And Apply startup configuration on all VPP DUTs
110 | | And Add DPDK bonded ethernet interfaces to topology file in 3-node single link topology
111 | | When Initialize L2 bridge domains with Vhost-User and VLAN with DPDK link bonding in a 3-node circular topology
112 | | ... | ${bd_id1} | ${bd_id2} | ${sock1} | ${sock2} | ${subid}
113 | | ... | ${tag_rewrite}
114 | | ${vm1}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
115 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1
116 | | ... | jumbo_frames=${jumbo_frames}
117 | | And Set To Dictionary | ${dut1_vm_refs} | DUT1_VM1 | ${vm1}
118 | | ${vm2}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
119 | | ... | ${dut2} | ${sock1} | ${sock2} | DUT2_VM1
120 | | ... | jumbo_frames=${jumbo_frames}
121 | | And Set To Dictionary | ${dut2_vm_refs} | DUT2_VM1 | ${vm2}
122 | | Then Run Keyword If | '${search_type}' == 'NDR'
123 | | ... | Find NDR using binary search and pps
124 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
125 | | ... | ${min_rate} | ${max_rate} | ${threshold}
126 | | ... | ELSE IF | '${search_type}' == 'PDR'
127 | | ... | Find PDR using binary search and pps
128 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
129 | | ... | ${min_rate} | ${max_rate} | ${threshold}
130 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
131
132 *** Test Cases ***
133 | tc01-64B-1t1c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
134 | | [Tags] | 64B | 1C | NDRDISC
135 | | phy_cores=${1} | framesize=${64} | search_type=NDR
136
137 | tc02-64B-1t1c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
138 | | [Tags] | 64B | 1C | PDRDISC | SKIP_PATCH
139 | | phy_cores=${1} | framesize=${64} | search_type=PDR
140
141 | tc03-1518B-1t1c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
142 | | [Tags] | 1518B | 1C | NDRDISC
143 | | phy_cores=${1} | framesize=${1518} | search_type=NDR
144
145 | tc04-1518B-1t1c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
146 | | [Tags] | 1518B | 1C | PDRDISC | SKIP_PATCH
147 | | phy_cores=${1} | framesize=${1518} | search_type=PDR
148
149 | tc05-9000B-1t1c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
150 | | [Tags] | 9000B | 1C | NDRDISC
151 | | phy_cores=${1} | framesize=${9000} | search_type=NDR
152
153 | tc06-9000B-1t1c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
154 | | [Tags] | 9000B | 1C | PDRDISC | SKIP_PATCH
155 | | phy_cores=${1} | framesize=${9000} | search_type=PDR
156
157 | tc07-IMIX-1t1c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
158 | | [Tags] | IMIX | 1C | NDRDISC
159 | | phy_cores=${1} | framesize=IMIX_v4_1 | search_type=NDR
160
161 | tc08-IMIX-1t1c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
162 | | [Tags] | IMIX | 1C | PDRDISC | SKIP_PATCH
163 | | phy_cores=${1} | framesize=IMIX_v4_1 | search_type=PDR
164
165 | tc09-64B-2t2c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
166 | | [Tags] | 64B | 2C | NDRDISC
167 | | phy_cores=${2} | framesize=${64} | search_type=NDR
168
169 | tc10-64B-2t2c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
170 | | [Tags] | 64B | 2C | PDRDISC | SKIP_PATCH
171 | | phy_cores=${2} | framesize=${64} | search_type=PDR
172
173 | tc11-1518B-2t2c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
174 | | [Tags] | 1518B | 2C | NDRDISC | SKIP_PATCH
175 | | phy_cores=${2} | framesize=${1518} | search_type=NDR
176
177 | tc12-1518B-2t2c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
178 | | [Tags] | 1518B | 2C | PDRDISC | SKIP_PATCH
179 | | phy_cores=${2} | framesize=${1518} | search_type=PDR
180
181 | tc13-9000B-2t2c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
182 | | [Tags] | 9000B | 2C | NDRDISC | SKIP_PATCH
183 | | phy_cores=${2} | framesize=${9000} | search_type=NDR
184
185 | tc14-9000B-2t2c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
186 | | [Tags] | 9000B | 2C | PDRDISC | SKIP_PATCH
187 | | phy_cores=${2} | framesize=${9000} | search_type=PDR
188
189 | tc15-IMIX-2t2c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
190 | | [Tags] | IMIX | 2C | NDRDISC | SKIP_PATCH
191 | | phy_cores=${2} | framesize=IMIX_v4_1 | search_type=NDR
192
193 | tc16-IMIX-2t2c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
194 | | [Tags] | IMIX | 2C | PDRDISC | SKIP_PATCH
195 | | phy_cores=${2} | framesize=IMIX_v4_1 | search_type=PDR
196
197 | tc17-64B-4t4c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
198 | | [Tags] | 64B | 4C | NDRDISC
199 | | phy_cores=${4} | framesize=${64} | search_type=NDR
200
201 | tc18-64B-4t4c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
202 | | [Tags] | 64B | 4C | PDRDISC | SKIP_PATCH
203 | | phy_cores=${4} | framesize=${64} | search_type=PDR
204
205 | tc19-1518B-4t4c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
206 | | [Tags] | 1518B | 4C | NDRDISC | SKIP_PATCH
207 | | phy_cores=${4} | framesize=${1518} | search_type=NDR
208
209 | tc20-1518B-4t4c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
210 | | [Tags] | 1518B | 4C | PDRDISC | SKIP_PATCH
211 | | phy_cores=${4} | framesize=${1518} | search_type=PDR
212
213 | tc21-9000B-4t4c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
214 | | [Tags] | 9000B | 4C | NDRDISC | SKIP_PATCH
215 | | phy_cores=${4} | framesize=${9000} | search_type=NDR
216
217 | tc22-9000B-4t4c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
218 | | [Tags] | 9000B | 4C | PDRDISC | SKIP_PATCH
219 | | phy_cores=${4} | framesize=${9000} | search_type=PDR
220
221 | tc23-IMIX-4t4c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-ndrdisc
222 | | [Tags] | IMIX | 4C | NDRDISC | SKIP_PATCH
223 | | phy_cores=${4} | framesize=IMIX_v4_1 | search_type=NDR
224
225 | tc24-IMIX-4t4c-1lbdpdk-dot1q-l2bdbasemaclrn-eth-2vhostvr1024-1vm-pdrdisc
226 | | [Tags] | IMIX | 4C | PDRDISC | SKIP_PATCH
227 | | phy_cores=${4} | framesize=IMIX_v4_1 | search_type=PDR