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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 | Resource | resources/libraries/robot/performance/performance_setup.robot
16 | Resource | resources/libraries/robot/ip/nat.robot
17 | Resource | resources/libraries/robot/shared/traffic.robot
19 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
20 | ... | NIC_Intel-X520-DA2 | ETH | IP4FWD | FEATURE | NAT44 | BASE
22 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
23 | ... | L3 | Intel-X520-DA2
24 | Suite Teardown | Tear down 3-node performance topology
26 | Test Setup | Set up performance test
28 | Test Teardown | Tear down performance discovery test with NAT
29 | ... | ${min_rate}pps | ${framesize} | ${traffic_profile}
31 | Documentation | *NAT44 performance test cases*
33 | ... | *High level description*
35 | ... | - NDR and PDR tests
36 | ... | - 3-node topology, TG-DUT1-DUT2-TG, NAT44 is enabled between DUTs.
37 | ... | - Cores / threads: 1t1c, 2t2c, and 4t4c
38 | ... | - Framesize: 64B, 1518B, IMIX
39 | ... | - Packet: ETH / IP(src, dst) / UDP(src_port, dst_port) / payload
40 | ... | - scale: src: 1 user, 10 users, 100 users, ..., 4000 up to the memory
41 | ... | limit; 15 ports per user
43 | ... | *Low level description*
45 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
46 | ... | with single links between nodes.
47 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing.
48 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
49 | ... | routing and two static IPv4 /24 and IPv4/20 route entries. DUT1 and DUT2
50 | ... | tested with 2p10GE NIC X520 Niantic by Intel.
51 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
52 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
53 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in percentage
54 | ... | of packets transmitted. NDR and PDR are discovered for different
55 | ... | Ethernet L2 frame sizes using either binary search or linear search
56 | ... | algorithms with configured starting rate and final step that determines
57 | ... | throughput measurement resolution. Test packets are generated by TG on
58 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
59 | ... | (flow-group per direction, one flow per flow-group) with all packets
60 | ... | containing Ethernet header, IPv4 header with UDP header and static
61 | ... | payload. MAC addresses are matching MAC addresses of the TG node
63 | ... | *[Ref] Applicable standard specifications:* RFC2544.
66 # X520-DA2 bandwidth limit
67 | ${s_limit} | ${10000000000}
69 | ${traffic_profile} | trex-sl-3n-ethip4udp-1u15p
72 | Discover NDR or PDR for IPv4 routing with NAT44
74 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
76 | | Set Test Variable | ${framesize}
77 | | Set Test Variable | ${min_rate}
78 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
79 | | ${binary_min}= | Set Variable | ${min_rate}
80 | | ${binary_max}= | Set Variable | ${max_rate}
81 | | ${threshold}= | Set Variable | ${min_rate}
82 | | ${get_framesize}= | Get Frame Size | ${framesize}
84 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
85 | | And Add PCI devices to DUTs in 3-node single link topology
86 | | And Run Keyword If | ${get_framesize} < ${1522}
87 | | ... | Add no multi seg to all DUTs
88 | | And Add NAT to all DUTs
89 | | And Apply startup configuration on all VPP DUTs
90 | | When Initialize NAT44 in 3-node circular topology
91 | | Then Run Keyword If | '${search_type}' == 'NDR'
92 | | ... | Find NDR using binary search and pps
93 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
94 | | ... | ${min_rate} | ${max_rate} | ${threshold}
95 | | ... | ELSE IF | '${search_type}' == 'PDR'
96 | | ... | Find PDR using binary search and pps
97 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
98 | | ... | ${min_rate} | ${max_rate} | ${threshold}
99 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
102 | tc01-64B-1t1c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
104 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
105 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
106 | | ... | 1 user and 15 ports (sessions) per user.
107 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
108 | | ... | linerate, step 100kpps.
110 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
112 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
113 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=NDR
115 | tc02-64B-1t1c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
117 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
118 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
119 | | ... | 1 user and 15 ports (sessions) per user.
120 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
121 | | ... | linerate, step 100kpps.
123 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
125 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
126 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=PDR
128 | tc03-1518B-1t1c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
130 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
131 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
132 | | ... | 1 user and 15 ports (sessions) per user.
133 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
134 | | ... | linerate, step 100kpps.
136 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
138 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
139 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=NDR
141 | tc04-1518B-1t1c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
143 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
144 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
145 | | ... | 1 user and 15 ports (sessions) per user.
146 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
147 | | ... | linerate, step 100kpps.
149 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
151 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
152 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=PDR
154 | tc05-IMIX-1t1c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
156 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
157 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
158 | | ... | 1 user and 15 ports (sessions) per user.
159 | | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
160 | | ... | linerate, step 100kpps.
162 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
164 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
165 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=NDR
167 | tc06-IMIX-1t1c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
169 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
170 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
171 | | ... | 1 user and 15 ports (sessions) per user.
172 | | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
173 | | ... | linerate, step 100kpps.
175 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
177 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
178 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=PDR
180 | tc07-64B-2t2c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
182 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
183 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
184 | | ... | 1 user and 15 ports (sessions) per user.
185 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
186 | | ... | linerate, step 100kpps.
188 | | [Tags] | 64B | 2T2C | MTHREAD | NDRDISC
190 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
191 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=NDR
193 | tc08-64B-2t2c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
195 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
196 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
197 | | ... | 1 user and 15 ports (sessions) per user.
198 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
199 | | ... | linerate, step 100kpps.
201 | | [Tags] | 64B | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
203 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
204 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=PDR
206 | tc09-1518B-2t2c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
208 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
209 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
210 | | ... | 1 user and 15 ports (sessions) per user.
211 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
212 | | ... | linerate, step 100kpps.
214 | | [Tags] | 1518B | 2T2C | MTHREAD | NDRDISC
216 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
217 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=NDR
219 | tc10-1518B-2t2c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
221 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
222 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
223 | | ... | 1 user and 15 ports (sessions) per user.
224 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
225 | | ... | linerate, step 100kpps.
227 | | [Tags] | 1518B | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
229 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
230 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=PDR
232 | tc11-IMIX-2t2c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
234 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
235 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
236 | | ... | 1 user and 15 ports (sessions) per user.
237 | | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
238 | | ... | linerate, step 100kpps.
240 | | [Tags] | IMIX | 2T2C | MTHREAD | NDRDISC
242 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
243 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=NDR
245 | tc12-IMIX-2t2c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
247 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
248 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
249 | | ... | 1 user and 15 ports (sessions) per user.
250 | | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
251 | | ... | linerate, step 100kpps.
253 | | [Tags] | IMIX | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
255 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
256 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=PDR
258 | tc13-64B-4t4c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
260 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
261 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
262 | | ... | 1 user and 15 ports (sessions) per user.
263 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
264 | | ... | linerate, step 100kpps.
266 | | [Tags] | 64B | 4T4C | MTHREAD | NDRDISC
268 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
269 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${100000} | search_type=NDR
271 | tc14-64B-4t4c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
273 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
274 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
275 | | ... | 1 user and 15 ports (sessions) per user.
276 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
277 | | ... | linerate, step 100kpps.
279 | | [Tags] | 64B | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
281 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
282 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${100000} | search_type=PDR
284 | tc15-1518B-4t4c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
286 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
287 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
288 | | ... | 1 user and 15 ports (sessions) per user.
289 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
290 | | ... | linerate, step 100kpps.
292 | | [Tags] | 1518B | 4T4C | MTHREAD | NDRDISC
294 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
295 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${100000} | search_type=NDR
297 | tc16-1518B-4t4c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
299 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
300 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
301 | | ... | 1 user and 15 ports (sessions) per user.
302 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
303 | | ... | linerate, step 100kpps.
305 | | [Tags] | 1518B | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
307 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
308 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${100000} | search_type=PDR
310 | tc17-IMIX-4t4c-ethip4udp-ip4base-udpsrcscale15-snat-ndrdisc
312 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
313 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
314 | | ... | 1 user and 15 ports (sessions) per user.
315 | | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
316 | | ... | linerate, step 100kpps.
318 | | [Tags] | IMIX | 4T4C | MTHREAD | NDRDISC
320 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
321 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=NDR
323 | tc18-IMIX-4t4c-ethip4udp-ip4base-udpsrcscale15-snat-pdrdisc
325 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
326 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
327 | | ... | 1 user and 15 ports (sessions) per user.
328 | | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
329 | | ... | linerate, step 100kpps.
331 | | [Tags] | IMIX | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
333 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
334 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=PDR