69f47af6206a58d5369da8ed557aafc8c5e3538a
[csit.git] / tests / kubernetes / perf / container_memif / 10ge2p1x710-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-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-X710 | ETH | L2BDMACLRN | L2BDBASE | SCALE | MEMIF
19 | ... | K8S | 1VSWITCH | 4VNF | VPP_AGENT | SFC_CONTROLLER | HORIZONTAL
20 | ...
21 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
22 | ... | L2 | Intel-X710
23 | ...
24 | Test Setup | Set up performance test with Ligato Kubernetes
25 | ...
26 | Suite Teardown | Tear down 3-node performance topology
27 | ...
28 | Test Teardown | Tear down performance test with Ligato Kubernetes
29 | ...
30 | Documentation | *RFC2544: Pkt throughput L2BD test cases*
31 | ...
32 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
33 | ... | with single links between nodes.
34 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for L2 bridge domain.
35 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with two L2
36 | ... | bridge domains and MAC learning enabled. DUT1 and DUT2 tested with
37 | ... | 2p10GE NIC X710 by Intel.
38 | ... | VNF Containers are connected to VSWITCH container via Memif interface.
39 | ... | All containers are running same VPP version. Containers are deployed
40 | ... | with Kubernetes. Configuration is applied by vnf-agent.
41 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
42 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
43 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
44 | ... | of packets transmitted. NDR and PDR are discovered for different
45 | ... | Ethernet L2 frame sizes using either binary search or linear search
46 | ... | algorithms with configured starting rate and final step that determines
47 | ... | throughput measurement resolution. Test packets are generated by TG on
48 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
49 | ... | (flow-group per direction, 254 flows per flow-group) with all packets
50 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static
51 | ... | payload. MAC addresses are matching MAC addresses of the TG node
52 | ... | interfaces.
53 | ... | *[Ref] Applicable standard specifications:* RFC2544.
54
55 *** Variables ***
56 # X710 bandwidth limit
57 | ${s_limit} | ${10000000000}
58 # SFC profile
59 | ${sfc_profile} | configmaps/eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz
60 # Traffic profile:
61 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
62 # CPU settings
63 | ${system_cpus}= | ${1}
64 | ${vswitch_cpus}= | ${5}
65 | ${vnf_cpus}= | ${2}
66
67 *** Keywords ***
68 | Create Kubernetes VSWITCH startup config on all DUTs
69 | | [Documentation] | Create base startup configuration of VSWITCH in Kubernetes
70 | | ... | deploy to all DUTs.
71 | | ...
72 | | ... | *Arguments:*
73 | | ... | - ${framesize} - L2 framesize. Type: integer
74 | | ... | - ${wt} - Worker threads. Type: integer
75 | | ... | - ${rxq} - RX queues. Type: integer
76 | | ...
77 | | ... | *Example:*
78 | | ...
79 | | ... | \| Create Kubernetes VSWITCH startup config on all DUTs \| ${64} \
80 | | ... | \| ${1} \| ${1}
81 | | ...
82 | | [Arguments] | ${framesize} | ${wt} | ${rxq}
83 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
84 | | ... | ${dut1_if1} | ${dut1_if2}
85 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
86 | | ... | ${dut2_if1} | ${dut2_if2}
87 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
88 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
89 | | ${dut2_if1_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if1}
90 | | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
91 | | ${cpu_cnt}= | Evaluate | ${wt}+1
92 | | ${config}= | Run keyword | Create Kubernetes VSWITCH startup config
93 | | ... | node=${dut1} | cpu_cnt=${cpu_cnt} | cpu_node=${dut1_numa}
94 | | ... | cpu_skip=${system_cpus} | smt_used=${False}
95 | | ... | filename=/tmp/vswitch.conf | framesize=${framesize} | rxq=${rxq}
96 | | ... | if1=${dut1_if1_pci} | if2=${dut1_if2_pci}
97 | | ${config}= | Run keyword | Create Kubernetes VSWITCH startup config
98 | | ... | node=${dut2} | cpu_cnt=${cpu_cnt} | cpu_node=${dut2_numa}
99 | | ... | cpu_skip=${system_cpus} | smt_used=${False}
100 | | ... | filename=/tmp/vswitch.conf | framesize=${framesize} | rxq=${rxq}
101 | | ... | if1=${dut2_if1_pci} | if2=${dut2_if2_pci}
102
103 | Create Kubernetes VNF'${i}' startup config on all DUTs
104 | | [Documentation] | Create base startup configuration of VNF in Kubernetes
105 | | ... | deploy to all DUTs.
106 | | ...
107 | | ${i_int}= | Convert To Integer | ${i}
108 | | ${cpu_skip}= | Evaluate | ${vswitch_cpus}+${system_cpus}
109 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
110 | | ... | ${dut1_if1} | ${dut1_if2}
111 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
112 | | ... | ${dut2_if1} | ${dut2_if2}
113 | | ${config}= | Run keyword | Create Kubernetes VNF startup config
114 | | ... | node=${dut1} | cpu_cnt=${vnf_cpus} | cpu_node=${dut1_numa}
115 | | ... | cpu_skip=${cpu_skip} | smt_used=${False} | filename=/tmp/vnf${i}.conf
116 | | ... | i=${i_int}
117 | | ${config}= | Run keyword | Create Kubernetes VNF startup config
118 | | ... | node=${dut2} | cpu_cnt=${vnf_cpus} | cpu_node=${dut2_numa}
119 | | ... | cpu_skip=${cpu_skip} | smt_used=${False} | filename=/tmp/vnf${i}.conf
120 | | ... | i=${i_int}
121
122 | L2 Bridge Domain Binary Search
123 | | ...
124 | | [Arguments] | ${framesize} | ${min_rate} | ${wt} | ${rxq} | ${search_type}
125 | | ...
126 | | # Test Variables required for test execution and test teardown
127 | | Set Test Variable | ${framesize}
128 | | ${get_framesize}= | Get Frame Size | ${framesize}
129 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
130 | | Set Test Variable | ${min_rate}
131 | | ${binary_min}= | Set Variable | ${min_rate}
132 | | ${binary_max}= | Set Variable | ${max_rate}
133 | | ${threshold}= | Set Variable | ${min_rate}
134 | | ${dut1_if1_name}= | Get interface name | ${dut1} | ${dut1_if1}
135 | | ${dut1_if2_name}= | Get interface name | ${dut1} | ${dut1_if2}
136 | | ${dut2_if1_name}= | Get interface name | ${dut2} | ${dut2_if1}
137 | | ${dut2_if2_name}= | Get interface name | ${dut2} | ${dut2_if2}
138 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
139 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
140 | | Create Kubernetes VSWITCH startup config on all DUTs | ${get_framesize}
141 | | ... | ${wt} | ${rxq}
142 | | Create Kubernetes VNF'1' startup config on all DUTs
143 | | Create Kubernetes VNF'2' startup config on all DUTs
144 | | Create Kubernetes VNF'3' startup config on all DUTs
145 | | Create Kubernetes VNF'4' startup config on all DUTs
146 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
147 | | ... | name=vswitch-vpp-cfg | vpp.conf=/tmp/vswitch.conf
148 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
149 | | ... | name=vnf1-vpp-cfg | vpp.conf=/tmp/vnf1.conf
150 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
151 | | ... | name=vnf2-vpp-cfg | vpp.conf=/tmp/vnf2.conf
152 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
153 | | ... | name=vnf3-vpp-cfg | vpp.conf=/tmp/vnf3.conf
154 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
155 | | ... | name=vnf4-vpp-cfg | vpp.conf=/tmp/vnf4.conf
156 | | Apply Kubernetes resource on node | ${dut1}
157 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf1
158 | | Apply Kubernetes resource on node | ${dut2}
159 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf1
160 | | Apply Kubernetes resource on node | ${dut1}
161 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf2
162 | | Apply Kubernetes resource on node | ${dut2}
163 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf2
164 | | Apply Kubernetes resource on node | ${dut1}
165 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf3
166 | | Apply Kubernetes resource on node | ${dut2}
167 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf3
168 | | Apply Kubernetes resource on node | ${dut1}
169 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf4
170 | | Apply Kubernetes resource on node | ${dut2}
171 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf4
172 | | Apply Kubernetes resource on node | ${dut1}
173 | | ... | ${sfc_profile}.yaml | $$TEST_NAME$$=${TEST NAME}
174 | | ... | $$VSWITCH_IF1$$=${dut1_if1_name}
175 | | ... | $$VSWITCH_IF2$$=${dut1_if2_name}
176 | | Apply Kubernetes resource on node | ${dut2}
177 | | ... | ${sfc_profile}.yaml | $$TEST_NAME$$=${TEST NAME}
178 | | ... | $$VSWITCH_IF1$$=${dut2_if1_name}
179 | | ... | $$VSWITCH_IF2$$=${dut2_if2_name}
180 | | Wait for Kubernetes PODs on all DUTs | ${nodes} | csit
181 | | Set Kubernetes PODs affinity on all DUTs | ${nodes}
182 | | Run Keyword If | '${search_type}' == 'NDR'
183 | | ... | Find NDR using binary search and pps
184 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
185 | | ... | ${min_rate} | ${max_rate} | ${threshold}
186 | | ... | ELSE IF | '${search_type}' == 'PDR'
187 | | ... | Find PDR using binary search and pps
188 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
189 | | ... | ${min_rate} | ${max_rate} | ${threshold}
190 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
191
192 *** Test Cases ***
193 | tc01-64B-1t1c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-ndrdisc
194 | | [Documentation]
195 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
196 | | ... | 1 receive queue per NIC port.
197 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
198 | | ... | linerate, step 50kpps.
199 | | ...
200 | | [Tags] | 64B | 1C | NDRDISC
201 | | [Template] | L2 Bridge Domain Binary Search
202 | | framesize=${64} | min_rate=${50000} | wt=1 | rxq=1 | search_type=NDR
203
204 | tc02-64B-1t1c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-pdrdisc
205 | | [Documentation]
206 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
207 | | ... | 1 receive queue per NIC port.
208 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
209 | | ... | linerate, step 50kpps, LT=0.5%.
210 | | ...
211 | | [Tags] | 64B | 1C | PDRDISC | SKIP_PATCH
212 | | [Template] | L2 Bridge Domain Binary Search
213 | | framesize=${64} | min_rate=${50000} | wt=1 | rxq=1 | search_type=PDR
214
215 | tc03-IMIX-1t1c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-ndrdisc
216 | | [Documentation]
217 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
218 | | ... | 1 receive queue per NIC port.
219 | | ... | [Ver] Find NDR for IMIX_v4_1 frames using binary search start at 10GE\
220 | | ... | linerate, step 50kpps.
221 | | ... | IMIX_v4_1 = (28x64B;16x570B;4x1518B)
222 | | ...
223 | | [Tags] | IMIX | 1C | NDRDISC
224 | | [Template] | L2 Bridge Domain Binary Search
225 | | framesize=IMIX_v4_1 | min_rate=${50000} | wt=1 | rxq=1 | search_type=NDR
226
227 | tc04-IMIX-1t1c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-pdrdisc
228 | | [Documentation]
229 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
230 | | ... | 1 receive queue per NIC port.
231 | | ... | [Ver] Find PDR for IMIX_v4_1 frames using binary search start at 10GE\
232 | | ... | linerate, step 50kpps, LT=0.5%.
233 | | ... | IMIX_v4_1 = (28x64B;16x570B;4x1518B)
234 | | ...
235 | | [Tags] | IMIX | 1C | PDRDISC | SKIP_PATCH
236 | | [Template] | L2 Bridge Domain Binary Search
237 | | framesize=IMIX_v4_1 | min_rate=${50000} | wt=1 | rxq=1 | search_type=PDR
238
239 | tc05-1518B-1t1c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-ndrdisc
240 | | [Documentation]
241 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
242 | | ... | 1 receive queue per NIC port.
243 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
244 | | ... | linerate, step 50kpps.
245 | | ...
246 | | [Tags] | 1518B | 1C | NDRDISC
247 | | [Template] | L2 Bridge Domain Binary Search
248 | | framesize=${1518} | min_rate=${50000} | wt=1 | rxq=1 | search_type=NDR
249
250 | tc06-1518B-1t1c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-pdrdisc
251 | | [Documentation]
252 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
253 | | ... | 1 receive queue per NIC port.
254 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
255 | | ... | linerate, step 50kpps, LT=0.5%.
256 | | ...
257 | | [Tags] | 1518B | 1C | PDRDISC | SKIP_PATCH
258 | | [Template] | L2 Bridge Domain Binary Search
259 | | framesize=${1518} | min_rate=${50000} | wt=1 | rxq=1 | search_type=PDR
260
261 | tc07-64B-2t2c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-ndrdisc
262 | | [Documentation]
263 | | ... | [Cfg] DUT runs L2BD switching config with 2 phy core,\
264 | | ... | 1 receive queue per NIC port.
265 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
266 | | ... | linerate, step 50kpps.
267 | | ...
268 | | [Tags] | 64B | 2C | NDRDISC
269 | | [Template] | L2 Bridge Domain Binary Search
270 | | framesize=${64} | min_rate=${50000} | wt=2 | rxq=1 | search_type=NDR
271
272 | tc08-64B-2t2c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-pdrdisc
273 | | [Documentation]
274 | | ... | [Cfg] DUT runs L2BD switching config with 2 phy core,\
275 | | ... | 1 receive queue per NIC port.
276 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
277 | | ... | linerate, step 50kpps, LT=0.5%.
278 | | ...
279 | | [Tags] | 64B | 2C | PDRDISC | SKIP_PATCH
280 | | [Template] | L2 Bridge Domain Binary Search
281 | | framesize=${64} | min_rate=${50000} | wt=2 | rxq=1 | search_type=PDR
282
283 | tc09-IMIX-2t2c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-ndrdisc
284 | | [Documentation]
285 | | ... | [Cfg] DUT runs L2BD switching config with 2 phy core,\
286 | | ... | 1 receive queue per NIC port.
287 | | ... | [Ver] Find NDR for IMIX_v4_1 frames using binary search start at 10GE\
288 | | ... | linerate, step 50kpps.
289 | | ... | IMIX_v4_1 = (28x64B;16x570B;4x1518B)
290 | | ...
291 | | [Tags] | IMIX | 2C | NDRDISC | SKIP_PATCH
292 | | [Template] | L2 Bridge Domain Binary Search
293 | | framesize=IMIX_v4_1 | min_rate=${50000} | wt=2 | rxq=1 | search_type=NDR
294
295 | tc10-IMIX-2t2c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-pdrdisc
296 | | [Documentation]
297 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
298 | | ... | 1 receive queue per NIC port.
299 | | ... | [Ver] Find PDR for IMIX_v4_1 frames using binary search start at 10GE\
300 | | ... | linerate, step 50kpps, LT=0.5%.
301 | | ... | IMIX_v4_1 = (28x64B;16x570B;4x1518B)
302 | | ...
303 | | [Tags] | IMIX | 2C | PDRDISC | SKIP_PATCH
304 | | [Template] | L2 Bridge Domain Binary Search
305 | | framesize=IMIX_v4_1 | min_rate=${50000} | wt=2 | rxq=1 | search_type=PDR
306
307 | tc11-1518B-2t2c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-ndrdisc
308 | | [Documentation]
309 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
310 | | ... | 1 receive queue per NIC port.
311 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
312 | | ... | linerate, step 50kpps.
313 | | ...
314 | | [Tags] | 1518B | 2C | NDRDISC | SKIP_PATCH
315 | | [Template] | L2 Bridge Domain Binary Search
316 | | framesize=${1518} | min_rate=${50000} | wt=2 | rxq=1 | search_type=NDR
317
318 | tc12-1518B-2t2c-eth-1drcl2bdbasemaclrn-eth-2memif-4drcl2xc-1horiz-k8s-pdrdisc
319 | | [Documentation]
320 | | ... | [Cfg] DUT runs L2BD switching config with 1 phy core,\
321 | | ... | 1 receive queue per NIC port.
322 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
323 | | ... | linerate, step 50kpps, LT=0.5%.
324 | | ...
325 | | [Tags] | 1518B | 2C | PDRDISC | SKIP_PATCH
326 | | [Template] | L2 Bridge Domain Binary Search
327 | | framesize=${1518} | min_rate=${50000} | wt=2 | rxq=1 | search_type=PDR