CSIT-861: SW cryptodev perf tests
[csit.git] / tests / vpp / perf / crypto / 40ge2p1xl710-ethip4ipsecbasetnlsw-ip4base-tnl-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 | 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 | | [Arguments] | ${wt} | ${rxq} | ${framesize} | ${min_rate} | ${search_type}
79 | | Set Test Variable | ${framesize}
80 | | Set Test Variable | ${min_rate}
81 | | ${get_framesize}= | Get Frame Size | ${framesize}
82 | | ${max_rate}= | Calculate pps | ${s_limit}
83 | | ... | ${get_framesize} + ${ipsec_overhead_gcm}
84 | | ${max_rate}= | Set Variable If
85 | | ... | ${max_rate} > ${s_18.75Mpps} | ${s_18.75Mpps} | ${max_rate}
86 | | ${binary_min}= | Set Variable | ${min_rate}
87 | | ${binary_max}= | Set Variable | ${max_rate}
88 | | ${threshold}= | Set Variable | ${min_rate}
89 | | ${encr_alg}= | Crypto Alg AES GCM 128
90 | | ${auth_alg}= | Integ Alg AES GCM 128
91 | | Given Add '${wt}' worker threads and '${rxq}' rxqueues in 3-node single-link circular topology
92 | | And Add PCI devices to DUTs in 3-node single link topology
93 | | And Add no multi seg to all DUTs
94 | | And Add DPDK SW cryptodev on DUTs in 3-node single-link circular topology
95 | | ... | aesni_gcm | ${${wt}}
96 | | And Add DPDK dev default RXD to all DUTs | 2048
97 | | And Add DPDK dev default TXD to all DUTs | 2048
98 | | And Apply startup configuration on all VPP DUTs
99 | | And Generate keys for IPSec | ${encr_alg} | ${auth_alg}
100 | | And Initialize IPSec in 3-node circular topology
101 | | Vpp Route Add | ${dut1} | ${raddr_ip4} | 8 | ${dut2_if1_ip4} | ${dut1_if2}
102 | | Vpp Route Add | ${dut2} | ${laddr_ip4} | 8 | ${dut1_if2_ip4} | ${dut2_if1}
103 | | And VPP IPsec Add Multiple Tunnels
104 | | ... | ${dut1} | ${dut2} | ${dut1_if2} | ${dut2_if1} | ${n_tunnels}
105 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key}
106 | | ... | ${dut1_if2_ip4} | ${dut2_if1_ip4} | ${laddr_ip4} | ${raddr_ip4}
107 | | ... | ${addr_range}
108 | | Then Run Keyword If | '${search_type}' == 'NDR'
109 | | ... | Find NDR using binary search and pps
110 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
111 | | ... | ${min_rate} | ${max_rate} | ${threshold}
112 | | ... | ELSE IF | '${search_type}' == 'PDR'
113 | | ... | Find PDR using binary search and pps
114 | | ... | ${framesize} | ${binary_min} | ${binary_max} | ${traffic_profile}
115 | | ... | ${min_rate} | ${max_rate} | ${threshold}
116 | | ... | ${perf_pdr_loss_acceptance} | ${perf_pdr_loss_acceptance_type}
117
118 *** Test Cases ***
119 | tc01-64B-1t1c-ethip4ipsecbasetnlsw-ip4base-tnl-aes-gcm-ndrdisc
120 | | [Documentation]
121 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
122 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
123 | | ... | [Ver] Find NDR for 64 Byte frames\
124 | | ... | using binary search start at 40GE linerate, step 100kpps.
125 | | ...
126 | | [Tags] | 64B | 1T1C | STHREAD | NDRDISC
127 | | ...
128 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec SW cryptodev
129 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=NDR
130
131 | tc02-64B-1t1c-ethip4ipsecbasetnlsw-ip4base-tnl-aes-gcm-pdrdisc
132 | | [Documentation]
133 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
134 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
135 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 40GE\
136 | | ... | linerate, step 100kpps and loss tolerance of 0.5%.
137 | | ...
138 | | [Tags] | 64B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
139 | | ...
140 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec SW cryptodev
141 | | wt=1 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=PDR
142
143 | tc03-1518B-1t1c-ethip4ipsecbasetnlsw-ip4base-tnl-aes-gcm-ndrdisc
144 | | [Documentation]
145 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
146 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
147 | | ... | [Ver] Find NDR for 1518 Byte frames\
148 | | ... | using binary search start at 40GE linerate, step 100kpps.
149 | | ...
150 | | [Tags] | 1518B | 1T1C | STHREAD | NDRDISC
151 | | ...
152 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec SW cryptodev
153 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=NDR
154
155 | tc04-1518B-1t1c-ethip4ipsecbasetnlsw-ip4base-tnl-aes-gcm-pdrdisc
156 | | [Documentation]
157 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
158 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
159 | | ... | [Ver] Find PDR for 1518 Byte frames using binary search start at 40GE\
160 | | ... | linerate, step 100kpps and loss tolerance of 0.5%.
161 | | ...
162 | | [Tags] | 1518B | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
163 | | ...
164 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec SW cryptodev
165 | | wt=1 | rxq=1 | framesize=${1518} | min_rate=${100000} | search_type=PDR
166
167 | tc05-IMIX-1t1c-ethip4ipsecbasetnlsw-ip4base-tnl-aes-gcm-ndrdisc
168 | | [Documentation]
169 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
170 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
171 | | ... | [Ver] Find NDR for IMIX_v4_1 frames\
172 | | ... | using binary search start at 40GE linerate, step 100kpps.
173 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
174 | | ...
175 | | [Tags] | IMIX | 1T1C | STHREAD | NDRDISC
176 | | ...
177 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec SW cryptodev
178 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=NDR
179
180 | tc06-IMIX-1t1c-ethip4ipsecbasetnlsw-ip4base-tnl-aes-gcm-pdrdisc
181 | | [Documentation]
182 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
183 | | ... | with 1 thread, 1 phy core, 1 receive queue per NIC port.
184 | | ... | [Ver] Find PDR for IMIX_v4_1 frames using binary search start at 40GE\
185 | | ... | linerate, step 100kpps and loss tolerance of 0.5%.
186 | | ... | IMIX_v4_1 = (28x64B; 16x570B; 4x1518B)
187 | | ...
188 | | [Tags] | IMIX | 1T1C | STHREAD | PDRDISC | SKIP_PATCH
189 | | ...
190 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec SW cryptodev
191 | | wt=1 | rxq=1 | framesize=IMIX_v4_1 | min_rate=${100000} | search_type=PDR
192
193 | tc07-64B-2t2c-ethip4ipsecbasetnlsw-ip4base-tnl-aes-gcm-ndrdisc
194 | | [Documentation]
195 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
196 | | ... | with 2 thread, 2 phy core, 1 receive queue per NIC port.
197 | | ... | [Ver] Find NDR for 64 Byte frames\
198 | | ... | using binary search start at 40GE linerate, step 100kpps.
199 | | ...
200 | | [Tags] | 64B | 2T2C | MTHREAD | NDRDISC
201 | | ...
202 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec SW cryptodev
203 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=NDR
204
205 | tc08-64B-2t2c-ethip4ipsecbasetnlsw-ip4base-tnl-aes-gcm-pdrdisc
206 | | [Documentation]
207 | | ... | [Cfg] DUTs run 1 IPsec tunnel AES GCM in each direction, configured\
208 | | ... | with 2 thread, 2 phy core, 1 receive queue per NIC port.
209 | | ... | [Ver] Find PDR for 64 Byte frames using binary search start at 40GE\
210 | | ... | linerate, step 100kpps and loss tolerance of 0.5%.
211 | | ...
212 | | [Tags] | 64B | 2T2C | MTHREAD | PDRDISC | SKIP_PATCH
213 | | ...
214 | | [Template] | Discover NDR or PDR for IPv4 routing with IPSec SW cryptodev
215 | | wt=2 | rxq=1 | framesize=${64} | min_rate=${100000} | search_type=PDR