From: Akhil Goyal <gakhil@marvell.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <david.marchand@redhat.com>,
<hemant.agrawal@nxp.com>, <anoobj@marvell.com>,
<konstantin.ananyev@intel.com>, <ciara.power@intel.com>,
<ferruh.yigit@intel.com>, <andrew.rybchenko@oktetlabs.ru>,
<ndabilpuram@marvell.com>, <vattunuru@marvell.com>,
Akhil Goyal <gakhil@marvell.com>,
Fan Zhang <roy.fan.zhang@intel.com>
Subject: [PATCH v7 3/7] test/security: add combined mode inline IPsec cases
Date: Tue, 24 May 2022 12:52:12 +0530 [thread overview]
Message-ID: <20220524072216.1283647-4-gakhil@marvell.com> (raw)
In-Reply-To: <20220524072216.1283647-1-gakhil@marvell.com>
Added combined encap and decap test cases for various algorithm
combinations
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
app/test/test_security_inline_proto.c | 102 ++++++++++++++++++++++++++
1 file changed, 102 insertions(+)
diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c
index 4a95b25a0b..a44a4f9b04 100644
--- a/app/test/test_security_inline_proto.c
+++ b/app/test/test_security_inline_proto.c
@@ -665,6 +665,92 @@ test_ipsec_inline_proto_process(struct ipsec_test_data *td,
return ret;
}
+static int
+test_ipsec_inline_proto_all(const struct ipsec_test_flags *flags)
+{
+ struct ipsec_test_data td_outb;
+ struct ipsec_test_data td_inb;
+ unsigned int i, nb_pkts = 1, pass_cnt = 0, fail_cnt = 0;
+ int ret;
+
+ if (flags->iv_gen || flags->sa_expiry_pkts_soft ||
+ flags->sa_expiry_pkts_hard)
+ nb_pkts = IPSEC_TEST_PACKETS_MAX;
+
+ for (i = 0; i < RTE_DIM(alg_list); i++) {
+ test_ipsec_td_prepare(alg_list[i].param1,
+ alg_list[i].param2,
+ flags, &td_outb, 1);
+
+ if (!td_outb.aead) {
+ enum rte_crypto_cipher_algorithm cipher_alg;
+ enum rte_crypto_auth_algorithm auth_alg;
+
+ cipher_alg = td_outb.xform.chain.cipher.cipher.algo;
+ auth_alg = td_outb.xform.chain.auth.auth.algo;
+
+ if (td_outb.aes_gmac && cipher_alg != RTE_CRYPTO_CIPHER_NULL)
+ continue;
+
+ /* ICV is not applicable for NULL auth */
+ if (flags->icv_corrupt &&
+ auth_alg == RTE_CRYPTO_AUTH_NULL)
+ continue;
+
+ /* IV is not applicable for NULL cipher */
+ if (flags->iv_gen &&
+ cipher_alg == RTE_CRYPTO_CIPHER_NULL)
+ continue;
+ }
+
+ if (flags->udp_encap)
+ td_outb.ipsec_xform.options.udp_encap = 1;
+
+ ret = test_ipsec_inline_proto_process(&td_outb, &td_inb, nb_pkts,
+ false, flags);
+ if (ret == TEST_SKIPPED)
+ continue;
+
+ if (ret == TEST_FAILED) {
+ printf("\n TEST FAILED");
+ test_ipsec_display_alg(alg_list[i].param1,
+ alg_list[i].param2);
+ fail_cnt++;
+ continue;
+ }
+
+ test_ipsec_td_update(&td_inb, &td_outb, 1, flags);
+
+ ret = test_ipsec_inline_proto_process(&td_inb, NULL, nb_pkts,
+ false, flags);
+ if (ret == TEST_SKIPPED)
+ continue;
+
+ if (ret == TEST_FAILED) {
+ printf("\n TEST FAILED");
+ test_ipsec_display_alg(alg_list[i].param1,
+ alg_list[i].param2);
+ fail_cnt++;
+ continue;
+ }
+
+ if (flags->display_alg)
+ test_ipsec_display_alg(alg_list[i].param1,
+ alg_list[i].param2);
+
+ pass_cnt++;
+ }
+
+ printf("Tests passed: %d, failed: %d", pass_cnt, fail_cnt);
+ if (fail_cnt > 0)
+ return TEST_FAILED;
+ if (pass_cnt > 0)
+ return TEST_SUCCESS;
+ else
+ return TEST_SKIPPED;
+}
+
+
static int
ut_setup_inline_ipsec(void)
{
@@ -841,6 +927,17 @@ test_ipsec_inline_proto_known_vec_inb(const void *test_data)
return test_ipsec_inline_proto_process(&td_inb, NULL, 1, false, &flags);
}
+static int
+test_ipsec_inline_proto_display_list(const void *data __rte_unused)
+{
+ struct ipsec_test_flags flags;
+
+ memset(&flags, 0, sizeof(flags));
+
+ flags.display_alg = true;
+
+ return test_ipsec_inline_proto_all(&flags);
+}
static struct unit_test_suite inline_ipsec_testsuite = {
.suite_name = "Inline IPsec Ethernet Device Unit Test Suite",
@@ -934,6 +1031,11 @@ static struct unit_test_suite inline_ipsec_testsuite = {
test_ipsec_inline_proto_known_vec_inb,
&pkt_null_aes_xcbc),
+ TEST_CASE_NAMED_ST(
+ "Combined test alg list",
+ ut_setup_inline_ipsec, ut_teardown_inline_ipsec,
+ test_ipsec_inline_proto_display_list),
+
TEST_CASES_END() /**< NULL terminate unit test array */
--
2.25.1
next prev parent reply other threads:[~2022-05-24 7:55 UTC|newest]
Thread overview: 184+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 10:02 [dpdk-dev] [PATCH] RFC: ethdev: add reassembly offload Akhil Goyal
2021-08-23 10:18 ` Andrew Rybchenko
2021-08-29 13:14 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-09-21 19:59 ` Thomas Monjalon
2021-09-07 8:47 ` [dpdk-dev] " Ferruh Yigit
2021-09-08 10:29 ` [dpdk-dev] [EXT] " Anoob Joseph
2021-09-13 6:56 ` Xu, Rosen
2021-09-13 7:22 ` Andrew Rybchenko
2021-09-14 5:14 ` Anoob Joseph
2021-09-08 6:34 ` [dpdk-dev] " Xu, Rosen
2021-09-08 6:36 ` Xu, Rosen
2022-01-03 15:08 ` [PATCH 0/8] ethdev: introduce IP " Akhil Goyal
2022-01-03 15:08 ` [PATCH 1/8] " Akhil Goyal
2022-01-11 16:03 ` Ananyev, Konstantin
2022-01-22 7:38 ` Andrew Rybchenko
2022-01-30 16:53 ` [EXT] " Akhil Goyal
2022-01-03 15:08 ` [PATCH 2/8] ethdev: add dev op for IP reassembly configuration Akhil Goyal
2022-01-11 16:09 ` Ananyev, Konstantin
2022-01-11 18:54 ` Akhil Goyal
2022-01-12 10:22 ` Ananyev, Konstantin
2022-01-12 10:32 ` Akhil Goyal
2022-01-12 10:48 ` Ananyev, Konstantin
2022-01-12 11:06 ` Akhil Goyal
2022-01-13 13:31 ` Akhil Goyal
2022-01-13 14:41 ` Ananyev, Konstantin
2022-01-03 15:08 ` [PATCH 3/8] ethdev: add mbuf dynfield for incomplete IP reassembly Akhil Goyal
2022-01-11 17:04 ` Ananyev, Konstantin
2022-01-11 18:44 ` Akhil Goyal
2022-01-12 10:30 ` Ananyev, Konstantin
2022-01-12 10:59 ` Akhil Goyal
2022-01-13 22:29 ` Ananyev, Konstantin
2022-01-13 13:18 ` Akhil Goyal
2022-01-13 14:36 ` Ananyev, Konstantin
2022-01-13 15:04 ` Akhil Goyal
2022-01-03 15:08 ` [PATCH 4/8] security: add IPsec option for " Akhil Goyal
2022-01-03 15:08 ` [PATCH 5/8] app/test: add unit cases for inline IPsec offload Akhil Goyal
2022-01-20 16:48 ` [PATCH v2 0/4] app/test: add inline IPsec and reassembly cases Akhil Goyal
2022-01-20 16:48 ` [PATCH v2 1/4] app/test: add unit cases for inline IPsec offload Akhil Goyal
2022-01-20 16:48 ` [PATCH v2 2/4] app/test: add IP reassembly case with no frags Akhil Goyal
2022-01-20 16:48 ` [PATCH v2 3/4] app/test: add IP reassembly cases with multiple fragments Akhil Goyal
2022-01-20 16:48 ` [PATCH v2 4/4] app/test: add IP reassembly negative cases Akhil Goyal
2022-02-17 17:23 ` [PATCH v3 0/4] app/test: add inline IPsec and reassembly cases Akhil Goyal
2022-02-17 17:23 ` [PATCH v3 1/4] app/test: add unit cases for inline IPsec offload Akhil Goyal
2022-02-17 17:23 ` [PATCH v3 2/4] app/test: add IP reassembly case with no frags Akhil Goyal
2022-02-17 17:23 ` [PATCH v3 3/4] app/test: add IP reassembly cases with multiple fragments Akhil Goyal
2022-02-17 17:23 ` [PATCH v3 4/4] app/test: add IP reassembly negative cases Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 00/10] app/test: add inline IPsec and reassembly cases Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 01/10] app/test: add unit cases for inline IPsec offload Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 02/10] test/security: add inline inbound IPsec cases Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 03/10] test/security: add combined mode inline " Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 04/10] test/security: add inline IPsec reassembly cases Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 05/10] test/security: add more inline IPsec functional cases Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 06/10] test/security: add ESN and anti-replay cases for inline Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes Akhil Goyal
2022-04-19 8:58 ` Thomas Monjalon
2022-04-19 10:14 ` [EXT] " Akhil Goyal
2022-04-19 10:19 ` Anoob Joseph
2022-04-19 10:37 ` Thomas Monjalon
2022-04-19 10:39 ` Anoob Joseph
2022-04-19 10:47 ` Thomas Monjalon
2022-04-19 12:27 ` Akhil Goyal
2022-04-19 15:41 ` Ray Kinsella
2022-04-20 13:51 ` Akhil Goyal
2022-09-24 13:57 ` [PATCH v5 0/3] Add and test IPsec SA expiry events Akhil Goyal
2022-09-24 13:57 ` [PATCH v5 1/3] ethdev: add IPsec SA expiry event subtypes Akhil Goyal
2022-09-24 14:02 ` Akhil Goyal
2022-09-26 14:02 ` Thomas Monjalon
2022-09-27 18:44 ` [EXT] " Akhil Goyal
2022-09-24 13:57 ` [PATCH v5 2/3] test/security: add inline IPsec SA soft expiry cases Akhil Goyal
2022-09-24 13:57 ` [PATCH v5 3/3] test/security: add inline IPsec SA hard " Akhil Goyal
2022-09-26 17:07 ` [PATCH v6 0/3] Add and test IPsec SA expiry events Akhil Goyal
2022-09-26 17:07 ` [PATCH v6 1/3] ethdev: add IPsec SA expiry event subtypes Akhil Goyal
2022-09-26 17:07 ` [PATCH v6 2/3] test/security: add inline IPsec SA soft expiry cases Akhil Goyal
2022-09-26 17:07 ` [PATCH v6 3/3] test/security: add inline IPsec SA hard " Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 08/10] test/security: add inline IPsec SA soft " Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 09/10] test/security: add inline IPsec SA hard " Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 10/10] test/security: add inline IPsec IPv6 flow label cases Akhil Goyal
2022-04-18 3:44 ` Anoob Joseph
2022-04-18 3:55 ` Akhil Goyal
2022-04-25 12:38 ` [PATCH v4 00/10] app/test: add inline IPsec and reassembly cases Poczatek, Jakub
2022-04-27 15:10 ` [PATCH v5 0/7] " Akhil Goyal
2022-04-27 15:10 ` [PATCH v5 1/7] app/test: add unit cases for inline IPsec offload Akhil Goyal
2022-04-27 15:44 ` Zhang, Roy Fan
2022-04-27 15:10 ` [PATCH v5 2/7] test/security: add inline inbound IPsec cases Akhil Goyal
2022-04-27 15:44 ` Zhang, Roy Fan
2022-04-27 15:10 ` [PATCH v5 3/7] test/security: add combined mode inline " Akhil Goyal
2022-04-27 15:45 ` Zhang, Roy Fan
2022-04-27 15:10 ` [PATCH v5 4/7] test/security: add inline IPsec reassembly cases Akhil Goyal
2022-04-27 15:45 ` Zhang, Roy Fan
2022-04-27 15:10 ` [PATCH v5 5/7] test/security: add more inline IPsec functional cases Akhil Goyal
2022-04-27 15:46 ` Zhang, Roy Fan
2022-04-27 15:10 ` [PATCH v5 6/7] test/security: add ESN and anti-replay cases for inline Akhil Goyal
2022-04-27 15:46 ` Zhang, Roy Fan
2022-04-28 5:25 ` Anoob Joseph
2022-04-27 15:10 ` [PATCH v5 7/7] test/security: add inline IPsec IPv6 flow label cases Akhil Goyal
2022-04-27 15:46 ` Zhang, Roy Fan
2022-04-27 15:42 ` [PATCH v5 0/7] app/test: add inline IPsec and reassembly cases Zhang, Roy Fan
2022-05-13 7:31 ` [PATCH v6 " Akhil Goyal
2022-05-13 7:31 ` [PATCH v6 1/7] app/test: add unit cases for inline IPsec offload Akhil Goyal
2022-05-13 7:31 ` [PATCH v6 2/7] test/security: add inline inbound IPsec cases Akhil Goyal
2022-05-13 7:31 ` [PATCH v6 3/7] test/security: add combined mode inline " Akhil Goyal
2022-05-13 7:31 ` [PATCH v6 4/7] test/security: add inline IPsec reassembly cases Akhil Goyal
2022-05-13 7:31 ` [PATCH v6 5/7] test/security: add more inline IPsec functional cases Akhil Goyal
2022-05-13 7:32 ` [PATCH v6 6/7] test/security: add ESN and anti-replay cases for inline Akhil Goyal
2022-05-13 7:32 ` [PATCH v6 7/7] test/security: add inline IPsec IPv6 flow label cases Akhil Goyal
2022-05-24 7:22 ` [PATCH v7 0/7] app/test: add inline IPsec and reassembly cases Akhil Goyal
2022-05-24 7:22 ` [PATCH v7 1/7] app/test: add unit cases for inline IPsec offload Akhil Goyal
2022-05-24 7:22 ` [PATCH v7 2/7] test/security: add inline inbound IPsec cases Akhil Goyal
2022-05-24 7:22 ` Akhil Goyal [this message]
2022-05-24 7:22 ` [PATCH v7 4/7] test/security: add inline IPsec reassembly cases Akhil Goyal
2022-05-24 7:22 ` [PATCH v7 5/7] test/security: add more inline IPsec functional cases Akhil Goyal
2022-05-24 7:22 ` [PATCH v7 6/7] test/security: add ESN and anti-replay cases for inline Akhil Goyal
2022-05-24 7:22 ` [PATCH v7 7/7] test/security: add inline IPsec IPv6 flow label cases Akhil Goyal
2022-05-24 8:05 ` [PATCH v7 0/7] app/test: add inline IPsec and reassembly cases Anoob Joseph
2022-05-24 9:38 ` Akhil Goyal
2022-01-03 15:08 ` [PATCH 6/8] app/test: add IP reassembly case with no frags Akhil Goyal
2022-01-03 15:08 ` [PATCH 7/8] app/test: add IP reassembly cases with multiple fragments Akhil Goyal
2022-01-03 15:08 ` [PATCH 8/8] app/test: add IP reassembly negative cases Akhil Goyal
2022-01-06 9:51 ` [PATCH 0/8] ethdev: introduce IP reassembly offload David Marchand
2022-01-06 9:54 ` [EXT] " Akhil Goyal
2022-01-20 16:26 ` [PATCH v2 0/4] " Akhil Goyal
2022-01-20 16:26 ` [PATCH v2 1/4] " Akhil Goyal
2022-01-20 16:45 ` Stephen Hemminger
2022-01-20 17:11 ` [EXT] " Akhil Goyal
2022-01-20 16:26 ` [PATCH v2 2/4] ethdev: add dev op to set/get IP reassembly configuration Akhil Goyal
2022-01-22 8:17 ` Andrew Rybchenko
2022-01-30 16:30 ` [EXT] " Akhil Goyal
2022-01-20 16:26 ` [PATCH v2 3/4] ethdev: add mbuf dynfield for incomplete IP reassembly Akhil Goyal
2022-01-20 16:26 ` [PATCH v2 4/4] security: add IPsec option for " Akhil Goyal
2022-01-30 17:59 ` [PATCH v3 0/4] ethdev: introduce IP reassembly offload Akhil Goyal
2022-01-30 17:59 ` [PATCH v3 1/4] " Akhil Goyal
2022-02-01 14:11 ` Ferruh Yigit
2022-02-02 10:57 ` [EXT] " Akhil Goyal
2022-02-02 14:05 ` Ferruh Yigit
2022-01-30 17:59 ` [PATCH v3 2/4] ethdev: add dev op to set/get IP reassembly configuration Akhil Goyal
2022-01-30 17:59 ` [PATCH v3 3/4] ethdev: add mbuf dynfield for incomplete IP reassembly Akhil Goyal
2022-02-01 14:11 ` Ferruh Yigit
2022-02-02 9:13 ` [EXT] " Akhil Goyal
2022-01-30 17:59 ` [PATCH v3 4/4] security: add IPsec option for " Akhil Goyal
2022-02-01 14:12 ` Ferruh Yigit
2022-02-02 9:15 ` [EXT] " Akhil Goyal
2022-02-02 14:04 ` Ferruh Yigit
2022-02-01 14:10 ` [PATCH v3 0/4] ethdev: introduce IP reassembly offload Ferruh Yigit
2022-02-02 9:05 ` [EXT] " Akhil Goyal
2022-02-04 22:13 ` [PATCH v4 0/3] " Akhil Goyal
2022-02-04 22:13 ` [PATCH v4 1/3] " Akhil Goyal
2022-02-04 22:20 ` Akhil Goyal
2022-02-07 13:53 ` Ferruh Yigit
2022-02-07 14:36 ` [EXT] " Akhil Goyal
2022-02-04 22:13 ` [PATCH v4 2/3] ethdev: add mbuf dynfield for incomplete IP reassembly Akhil Goyal
2022-02-07 13:58 ` Ferruh Yigit
2022-02-07 14:20 ` [EXT] " Akhil Goyal
2022-02-07 14:56 ` Ferruh Yigit
2022-02-07 16:20 ` Akhil Goyal
2022-02-07 16:41 ` Ferruh Yigit
2022-02-07 17:17 ` Akhil Goyal
2022-02-07 17:23 ` Stephen Hemminger
2022-02-07 17:28 ` Ferruh Yigit
2022-02-07 18:01 ` Stephen Hemminger
2022-02-07 18:28 ` [EXT] " Akhil Goyal
2022-02-07 19:08 ` Stephen Hemminger
2022-02-07 17:29 ` Akhil Goyal
2022-02-04 22:13 ` [PATCH v4 3/3] security: add IPsec option for " Akhil Goyal
2022-02-08 9:01 ` David Marchand
2022-02-08 9:18 ` [EXT] " Akhil Goyal
2022-02-08 9:27 ` David Marchand
2022-02-08 10:45 ` Akhil Goyal
2022-02-08 13:19 ` Akhil Goyal
2022-02-08 19:55 ` David Marchand
2022-02-08 20:01 ` Akhil Goyal
2022-02-08 20:11 ` [PATCH v5 0/3] ethdev: introduce IP reassembly offload Akhil Goyal
2022-02-08 20:11 ` [PATCH v5 1/3] " Akhil Goyal
2022-02-08 20:11 ` [PATCH v5 2/3] ethdev: add mbuf dynfield for incomplete IP reassembly Akhil Goyal
2022-02-08 20:11 ` [PATCH v5 3/3] security: add IPsec option for " Akhil Goyal
2022-02-08 22:20 ` [PATCH v6 0/3] ethdev: introduce IP reassembly offload Akhil Goyal
2022-02-08 22:20 ` [PATCH v6 1/3] " Akhil Goyal
2022-02-10 8:54 ` Ferruh Yigit
2022-02-10 10:08 ` Andrew Rybchenko
2022-02-10 10:20 ` Ferruh Yigit
2022-02-10 10:30 ` Ferruh Yigit
2022-02-08 22:20 ` [PATCH v6 2/3] ethdev: add mbuf dynfield for incomplete IP reassembly Akhil Goyal
2022-02-10 8:54 ` Ferruh Yigit
2022-02-08 22:20 ` [PATCH v6 3/3] security: add IPsec option for " Akhil Goyal
2022-02-10 8:54 ` [PATCH v6 0/3] ethdev: introduce IP reassembly offload Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220524072216.1283647-4-gakhil@marvell.com \
--to=gakhil@marvell.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=anoobj@marvell.com \
--cc=ciara.power@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=konstantin.ananyev@intel.com \
--cc=ndabilpuram@marvell.com \
--cc=roy.fan.zhang@intel.com \
--cc=thomas@monjalon.net \
--cc=vattunuru@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).