5cece02e25102ffd64951fd6cf2d14a9ec41dc13
[csit.git] / tests / vpp / perf / container_memif / 10ge2p1x520-eth-l2xcbase-eth-1memif-1dcr-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 | ...
17 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
18 | ... | NIC_Intel-X520-DA2 | ETH | L2XCFWD | BASE | MEMIF | SINGLE_MEMIF
19 | ... | DOCKER
20 | ...
21 | Suite Setup | Run Keywords
22 | ... | Set up 3-node performance topology with DUT's NIC model | L2
23 | ... | Intel-X520-DA2
24 | ... | AND | Set up performance test suite with MEMIF
25 | ... | AND | Set up performance topology with containers
26 | ...
27 | Suite Teardown | Tear down 3-node performance topology with container
28 | ...
29 | Test Setup | Run Keywords
30 | ... | Set up performance test
31 | ... | AND | Restart VPP in all 'VNF' containers
32 | ...
33 | Test Teardown | Tear down performance discovery test | ${min_rate}pps
34 | ... | ${framesize} | ${traffic_profile}
35 | ...
36 | Test Template | Local template
37 | ...
38 | Documentation | *RFC2544: Pkt throughput L2XC test cases*
39 | ...
40 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
41 | ... | with single links between nodes.
42 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for L2 cross connect.
43 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 configured with L2 cross-
44 | ... | connect. DUT1 and DUT2 tested with 2p10GE NIC X520 Niantic by Intel.
45 | ... | Container is connected to VPP via Memif interface running same VPP
46 | ... | version as running on DUT. Resources are limited via cgroup to use 5
47 | ... | cores allocated from pool of isolated CPUs. There are no memory
48 | ... | contraints. Cross Horizontal topology with packets flowing via DUT (VPP)
49 | ... | to Container, then via horizontal memif to the next Container, and so on
50 | ... | until the last Container then to NIC (in last Container). Single
51 | ... | Container is supported as of now.
52 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
53 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
54 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
55 | ... | of packets transmitted. NDR and PDR are discovered for different
56 | ... | Ethernet L2 frame sizes using either binary search or linear search
57 | ... | algorithms with configured starting rate and final step that determines
58 | ... | throughput measurement resolution. Test packets are generated by TG on
59 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
60 | ... | (flow-group per direction, 254 flows per flow-group) with all packets
61 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static
62 | ... | payload. MAC addresses are matching MAC addresses of the TG node
63 | ... | interfaces.
64 | ... | *[Ref] Applicable standard specifications:* RFC2544.
65
66 *** Variables ***
67 # X520-DA2 bandwidth limit
68 | ${s_limit} | ${10000000000}
69 # Traffic profile
70 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
71 # Container settings
72 | ${container_count}= | ${1}
73 | ${container_engine}= | Docker
74 | ${container_image}= | ubuntu:xenial-20180412
75 | ${container_install_dkms}= | ${TRUE}
76 | ${container_chain_topology}= | cross_horiz
77 # CPU settings
78 | ${system_cpus}= | ${1}
79 | ${vpp_cpus}= | ${5}
80 | ${container_cpus}= | ${5}
81
82 *** Keywords ***
83 | Local template
84 | | [Documentation]
85 | | ... | [Cfg] DUT runs L2XC switching config.
86 | | ... | Each DUT uses ${phy_cores} physical core(s) for worker threads.
87 | | ... | [Ver] Find ${search_type} for ${framesize}B frames using binary search\
88 | | ... | start at linerate, step ${min_rate}pps.
89 | | ...
90 | | ... | *Arguments:*
91 | | ... | - framesize - Framesize in Bytes in integer or string (IMIX_v4_1).
92 | | ... | Type: integer, string
93 | | ... | - phy_cores - Number of physical cores. Type: integer
94 | | ... | - search_type - NDR or PDR. Type: string
95 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
96 | | ... | - min_rate - Min rate for binary search, default value: ${50000}.
97 | | ... | Type: integer
98 | | ...
99 | | [Arguments] | ${framesize} | ${phy_cores} | ${search_type}
100 | | ... | ${rxq}=${None} | ${min_rate}=${50000}
101 | | ...
102 | | Set Test Variable | ${framesize}
103 | | Set Test Variable | ${min_rate}
104 | | ${get_framesize}= | Get Frame Size | ${framesize}
105 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
106 | | ${binary_min}= | Set Variable | ${min_rate}
107 | | ${binary_max}= | Set Variable | ${max_rate}
108 | | ${threshold}= | Set Variable | ${min_rate}
109 | | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
110 | | And Add single PCI device to all DUTs
111 | | And Run Keyword If | ${get_framesize} < ${1522}
112 | | ... | Add no multi seg to all DUTs
113 | | And Apply startup configuration on all VPP DUTs
114 | | And Initialize L2 xconnect for single memif in 3-node circular topology
115 | | Then 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-l2xcbase-eth-1memif-1dcr-ndrdisc
127 | | [Tags] | 64B | 1C | NDRDISC
128 | | framesize=${64} | phy_cores=${1} | search_type=NDR
129
130 | tc02-64B-1t1c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
131 | | [Tags] | 64B | 1C | PDRDISC
132 | | framesize=${64} | phy_cores=${1} | search_type=PDR
133
134 | tc03-1518B-1t1c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
135 | | [Tags] | 1518B | 1C | NDRDISC
136 | | framesize=${1518} | phy_cores=${1} | search_type=NDR
137
138 | tc04-1518B-1t1c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
139 | | [Tags] | 1518B | 1C | PDRDISC
140 | | framesize=${1518} | phy_cores=${1} | search_type=PDR
141
142 | tc05-9000B-1t1c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
143 | | [Tags] | 9000B | 1C | NDRDISC
144 | | framesize=${9000} | phy_cores=${1} | search_type=NDR
145
146 | tc06-9000B-1t1c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
147 | | [Tags] | 9000B | 1C | PDRDISC
148 | | framesize=${9000} | phy_cores=${1} | search_type=PDR
149
150 | tc07-IMIX-1t1c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
151 | | [Tags] | IMIX | 1C | NDRDISC
152 | | framesize=IMIX_v4_1 | phy_cores=${1} | search_type=NDR
153
154 | tc08-IMIX-1t1c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
155 | | [Tags] | IMIX | 1C | PDRDISC
156 | | framesize=IMIX_v4_1 | phy_cores=${1} | search_type=PDR
157
158 | tc09-64B-2t2c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
159 | | [Tags] | 64B | 2C | NDRDISC
160 | | framesize=${64} | phy_cores=${2} | search_type=NDR
161
162 | tc10-64B-2t2c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
163 | | [Tags] | 64B | 1C | PDRDISC
164 | | framesize=${64} | phy_cores=${2} | search_type=PDR
165
166 | tc11-1518B-2t2c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
167 | | [Tags] | 1518B | 2C | NDRDISC
168 | | framesize=${1518} | phy_cores=${2} | search_type=NDR
169
170 | tc12-1518B-2t2c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
171 | | [Tags] | 1518B | 2C | PDRDISC
172 | | framesize=${1518} | phy_cores=${2} | search_type=PDR
173
174 | tc13-9000B-2t2c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
175 | | [Tags] | 9000B | 2C | NDRDISC
176 | | framesize=${9000} | phy_cores=${2} | search_type=NDR
177
178 | tc14-9000B-2t2c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
179 | | [Tags] | 9000B | 2C | PDRDISC
180 | | framesize=${9000} | phy_cores=${2} | search_type=PDR
181
182 | tc15-IMIX-2t2c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
183 | | [Tags] | IMIX | 2C | NDRDISC
184 | | framesize=IMIX_v4_1 | phy_cores=${2} | search_type=NDR
185
186 | tc16-IMIX-2t2c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
187 | | [Tags] | IMIX | 2C | PDRDISC
188 | | framesize=IMIX_v4_1 | phy_cores=${2} | search_type=PDR
189
190 | tc17-64B-4t4c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
191 | | [Tags] | 64B | 4C | NDRDISC
192 | | framesize=${64} | phy_cores=${4} | search_type=NDR
193
194 | tc18-64B-4t4c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
195 | | [Tags] | 64B | 4C | PDRDISC
196 | | framesize=${64} | phy_cores=${4} | search_type=PDR
197
198 | tc19-1518B-4t4c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
199 | | [Tags] | 1518B | 4C | NDRDISC
200 | | framesize=${1518} | phy_cores=${4} | search_type=NDR
201
202 | tc20-1518B-4t4c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
203 | | [Tags] | 1518B | 4C | PDRDISC
204 | | framesize=${1518} | phy_cores=${4} | search_type=PDR
205
206 | tc21-9000B-4t4c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
207 | | [Tags] | 9000B | 4C | NDRDISC
208 | | framesize=${9000} | phy_cores=${4} | search_type=NDR
209
210 | tc22-9000B-4t4c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
211 | | [Tags] | 9000B | 4C | PDRDISC
212 | | framesize=${9000} | phy_cores=${4} | search_type=PDR
213
214 | tc23-IMIX-4t4c-eth-l2xcbase-eth-1memif-1dcr-ndrdisc
215 | | [Tags] | IMIX | 4C | NDRDISC
216 | | framesize=IMIX_v4_1 | phy_cores=${4} | search_type=NDR
217
218 | tc24-IMIX-4t4c-eth-l2xcbase-eth-1memif-1dcr-pdrdisc
219 | | [Tags] | IMIX | 4C | PDRDISC
220 | | framesize=IMIX_v4_1 | phy_cores=${4} | search_type=PDR