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