vpp_device: Multiple NICs (infra)
[csit.git] / tests / vpp / device / crypto / eth2p-ethip4ipsec1tnlsw-ip4base-policy-aes-128-cbc-sha-512-256-dev.robot
1 # Copyright (c) 2021 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 | IP4FWD | IPSEC | IPSECSW | IPSECTUN | IP4BASE
19 | ... | AES_128_CBC | HMAC_SHA_512 | HMAC | AES | DRV_VFIO_PCI
20 | ... | RXQ_SIZE_0 | TXQ_SIZE_0
21 | ... | ethip4ipsec1tnlsw-ip4base-policy-aes-128-cbc-sha-512-256
22 |
23 | Suite Setup | Setup suite topology interfaces | scapy
24 | Test Setup | Setup test
25 | Test Teardown | Tear down test | packet_trace | ipsec_sa
26 |
27 | Test Template | Local Template
28 |
29 | Documentation | *IPv4 IPsec tunnel mode test suite.*
30 |
31 | ... | *[Top] Network topologies:* TG-DUT1 2-node topology with one link\
32 | ... | between nodes.
33 | ... | *[Cfg] DUT configuration:* On DUT1 create loopback interface, configure\
34 | ... | loopback an physical interface IPv4 addresses, static ARP record, route\
35 | ... | and IPsec manual keyed connection in tunnel mode.
36 | ... | *[Ver] TG verification:* ESP packet is sent from TG to DUT1. ESP packet\
37 | ... | is received on TG from DUT1.
38 | ... | *[Ref] Applicable standard specifications:* RFC4303.
39
40 *** Variables ***
41 | @{plugins_to_enable}= | dpdk_plugin.so | perfmon_plugin.so
42 | ... | crypto_native_plugin.so | crypto_ipsecmb_plugin.so
43 | ... | crypto_openssl_plugin.so
44 | ${crypto_type}= | ${None}
45 | ${nic_name}= | Intel-X710
46 | ${nic_driver}= | vfio-pci
47 | ${nic_rxq_size}= | 0
48 | ${nic_txq_size}= | 0
49 | ${nic_pfs}= | 2
50 | ${nic_vfs}= | 0
51 | ${overhead}= | ${54}
52 | ${tg_spi}= | ${1000}
53 | ${dut_spi}= | ${1001}
54 | ${ESP_PROTO}= | ${50}
55 | ${tg_if1_ip4}= | 192.168.100.2
56 | ${tg_if2_ip4}= | 192.168.4.4
57 | ${dut_if1_ip4}= | 192.168.100.3
58 | ${dut_if2_ip4}= | 192.168.4.3
59 | ${tg_host_ip4}= | 192.168.3.3
60 | ${ip4_plen}= | ${24}
61
62 *** Keywords ***
63 | Local Template
64 | | [Documentation]
65 | | ... | [Cfg] On DUT1 configure IPsec manual keyed connection with encryption\
66 | | ... | algorithm AES_128_CBC and integrity algorithm HMAC_SHA_512 in tunnel\
67 | | ... | mode.
68 | |
69 | | ... | *Arguments:*
70 | | ... | - frame_size - Framesize in Bytes in integer. Type: integer
71 | | ... | - phy_cores - Number of physical cores. Type: integer
72 | | ... | - rxq - Number of RX queues, default value: ${None}. Type: integer
73 | |
74 | | [Arguments] | ${frame_size} | ${phy_cores} | ${rxq}=${None}
75 | |
76 | | Set Test Variable | \${frame_size}
77 | |
78 | | # These are enums (not strings) so they cannot be in Variables table.
79 | | ${encr_alg}= | Crypto Alg AES CBC 128
80 | | ${auth_alg}= | Integ Alg SHA 512 256
81 | |
82 | | Given Set Max Rate And Jumbo
83 | | And Add worker threads to all DUTs | ${phy_cores} | ${rxq}
84 | | And Pre-initialize layer driver | ${nic_driver}
85 | | And Apply startup configuration on all VPP DUTs | with_trace=${True}
86 | | When Initialize layer driver | ${nic_driver}
87 | | And Initialize layer interface
88 | | And Configure topology for IPv4 IPsec testing
89 | | And Generate keys for IPSec | ${encr_alg} | ${auth_alg}
90 | | And Configure manual keyed connection for IPSec
91 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${encr_alg} | ${encr_key} | ${auth_alg}
92 | | ... | ${auth_key} | ${dut_spi} | ${tg_spi} | ${tg_dst_ip} | ${tg_src_ip}
93 | | ... | ${dut_tun_ip} | ${tg_tun_ip}
94 | | Then Send IPsec Packet and verify ESP encapsulation in received packet
95 | | ... | ${tg} | ${TG_pf1}[0] | ${TG_pf2}[0]
96 | | ... | ${DUT1_vf1_mac}[0] | ${DUT1_vf2_mac}[0]
97 | | ... | ${encr_alg} | ${encr_key} | ${auth_alg} | ${auth_key} | ${tg_spi}
98 | | ... | ${dut_spi} | ${tg_src_ip} | ${tg_dst_ip} | ${tg_tun_ip}
99 | | ... | ${dut_tun_ip}
100
101 *** Test Cases ***
102 | 110B-ethip4ipsec1tnlsw-ip4base-policy-aes-128-cbc-sha-512-256-dev
103 | | [Tags] | 110B
104 | | frame_size=${110} | phy_cores=${0}