Revert "fix(jobspec): Delete ipsec nfv density tests"
[csit.git] / tests / vpp / device / crypto / ethip6 / 2n1l-10ge2p1x710-ethip6ipsec1tnlsw-ip6base-policy-aes128cbc-hmac512sha-scapy.robot
1 # Copyright (c) 2024 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/shared/default.robot
16 |
17 | Force Tags | 2_NODE_SINGLE_LINK_TOPO | DEVICETEST | HW_ENV | DCR_ENV | SCAPY
18 | ... | NIC_Intel-X710 | IP6FWD | IPSEC | IPSECSW | IPSECTUN | IP6BASE
19 | ... | AES_128_CBC | HMAC_SHA_512 | HMAC | AES | DRV_VFIO_PCI
20 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
21 | ... | ethip6ipsec1tnlsw-ip6base-policy-aes128cbc-hmac512sha
22 |
23 | Suite Setup | Setup suite topology interfaces | scapy
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace | telemetry | ipsec_sa
26 |
27 | Test Template | Local Template
28 |
29 | Documentation | **IPv6 IPsec tunnel mode test suite.**
30 | ... |
31 | ... | - **[Top] Network topologies:** TG-DUT1 2-node topology with one link \
32 | ... | between nodes.
33 | ... |
34 | ... | - **[Cfg] DUT configuration:** On DUT1 create loopback interface, \
35 | ... | configure loopback an physical interface IPv6 addresses, static ARP \
36 | ... | record, route and IPsec manual keyed connection in tunnel mode.
37 | ... |
38 | ... | - **[Ver] TG verification:** ESP packet is sent from TG to DUT1. ESP \
39 | ... | packet is received on TG from DUT1.
40 | ... |
41 | ... | - **[Ref] Applicable standard specifications:** RFC4303.
42
43 *** Variables ***
44 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so
45 | ... | crypto_native_plugin.so | crypto_ipsecmb_plugin.so
46 | ... | crypto_openssl_plugin.so
47 | ${crypto_type}= | ${None}
48 | ${encr_alg}= | AES CBC 128
49 | ${auth_alg}= | SHA 512 256
50 | ${nic_name}= | Intel-X710
51 | ${nic_driver}= | vfio-pci
52 | ${nic_rxq_size}= | 0
53 | ${nic_txq_size}= | 0
54 | ${nic_pfs}= | 2
55 | ${nic_vfs}= | 0
56 | ${overhead}= | ${54}
57 | ${tg_spi}= | ${1000}
58 | ${dut_spi}= | ${1001}
59 | ${tg_if1_ip6}= | 3ffe:5f::1
60 | ${tg_if2_ip6}= | 3ffe:60::4
61 | ${dut_if1_ip6}= | 3ffe:5f::2
62 | ${dut_if2_ip6}= | 3ffe:60::3
63 | ${tg_host_ip6}= | 3ffe:61::3
64 | ${ip6_plen}= | ${64}
65 | ${ip6_plen_rt}= | ${128}
66 # Telemetry
67 | ${telemetry_profile}= | vppctl_test_teardown
68
69 *** Keywords ***
70 | Local Template
71 | | [Documentation]
72 | | ... | - **[Cfg]** On DUT1 configure IPsec manual keyed connection with \
73 | | ... | encryption algorithm AES_128_CBC and integrity algorithm \
74 | | ... | HMAC_SHA_512 in tunnel mode.
75 | |
76 | | ... | *Arguments:*
77 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
78 | | ... | - phy_cores - Number of physical cores. Type: integer
79 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
80 | |
81 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
82 | |
83 | | Set Test Variable | \${frame_size}
84 | |
85 | | Given Set Max Rate And Jumbo
86 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
87 | | And Pre-initialize layer driver | ${nic_driver}
88 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
89 | | When Initialize layer driver | ${nic_driver}
90 | | And Initialize layer interface
91 | | And Configure topology for IPv6 IPsec testing
92 | | And Generate keys for IPSec | ${encr_alg} | ${auth_alg}
93 | | And Configure manual keyed connection for IPSec
94 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${encr_alg} | ${encr_key} | ${auth_alg}
95 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${tg_dst_ip} | ${tg_src_ip}
96 | | ... | ${dut_tun_ip} | ${tg_tun_ip} | is_ipv6=${TRUE}
97 | | Then Send IPsec Packet and verify ESP encapsulation in received packet
98 | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0]
99 | | ... | ${DUT1_vf1_mac}[0] | ${DUT1_vf2_mac}[0]
100 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
101 | | ... | ${dut_spi} | ${tg_src_ip} | ${tg_dst_ip} | ${tg_tun_ip}
102 | | ... | ${dut_tun_ip}
103
104 *** Test Cases ***
105 | 78B-0c-ethip6ipsec1tnlsw-ip6base-policy-aes128cbc-hmac512sha-scapy
106 | | [Tags] | 78B | 0C
107 | | frame_size=${78} | phy_cores=${0}