[v5,4/4] examples/ipsec-secgw: add offload fallback tests

Message ID 20190927155446.19136-5-marcinx.smoczynski@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series add fallback session |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Marcin Smoczynski Sept. 27, 2019, 3:54 p.m. UTC
  Add tests for offload fallback feature; add inbound config modificator
SGW_CFG_XPRM_IN (offload fallback setting can be set only for inbound
SAs). Tests are using cryptodev for outbound SA.

To test fragmentation with QAT set:
MULTI_SEG_TEST="--reassemble=4096 --cryptodev_mask=0x5555"

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
---
 examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh         | 4 ++--
 .../test/trs_aesgcm_inline_crypto_fallback_defs.sh          | 5 +++++
 examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh         | 6 ++++--
 .../test/tun_aesgcm_inline_crypto_fallback_defs.sh          | 5 +++++
 4 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh
 create mode 100644 examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh
  

Comments

Iremonger, Bernard Oct. 3, 2019, 4:46 p.m. UTC | #1
Hi Marcin,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Marcin Smoczynski
> Sent: Friday, September 27, 2019 4:55 PM
> To: anoobj@marvell.com; akhil.goyal@nxp.com; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Smoczynski, MarcinX <marcinx.smoczynski@intel.com>
> Subject: [dpdk-dev] [PATCH v5 4/4] examples/ipsec-secgw: add offload
> fallback tests
> 
> Add tests for offload fallback feature; add inbound config modificator
> SGW_CFG_XPRM_IN (offload fallback setting can be set only for inbound
> SAs). Tests are using cryptodev for outbound SA.
> 
> To test fragmentation with QAT set:
> MULTI_SEG_TEST="--reassemble=4096 --cryptodev_mask=0x5555"

The environment variable MULTI_SEG_TEST should be documented in the ipsec-secgw guide, section
49.6 Test directory, along side the other environment variables.

 
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>

Tested-by:  Bernard Iremonger <bernard.iremonger@intel.com>

> ---
>  examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh         | 4 ++--
>  .../test/trs_aesgcm_inline_crypto_fallback_defs.sh          | 5 +++++
>  examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh         | 6 ++++--
>  .../test/tun_aesgcm_inline_crypto_fallback_defs.sh          | 5 +++++
>  4 files changed, 16 insertions(+), 4 deletions(-)  create mode 100644
> examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh
>  create mode 100644 examples/ipsec-
> secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh
> 
> diff --git a/examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh
> b/examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh
> index f6c5bf5a7..17f2f86d2 100644
> --- a/examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh
> +++ b/examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh
> @@ -29,11 +29,11 @@ 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}
> +mode transport ${SGW_CFG_XPRM} ${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}
> +mode transport ${SGW_CFG_XPRM} ${SGW_CFG_XPRM_IN}
> 
>  #SA out rules
>  sa out 7 aead_algo aes-128-gcm \
> diff --git a/examples/ipsec-
> secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh b/examples/ipsec-
> secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh
> new file mode 100644
> index 000000000..875a7457d
> --- /dev/null
> +++ b/examples/ipsec-
> secgw/test/trs_aesgcm_inline_crypto_fallback_defs.s
> +++ h
> @@ -0,0 +1,5 @@
> +#! /bin/bash
> +
> +. ${DIR}/trs_aesgcm_defs.sh
> +
> +SGW_CFG_XPRM_IN='port_id 0 type inline-crypto-offload fallback
> lookaside-none'
> diff --git a/examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh
> b/examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh
> index 278377967..7490baded 100644
> --- a/examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh
> +++ b/examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh
> @@ -29,11 +29,13 @@ 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 ipv4-
> tunnel src ${REMOTE_IPV4} dst ${LOCAL_IPV4} ${SGW_CFG_XPRM}
> +mode ipv4-tunnel src ${REMOTE_IPV4} dst ${LOCAL_IPV4}
> ${SGW_CFG_XPRM} \
> +${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 ipv6-tunnel src ${REMOTE_IPV6} dst ${LOCAL_IPV6}
> ${SGW_CFG_XPRM}
> +mode ipv6-tunnel src ${REMOTE_IPV6} dst ${LOCAL_IPV6}
> ${SGW_CFG_XPRM} \
> +${SGW_CFG_XPRM_IN}
> 
>  #SA out rules
>  sa out 7 aead_algo aes-128-gcm \
> diff --git a/examples/ipsec-
> secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh b/examples/ipsec-
> secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh
> new file mode 100644
> index 000000000..696848432
> --- /dev/null
> +++ b/examples/ipsec-
> secgw/test/tun_aesgcm_inline_crypto_fallback_defs.s
> +++ h
> @@ -0,0 +1,5 @@
> +#! /bin/bash
> +
> +. ${DIR}/tun_aesgcm_defs.sh
> +
> +SGW_CFG_XPRM_IN='port_id 0 type inline-crypto-offload fallback
> lookaside-none'
> --
> 2.17.1

Regards,

Bernard.
  

Patch

diff --git a/examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh b/examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh
index f6c5bf5a7..17f2f86d2 100644
--- a/examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh
+++ b/examples/ipsec-secgw/test/trs_aesgcm_common_defs.sh
@@ -29,11 +29,11 @@  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}
+mode transport ${SGW_CFG_XPRM} ${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}
+mode transport ${SGW_CFG_XPRM} ${SGW_CFG_XPRM_IN}
 
 #SA out rules
 sa out 7 aead_algo aes-128-gcm \
diff --git a/examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh b/examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh
new file mode 100644
index 000000000..875a7457d
--- /dev/null
+++ b/examples/ipsec-secgw/test/trs_aesgcm_inline_crypto_fallback_defs.sh
@@ -0,0 +1,5 @@ 
+#! /bin/bash
+
+. ${DIR}/trs_aesgcm_defs.sh
+
+SGW_CFG_XPRM_IN='port_id 0 type inline-crypto-offload fallback lookaside-none'
diff --git a/examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh b/examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh
index 278377967..7490baded 100644
--- a/examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh
+++ b/examples/ipsec-secgw/test/tun_aesgcm_common_defs.sh
@@ -29,11 +29,13 @@  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 ipv4-tunnel src ${REMOTE_IPV4} dst ${LOCAL_IPV4} ${SGW_CFG_XPRM}
+mode ipv4-tunnel src ${REMOTE_IPV4} dst ${LOCAL_IPV4} ${SGW_CFG_XPRM} \
+${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 ipv6-tunnel src ${REMOTE_IPV6} dst ${LOCAL_IPV6} ${SGW_CFG_XPRM}
+mode ipv6-tunnel src ${REMOTE_IPV6} dst ${LOCAL_IPV6} ${SGW_CFG_XPRM} \
+${SGW_CFG_XPRM_IN}
 
 #SA out rules
 sa out 7 aead_algo aes-128-gcm \
diff --git a/examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh b/examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh
new file mode 100644
index 000000000..696848432
--- /dev/null
+++ b/examples/ipsec-secgw/test/tun_aesgcm_inline_crypto_fallback_defs.sh
@@ -0,0 +1,5 @@ 
+#! /bin/bash
+
+. ${DIR}/tun_aesgcm_defs.sh
+
+SGW_CFG_XPRM_IN='port_id 0 type inline-crypto-offload fallback lookaside-none'