]> git.proxmox.com Git - ceph.git/blob - ceph/src/seastar/dpdk/examples/ipsec-secgw/test/linux_test6.sh
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / examples / ipsec-secgw / test / linux_test6.sh
1 #! /bin/bash
2
3 # usage: /bin/bash linux_test6.sh <ipsec_mode>
4 # for list of available modes please refer to run_test.sh.
5 # ipsec-secgw (IPv6 mode) functional test script.
6 #
7 # Note that for most of them you required appropriate crypto PMD/device
8 # to be avaialble.
9 # Also user has to setup properly the following environment variables:
10 # SGW_PATH - path to the ipsec-secgw binary to test
11 # REMOTE_HOST - ip/hostname of the DUT
12 # REMOTE_IFACE - iface name for the test-port on DUT
13 # ETH_DEV - ethernet device to be used on SUT by DPDK ('-w <pci-id>')
14 # Also user can optonally setup:
15 # SGW_LCORE - lcore to run ipsec-secgw on (default value is 0)
16 # CRYPTO_DEV - crypto device to be used ('-w <pci-id>')
17 # if none specified appropriate vdevs will be created by the scrit
18 #
19 # The purpose of the script is to automate ipsec-secgw testing
20 # using another system running linux as a DUT.
21 # It expects that SUT and DUT are connected through at least 2 NICs.
22 # One NIC is expected to be managed by linux both machines,
23 # and will be used as a control path.
24 # Make sure user from SUT can ssh to DUT without entering password,
25 # also make sure that sshd over ipv6 is enabled.
26 # Second NIC (test-port) should be reserved for DPDK on SUT,
27 # and should be managed by linux on DUT.
28 # The script starts ipsec-secgw with 2 NIC devices: test-port and tap vdev.
29 # Then configures local tap iface and remote iface and ipsec policies
30 # in the following way:
31 # traffic going over test-port in both directions has to be
32 # protected by ipsec.
33 # raffic going over TAP in both directions doesn't have to be protected.
34 # I.E:
35 # DUT OS(NIC1)--(ipsec)-->(NIC1)ipsec-secgw(TAP)--(plain)-->(TAP)SUT OS
36 # SUT OS(TAP)--(plain)-->(TAP)psec-secgw(NIC1)--(ipsec)-->(NIC1)DUT OS
37 # Then tries to perorm some data transfer using the scheme decribed above.
38 #
39
40 DIR=`dirname $0`
41 MODE=$1
42
43 . ${DIR}/common_defs.sh
44 . ${DIR}/${MODE}_defs.sh
45
46 config_secgw
47
48 secgw_start
49
50 config6_iface
51
52 config6_remote_xfrm
53
54 . ${DIR}/data_rxtx.sh
55
56 ping6_test1 ${REMOTE_IPV6}
57 st=$?
58 if [[ $st -eq 0 ]]; then
59 scp_test1 ${REMOTE_IPV6}
60 st=$?
61 fi
62
63 secgw_stop
64 exit $st