[dpdk-dev] [PATCH v3 2/5] test/crypto: add combined mode tests

Power, Ciara ciara.power at intel.com
Fri Sep 3 11:42:11 CEST 2021


Hi Anoob, 

>-----Original Message-----
>From: Anoob Joseph <anoobj at marvell.com>
>Sent: Friday 3 September 2021 05:47
>To: Akhil Goyal <gakhil at marvell.com>; Doherty, Declan
><declan.doherty at intel.com>; Zhang, Roy Fan <roy.fan.zhang at intel.com>;
>Ananyev, Konstantin <konstantin.ananyev at intel.com>
>Cc: Anoob Joseph <anoobj at marvell.com>; Jerin Jacob <jerinj at marvell.com>;
>Archana Muniganti <marchana at marvell.com>; Tejasree Kondoj
><ktejasree at marvell.com>; Hemant Agrawal <hemant.agrawal at nxp.com>;
>Nicolau, Radu <radu.nicolau at intel.com>; Power, Ciara
><ciara.power at intel.com>; Gagandeep Singh <g.singh at nxp.com>; dev at dpdk.org
>Subject: [PATCH v3 2/5] test/crypto: add combined mode tests
>
>Add framework to test IPsec features with all supported combinations of ciphers.
>
>Signed-off-by: Anoob Joseph <anoobj at marvell.com>
>Signed-off-by: Tejasree Kondoj <ktejasree at marvell.com>
>---
<snip>

>+static int
>+test_ipsec_proto_all(const struct ipsec_test_flags *flags) {
>+	struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];
>+	struct ipsec_test_data td_inb[IPSEC_TEST_PACKETS_MAX];
>+	unsigned int i, nb_pkts = 1, pass_cnt = 0;
>+	int ret;
>+

Is this testcase actually running multiple testcases under the hood?
I wonder could it be suited to use a sub-testsuite structure to bring the testcase results up to the top level, as done with cryptodev blockcipher tests.
Have you considered this approach?

Thanks,
Ciara

>+	for (i = 0; i < RTE_DIM(aead_list); i++) {
>+		test_ipsec_td_prepare(&aead_list[i],
>+				      NULL,
>+				      flags,
>+				      td_outb,
>+				      nb_pkts);
>+
>+		ret = test_ipsec_proto_process(td_outb, td_inb, nb_pkts, true,
>+					       flags);
>+		if (ret == TEST_SKIPPED)
>+			continue;
>+
>+		if (ret == TEST_FAILED)
>+			return TEST_FAILED;
>+
>+		test_ipsec_td_update(td_inb, td_outb, nb_pkts, flags);
>+
>+		ret = test_ipsec_proto_process(td_inb, NULL, nb_pkts, true,
>+					       flags);
>+		if (ret == TEST_SKIPPED)
>+			continue;
>+
>+		if (ret == TEST_FAILED)
>+			return TEST_FAILED;
>+
>+		if (flags->display_alg)
>+			test_ipsec_display_alg(&aead_list[i], NULL);
>+
>+		pass_cnt++;
>+	}
>+
>+	if (pass_cnt > 0)
>+		return TEST_SUCCESS;
>+	else
>+		return TEST_SKIPPED;
>+}
>+
<snip>


More information about the dev mailing list