cc4d0c99248779e38283fb16cabe56d14fe17c6e
[csit.git] / tests / kubernetes / perf / container_memif / 10ge2p1x520-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-ndrpdrdisc.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 | ...
17 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
18 | ... | NIC_Intel-X520-DA2 | ETH | L2BDMACLRN | L2BDBASE | SCALE | MEMIF
19 | ... | K8S | 1VSWITCH | 4VNF | VPP_AGENT | SFC_CONTROLLER | CHAIN
20 | ...
21 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
22 | ... | L2 | Intel-X520-DA2
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 X520 Niantic 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, 253 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 | ${avg_imix_framesize}= | ${357.833}
57 # X520-DA2 bandwidth limit
58 | ${s_limit} | ${10000000000}
59 # SFC profile
60 | ${sfc_profile} | configmaps/ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc
61 # Traffic profile:
62 | ${traffic_profile} | trex-sl-3n-ethip4-ip4src254
63 # CPU settings
64 | ${system_cpus}= | ${1}
65 | ${vswitch_cpus}= | ${5}
66 | ${vnf_cpus}= | ${2}
67
68 *** Keywords ***
69 | Create Kubernetes VSWITCH startup config on all DUTs
70 | | [Documentation] | Create base startup configuration of VSWITCH in Kubernetes
71 | | ... | deploy to all DUTs.
72 | | ...
73 | | ... | *Arguments:*
74 | | ... | - ${framesize} - L2 framesize. Type: integer
75 | | ... | - ${wt} - Worker threads. Type: integer
76 | | ... | - ${rxq} - RX queues. Type: integer
77 | | ...
78 | | ... | *Example:*
79 | | ...
80 | | ... | \| Create Kubernetes VSWITCH startup config on all DUTs \| ${64} \
81 | | ... | \| ${1} \| ${1}
82 | | ...
83 | | [Arguments] | ${framesize} | ${wt} | ${rxq}
84 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
85 | | ... | ${dut1_if1} | ${dut1_if2}
86 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
87 | | ... | ${dut2_if1} | ${dut2_if2}
88 | | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
89 | | ${dut1_if2_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if2}
90 | | ${dut2_if1_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if1}
91 | | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
92 | | ${cpu_cnt}= | Evaluate | ${wt}+1
93 | | ${config}= | Run keyword | Create Kubernetes VSWITCH startup config
94 | | ... | node=${dut1} | cpu_cnt=${cpu_cnt} | cpu_node=${dut1_numa}
95 | | ... | cpu_skip=${system_cpus} | smt_used=${False}
96 | | ... | filename=/tmp/vswitch.conf | framesize=${framesize} | rxq=${rxq}
97 | | ... | if1=${dut1_if1_pci} | if2=${dut1_if2_pci}
98 | | ${config}= | Run keyword | Create Kubernetes VSWITCH startup config
99 | | ... | node=${dut2} | cpu_cnt=${cpu_cnt} | cpu_node=${dut2_numa}
100 | | ... | cpu_skip=${system_cpus} | smt_used=${False}
101 | | ... | filename=/tmp/vswitch.conf | framesize=${framesize} | rxq=${rxq}
102 | | ... | if1=${dut2_if1_pci} | if2=${dut2_if2_pci}
103
104 | Create Kubernetes VNF'${i}' startup config on all DUTs
105 | | [Documentation] | Create base startup configuration of VNF in Kubernetes
106 | | ... | deploy to all DUTs.
107 | | ...
108 | | ${i_int}= | Convert To Integer | ${i}
109 | | ${cpu_skip}= | Evaluate | ${vswitch_cpus}+${system_cpus}
110 | | ${dut1_numa}= | Get interfaces numa node | ${dut1}
111 | | ... | ${dut1_if1} | ${dut1_if2}
112 | | ${dut2_numa}= | Get interfaces numa node | ${dut2}
113 | | ... | ${dut2_if1} | ${dut2_if2}
114 | | ${config}= | Run keyword | Create Kubernetes VNF startup config
115 | | ... | node=${dut1} | cpu_cnt=${vnf_cpus} | cpu_node=${dut1_numa}
116 | | ... | cpu_skip=${cpu_skip} | smt_used=${False} | filename=/tmp/vnf${i}.conf
117 | | ... | i=${i_int}
118 | | ${config}= | Run keyword | Create Kubernetes VNF startup config
119 | | ... | node=${dut2} | cpu_cnt=${vnf_cpus} | cpu_node=${dut2_numa}
120 | | ... | cpu_skip=${cpu_skip} | smt_used=${False} | filename=/tmp/vnf${i}.conf
121 | | ... | i=${i_int}
122
123 | L2 Bridge Domain Binary Search
124 | | [Arguments] | ${framesize} | ${min_rate} | ${wt} | ${rxq} | ${search_type}
125 | | Set Test Variable | ${framesize}
126 | | Set Test Variable | ${min_rate}
127 | | ${get_framesize}= | Set Variable If
128 | | ... | "${framesize}" == "IMIX_v4_1" | ${avg_imix_framesize} | ${framesize}
129 | | ${max_rate}= | Calculate pps | ${s_limit} | ${get_framesize}
130 | | ${binary_min}= | Set Variable | ${min_rate}
131 | | ${binary_max}= | Set Variable | ${max_rate}
132 | | ${threshold}= | Set Variable | ${min_rate}
133 | | ${dut1_if1_name}= | Get interface name | ${dut1} | ${dut1_if1}
134 | | ${dut1_if2_name}= | Get interface name | ${dut1} | ${dut1_if2}
135 | | ${dut2_if1_name}= | Get interface name | ${dut2} | ${dut2_if1}
136 | | ${dut2_if2_name}= | Get interface name | ${dut2} | ${dut2_if2}
137 | | ${tg_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1}
138 | | ${tg_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2}
139 | | Create Kubernetes VSWITCH startup config on all DUTs | ${get_framesize}
140 | | ... | ${wt} | ${rxq}
141 | | Create Kubernetes VNF'1' startup config on all DUTs
142 | | Create Kubernetes VNF'2' startup config on all DUTs
143 | | Create Kubernetes VNF'3' startup config on all DUTs
144 | | Create Kubernetes VNF'4' startup config on all DUTs
145 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
146 | | ... | name=vswitch-vpp-cfg | vpp.conf=/tmp/vswitch.conf
147 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
148 | | ... | name=vnf1-vpp-cfg | vpp.conf=/tmp/vnf1.conf
149 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
150 | | ... | name=vnf2-vpp-cfg | vpp.conf=/tmp/vnf2.conf
151 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
152 | | ... | name=vnf3-vpp-cfg | vpp.conf=/tmp/vnf3.conf
153 | | Create Kubernetes CM from file on all DUTs | ${nodes} | csit
154 | | ... | name=vnf4-vpp-cfg | vpp.conf=/tmp/vnf4.conf
155 | | Apply Kubernetes resource on node | ${dut1}
156 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf1
157 | | Apply Kubernetes resource on node | ${dut2}
158 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf1
159 | | Apply Kubernetes resource on node | ${dut1}
160 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf2
161 | | Apply Kubernetes resource on node | ${dut2}
162 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf2
163 | | Apply Kubernetes resource on node | ${dut1}
164 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf3
165 | | Apply Kubernetes resource on node | ${dut2}
166 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf3
167 | | Apply Kubernetes resource on node | ${dut1}
168 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf4
169 | | Apply Kubernetes resource on node | ${dut2}
170 | | ... | pods/contiv-vnf.yaml | $$VNF$$=vnf4
171 | | Apply Kubernetes resource on node | ${dut1}
172 | | ... | ${sfc_profile}.yaml | $$TEST_NAME$$=${TEST NAME}
173 | | ... | $$VSWITCH_IF1$$=${dut1_if1_name}
174 | | ... | $$VSWITCH_IF2$$=${dut1_if2_name}
175 | | ... | $$TG_IF1_MAC1$$=${tg_if1_mac}
176 | | ... | $$TG_IF2_MAC1$$=${tg_if2_mac}
177 | | Apply Kubernetes resource on node | ${dut2}
178 | | ... | ${sfc_profile}.yaml | $$TEST_NAME$$=${TEST NAME}
179 | | ... | $$VSWITCH_IF1$$=${dut2_if1_name}
180 | | ... | $$VSWITCH_IF2$$=${dut2_if2_name}
181 | | ... | $$TG_IF1_MAC1$$=${tg_if1_mac}
182 | | ... | $$TG_IF2_MAC1$$=${tg_if2_mac}
183 | | Wait for Kubernetes PODs on all DUTs | ${nodes} | csit
184 | | Set Kubernetes PODs affinity on all DUTs | ${nodes}
185 | | Run Keyword If | '${search_type}' == 'NDR'
186 | | ... | Find NDR using binary search and pps
187 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
188 | | ... | ${min_rate} | ${max_rate} | ${threshold}
189 | | ... | ELSE IF | '${search_type}' == 'PDR'
190 | | ... | Find PDR using binary search and pps
191 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
192 | | ... | ${min_rate} | ${max_rate} | ${threshold}
193 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
194
195 *** Test Cases ***
196 | tc01-64B-1t1c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-ndrdisc
197 | | [Documentation]
198 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
199 | | ... | 1 receive queue per NIC port.
200 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
201 | | ... | linerate, step 100kpps.
202 | | ...
203 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
204 | | [Template] | L2 Bridge Domain Binary Search
205 | | framesize=${64} | min_rate=${100000} | wt=1 | rxq=1 | search_type=NDR
206
207 | tc02-64B-1t1c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-pdrdisc
208 | | [Documentation]
209 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
210 | | ... | 1 receive queue per NIC port.
211 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
212 | | ... | linerate, step 100kpps, LT=0.5%.
213 | | ...
214 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
215 | | [Template] | L2 Bridge Domain Binary Search
216 | | framesize=${64} | min_rate=${100000} | wt=1 | rxq=1 | search_type=PDR
217
218 | tc03-IMIX-1t1c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-ndrdisc
219 | | [Documentation]
220 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
221 | | ... | 1 receive queue per NIC port.
222 | | ... | [Ver] Find NDR for IMIX_v4_1 frames using binary search start at 10GE\
223 | | ... | linerate, step 10kpps.
224 | | ... | IMIX_v4_1 = (28x64B;16x570B;4x1518B)
225 | | ...
226 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
227 | | [Template] | L2 Bridge Domain Binary Search
228 | | framesize=IMIX_v4_1 | min_rate=${10000} | wt=1 | rxq=1 | search_type=NDR
229
230 | tc04-IMIX-1t1c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-pdrdisc
231 | | [Documentation]
232 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
233 | | ... | 1 receive queue per NIC port.
234 | | ... | [Ver] Find PDR for IMIX_v4_1 frames using binary search start at 10GE\
235 | | ... | linerate, step 10kpps, LT=0.5%.
236 | | ... | IMIX_v4_1 = (28x64B;16x570B;4x1518B)
237 | | ...
238 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
239 | | [Template] | L2 Bridge Domain Binary Search
240 | | framesize=IMIX_v4_1 | min_rate=${10000} | wt=1 | rxq=1 | search_type=PDR
241
242 | tc05-1518B-1t1c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-ndrdisc
243 | | [Documentation]
244 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
245 | | ... | 1 receive queue per NIC port.
246 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
247 | | ... | linerate, step 10kpps.
248 | | ...
249 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
250 | | [Template] | L2 Bridge Domain Binary Search
251 | | framesize=${1518} | min_rate=${10000} | wt=1 | rxq=1 | search_type=NDR
252
253 | tc06-1518B-1t1c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-pdrdisc
254 | | [Documentation]
255 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
256 | | ... | 1 receive queue per NIC port.
257 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
258 | | ... | linerate, step 10kpps, LT=0.5%.
259 | | ...
260 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
261 | | [Template] | L2 Bridge Domain Binary Search
262 | | framesize=${1518} | min_rate=${10000} | wt=1 | rxq=1 | search_type=PDR
263
264 | tc07-64B-2t2c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-ndrdisc
265 | | [Documentation]
266 | | ... | [Cfg] DUT runs L2BD switching config with 2 thread, 2 phy core,\
267 | | ... | 1 receive queue per NIC port.
268 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
269 | | ... | linerate, step 100kpps.
270 | | ...
271 | | [Tags] | 64B | 2T2C | MTHREAD | NDRDISC
272 | | [Template] | L2 Bridge Domain Binary Search
273 | | framesize=${64} | min_rate=${100000} | wt=2 | rxq=1 | search_type=NDR
274
275 | tc08-64B-2t2c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-pdrdisc
276 | | [Documentation]
277 | | ... | [Cfg] DUT runs L2BD switching config with 2 thread, 2 phy core,\
278 | | ... | 1 receive queue per NIC port.
279 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
280 | | ... | linerate, step 100kpps, LT=0.5%.
281 | | ...
282 | | [Tags] | 64B | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
283 | | [Template] | L2 Bridge Domain Binary Search
284 | | framesize=${64} | min_rate=${100000} | wt=2 | rxq=1 | search_type=PDR
285
286 | tc09-IMIX-2t2c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-ndrdisc
287 | | [Documentation]
288 | | ... | [Cfg] DUT runs L2BD switching config with 2 thread, 2 phy core,\
289 | | ... | 1 receive queue per NIC port.
290 | | ... | [Ver] Find NDR for IMIX_v4_1 frames using binary search start at 10GE\
291 | | ... | linerate, step 10kpps.
292 | | ... | IMIX_v4_1 = (28x64B;16x570B;4x1518B)
293 | | ...
294 | | [Tags] | IMIX | 2T2C | MTHREAD | NDRDISC | SKIP_PATCH
295 | | [Template] | L2 Bridge Domain Binary Search
296 | | framesize=IMIX_v4_1 | min_rate=${10000} | wt=2 | rxq=1 | search_type=NDR
297
298 | tc10-IMIX-2t2c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-pdrdisc
299 | | [Documentation]
300 | | ... | [Cfg] DUT runs L2BD switching config with 2 thread, 1 phy core,\
301 | | ... | 1 receive queue per NIC port.
302 | | ... | [Ver] Find PDR for IMIX_v4_1 frames using binary search start at 10GE\
303 | | ... | linerate, step 10kpps, LT=0.5%.
304 | | ... | IMIX_v4_1 = (28x64B;16x570B;4x1518B)
305 | | ...
306 | | [Tags] | IMIX | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
307 | | [Template] | L2 Bridge Domain Binary Search
308 | | framesize=IMIX_v4_1 | min_rate=${10000} | wt=2 | rxq=1 | search_type=PDR
309
310 | tc11-1518B-2t2c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-ndrdisc
311 | | [Documentation]
312 | | ... | [Cfg] DUT runs L2BD switching config with 2 thread, 1 phy core,\
313 | | ... | 1 receive queue per NIC port.
314 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
315 | | ... | linerate, step 10kpps.
316 | | ...
317 | | [Tags] | 1518B | 2T2C | MTHREAD | NDRDISC | SKIP_PATCH
318 | | [Template] | L2 Bridge Domain Binary Search
319 | | framesize=${1518} | min_rate=${10000} | wt=2 | rxq=1 | search_type=NDR
320
321 | tc12-1518B-2t2c-ch-eth-1drcl2bdbasemaclrn-eth-8memif-4drcl2xc-k8s-pdrdisc
322 | | [Documentation]
323 | | ... | [Cfg] DUT runs L2BD switching config with 2 thread, 1 phy core,\
324 | | ... | 1 receive queue per NIC port.
325 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
326 | | ... | linerate, step 10kpps, LT=0.5%.
327 | | ...
328 | | [Tags] | 1518B | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
329 | | [Template] | L2 Bridge Domain Binary Search
330 | | framesize=${1518} | min_rate=${10000} | wt=2 | rxq=1 | search_type=PDR