Refactor perf test cases
[csit.git] / tests / vpp / perf / vm_vhost / 10ge2p1x520-ethip4-ip4base-eth-4vhostvr1024-2vm-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 | ETH | IP4FWD | BASE | VHOST | VM | VHOST_1024
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 | Test Template | Local template
32 | ...
33 | Documentation | *RFC2544: Pkt throughput IPv4 test cases with vhost*
34 | ...
35 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
36 | ... | with single links between nodes.
37 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing.
38 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
39 | ... | routing and static IPv4 /24 route entries. Qemu Guests are connected
40 | ... | to VPP via vhost-user interfaces. Guests are running DPDK testpmd
41 | ... | interconnecting vhost-user interfaces using 5 cores pinned to cpus 6-10
42 | ... | and 11-15 and 2048M memory. Testpmd is using socket-mem=1024M (512x2M
43 | ... | hugepages), 5 cores (1 main core and 4 cores dedicated for io),
44 | ... | forwarding mode is set to mac, rxd/txd=256, burst=64. DUT1, DUT2 are
45 | ... | tested with 2p10GE 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 | ${perf_qemu_qsz}= | 1024
62 # X520-DA2 bandwidth limit
63 | ${s_limit}= | ${10000000000}
64 # CPU settings
65 | ${system_cpus}= | ${1}
66 | ${vpp_cpus}= | ${5}
67 | ${vm_cpus}= | ${5}
68 # Traffic profile:
69 | ${traffic_profile}= | trex-sl-3n-ethip4-ip4src253
70
71 *** Keywords ***
72 | Local template
73 | | [Arguments] | ${phy_cores} | ${framesize} | ${search_type} | ${rxq}=${None}
74 | | ... | ${min_rate}=${10000}
75 | | ...
76 | | Set Test Variable | ${framesize}
77 | | Set Test Variable | ${min_rate}
78 | | ${get_framesize}= | Get Frame Size | ${framesize}
79 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
80 | | ${binary_min}= | Set Variable | ${min_rate}
81 | | ${binary_max}= | Set Variable | ${max_rate}
82 | | ${threshold}= | Set Variable | ${min_rate}
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 | | ${jumbo_frames}= | Set Variable If | ${get_framesize} < ${1522}
88 | | ... | ${False} | ${True}
89 | | Set Test Variable | ${jumbo_frames}
90 | | ...
91 | | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
92 | | And Add PCI devices to all DUTs
93 | | And Run Keyword If | ${get_framesize} < ${1522}
94 | | ... | Add no multi seg to all DUTs
95 | | And Apply startup configuration on all VPP DUTs
96 | | When Initialize IPv4 forwarding with vhost for '2' VMs in 3-node circular topology
97 | | And Configure '2' guest VMs with dpdk-testpmd-mac connected via vhost-user in 3-node circular topology
98 | | Then Run Keyword If | '${search_type}' == 'NDR'
99 | | ... | Find NDR using binary search and pps
100 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
101 | | ... | ${min_rate} | ${max_rate} | ${threshold}
102 | | ... | ELSE IF | '${search_type}' == 'PDR'
103 | | ... | Find PDR using binary search and pps
104 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
105 | | ... | ${min_rate} | ${max_rate} | ${threshold}
106 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
107
108 *** Test Cases ***
109 | tc01-64B-1t1c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
110 | | [Tags] | 64B | 1C | NDRDISC
111 | | phy_cores=${1} | framesize=${64} | search_type=NDR
112
113 | tc02-64B-1t1c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
114 | | [Tags] | 64B | 1C | PDRDISC | SKIP_PATCH
115 | | phy_cores=${1} | framesize=${64} | search_type=PDR
116
117 | tc03-1518B-1t1c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
118 | | [Tags] | 1518B | 1C | NDRDISC
119 | | phy_cores=${1} | framesize=${1518} | search_type=NDR
120
121 | tc04-1518B-1t1c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
122 | | [Tags] | 1518B | 1C | PDRDISC | SKIP_PATCH
123 | | phy_cores=${1} | framesize=${1518} | search_type=PDR
124
125 | tc05-IMIX-1t1c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
126 | | [Tags] | IMIX | 1C | NDRDISC
127 | | phy_cores=${1} | framesize=IMIX_v4_1 | search_type=NDR
128
129 | tc06-IMIX-1t1c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
130 | | [Tags] | IMIX | 1C | PDRDISC | SKIP_PATCH
131 | | phy_cores=${1} | framesize=IMIX_v4_1 | search_type=PDR
132
133 | tc07-64B-2t2c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
134 | | [Tags] | 64B | 2C | NDRDISC
135 | | phy_cores=${2} | framesize=${64} | search_type=NDR
136
137 | tc08-64B-2t2c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
138 | | [Tags] | 64B | 2C | PDRDISC | SKIP_PATCH
139 | | phy_cores=${2} | framesize=${64} | search_type=PDR
140
141 | tc09-1518B-2t2c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
142 | | [Tags] | 1518B | 2C | NDRDISC | SKIP_PATCH
143 | | phy_cores=${2} | framesize=${1518} | search_type=NDR
144
145 | tc10-1518B-2t2c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
146 | | [Tags] | 1518B | 2C | PDRDISC | SKIP_PATCH
147 | | phy_cores=${2} | framesize=${1518} | search_type=PDR
148
149 | tc11-IMIX-2t2c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
150 | | [Tags] | IMIX | 2C | NDRDISC | SKIP_PATCH
151 | | phy_cores=${2} | framesize=IMIX_v4_1 | search_type=NDR
152
153 | tc12-IMIX-2t2c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
154 | | [Tags] | IMIX | 2C | PDRDISC | SKIP_PATCH
155 | | phy_cores=${2} | framesize=IMIX_v4_1 | search_type=PDR
156
157 | tc13-64B-4t4c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
158 | | [Tags] | 64B | 4C | NDRDISC
159 | | phy_cores=${4} | framesize=${64} | search_type=NDR
160
161 | tc14-64B-4t4c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
162 | | [Tags] | 64B | 4C | PDRDISC | SKIP_PATCH
163 | | phy_cores=${4} | framesize=${64} | search_type=PDR
164
165 | tc15-1518B-4t4c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
166 | | [Tags] | 1518B | 4C | NDRDISC | SKIP_PATCH
167 | | phy_cores=${4} | framesize=${1518} | search_type=NDR
168
169 | tc16-1518B-4t4c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
170 | | [Tags] | 1518B | 4C | PDRDISC | SKIP_PATCH
171 | | phy_cores=${4} | framesize=${1518} | search_type=PDR
172
173 | tc17-IMIX-4t4c-ethip4-ip4base-eth-4vhostvr1024-2vm-ndrdisc
174 | | [Tags] | IMIX | 4C | NDRDISC | SKIP_PATCH
175 | | phy_cores=${4} | framesize=IMIX_v4_1 | search_type=NDR
176
177 | tc18-IMIX-4t4c-ethip4-ip4base-eth-4vhostvr1024-2vm-pdrdisc
178 | | [Tags] | IMIX | 4C | PDRDISC | SKIP_PATCH
179 | | phy_cores=${4} | framesize=IMIX_v4_1 | search_type=PDR