From 47eb8fb7f4701c64352b842918efcb82fb18608d Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Thu, 1 Jul 2021 16:50:26 +0300 Subject: Port 62a3c67ba "example: ipsec_api: enhance runtime scripts" Port original commit from linux-generic. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- platform/linux-dpdk/test/example/Makefile.am | 1 + .../linux-dpdk/test/example/ipsec_api/Makefile.am | 23 ++++++++ .../linux-dpdk/test/example/ipsec_api/pktio_env | 66 ++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 platform/linux-dpdk/test/example/ipsec_api/Makefile.am create mode 100644 platform/linux-dpdk/test/example/ipsec_api/pktio_env (limited to 'platform/linux-dpdk/test') diff --git a/platform/linux-dpdk/test/example/Makefile.am b/platform/linux-dpdk/test/example/Makefile.am index 22b254cd7..7cbb2fde1 100644 --- a/platform/linux-dpdk/test/example/Makefile.am +++ b/platform/linux-dpdk/test/example/Makefile.am @@ -1,6 +1,7 @@ SUBDIRS = \ classifier \ generator \ + ipsec_api \ l2fwd_simple \ l3fwd \ packet \ diff --git a/platform/linux-dpdk/test/example/ipsec_api/Makefile.am b/platform/linux-dpdk/test/example/ipsec_api/Makefile.am new file mode 100644 index 000000000..101c97cdf --- /dev/null +++ b/platform/linux-dpdk/test/example/ipsec_api/Makefile.am @@ -0,0 +1,23 @@ +EXTRA_DIST = pktio_env + +# If building out-of-tree, make check will not copy the scripts and data to the +# $(builddir) assuming that all commands are run locally. However this prevents +# running tests on a remote target using LOG_COMPILER. +# So copy all script and data files explicitly here. +all-local: + if [ "x$(srcdir)" != "x$(builddir)" ]; then \ + for f in $(EXTRA_DIST); do \ + if [ -e $(srcdir)/$$f ]; then \ + mkdir -p $(builddir)/$$(dirname $$f); \ + cp -f $(srcdir)/$$f $(builddir)/$$f; \ + fi \ + done \ + fi +clean-local: + if [ "x$(srcdir)" != "x$(builddir)" ]; then \ + for f in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$f; \ + done \ + fi + +.NOTPARALLEL: diff --git a/platform/linux-dpdk/test/example/ipsec_api/pktio_env b/platform/linux-dpdk/test/example/ipsec_api/pktio_env new file mode 100644 index 000000000..c647f6bf2 --- /dev/null +++ b/platform/linux-dpdk/test/example/ipsec_api/pktio_env @@ -0,0 +1,66 @@ +#!/bin/sh +# +# Copyright (C) 2021, Marvell +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Script to setup interfaces used for running application on linux-dpdk. +# +# ipsec_api application uses two loop devices loop0 and loop1. +# + +if [ "$0" == "$BASH_SOURCE" ]; then + echo "Error: Platform specific env file has to be sourced." + exit 1 +fi + +# Absolute path to the .env file. +LINUX_ENV_PATH=$PWD/../../platform/linux-dpdk/test + +TESTENV="tests-linux-dpdk.env" + +if [ -f $LINUX_ENV_PATH/$TESTENV ]; then + source $LINUX_ENV_PATH/$TESTENV +else + echo "BUG: unable to find $TESTENV!" + echo "$TESTENV has to be in following directory: " + echo " $LINUX_ENV_PATH" + exit 1 +fi + +# Skip IPsec example tests when there's no OpenSSL. +if [ -n "$WITH_OPENSSL" ] && [ ${WITH_OPENSSL} -eq 0 ]; then + echo "Crypto not supported. Skipping." + exit 77 +fi + +IF0=p7p1 +IF1=p8p1 + +NEXT_HOP_MAC0=08:00:27:76:B5:E0 +NEXT_HOP_MAC1=08:00:27:F5:8B:DB + +LIF0=loop1 +LIF1=loop2 + +IF_LIST=$LIF0,$LIF1 +ROUTE_IF_INB=$LIF0 +ROUTE_IF_OUTB=$LIF1 +OUT_IF=$LIF1 +IN_IF=$LIF0 + +validate_result() +{ + return 0 +} + +setup_interfaces() +{ + return 0 +} + +cleanup_interfaces() +{ + return 0 +} -- cgit v1.2.3 From cefc1d6a84089995e03546198426275dee5d84fd Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Thu, 1 Jul 2021 16:55:59 +0300 Subject: Port e94c28af5 "linux-gen: ipsec: add configurable ordering mode" Port original commit from linux-generic. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- platform/linux-dpdk/test/sched-basic.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/linux-dpdk/test') diff --git a/platform/linux-dpdk/test/sched-basic.conf b/platform/linux-dpdk/test/sched-basic.conf index c54089a0d..8a46a3ccc 100644 --- a/platform/linux-dpdk/test/sched-basic.conf +++ b/platform/linux-dpdk/test/sched-basic.conf @@ -1,6 +1,6 @@ # Mandatory fields odp_implementation = "linux-dpdk" -config_file_version = "0.1.11" +config_file_version = "0.1.12" sched_basic: { # Test scheduler with an odd spread value -- cgit v1.2.3 From 33d451574585ebe7ee6a7d7e93b648f2746e3560 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Thu, 1 Jul 2021 17:12:26 +0300 Subject: Port e44410dff "example: ipsec_crypto: enhance runtime scripts" Port original commit from linux-generic. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- platform/linux-dpdk/test/Makefile.am | 6 ++ platform/linux-dpdk/test/example/Makefile.am | 1 + .../test/example/ipsec_crypto/Makefile.am | 23 +++++++ .../linux-dpdk/test/example/ipsec_crypto/pktio_env | 72 ++++++++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 platform/linux-dpdk/test/example/ipsec_crypto/Makefile.am create mode 100644 platform/linux-dpdk/test/example/ipsec_crypto/pktio_env (limited to 'platform/linux-dpdk/test') diff --git a/platform/linux-dpdk/test/Makefile.am b/platform/linux-dpdk/test/Makefile.am index b21fd5314..a1580cec3 100644 --- a/platform/linux-dpdk/test/Makefile.am +++ b/platform/linux-dpdk/test/Makefile.am @@ -1,6 +1,12 @@ include $(top_srcdir)/test/Makefile.inc TESTS_ENVIRONMENT += TEST_DIR=${top_builddir}/test/validation +if WITH_OPENSSL +TESTS_ENVIRONMENT += WITH_OPENSSL=1 +else +TESTS_ENVIRONMENT += WITH_OPENSSL=0 +endif + SUBDIRS = if test_vald diff --git a/platform/linux-dpdk/test/example/Makefile.am b/platform/linux-dpdk/test/example/Makefile.am index 7cbb2fde1..947647cd4 100644 --- a/platform/linux-dpdk/test/example/Makefile.am +++ b/platform/linux-dpdk/test/example/Makefile.am @@ -2,6 +2,7 @@ SUBDIRS = \ classifier \ generator \ ipsec_api \ + ipsec_crypto \ l2fwd_simple \ l3fwd \ packet \ diff --git a/platform/linux-dpdk/test/example/ipsec_crypto/Makefile.am b/platform/linux-dpdk/test/example/ipsec_crypto/Makefile.am new file mode 100644 index 000000000..101c97cdf --- /dev/null +++ b/platform/linux-dpdk/test/example/ipsec_crypto/Makefile.am @@ -0,0 +1,23 @@ +EXTRA_DIST = pktio_env + +# If building out-of-tree, make check will not copy the scripts and data to the +# $(builddir) assuming that all commands are run locally. However this prevents +# running tests on a remote target using LOG_COMPILER. +# So copy all script and data files explicitly here. +all-local: + if [ "x$(srcdir)" != "x$(builddir)" ]; then \ + for f in $(EXTRA_DIST); do \ + if [ -e $(srcdir)/$$f ]; then \ + mkdir -p $(builddir)/$$(dirname $$f); \ + cp -f $(srcdir)/$$f $(builddir)/$$f; \ + fi \ + done \ + fi +clean-local: + if [ "x$(srcdir)" != "x$(builddir)" ]; then \ + for f in $(EXTRA_DIST); do \ + rm -f $(builddir)/$$f; \ + done \ + fi + +.NOTPARALLEL: diff --git a/platform/linux-dpdk/test/example/ipsec_crypto/pktio_env b/platform/linux-dpdk/test/example/ipsec_crypto/pktio_env new file mode 100644 index 000000000..1c6e7d172 --- /dev/null +++ b/platform/linux-dpdk/test/example/ipsec_crypto/pktio_env @@ -0,0 +1,72 @@ +#!/bin/sh +# +# Copyright (C) 2021, Marvell +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Script to setup interfaces used for running application on linux-dpdk. +# +# ipsec_api application uses two loop devices loop0 and loop1. +# + +if [ "$0" == "$BASH_SOURCE" ]; then + echo "Error: Platform specific env file has to be sourced." + exit 1 +fi + +# Absolute path to the .env file. +LINUX_ENV_PATH=$PWD/../../platform/linux-dpdk/test + +TESTENV="tests-linux-dpdk.env" + +if [ -f $LINUX_ENV_PATH/$TESTENV ]; then + source $LINUX_ENV_PATH/$TESTENV +else + echo "BUG: unable to find $TESTENV!" + echo "$TESTENV has to be in following directory: " + echo " $LINUX_ENV_PATH" + exit 1 +fi + +# Skip IPsec example tests when there's no OpenSSL. +if [ -n "$WITH_OPENSSL" ] && [ ${WITH_OPENSSL} -eq 0 ]; then + echo "Crypto not supported. Skipping." + exit 77 +fi + +# Skip live and router mode tests. +if [ ${IPSEC_APP_MODE} -eq 1 ] || [ ${IPSEC_APP_MODE} -eq 2 ]; then + echo "Live / Router mode test. Skipping." + exit 77 +fi + +IF0=p7p1 +IF1=p8p1 + +NEXT_HOP_MAC0=08:00:27:76:B5:E0 +NEXT_HOP_MAC1=08:00:27:F5:8B:DB + +LIF0=loop1 +LIF1=loop2 + +IF_LIST=$LIF0,$LIF1 +ROUTE_IF_INB=$LIF0 +ROUTE_IF_OUTB=$LIF1 +OUT_IF=$LIF1 +IN_IF=$LIF0 + +validate_result() +{ + return 0 +} + +setup_interfaces() +{ + return 0 +} + +cleanup_interfaces() +{ + return 0 +} -- cgit v1.2.3 From 5c5ad8950c57e8f0749073562ad2bc9c394e1147 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Thu, 1 Jul 2021 17:39:52 +0300 Subject: Port b599d217f "linux-gen: test: remove ipsec_crypto_example.sh" Port original commit from linux-generic. Signed-off-by: Matias Elo Reviewed-by: Petri Savolainen --- platform/linux-dpdk/test/Makefile.am | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'platform/linux-dpdk/test') diff --git a/platform/linux-dpdk/test/Makefile.am b/platform/linux-dpdk/test/Makefile.am index a1580cec3..1496c0558 100644 --- a/platform/linux-dpdk/test/Makefile.am +++ b/platform/linux-dpdk/test/Makefile.am @@ -8,9 +8,10 @@ TESTS_ENVIRONMENT += WITH_OPENSSL=0 endif SUBDIRS = +TESTS = if test_vald -TESTS = validation/api/pktio/pktio_run.sh +TESTS += validation/api/pktio/pktio_run.sh test_SCRIPTS = $(dist_check_SCRIPTS) @@ -42,25 +43,3 @@ if test_installdir installcheck-local: $(DESTDIR)/$(testdir)/run-test.sh $(TESTNAME) endif - -# If building out-of-tree, make check will not copy the scripts and data to the -# $(builddir) assuming that all commands are run locally. However this prevents -# running tests on a remote target using LOG_COMPILER. -# So copy all script and data files explicitly here. -all-local: - if [ "x$(srcdir)" != "x$(builddir)" ]; then \ - for f in $(dist_check_SCRIPTS); do \ - if [ -e $(srcdir)/$$f ]; then \ - mkdir -p $(builddir)/$$(dirname $$f); \ - cp -f $(srcdir)/$$f $(builddir)/$$f; \ - fi \ - done \ - fi -clean-local: - if [ "x$(srcdir)" != "x$(builddir)" ]; then \ - for f in $(dist_check_SCRIPTS); do \ - rm -f $(builddir)/$$f; \ - done \ - fi - -.NOTPARALLEL: -- cgit v1.2.3