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