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
41 | ... | *Low level description*
43 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
44 | ... | with single links between nodes.
45 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4-UDP for IPv4 routing.
46 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with IPv4
47 | ... | routing and two static IPv4 /24 and IPv4/20 route entries. DUT1 and DUT2
48 | ... | tested with 2p10GE NIC X520 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, one flow per flow-group) with all packets
58 | ... | containing Ethernet header, IPv4 header with UDP header and static
59 | ... | payload. MAC addresses are matching MAC addresses of the TG node
61 | ... | *[Ref] Applicable standard specifications:* RFC2544.
64 # X520-DA2 bandwidth limit
65 | ${s_limit} | ${10000000000}
67 | ${traffic_profile} | trex-sl-3n-ethip4udp-1u1p
70 | Discover NDR or PDR for IPv4 routing with NAT44
72 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
74 | | Set Test Variable | ${framesize}
75 | | Set Test Variable | ${min_rate}
76 | | ${max_rate}= | Calculate pps | ${s_limit} | ${framesize}
77 | | ${binary_min}= | Set Variable | ${min_rate}
78 | | ${binary_max}= | Set Variable | ${max_rate}
79 | | ${threshold}= | Set Variable | ${min_rate}
80 | | ${get_framesize}= | Get Frame Size | ${framesize}
82 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
83 | | And Add PCI devices to DUTs in 3-node single link topology
84 | | And Run Keyword If | ${get_framesize} < ${1522}
85 | | ... | Add no multi seg to all DUTs
86 | | And Add NAT to all DUTs
87 | | And Apply startup configuration on all VPP DUTs
88 | | When Initialize NAT44 in 3-node circular topology
89 | | Then Run Keyword If | '${search_type}' == 'NDR'
90 | | ... | Find NDR using binary search and pps
91 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
92 | | ... | ${min_rate} | ${max_rate} | ${threshold}
93 | | ... | ELSE IF | '${search_type}' == 'PDR'
94 | | ... | Find PDR using binary search and pps
95 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
96 | | ... | ${min_rate} | ${max_rate} | ${threshold}
97 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
100 | tc01-64B-1t1c-ethip4-ip4base-snat-1u-1p-ndrdisc
102 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
103 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
104 | | ... | 1 user and 1 port (session) per user.
105 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
106 | | ... | linerate, step 100kpps.
108 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
110 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
111 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=NDR
113 | tc02-64B-1t1c-ethip4-ip4base-snat-1u-1p-pdrdisc
115 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
116 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
117 | | ... | 1 user and 1 port (session) per user.
118 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
119 | | ... | linerate, step 100kpps.
121 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
123 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
124 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=PDR
126 | tc03-1518B-1t1c-ethip4-ip4base-snat-1u-1p-ndrdisc
128 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
129 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
130 | | ... | 1 user and 1 port (session) per user.
131 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
132 | | ... | linerate, step 100kpps.
134 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
136 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
137 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=NDR
139 | tc04-1518B-1t1c-ethip4-ip4base-snat-1u-1p-pdrdisc
141 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
142 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
143 | | ... | 1 user and 1 port (session) per user.
144 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
145 | | ... | linerate, step 100kpps.
147 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
149 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
150 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=PDR
152 | tc05-IMIX-1t1c-ethip4-ip4base-snat-1u-1p-ndrdisc
154 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
155 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
156 | | ... | 1 user and 1 port (session) per user.
157 | | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
158 | | ... | linerate, step 100kpps.
160 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
162 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
163 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=NDR
165 | tc06-IMIX-1t1c-ethip4-ip4base-snat-1u-1p-pdrdisc
167 | | ... | [Cfg] DUT runs IPv4 routing config with 1 thread, 1 phy core,\
168 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
169 | | ... | 1 user and 1 port (session) per user.
170 | | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
171 | | ... | linerate, step 100kpps.
173 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
175 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
176 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=PDR
178 | tc07-64B-2t2c-ethip4-ip4base-snat-1u-1p-ndrdisc
180 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
181 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
182 | | ... | 1 user and 1 port (session) per user.
183 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
184 | | ... | linerate, step 100kpps.
186 | | [Tags] | 64B | 2T2C | MTHREAD | NDRDISC
188 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
189 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=NDR
191 | tc08-64B-2t2c-ethip4-ip4base-snat-1u-1p-pdrdisc
193 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
194 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
195 | | ... | 1 user and 1 port (session) per user.
196 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
197 | | ... | linerate, step 100kpps.
199 | | [Tags] | 64B | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
201 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
202 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=PDR
204 | tc09-1518B-2t2c-ethip4-ip4base-snat-1u-1p-ndrdisc
206 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
207 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
208 | | ... | 1 user and 1 port (session) per user.
209 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
210 | | ... | linerate, step 100kpps.
212 | | [Tags] | 1518B | 2T2C | MTHREAD | NDRDISC
214 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
215 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=NDR
217 | tc10-1518B-2t2c-ethip4-ip4base-snat-1u-1p-pdrdisc
219 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
220 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
221 | | ... | 1 user and 1 port (session) per user.
222 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
223 | | ... | linerate, step 100kpps.
225 | | [Tags] | 1518B | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
227 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
228 | | wt=2 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=PDR
230 | tc11-IMIX-2t2c-ethip4-ip4base-snat-1u-1p-ndrdisc
232 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
233 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
234 | | ... | 1 user and 1 port (session) per user.
235 | | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
236 | | ... | linerate, step 100kpps.
238 | | [Tags] | IMIX | 2T2C | MTHREAD | NDRDISC
240 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
241 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=NDR
243 | tc12-IMIX-2t2c-ethip4-ip4base-snat-1u-1p-pdrdisc
245 | | ... | [Cfg] DUT runs IPv4 routing config with 2 threads, 2 phy cores,\
246 | | ... | 1 receive queue per NIC port. NAT44 is configured between DUTs -\
247 | | ... | 1 user and 1 port (session) per user.
248 | | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
249 | | ... | linerate, step 100kpps.
251 | | [Tags] | IMIX | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
253 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
254 | | wt=2 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=PDR
256 | tc13-64B-4t4c-ethip4-ip4base-snat-1u-1p-ndrdisc
258 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
259 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
260 | | ... | 1 user and 1 port (session) per user.
261 | | ... | [Ver] Find NDR for 64 Byte frames using binary search start at 10GE\
262 | | ... | linerate, step 100kpps.
264 | | [Tags] | 64B | 4T4C | MTHREAD | NDRDISC
266 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
267 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${100000} | search_type=NDR
269 | tc14-64B-4t4c-ethip4-ip4base-snat-1u-1p-pdrdisc
271 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
272 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
273 | | ... | 1 user and 1 port (session) per user.
274 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 10GE\
275 | | ... | linerate, step 100kpps.
277 | | [Tags] | 64B | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
279 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
280 | | wt=4 | rxq=2 | framesize=${64} | min_rate=${100000} | search_type=PDR
282 | tc15-1518B-4t4c-ethip4-ip4base-snat-1u-1p-ndrdisc
284 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
285 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
286 | | ... | 1 user and 1 port (session) per user.
287 | | ... | [Ver] Find NDR for 1518 Byte frames using binary search start at 10GE\
288 | | ... | linerate, step 100kpps.
290 | | [Tags] | 1518B | 4T4C | MTHREAD | NDRDISC
292 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
293 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${100000} | search_type=NDR
295 | tc16-1518B-4t4c-ethip4-ip4base-snat-1u-1p-pdrdisc
297 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
298 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
299 | | ... | 1 user and 1 port (session) per user.
300 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 10GE\
301 | | ... | linerate, step 100kpps.
303 | | [Tags] | 1518B | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
305 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
306 | | wt=4 | rxq=2 | framesize=${1518} | min_rate=${100000} | search_type=PDR
308 | tc17-IMIX-4t4c-ethip4-ip4base-snat-1u-1p-ndrdisc
310 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
311 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
312 | | ... | 1 user and 1 port (session) per user.
313 | | ... | [Ver] Find NDR for IMIX frames using binary search start at 10GE\
314 | | ... | linerate, step 100kpps.
316 | | [Tags] | IMIX | 4T4C | MTHREAD | NDRDISC
318 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
319 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=NDR
321 | tc18-IMIX-4t4c-ethip4-ip4base-snat-1u-1p-pdrdisc
323 | | ... | [Cfg] DUT runs IPv4 routing config with 4 threads, 4 phy cores,\
324 | | ... | 2 receive queues per NIC port. NAT44 is configured between DUTs -\
325 | | ... | 1 user and 1 port (session) per user.
326 | | ... | [Ver] Find PDR for IMIX frames using binary search start at 10GE\
327 | | ... | linerate, step 100kpps.
329 | | [Tags] | IMIX | 4T4C | MTHREAD | PDRDISC | SKIP_PATCH
331 | | [Template] | Discover NDR or PDR for IPv4 routing with NAT44
332 | | wt=4 | rxq=2 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=PDR