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