examples/ipsec-secgw: tests clean-up
PATCH 1/1 examples/ipsec-secgw: tests clean-up
As more test cases are defined for execution, test scripts structure needs to be reorganized, so fewer files are needed to describe the test. To achieve that, new environment variables are incorporated into the scripts.
Additionally, tests for mixed tunnel protocols are added.
--- doc/guides/sample_app_ug/ipsec_secgw.rst | 47 +++- examples/ipsec-secgw/test/common_defs.sh | 127 ++++++++--- examples/ipsec-secgw/test/linux_test.sh | 141 ++++++++++++ examples/ipsec-secgw/test/linux_test4.sh | 70 ------ examples/ipsec-secgw/test/linux_test6.sh | 71 ------ examples/ipsec-secgw/test/load_env.sh | 121 ++++++++++ examples/ipsec-secgw/test/run_test.sh | 215 +++++++++++++----- .../test/trs_3descbc_sha1_common_defs.sh | 8 +- .../ipsec-secgw/test/trs_3descbc_sha1_defs.sh | 17 +- .../test/trs_3descbc_sha1_esn_atom_defs.sh | 6 - .../test/trs_3descbc_sha1_esn_defs.sh | 67 ------ .../test/trs_3descbc_sha1_old_defs.sh | 6 - .../test/trs_aescbc_sha1_common_defs.sh | 8 +- .../ipsec-secgw/test/trs_aescbc_sha1_defs.sh | 17 +- .../test/trs_aescbc_sha1_esn_atom_defs.sh | 6 - .../test/trs_aescbc_sha1_esn_defs.sh | 67 ------ .../test/trs_aescbc_sha1_old_defs.sh | 6 - .../test/trs_aesctr_sha1_common_defs.sh | 8 +- .../ipsec-secgw/test/trs_aesctr_sha1_defs.sh | 17 +- .../test/trs_aesctr_sha1_esn_atom_defs.sh | 6 - .../test/trs_aesctr_sha1_esn_defs.sh | 67 ------ .../test/trs_aesctr_sha1_old_defs.sh | 6 - .../test/trs_aesgcm_common_defs.sh | 8 +- examples/ipsec-secgw/test/trs_aesgcm_defs.sh | 17 +- .../test/trs_aesgcm_esn_atom_defs.sh | 6 - .../ipsec-secgw/test/trs_aesgcm_esn_defs.sh | 67 ------ .../test/trs_aesgcm_inline_crypto_defs.sh | 7 - .../trs_aesgcm_inline_crypto_fallback_defs.sh | 10 - .../test/trs_aesgcm_inline_crypto_old_defs.sh | 6 - .../ipsec-secgw/test/trs_aesgcm_old_defs.sh | 6 - .../test/tun_3descbc_sha1_common_defs.sh | 76 ++++++- .../ipsec-secgw/test/tun_3descbc_sha1_defs.sh | 87 ++++++- .../test/tun_3descbc_sha1_esn_atom_defs.sh | 6 - .../test/tun_3descbc_sha1_esn_defs.sh | 71 ------ .../test/tun_3descbc_sha1_old_defs.sh | 6 - .../test/tun_aescbc_sha1_common_defs.sh | 72 +++++- .../ipsec-secgw/test/tun_aescbc_sha1_defs.sh | 87 ++++++- .../test/tun_aescbc_sha1_esn_atom_defs.sh | 6 - .../test/tun_aescbc_sha1_esn_defs.sh | 71 ------ .../test/tun_aescbc_sha1_old_defs.sh | 6 - .../test/tun_aesctr_sha1_common_defs.sh | 72 +++++- .../ipsec-secgw/test/tun_aesctr_sha1_defs.sh | 87 ++++++- .../test/tun_aesctr_sha1_esn_atom_defs.sh | 6 - .../test/tun_aesctr_sha1_esn_defs.sh | 71 ------ .../test/tun_aesctr_sha1_old_defs.sh | 6 - .../test/tun_aesgcm_common_defs.sh | 66 +++++- examples/ipsec-secgw/test/tun_aesgcm_defs.sh | 87 ++++++- .../test/tun_aesgcm_esn_atom_defs.sh | 6 - .../ipsec-secgw/test/tun_aesgcm_esn_defs.sh | 71 ------ .../test/tun_aesgcm_inline_crypto_defs.sh | 7 - .../tun_aesgcm_inline_crypto_fallback_defs.sh | 10 - .../test/tun_aesgcm_inline_crypto_old_defs.sh | 6 - .../ipsec-secgw/test/tun_aesgcm_old_defs.sh | 6 - 53 files changed, 1189 insertions(+), 1031 deletions(-) create mode 100644 examples/ipsec-secgw/test/linux_test.sh delete mode 100644 examples/ipsec-secgw/test/linux_test4.sh delete mode 100644 examples/ipsec-secgw/test/linux_test6.sh create mode 100644 examples/ipsec-secgw/test/load_env.sh delete mode 100644 examples/ipsec-secgw/test/trs_3descbc_sha1_esn_atom_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_3descbc_sha1_esn_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_3descbc_sha1_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aescbc_sha1_esn_atom_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aescbc_sha1_esn_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aescbc_sha1_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesctr_sha1_esn_atom_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesctr_sha1_esn_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesctr_sha1_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesgcm_esn_atom_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesgcm_esn_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/trs_aesgcm_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_3descbc_sha1_esn_atom_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_3descbc_sha1_esn_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_3descbc_sha1_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aescbc_sha1_esn_atom_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aescbc_sha1_esn_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aescbc_sha1_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesctr_sha1_esn_atom_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesctr_sha1_esn_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesctr_sha1_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesgcm_esn_atom_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesgcm_esn_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_old_defs.sh delete mode 100644 examples/ipsec-secgw/test/tun_aesgcm_old_defs.sh
doc/guides/sample_app_ug/ipsec_secgw.rst +36 -11
@@ -870,10 +870,12 @@ Also the user can optionally setup: * ``CRYPTO_DEV``: crypto device to be used ('-w <pci-id>'). If none specified appropriate vdevs will be created by the script -* ``MULTI_SEG_TEST``: ipsec-secgw option to enable reassembly support and - specify size of reassembly table (e.g. - ``MULTI_SEG_TEST='--reassemble 128'``). This option must be set for - fallback session tests. +Scripts can be used for multiple test scenarios. To check all available +options run: + +.. code-block:: console + + /bin/bash run_test.sh -h Note that most of the tests require the appropriate crypto PMD/device to be available.
@@ -917,17 +919,40 @@ SUT OS(TAP)--(plain)-->(TAP)psec-secgw(NIC1)--(IPsec)-->(NIC1)DUT OS It then tries to perform some data transfer using the scheme described above. -usage +Usage ~~~~~ -In the ipsec-secgw/test directory +In the ipsec-secgw/test directory run + +/bin/bash run_test.sh <options> <ipsec_mode> + +Available options: + +* ``-4`` Perform tests with use of IPv4. One or both [-46] options needs to be + selected. + +* ``-6`` Perform tests with use of IPv6. One or both [-46] options needs to be + selected. + +* ``-m`` Add IPSec tunnel mixed IP version tests - outer IP version different + than inner. Inner IP version will match selected option [-46]. + +* ``-i`` Run tests in inline mode. Regular tests will not be invoked. + +* ``-f`` Run tests for fallback mechanism. Regular tests will not be invoked. + +* ``-l`` Run tests in legacy mode only. It cannot be used with options [-fsc]. + On default library mode is used. -to run one test for IPv4 or IPv6 +* ``-s`` Run all tests with reassembly support. On default only tests for + fallback mechanism use reassembly support. -/bin/bash linux_test(4|6).sh <ipsec_mode> +* ``-c`` Run tests with use of cpu-crypto. For inline tests it will not be + applied. On default lookaside-none is used. -to run all tests for IPv4 or IPv6 +* ``-p`` Perform packet validation tests. Option [-46] is not required. -/bin/bash run_test.sh -4|-6 +* ``-h`` Show usage. -For the list of available modes please refer to run_test.sh. +If <ipsec_mode> is specified, only tests for that mode will be invoked. For the +list of available modes please refer to run_test.sh.
examples/ipsec-secgw/test/common_defs.sh +100 -27
190 lines not on this page · raw message
examples/ipsec-secgw/test/linux_test.sh new file +141 -0
141 lines not on this page · raw message
examples/ipsec-secgw/test/linux_test4.sh deleted +0 -70
70 lines not on this page · raw message
examples/ipsec-secgw/test/linux_test6.sh deleted +0 -71
71 lines not on this page · raw message
examples/ipsec-secgw/test/load_env.sh new file +121 -0
121 lines not on this page · raw message
examples/ipsec-secgw/test/run_test.sh +155 -60
279 lines not on this page · raw message
examples/ipsec-secgw/test/trs_3descbc_sha1_common_defs.sh +4 -4
@@ -33,14 +33,14 @@ cipher_key \ de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_IN} sa in 9 cipher_algo 3des-cbc \ cipher_key \ de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_IN} #SA out rules sa out 7 cipher_algo 3des-cbc \
@@ -48,7 +48,7 @@ cipher_key \ de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_OUT} #SA out rules sa out 9 cipher_algo 3des-cbc \
@@ -56,7 +56,7 @@ cipher_key \ de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_OUT} #Routing rules rt ipv4 dst ${REMOTE_IPV4}/32 port 0
examples/ipsec-secgw/test/trs_3descbc_sha1_defs.sh +9 -8
@@ -3,9 +3,9 @@ . ${DIR}/trs_3descbc_sha1_common_defs.sh -SGW_CMD_XPRM='-w 300 -l' +SGW_CMD_XPRM="${DPDK_VARS} ${DPDK_MODE} ${SGW_CMD_XPRM}" -config_remote_xfrm() +config_remote_xfrm_44() { ssh ${REMOTE_HOST} ip xfrm policy flush ssh ${REMOTE_HOST} ip xfrm state flush
@@ -22,13 +22,13 @@ tmpl proto esp mode transport reqid 2 ssh ${REMOTE_HOST} ip xfrm state add \ src ${REMOTE_IPV4} dst ${LOCAL_IPV4} \ -proto esp spi 7 reqid 1 mode transport replay-window 64 \ +proto esp spi 7 reqid 1 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc "cbc\(des3_ede\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state add \ src ${LOCAL_IPV4} dst ${REMOTE_IPV4} \ -proto esp spi 7 reqid 2 mode transport replay-window 64 \ +proto esp spi 7 reqid 2 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc "cbc\(des3_ede\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
@@ -36,9 +36,10 @@ enc "cbc\(des3_ede\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state list } -config6_remote_xfrm() +config_remote_xfrm_66() { - config_remote_xfrm + ssh ${REMOTE_HOST} ip xfrm policy flush + ssh ${REMOTE_HOST} ip xfrm state flush ssh ${REMOTE_HOST} ip xfrm policy add \ src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \
@@ -53,13 +54,13 @@ tmpl proto esp mode transport reqid 4 ssh ${REMOTE_HOST} ip xfrm state add \ src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \ -proto esp spi 9 reqid 3 mode transport replay-window 64 \ +proto esp spi 9 reqid 3 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc "cbc\(des3_ede\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state add \ src ${LOCAL_IPV6} dst ${REMOTE_IPV6} \ -proto esp spi 9 reqid 4 mode transport replay-window 64 \ +proto esp spi 9 reqid 4 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc "cbc\(des3_ede\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
examples/ipsec-secgw/test/trs_3descbc_sha1_esn_atom_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_3descbc_sha1_esn_defs.sh - -SGW_CMD_XPRM='-e -a -w 300 -l'
examples/ipsec-secgw/test/trs_3descbc_sha1_esn_defs.sh deleted +0 -67
67 lines not on this page · raw message
examples/ipsec-secgw/test/trs_3descbc_sha1_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_3descbc_sha1_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/trs_aescbc_sha1_common_defs.sh +4 -4
@@ -32,27 +32,27 @@ sa in 7 cipher_algo aes-128-cbc \ cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_IN} sa in 9 cipher_algo aes-128-cbc \ cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_IN} #SA out rules sa out 7 cipher_algo aes-128-cbc \ cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_OUT} #SA out rules sa out 9 cipher_algo aes-128-cbc \ cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_OUT} #Routing rules rt ipv4 dst ${REMOTE_IPV4}/32 port 0
examples/ipsec-secgw/test/trs_aescbc_sha1_defs.sh +9 -8
@@ -3,9 +3,9 @@ . ${DIR}/trs_aescbc_sha1_common_defs.sh -SGW_CMD_XPRM='-w 300 -l' +SGW_CMD_XPRM="${DPDK_VARS} ${DPDK_MODE} ${SGW_CMD_XPRM}" -config_remote_xfrm() +config_remote_xfrm_44() { ssh ${REMOTE_HOST} ip xfrm policy flush ssh ${REMOTE_HOST} ip xfrm state flush
@@ -22,13 +22,13 @@ tmpl proto esp mode transport reqid 2 ssh ${REMOTE_HOST} ip xfrm state add \ src ${REMOTE_IPV4} dst ${LOCAL_IPV4} \ -proto esp spi 7 reqid 1 mode transport replay-window 64 \ +proto esp spi 7 reqid 1 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc aes 0xdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state add \ src ${LOCAL_IPV4} dst ${REMOTE_IPV4} \ -proto esp spi 7 reqid 2 mode transport replay-window 64 \ +proto esp spi 7 reqid 2 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc aes 0xdeadbeefdeadbeefdeadbeefdeadbeef
@@ -36,9 +36,10 @@ enc aes 0xdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state list } -config6_remote_xfrm() +config_remote_xfrm_66() { - config_remote_xfrm + ssh ${REMOTE_HOST} ip xfrm policy flush + ssh ${REMOTE_HOST} ip xfrm state flush ssh ${REMOTE_HOST} ip xfrm policy add \ src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \
@@ -53,13 +54,13 @@ tmpl proto esp mode transport reqid 4 ssh ${REMOTE_HOST} ip xfrm state add \ src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \ -proto esp spi 9 reqid 3 mode transport replay-window 64 \ +proto esp spi 9 reqid 3 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc aes 0xdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state add \ src ${LOCAL_IPV6} dst ${REMOTE_IPV6} \ -proto esp spi 9 reqid 4 mode transport replay-window 64 \ +proto esp spi 9 reqid 4 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc aes 0xdeadbeefdeadbeefdeadbeefdeadbeef
examples/ipsec-secgw/test/trs_aescbc_sha1_esn_atom_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aescbc_sha1_esn_defs.sh - -SGW_CMD_XPRM='-e -a -w 300 -l'
examples/ipsec-secgw/test/trs_aescbc_sha1_esn_defs.sh deleted +0 -67
67 lines not on this page · raw message
examples/ipsec-secgw/test/trs_aescbc_sha1_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aescbc_sha1_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/trs_aesctr_sha1_common_defs.sh +4 -4
@@ -32,27 +32,27 @@ sa in 7 cipher_algo aes-128-ctr \ cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_IN} sa in 9 cipher_algo aes-128-ctr \ cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_IN} #SA out rules sa out 7 cipher_algo aes-128-ctr \ cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_OUT} #SA out rules sa out 9 cipher_algo aes-128-ctr \ cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ auth_algo sha1-hmac \ auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_OUT} #Routing rules rt ipv4 dst ${REMOTE_IPV4}/32 port 0
examples/ipsec-secgw/test/trs_aesctr_sha1_defs.sh +9 -8
@@ -3,9 +3,9 @@ . ${DIR}/trs_aesctr_sha1_common_defs.sh -SGW_CMD_XPRM='-w 300 -l' +SGW_CMD_XPRM="${DPDK_VARS} ${DPDK_MODE} ${SGW_CMD_XPRM}" -config_remote_xfrm() +config_remote_xfrm_44() { ssh ${REMOTE_HOST} ip xfrm policy flush ssh ${REMOTE_HOST} ip xfrm state flush
@@ -22,13 +22,13 @@ tmpl proto esp mode transport reqid 2 ssh ${REMOTE_HOST} ip xfrm state add \ src ${REMOTE_IPV4} dst ${LOCAL_IPV4} \ -proto esp spi 7 reqid 1 mode transport replay-window 64 \ +proto esp spi 7 reqid 1 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc "rfc3686\(ctr\(aes\)\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state add \ src ${LOCAL_IPV4} dst ${REMOTE_IPV4} \ -proto esp spi 7 reqid 2 mode transport replay-window 64 \ +proto esp spi 7 reqid 2 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc "rfc3686\(ctr\(aes\)\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
@@ -36,9 +36,10 @@ enc "rfc3686\(ctr\(aes\)\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state list } -config6_remote_xfrm() +config_remote_xfrm_66() { - config_remote_xfrm + ssh ${REMOTE_HOST} ip xfrm policy flush + ssh ${REMOTE_HOST} ip xfrm state flush ssh ${REMOTE_HOST} ip xfrm policy add \ src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \
@@ -53,13 +54,13 @@ tmpl proto esp mode transport reqid 4 ssh ${REMOTE_HOST} ip xfrm state add \ src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \ -proto esp spi 9 reqid 3 mode transport replay-window 64 \ +proto esp spi 9 reqid 3 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc "rfc3686\(ctr\(aes\)\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef ssh ${REMOTE_HOST} ip xfrm state add \ src ${LOCAL_IPV6} dst ${REMOTE_IPV6} \ -proto esp spi 9 reqid 4 mode transport replay-window 64 \ +proto esp spi 9 reqid 4 mode transport replay-window 64 ${XFRM_ESN} \ auth sha1 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef \ enc "rfc3686\(ctr\(aes\)\)" 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
examples/ipsec-secgw/test/trs_aesctr_sha1_esn_atom_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aesctr_sha1_esn_defs.sh - -SGW_CMD_XPRM='-e -a -w 300 -l'
examples/ipsec-secgw/test/trs_aesctr_sha1_esn_defs.sh deleted +0 -67
67 lines not on this page · raw message
examples/ipsec-secgw/test/trs_aesctr_sha1_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aesctr_sha1_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh +4 -4
@@ -30,20 +30,20 @@ sp ipv6 out esp bypass pri 1 sport 0:65535 dport 0:65535 #SA in rules sa in 7 aead_algo aes-128-gcm \ aead_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} ${SGW_CFG_XPRM_IN} +mode transport ${SGW_CFG_XPRM_IN} sa in 9 aead_algo aes-128-gcm \ aead_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} ${SGW_CFG_XPRM_IN} +mode transport ${SGW_CFG_XPRM_IN} #SA out rules sa out 7 aead_algo aes-128-gcm \ aead_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_OUT} sa out 9 aead_algo aes-128-gcm \ aead_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \ -mode transport ${SGW_CFG_XPRM} +mode transport ${SGW_CFG_XPRM_OUT} #Routing rules rt ipv4 dst ${REMOTE_IPV4}/32 port 0
examples/ipsec-secgw/test/trs_aesgcm_defs.sh +9 -8
@@ -3,9 +3,9 @@ . ${DIR}/trs_aesgcm_common_defs.sh -SGW_CMD_XPRM='-w 300 -l' +SGW_CMD_XPRM="${DPDK_VARS} ${DPDK_MODE} ${SGW_CMD_XPRM}" -config_remote_xfrm() +config_remote_xfrm_44() { ssh ${REMOTE_HOST} ip xfrm policy flush ssh ${REMOTE_HOST} ip xfrm state flush
@@ -22,13 +22,13 @@ tmpl proto esp mode transport reqid 2 ssh ${REMOTE_HOST} ip xfrm state add \ src ${REMOTE_IPV4} dst ${LOCAL_IPV4} \ -proto esp spi 7 reqid 1 mode transport replay-window 64 \ +proto esp spi 7 reqid 1 mode transport replay-window 64 ${XFRM_ESN} \ aead "rfc4106\(gcm\(aes\)\)" \ 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 128 ssh ${REMOTE_HOST} ip xfrm state add \ src ${LOCAL_IPV4} dst ${REMOTE_IPV4} \ -proto esp spi 7 reqid 2 mode transport replay-window 64 \ +proto esp spi 7 reqid 2 mode transport replay-window 64 ${XFRM_ESN} \ aead "rfc4106\(gcm\(aes\)\)" \ 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 128
@@ -36,9 +36,10 @@ aead "rfc4106\(gcm\(aes\)\)" \ ssh ${REMOTE_HOST} ip xfrm state list } -config6_remote_xfrm() +config_remote_xfrm_66() { - config_remote_xfrm + ssh ${REMOTE_HOST} ip xfrm policy flush + ssh ${REMOTE_HOST} ip xfrm state flush ssh ${REMOTE_HOST} ip xfrm policy add \ src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \
@@ -52,13 +53,13 @@ tmpl proto esp mode transport reqid 4 ssh ${REMOTE_HOST} ip xfrm state add \ src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \ -proto esp spi 9 reqid 3 mode transport replay-window 64 \ +proto esp spi 9 reqid 3 mode transport replay-window 64 ${XFRM_ESN} \ aead "rfc4106\(gcm\(aes\)\)" \ 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 128 ssh ${REMOTE_HOST} ip xfrm state add \ src ${LOCAL_IPV6} dst ${REMOTE_IPV6} \ -proto esp spi 9 reqid 4 mode transport replay-window 64 \ +proto esp spi 9 reqid 4 mode transport replay-window 64 ${XFRM_ESN} \ aead "rfc4106\(gcm\(aes\)\)" \ 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 128
examples/ipsec-secgw/test/trs_aesgcm_esn_atom_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aesgcm_esn_defs.sh - -SGW_CMD_XPRM='-e -a -w 300 -l'
examples/ipsec-secgw/test/trs_aesgcm_esn_defs.sh deleted +0 -67
67 lines not on this page · raw message
examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_defs.sh deleted +0 -7
@@ -1,7 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aesgcm_defs.sh - -CRYPTO_DEV='--vdev="crypto_null0"' -SGW_CFG_XPRM='port_id 0 type inline-crypto-offload'
examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh deleted +0 -10
@@ -1,10 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aesgcm_defs.sh - -if [[ -z "${CRYPTO_FLBK_TYPE}" ]]; then - CRYPTO_FLBK_TYPE="fallback lookaside-none" -fi - -SGW_CFG_XPRM_IN="port_id 0 type inline-crypto-offload ${CRYPTO_FLBK_TYPE}"
examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aesgcm_inline_crypto_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/trs_aesgcm_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/trs_aesgcm_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/tun_3descbc_sha1_common_defs.sh +72 -4
100 lines not on this page · raw message
examples/ipsec-secgw/test/tun_3descbc_sha1_defs.sh +79 -8
123 lines not on this page · raw message
examples/ipsec-secgw/test/tun_3descbc_sha1_esn_atom_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_3descbc_sha1_esn_defs.sh - -SGW_CMD_XPRM='-e -a -w 300 -l'
examples/ipsec-secgw/test/tun_3descbc_sha1_esn_defs.sh deleted +0 -71
71 lines not on this page · raw message
examples/ipsec-secgw/test/tun_3descbc_sha1_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_3descbc_sha1_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/tun_aescbc_sha1_common_defs.sh +68 -4
94 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aescbc_sha1_defs.sh +79 -8
123 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aescbc_sha1_esn_atom_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aescbc_sha1_esn_defs.sh - -SGW_CMD_XPRM='-e -a -w 300 -l'
examples/ipsec-secgw/test/tun_aescbc_sha1_esn_defs.sh deleted +0 -71
71 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aescbc_sha1_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aescbc_sha1_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/tun_aesctr_sha1_common_defs.sh +68 -4
94 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aesctr_sha1_defs.sh +79 -8
123 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aesctr_sha1_esn_atom_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aesctr_sha1_esn_defs.sh - -SGW_CMD_XPRM='-e -a -w 300 -l'
examples/ipsec-secgw/test/tun_aesctr_sha1_esn_defs.sh deleted +0 -71
71 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aesctr_sha1_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aesctr_sha1_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh +60 -6
82 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aesgcm_defs.sh +79 -8
123 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aesgcm_esn_atom_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aesgcm_esn_defs.sh - -SGW_CMD_XPRM='-e -a -w 300 -l'
examples/ipsec-secgw/test/tun_aesgcm_esn_defs.sh deleted +0 -71
71 lines not on this page · raw message
examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_defs.sh deleted +0 -7
@@ -1,7 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aesgcm_defs.sh - -CRYPTO_DEV='--vdev="crypto_null0"' -SGW_CFG_XPRM='port_id 0 type inline-crypto-offload'
examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh deleted +0 -10
@@ -1,10 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aesgcm_defs.sh - -if [[ -z "${CRYPTO_FLBK_TYPE}" ]]; then - CRYPTO_FLBK_TYPE="fallback lookaside-none" -fi - -SGW_CFG_XPRM_IN="port_id 0 type inline-crypto-offload ${CRYPTO_FLBK_TYPE}"
examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aesgcm_inline_crypto_defs.sh - -SGW_CMD_XPRM=
examples/ipsec-secgw/test/tun_aesgcm_old_defs.sh deleted +0 -6
@@ -1,6 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: BSD-3-Clause - -. ${DIR}/tun_aesgcm_defs.sh - -SGW_CMD_XPRM=
Signature · 1 line
2.17.1
Quoted 8 lines
As more test cases are defined for execution, test scripts structure needs to be reorganized, so fewer files are needed to describe the test. To achieve that, new environment variables are incorporated into the scripts.
Additionally, tests for mixed tunnel protocols are added.Signed-off-by Mariusz Drost <[email protected]>---
Quoted 2 lines
--
2.17.1
Akhil Goyal
AppliedQuoted 6 lines
Quoted 6 lines
As more test cases are defined for execution, test scripts structure needs to be reorganized, so fewer files are needed to describe the test. To achieve that, new environment variables are incorporated into the scripts.
Additionally, tests for mixed tunnel protocols are added.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Mariusz Drost <[email protected]>---
Tested-by Konstantin Ananyev <[email protected]>
Title modified " examples/ipsec-secgw: clean up test scripts"
Applied to dpdk-next-crypto
Thanks.