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