bf16ef55a9196bd09d9ba182364aef0fcb9d5c21
[csit.git] / tests / vpp / perf / crypto / 40ge2p1xl710-ethip4ipsecbasetnl-ip4base-int-aes-gcm-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 | Resource | resources/libraries/robot/crypto/ipsec.robot
17 | ...
18 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
19 | ... | IP4FWD | IPSEC | IPSECHW | IPSECTUN | NIC_Intel-XL710 | BASE
20 | ...
21 | Suite Setup | Set up IPSec performance test suite | L3 | Intel-XL710
22 | ... | HW_cryptodev
23 | ...
24 | Suite Teardown | Tear down 3-node performance topology
25 | ...
26 | Test Setup | Set up performance test
27 | ...
28 | Test Teardown | Tear down performance discovery test | ${min_rate}pps
29 | ... | ${framesize} | ${traffic_profile}
30 | ...
31 | Documentation | *IPv4 IPsec tunnel mode performance test suite.*
32 | ...
33 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology
34 | ... | with single links between nodes.
35 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 on TG-DUTn,
36 | ... | Eth-IPv4-IPSec on DUT1-DUT2
37 | ... | *[Cfg] DUT configuration:* DUT1 and DUT2 are configured with multiple
38 | ... | IPsec tunnels between them. DUTs get IPv4 traffic from TG, encrypt it
39 | ... | and send to another DUT, where packets are decrypted and sent back to TG
40 | ... | *[Ver] TG verification:* TG finds and reports throughput NDR (Non Drop
41 | ... | Rate) with zero packet loss tolerance or throughput PDR (Partial Drop
42 | ... | Rate) with non-zero packet loss tolerance (LT) expressed in number
43 | ... | of packets transmitted. NDR is discovered for different
44 | ... | number of IPsec tunnels using binary search algorithms with configured
45 | ... | starting rate and final step that determines throughput measurement
46 | ... | resolution. Test packets are generated by TG on
47 | ... | links to DUTs. TG traffic profile contains two L3 flow-groups
48 | ... | (flow-group per direction, number of flows per flow-group equals to
49 | ... | number of IPSec tunnels) with all packets
50 | ... | containing Ethernet header, IPv4 header with IP protocol=61 and
51 | ... | static payload. MAC addresses are matching MAC addresses of the TG
52 | ... | node interfaces. Incrementing of IP.dst (IPv4 destination address) field
53 | ... | is applied to both streams.
54 | ... | *[Ref] Applicable standard specifications:* RFC4303 and RFC2544.
55
56 *** Variables ***
57 # XL710-DA2 bandwidth limit ~49Gbps/2=24.5Gbps
58 | ${s_limit}= | ${24500000000}
59 # XL710-DA2 Mpps limit 37.5Mpps/2=18.75Mpps
60 | ${s_18.75Mpps}= | ${18750000}
61 | ${tg_if1_ip4}= | 192.168.10.2
62 | ${dut1_if1_ip4}= | 192.168.10.1
63 | ${dut1_if2_ip4}= | 172.168.1.1
64 | ${dut2_if1_ip4}= | 172.168.1.2
65 | ${dut2_if2_ip4}= | 192.168.20.1
66 | ${tg_if2_ip4}= | 192.168.20.2
67 | ${raddr_ip4}= | 20.0.0.0
68 | ${laddr_ip4}= | 10.0.0.0
69 | ${addr_range}= | ${32}
70 | ${ipsec_overhead_gcm}= | ${54}
71 | ${n_tunnels}= | ${1}
72 # Traffic profile:
73 | ${traffic_profile}= | trex-sl-3n-ethip4-ip4dst${n_tunnels}
74
75 *** Keywords ***
76 | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
77 | | [Documentation]
78 | | ... | [Cfg] DUT runs IPSec tunneling AES GCM config with ${wt} thread(s),\
79 | | ... | ${wt} phy core(s), ${rxq} receive queue(s) per NIC port.
80 | | ... | [Ver] Measure NDR or PDR for ${framesize} by bisecting between\
81 | | ... | ${min_rate} and computed max rate, using trial loss rate measurements.
82 | | ...
83 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
84 | | ...
85 | | # Test Variables required for test teardown
86 | | Set Test Variable | ${framesize}
87 | | Set Test Variable | ${min_rate}
88 | | ${get_framesize}= | Get Frame Size | ${framesize}
89 | | ${max_rate}= | Calculate pps | ${s_limit}
90 | | ... | ${get_framesize} + ${ipsec_overhead_gcm}
91 | | ${max_rate}= | Set Variable If
92 | | ... | ${max_rate} > ${s_18.75Mpps} | ${s_18.75Mpps} | ${max_rate}
93 | | ${binary_min}= | Set Variable | ${min_rate}
94 | | ${binary_max}= | Set Variable | ${max_rate}
95 | | ${threshold}= | Set Variable | ${min_rate}
96 | | ${encr_alg}= | Crypto Alg AES GCM 128
97 | | ${auth_alg}= | Integ Alg AES GCM 128
98 | | ...
99 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
100 | | And Add PCI devices to DUTs in 3-node single link topology
101 | | And Add no multi seg to all DUTs
102 | | And Add cryptodev to all DUTs | ${${wt}}
103 | | And Add DPDK dev default RXD to all DUTs | 2048
104 | | And Add DPDK dev default TXD to all DUTs | 2048
105 | | And Apply startup configuration on all VPP DUTs
106 | | When Generate keys for IPSec | ${encr_alg} | ${auth_alg}
107 | | And Initialize IPSec in 3-node circular topology
108 | | And VPP IPsec Create Tunnel Interfaces
109 | | ... | ${dut1} | ${dut2} | ${dut1_if2_ip4} | ${dut2_if1_ip4} | ${dut1_if2}
110 | | ... | ${dut2_if1} | ${n_tunnels} | ${encr_alg} | ${encr_key} | ${auth_alg}
111 | | ... | ${auth_key} | ${laddr_ip4} | ${raddr_ip4} | ${addr_range}
112 | | Then Run Keyword If | '${search_type}' == 'NDR'
113 | | ... | Find NDR using binary search and pps
114 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
115 | | ... | ${min_rate} | ${max_rate} | ${threshold}
116 | | ... | ELSE IF | '${search_type}' == 'PDR'
117 | | ... | Find PDR using binary search and pps
118 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
119 | | ... | ${min_rate} | ${max_rate} | ${threshold}
120 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
121
122 *** Test Cases ***
123 | tc01-64B-1t1c-ethip4ipsecbasetnl-ip4base-int-aes-gcm-ndrdisc
124 | | [Documentation]
125 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
126 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
127 | | ... | [Ver] Find NDR for 64 Byte frames\
128 | | ... | using binary search start at 40GE linerate, step 50kpps.
129 | | ...
130 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
131 | | ...
132 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
133 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${50000} | search_type=NDR
134
135 | tc02-64B-1t1c-ethip4ipsecbasetnl-ip4base-int-aes-gcm-pdrdisc
136 | | [Documentation]
137 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
138 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
139 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 40GE\
140 | | ... | linerate, step 50kpps and loss tolerance of 0.5%.
141 | | ...
142 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
143 | | ...
144 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
145 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${50000} | search_type=PDR
146
147 | tc03-1518B-1t1c-ethip4ipsecbasetnl-ip4base-int-aes-gcm-ndrdisc
148 | | [Documentation]
149 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
150 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
151 | | ... | [Ver] Find NDR for 1518 Byte frames\
152 | | ... | using binary search start at 40GE linerate, step 50kpps.
153 | | ...
154 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
155 | | ...
156 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
157 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${50000} | search_type=NDR
158
159 | tc04-1518B-1t1c-ethip4ipsecbasetnl-ip4base-int-aes-gcm-pdrdisc
160 | | [Documentation]
161 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
162 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
163 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 40GE\
164 | | ... | linerate, step 50kpps and loss tolerance of 0.5%.
165 | | ...
166 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
167 | | ...
168 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
169 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${50000} | search_type=PDR
170
171 | tc05-IMIX-1t1c-ethip4ipsecbasetnl-ip4base-int-aes-gcm-ndrdisc
172 | | [Documentation]
173 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
174 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
175 | | ... | [Ver] Find NDR for IMIX_v4_1 frames\
176 | | ... | using binary search start at 40GE linerate, step 50kpps.
177 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
178 | | ...
179 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
180 | | ...
181 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
182 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${50000} | search_type=NDR
183
184 | tc06-IMIX-1t1c-ethip4ipsecbasetnl-ip4base-int-aes-gcm-pdrdisc
185 | | [Documentation]
186 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
187 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
188 | | ... | [Ver] Find PDR for IMIX_v4_1 frames using binary search start at 40GE\
189 | | ... | linerate, step 50kpps and loss tolerance of 0.5%.
190 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
191 | | ...
192 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
193 | | ...
194 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
195 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${50000} | search_type=PDR
196
197 | tc07-64B-2t2c-ethip4ipsecbasetnl-ip4base-int-aes-gcm-ndrdisc
198 | | [Documentation]
199 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
200 | | ... | with 2 thread, 2 phy core, 1 receive queue per NIC port.
201 | | ... | [Ver] Find NDR for 64 Byte frames\
202 | | ... | using binary search start at 40GE linerate, step 50kpps.
203 | | ...
204 | | [Tags] | 64B | 2T2C | MTHREAD | NDRDISC
205 | | ...
206 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
207 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${50000} | search_type=NDR
208
209 | tc08-64B-2t2c-ethip4ipsecbasetnl-ip4base-int-aes-gcm-pdrdisc
210 | | [Documentation]
211 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
212 | | ... | with 2 thread, 2 phy core, 1 receive queue per NIC port.
213 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 40GE\
214 | | ... | linerate, step 50kpps and loss tolerance of 0.5%.
215 | | ...
216 | | [Tags] | 64B | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
217 | | ...
218 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec HW cryptodev
219 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${50000} | search_type=PDR