CSIT-1142 2-node topology - keywords
[csit.git] / tests / vpp / perf / vts / 10ge2p1x520-ethip4vxlan-l2bdbasemaclrn-eth-iacldstbase-2vhostvr1024-1vm-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 | Library | resources.libraries.python.QemuUtils
17 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
18 | ... | NIC_Intel-X520-DA2 | L2BDMACLRN | ENCAP | VXLAN | L2OVRLAY | IP4UNRLAY
19 | ... | VHOST | VM | VHOST_1024 | VTS
20 | ...
21 | Suite Setup | Run Keywords
22 | ... | Set up 3-node performance topology with DUT's NIC model
23 | ... | L3 | Intel-X520-DA2
24 | ... | AND | Set up performance test suite with ACL
25 | Suite Teardown | Tear down 3-node performance topology
26 | ...
27 | Test Setup | Set up performance test
28 | Test Teardown | Tear down performance test with vhost and VM with dpdk-testpmd and ACL
29 | ... | ${min_rate}pps | ${framesize} | ${traffic_profile}
30 | ... | dut1_node=${dut1} | dut1_vm_refs=${dut1_vm_refs}
31 | ...
32 | Documentation | *RFC2544: Packet throughput L2BD test cases with VXLANoIPv4
33 | ... | and vhost*
34 | ...
35 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
36 | ... | with single links between nodes.
37 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for L2 switching of IPv4.
38 | ... | Eth-IPv4-VXLAN-Eth-IPv4 is applied on link between DUT1 and DUT2.
39 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 bridge-
40 | ... | domain and MAC learning enabled. Qemu Guest is connected to VPP via
41 | ... | vhost-user interfaces. Guest is running DPDK testpmd interconnecting
42 | ... | vhost-user interfaces using 5 cores pinned to cpus 5-9 and 2048M
43 | ... | memory. Testpmd is using socket-mem=1024M (512x2M hugepages), 5 cores
44 | ... | (1 main core and 4 cores dedicated for io), forwarding mode is set to
45 | ... | io, rxd/txd=256, burst=64. DUT1, DUT2 are tested with 2p10GE NIC X520
46 | ... | Niantic by Intel.
47 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
48 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
49 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
50 | ... | of packets transmitted. NDR and PDR are discovered for different
51 | ... | Ethernet L2 frame sizes using either binary search or linear search
52 | ... | algorithms with configured starting rate and final step that determines
53 | ... | throughput measurement resolution. Test packets are generated by TG on
54 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
55 | ... | (flow-group per direction, 253 flows per flow-group) with all packets
56 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static
57 | ... | payload. MAC addresses are matching MAC addresses of the TG node
58 | ... | interfaces.
59 | ... | *[Ref] Applicable standard specifications:* RFC2544, RFC7348.
60
61 *** Variables ***
62 | ${perf_qemu_qsz}= | 1024
63 # X520-DA2 bandwidth limit
64 | ${s_limit}= | ${10000000000}
65 | ${vxlan_overhead}= | ${50}
66 # Socket names
67 | ${dut1_bd_id1}= | 1
68 | ${dut1_bd_id2}= | 2
69 | ${dut2_bd_id1}= | 1
70 | ${sock1}= | /tmp/sock-1-${dut1_bd_id1}
71 | ${sock2}= | /tmp/sock-1-${dut1_bd_id2}
72 # Traffic profile:
73 | ${traffic_profile} | trex-sl-ethip4-vxlansrc253
74 | ${min_rate}= | ${10000}
75
76
77 *** Keywords ***
78 | Configure ACLs on a single interface
79 | | [Documentation]
80 | | ... | Configure ACL
81 | | ...
82 | | ... | *Arguments:*
83 | | ... | - dut - DUT node. Type: string
84 | | ... | - dut_if - DUT node interface name. Type: string
85 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
86 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
87 | | ... | - subnets - Subnets to apply the specific ACL. Type: list
88 | | ...
89 | | ... | *Example:*
90 | | ...
91 | | ... | \| Configure ACLs on a single interface \| ${nodes['DUT1']}
92 | | ... | \| ... \| GigabitEthernet0/7/0 \| input \| permit | 0.0.0.0/0
93 | | ...
94 | | [Arguments] | ${dut} | ${dut_if} | ${acl_apply_type} | ${acl_action}
95 | | ... | @{subnets}
96 | | Set Test variable | ${acl} | ${EMPTY}
97 | | :FOR | ${subnet} | IN | @{subnets}
98 | | | ${acl}= | Run Keyword If | '${acl}' == '${EMPTY}'
99 | | | ... | Set Variable | ipv4 ${acl_action} src ${subnet}
100 | | | ... | ELSE
101 | | | ... | Catenate | SEPARATOR=, | ${acl}
102 | | | ... | ipv4 ${acl_action} src ${subnet}
103 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
104 | | @{acl_list}= | Create List | ${0}
105 | | Set Acl List For Interface | ${dut} | ${dut_if} | ${acl_apply_type}
106 | | ... | ${acl_list}
107
108
109 *** Keywords ***
110 | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
111 | | [Arguments] | ${num_of_threads} | ${rxq} | ${pkt_framesize} | ${search_type}
112 | | ... | ${acl_type}=${EMPTY}
113 | | [Documentation]
114 | | ... | [Cfg] DUT runs L2BD switching config with 1 thread, 1 phy core,\
115 | | ... | 1 receive queue per NIC port.
116 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
117 | | ... | linerate, step 10kpps.
118 | | ...
119 | | ... | *Arguments:*
120 | | ... | - num_of_threads - Number of worker threads to be used. Type: integer
121 | | ... | - rxq - Number of Rx queues to be used. Type: integer
122 | | ... | - pkt_framesize - L2 Frame Size [B]. Type: integer
123 | | ... | - search_type - Type of the search - non drop rate (NDR) or partial
124 | | ... | drop rare (PDR). Type: string
125 | | ...
126 | | ${binary_min}= | Set Variable | ${min_rate}
127 | | ${threshold}= | Set Variable | ${min_rate}
128 | | ${max_pkt_size}= | Set Variable If | '${pkt_framesize}' == 'IMIX_v4_1' |
129 | | ... | ${1500 + ${vxlan_overhead}} | ${pkt_framesize + ${vxlan_overhead}}
130 | | ${max_rate}= | Calculate pps | ${s_limit} | ${max_pkt_size}
131 | | ${binary_max}= | Set Variable | ${max_rate}
132 | | Given Add '${num_of_threads}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
133 | | Add PCI devices to all DUTs
134 | | And Run Keyword If | ${max_pkt_size} < ${1522}
135 | | ... | Add no multi seg to all DUTs
136 | | And Apply startup configuration on all VPP DUTs
137 | | &{vxlan1}= | Create Dictionary | vni=24 | vtep=172.17.0.2
138 | | &{vxlan2}= | Create Dictionary | vni=24 | vtep=172.27.0.2
139 | | @{dut1_vxlans}= | Create List | ${vxlan1}
140 | | @{dut2_vxlans}= | Create List | ${vxlan2}
141 | | ${jumbo_frames}= | Set Variable If
142 | | ... | ${max_pkt_size} < ${1522} | ${False} | ${True}
143 | | Set interfaces in path in 3-node circular topology up
144 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
145 | | ... | ${sock1} | ${sock2}
146 | | When Init L2 bridge domains with single DUT with Vhost-User and VXLANoIPv4 in 3-node circular topology
147 | | ... | 172.16.0.1 | 16 | 172.26.0.1 | 16 | 172.16.0.2 | 172.26.0.2
148 | | ... | ${dut1_vxlans} | ${dut2_vxlans} | 172.17.0.0 | 16 | 172.27.0.0 | 16
149 | | @{permit_list}= | Create List | 10.0.0.1/32 | 10.0.0.2/32
150 | | Run Keyword If | '${acl_type}' != '${EMPTY}'
151 | | ... | Configure ACLs on a single interface | ${dut1} | ${dut1_if2} | input
152 | | ... | ${acl_type} | @{permit_list}
153 | | ${vm1}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
154 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1
155 | | ... | jumbo_frames=${jumbo_frames}
156 | | Set Test Variable | &{dut1_vm_refs} | DUT1_VM1=${vm1}
157 | | Set Test Variable | ${framesize} | ${pkt_framesize}
158 | | ${pkt_framesize}= | Set Variable If | '${pkt_framesize}' == 'IMIX_v4_1' |
159 | | ... | ${pkt_framesize} | ${pkt_framesize + ${vxlan_overhead}}
160 | | Run Keyword If | '${search_type}' == 'NDR'
161 | | ... | Find NDR using binary search and pps
162 | | ... | ${pkt_framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
163 | | ... | ${min_rate} | ${max_rate} | ${threshold}
164 | | ... | ELSE IF | '${search_type}' == 'PDR'
165 | | ... | Find PDR using binary search and pps
166 | | ... | ${pkt_framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
167 | | ... | ${min_rate} | ${max_rate} | ${threshold}
168 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
169
170 *** Test Cases ***
171 | tc01-64B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
172 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC
173 | | ...
174 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
175 | | num_of_threads=2 | rxq=2 | pkt_framesize=${64} | search_type=NDR
176
177 | tc02-64B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
178 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC
179 | | ...
180 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
181 | | num_of_threads=2 | rxq=2 | pkt_framesize=${64} | search_type=PDR
182
183 | tc03-150B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
184 | | [Tags] | 150B | 2T2C | STHREAD | NDRDISC
185 | | ...
186 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
187 | | num_of_threads=2 | rxq=2 | pkt_framesize=${150} | search_type=NDR
188
189 | tc04-150B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
190 | | [Tags] | 150B | 2T2C | STHREAD | PDRDISC
191 | | ...
192 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
193 | | num_of_threads=2 | rxq=2 | pkt_framesize=${150} | search_type=PDR
194
195 | tc05-200B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
196 | | [Tags] | 200B | 2T2C | STHREAD | NDRDISC
197 | | ...
198 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
199 | | num_of_threads=2 | rxq=2 | pkt_framesize=${200} | search_type=NDR
200
201 | tc06-200B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
202 | | [Tags] | 200B | 2T2C | STHREAD | PDRDISC
203 | | ...
204 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
205 | | num_of_threads=2 | rxq=2 | pkt_framesize=${200} | search_type=PDR
206
207 | tc07-IMIX-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
208 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC
209 | | ...
210 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
211 | | num_of_threads=2 | rxq=2 | pkt_framesize=IMIX_v4_1 | search_type=NDR
212
213 | tc08-IMIX-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
214 | | [Tags] | IMIX | 2T2C | STHREAD | PDRDISC
215 | | ...
216 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
217 | | num_of_threads=2 | rxq=2 | pkt_framesize=IMIX_v4_1 | search_type=PDR
218
219 | tc09-64B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-ndrdisc
220 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC | ACL_PERMIT
221 | | ...
222 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
223 | | num_of_threads=2 | rxq=2 | pkt_framesize=${64} | search_type=NDR
224 | | ... | acl_type=permit
225
226 | tc10-64B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-pdrdisc
227 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC | ACL_PERMIT
228 | | ...
229 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
230 | | num_of_threads=2 | rxq=2 | pkt_framesize=${64} | search_type=PDR
231 | | ... | acl_type=permit
232
233 | tc11-150B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-ndrdisc
234 | | [Tags] | 150B | 2T2C | STHREAD | NDRDISC | ACL_PERMIT
235 | | ...
236 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
237 | | num_of_threads=2 | rxq=2 | pkt_framesize=${150} | search_type=NDR
238 | | ... | acl_type=permit
239
240 | tc12-150B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-pdrdisc
241 | | [Tags] | 150B | 2T2C | STHREAD | PDRDISC | ACL_PERMIT
242 | | ...
243 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
244 | | num_of_threads=2 | rxq=2 | pkt_framesize=${150} | search_type=PDR
245 | | ... | acl_type=permit
246
247 | tc13-200B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-ndrdisc
248 | | [Tags] | 200B | 2T2C | STHREAD | NDRDISC | ACL_PERMIT
249 | | ...
250 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
251 | | num_of_threads=2 | rxq=2 | pkt_framesize=${200} | search_type=NDR
252 | | ... | acl_type=permit
253
254 | tc14-200B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-pdrdisc
255 | | [Tags] | 200B | 2T2C | STHREAD | PDRDISC | ACL_PERMIT
256 | | ...
257 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
258 | | num_of_threads=2 | rxq=2 | pkt_framesize=${200} | search_type=PDR
259 | | ... | acl_type=permit
260
261 | tc15-IMIX-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-ndrdisc
262 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC | ACL_PERMIT
263 | | ...
264 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
265 | | num_of_threads=2 | rxq=2 | pkt_framesize=IMIX_v4_1 | search_type=NDR
266 | | ... | acl_type=permit
267
268 | tc16-IMIX-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-pdrdisc
269 | | [Tags] | IMIX | 2T2C | STHREAD | PDRDISC | ACL_PERMIT
270 | | ...
271 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
272 | | num_of_threads=2 | rxq=2 | pkt_framesize=IMIX_v4_1 | search_type=PDR
273 | | ... | acl_type=permit
274
275 | tc17-64B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-ndrdisc
276 | | [Tags] | 64B | 2T2C | STHREAD | NDRDISC | ACL_PERMIT_REFLECT
277 | | ...
278 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
279 | | num_of_threads=2 | rxq=2 | pkt_framesize=${64} | search_type=NDR
280 | | ... | acl_type=permit+reflect
281
282 | tc18-64B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-pdrdisc
283 | | [Tags] | 64B | 2T2C | STHREAD | PDRDISC | ACL_PERMIT_REFLECT
284 | | ...
285 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
286 | | num_of_threads=2 | rxq=2 | pkt_framesize=${64} | search_type=PDR
287 | | ... | acl_type=permit+reflect
288
289 | tc19-150B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-ndrdisc
290 | | [Tags] | 150B | 2T2C | STHREAD | NDRDISC | ACL_PERMIT_REFLECT
291 | | ...
292 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
293 | | num_of_threads=2 | rxq=2 | pkt_framesize=${150} | search_type=NDR
294 | | ... | acl_type=permit+reflect
295
296 | tc20-150B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-pdrdisc
297 | | [Tags] | 150B | 2T2C | STHREAD | PDRDISC | ACL_PERMIT_REFLECT
298 | | ...
299 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
300 | | num_of_threads=2 | rxq=2 | pkt_framesize=${150} | search_type=PDR
301 | | ... | acl_type=permit+reflect
302
303 | tc21-200B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-ndrdisc
304 | | [Tags] | 200B | 2T2C | STHREAD | NDRDISC | ACL_PERMIT_REFLECT
305 | | ...
306 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
307 | | num_of_threads=2 | rxq=2 | pkt_framesize=${200} | search_type=NDR
308 | | ... | acl_type=permit+reflect
309
310 | tc22-200B-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-pdrdisc
311 | | [Tags] | 200B | 2T2C | STHREAD | PDRDISC | ACL_PERMIT_REFLECT
312 | | ...
313 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
314 | | num_of_threads=2 | rxq=2 | pkt_framesize=${200} | search_type=PDR
315 | | ... | acl_type=permit+reflect
316
317 | tc23-IMIX-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-ndrdisc
318 | | [Tags] | IMIX | 2T2C | STHREAD | NDRDISC | ACL_PERMIT_REFLECT
319 | | ...
320 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
321 | | num_of_threads=2 | rxq=2 | pkt_framesize=IMIX_v4_1 | search_type=NDR
322 | | ... | acl_type=permit+reflect
323
324 | tc24-IMIX-1t1c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-pdrdisc
325 | | [Tags] | IMIX | 2T2C | STHREAD | PDRDISC | ACL_PERMIT_REFLECT
326 | | ...
327 | | [Template] | Discover NDR or PDR for IPv4 forwarding with VHOST/VXLAN and ACL
328 | | num_of_threads=2 | rxq=2 | pkt_framesize=IMIX_v4_1 | search_type=PDR
329 | | ... | acl_type=permit+reflect