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