ef8722b62ae502d4ea37cebd400d553d1215a037
[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 | Test Template | Local template
33 | ...
34 | Documentation | *RFC2544: Packet throughput L2BD test cases with VXLANoIPv4
35 | ... | and vhost*
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 switching of IPv4.
40 | ... | Eth-IPv4-VXLAN-Eth-IPv4 is applied on link between DUT1 and DUT2.
41 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with L2 bridge-
42 | ... | domain and MAC learning enabled. Qemu Guest is connected to VPP via
43 | ... | vhost-user interfaces. Guest is running DPDK testpmd interconnecting
44 | ... | vhost-user interfaces using 5 cores pinned to cpus 5-9 and 2048M
45 | ... | memory. Testpmd is using socket-mem=1024M (512x2M hugepages), 5 cores
46 | ... | (1 main core and 4 cores dedicated for io), forwarding mode is set to
47 | ... | io, rxd/txd=256, burst=64. DUT1, DUT2 are tested with 2p10GE NIC X520
48 | ... | Niantic by Intel.
49 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
50 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
51 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
52 | ... | of packets transmitted. NDR and PDR are discovered for different
53 | ... | Ethernet L2 frame sizes using either binary search or linear search
54 | ... | algorithms with configured starting rate and final step that determines
55 | ... | throughput measurement resolution. Test packets are generated by TG on
56 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
57 | ... | (flow-group per direction, 253 flows per flow-group) with all packets
58 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and static
59 | ... | payload. MAC addresses are matching MAC addresses of the TG node
60 | ... | interfaces.
61 | ... | *[Ref] Applicable standard specifications:* RFC2544, RFC7348.
62
63 *** Variables ***
64 | ${perf_qemu_qsz}= | 1024
65 # X520-DA2 bandwidth limit
66 | ${s_limit}= | ${10000000000}
67 | ${vxlan_overhead}= | ${50}
68 # Socket names
69 | ${dut1_bd_id1}= | 1
70 | ${dut1_bd_id2}= | 2
71 | ${dut2_bd_id1}= | 1
72 | ${sock1}= | /tmp/sock-1-${dut1_bd_id1}
73 | ${sock2}= | /tmp/sock-1-${dut1_bd_id2}
74 # Traffic profile:
75 | ${traffic_profile} | trex-sl-ethip4-vxlansrc253
76 | ${min_rate}= | ${10000}
77
78
79 *** Keywords ***
80 | Configure ACLs on a single interface
81 | | [Documentation]
82 | | ... | Configure ACL
83 | | ...
84 | | ... | *Arguments:*
85 | | ... | - dut - DUT node. Type: string
86 | | ... | - dut_if - DUT node interface name. Type: string
87 | | ... | - acl_apply_type - To what path apply the ACL - input or output.
88 | | ... | - acl_action - Action for the rule - deny, permit, permit+reflect.
89 | | ... | - subnets - Subnets to apply the specific ACL. Type: list
90 | | ...
91 | | ... | *Example:*
92 | | ...
93 | | ... | \| Configure ACLs on a single interface \| ${nodes['DUT1']}
94 | | ... | \| ... \| GigabitEthernet0/7/0 \| input \| permit | 0.0.0.0/0
95 | | ...
96 | | [Arguments] | ${dut} | ${dut_if} | ${acl_apply_type} | ${acl_action}
97 | | ... | @{subnets}
98 | | Set Test variable | ${acl} | ${EMPTY}
99 | | :FOR | ${subnet} | IN | @{subnets}
100 | | | ${acl}= | Run Keyword If | '${acl}' == '${EMPTY}'
101 | | | ... | Set Variable | ipv4 ${acl_action} src ${subnet}
102 | | | ... | ELSE
103 | | | ... | Catenate | SEPARATOR=, | ${acl}
104 | | | ... | ipv4 ${acl_action} src ${subnet}
105 | | Add Replace Acl Multi Entries | ${dut} | rules=${acl}
106 | | @{acl_list}= | Create List | ${0}
107 | | Set Acl List For Interface | ${dut} | ${dut_if} | ${acl_apply_type}
108 | | ... | ${acl_list}
109
110
111 *** Keywords ***
112 | Local template
113 | | [Documentation]
114 | | ... | [Cfg] DUT runs L2BD switching config with 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 | | ... | - phy_cores - 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 | | [Arguments] | ${phy_cores} | ${pkt_framesize} | ${search_type}
127 | | ... | ${acl_type}=${EMPTY} | ${rxq}=${None}
128 | | ...
129 | | ${binary_min}= | Set Variable | ${min_rate}
130 | | ${threshold}= | Set Variable | ${min_rate}
131 | | ${max_pkt_size}= | Set Variable If | '${pkt_framesize}' == 'IMIX_v4_1' |
132 | | ... | ${1500 + ${vxlan_overhead}} | ${pkt_framesize + ${vxlan_overhead}}
133 | | ${max_rate}= | Calculate pps | ${s_limit} | ${max_pkt_size}
134 | | ${binary_max}= | Set Variable | ${max_rate}
135 | | Given Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
136 | | Add PCI devices to all DUTs
137 | | And Run Keyword If | ${max_pkt_size} < ${1522}
138 | | ... | Add no multi seg to all DUTs
139 | | And Apply startup configuration on all VPP DUTs
140 | | &{vxlan1}= | Create Dictionary | vni=24 | vtep=172.17.0.2
141 | | &{vxlan2}= | Create Dictionary | vni=24 | vtep=172.27.0.2
142 | | @{dut1_vxlans}= | Create List | ${vxlan1}
143 | | @{dut2_vxlans}= | Create List | ${vxlan2}
144 | | ${jumbo_frames}= | Set Variable If
145 | | ... | ${max_pkt_size} < ${1522} | ${False} | ${True}
146 | | Set interfaces in path in 3-node circular topology up
147 | | Configure vhost interfaces for L2BD forwarding | ${dut1}
148 | | ... | ${sock1} | ${sock2}
149 | | When Init L2 bridge domains with single DUT with Vhost-User and VXLANoIPv4 in 3-node circular topology
150 | | ... | 172.16.0.1 | 16 | 172.26.0.1 | 16 | 172.16.0.2 | 172.26.0.2
151 | | ... | ${dut1_vxlans} | ${dut2_vxlans} | 172.17.0.0 | 16 | 172.27.0.0 | 16
152 | | @{permit_list}= | Create List | 10.0.0.1/32 | 10.0.0.2/32
153 | | Run Keyword If | '${acl_type}' != '${EMPTY}'
154 | | ... | Configure ACLs on a single interface | ${dut1} | ${dut1_if2} | input
155 | | ... | ${acl_type} | @{permit_list}
156 | | ${vm1}= | And Configure guest VM with dpdk-testpmd connected via vhost-user
157 | | ... | ${dut1} | ${sock1} | ${sock2} | DUT1_VM1
158 | | ... | jumbo_frames=${jumbo_frames}
159 | | Set Test Variable | &{dut1_vm_refs} | DUT1_VM1=${vm1}
160 | | Set Test Variable | ${framesize} | ${pkt_framesize}
161 | | ${pkt_framesize}= | Set Variable If | '${pkt_framesize}' == 'IMIX_v4_1' |
162 | | ... | ${pkt_framesize} | ${pkt_framesize + ${vxlan_overhead}}
163 | | Run Keyword If | '${search_type}' == 'NDR'
164 | | ... | Find NDR using binary search and pps
165 | | ... | ${pkt_framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
166 | | ... | ${min_rate} | ${max_rate} | ${threshold}
167 | | ... | ELSE IF | '${search_type}' == 'PDR'
168 | | ... | Find PDR using binary search and pps
169 | | ... | ${pkt_framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
170 | | ... | ${min_rate} | ${max_rate} | ${threshold}
171 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
172
173 *** Test Cases ***
174 | tc01-64B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
175 | | [Tags] | 64B | 2C | NDRDISC
176 | | phy_cores=${2} | pkt_framesize=${64} | search_type=NDR
177
178 | tc02-64B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
179 | | [Tags] | 64B | 2C | PDRDISC
180 | | phy_cores=${2} | pkt_framesize=${64} | search_type=PDR
181
182 | tc03-150B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
183 | | [Tags] | 150B | 2C | NDRDISC
184 | | phy_cores=${2} | pkt_framesize=${150} | search_type=NDR
185
186 | tc04-150B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
187 | | [Tags] | 150B | 2C | PDRDISC
188 | | phy_cores=${2} | pkt_framesize=${150} | search_type=PDR
189
190 | tc05-200B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
191 | | [Tags] | 200B | 2C | NDRDISC
192 | | phy_cores=${2} | pkt_framesize=${200} | search_type=NDR
193
194 | tc06-200B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
195 | | [Tags] | 200B | 2C | PDRDISC
196 | | phy_cores=${2} | pkt_framesize=${200} | search_type=PDR
197
198 | tc07-IMIX-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc
199 | | [Tags] | IMIX | 2C | NDRDISC
200 | | phy_cores=${2} | pkt_framesize=IMIX_v4_1 | search_type=NDR
201
202 | tc08-IMIX-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-pdrdisc
203 | | [Tags] | IMIX | 2C | PDRDISC
204 | | phy_cores=${2} | pkt_framesize=IMIX_v4_1 | search_type=PDR
205
206 | tc09-64B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-ndrdisc
207 | | [Tags] | 64B | 2C | NDRDISC | ACL_PERMIT
208 | | phy_cores=${2} | pkt_framesize=${64} | search_type=NDR
209 | | ... | acl_type=permit
210
211 | tc10-64B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-pdrdisc
212 | | [Tags] | 64B | 2C | PDRDISC | ACL_PERMIT
213 | | phy_cores=${2} | pkt_framesize=${64} | search_type=PDR
214 | | ... | acl_type=permit
215
216 | tc11-150B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-ndrdisc
217 | | [Tags] | 150B | 2C | NDRDISC | ACL_PERMIT
218 | | phy_cores=${2} | pkt_framesize=${150} | search_type=NDR
219 | | ... | acl_type=permit
220
221 | tc12-150B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-pdrdisc
222 | | [Tags] | 150B | 2C | PDRDISC | ACL_PERMIT
223 | | phy_cores=${2} | pkt_framesize=${150} | search_type=PDR
224 | | ... | acl_type=permit
225
226 | tc13-200B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-ndrdisc
227 | | [Tags] | 200B | 2C | NDRDISC | ACL_PERMIT
228 | | phy_cores=${2} | pkt_framesize=${200} | search_type=NDR
229 | | ... | acl_type=permit
230
231 | tc14-200B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-pdrdisc
232 | | [Tags] | 200B | 2C | PDRDISC | ACL_PERMIT
233 | | phy_cores=${2} | pkt_framesize=${200} | search_type=PDR
234 | | ... | acl_type=permit
235
236 | tc15-IMIX-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-ndrdisc
237 | | [Tags] | IMIX | 2C | NDRDISC | ACL_PERMIT
238 | | phy_cores=${2} | pkt_framesize=IMIX_v4_1 | search_type=NDR
239 | | ... | acl_type=permit
240
241 | tc16-IMIX-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-acl-pdrdisc
242 | | [Tags] | IMIX | 2C | PDRDISC | ACL_PERMIT
243 | | phy_cores=${2} | pkt_framesize=IMIX_v4_1 | search_type=PDR
244 | | ... | acl_type=permit
245
246 | tc17-64B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-ndrdisc
247 | | [Tags] | 64B | 2C | NDRDISC | ACL_PERMIT_REFLECT
248 | | phy_cores=${2} | pkt_framesize=${64} | search_type=NDR
249 | | ... | acl_type=permit+reflect
250
251 | tc18-64B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-pdrdisc
252 | | [Tags] | 64B | 2C | PDRDISC | ACL_PERMIT_REFLECT
253 | | phy_cores=${2} | pkt_framesize=${64} | search_type=PDR
254 | | ... | acl_type=permit+reflect
255
256 | tc19-150B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-ndrdisc
257 | | [Tags] | 150B | 2C | NDRDISC | ACL_PERMIT_REFLECT
258 | | phy_cores=${2} | pkt_framesize=${150} | search_type=NDR
259 | | ... | acl_type=permit+reflect
260
261 | tc20-150B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-pdrdisc
262 | | [Tags] | 150B | 2C | PDRDISC | ACL_PERMIT_REFLECT
263 | | phy_cores=${2} | pkt_framesize=${150} | search_type=PDR
264 | | ... | acl_type=permit+reflect
265
266 | tc21-200B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-ndrdisc
267 | | [Tags] | 200B | 2C | NDRDISC | ACL_PERMIT_REFLECT
268 | | phy_cores=${2} | pkt_framesize=${200} | search_type=NDR
269 | | ... | acl_type=permit+reflect
270
271 | tc22-200B-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-pdrdisc
272 | | [Tags] | 200B | 2C | PDRDISC | ACL_PERMIT_REFLECT
273 | | phy_cores=${2} | pkt_framesize=${200} | search_type=PDR
274 | | ... | acl_type=permit+reflect
275
276 | tc23-IMIX-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-ndrdisc
277 | | [Tags] | IMIX | 2C | NDRDISC | ACL_PERMIT_REFLECT
278 | | phy_cores=${2} | pkt_framesize=IMIX_v4_1 | search_type=NDR
279 | | ... | acl_type=permit+reflect
280
281 | tc24-IMIX-2c-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-aclreflect-pdrdisc
282 | | [Tags] | IMIX | 2C | PDRDISC | ACL_PERMIT_REFLECT
283 | | phy_cores=${2} | pkt_framesize=IMIX_v4_1 | search_type=PDR
284 | | ... | acl_type=permit+reflect