[dpdk-dev] [PATCH v4 1/5] test/crypto: add lookaside IPsec tests

Anoob Joseph anoobj at marvell.com
Thu Sep 23 13:08:33 CEST 2021


Hi Ciara,

Please see inline.

Thanks,
Anoob

> -----Original Message-----
> From: Power, Ciara <ciara.power at intel.com>
> Sent: Thursday, September 23, 2021 4:09 PM
> To: Anoob Joseph <anoobj at marvell.com>; 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: Jerin Jacob Kollanukkaran <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>; Gagandeep Singh <g.singh at nxp.com>;
> dev at dpdk.org
> Subject: [EXT] RE: [PATCH v4 1/5] test/crypto: add lookaside IPsec tests
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hi Anoob,
> 
> One comment inline.
> 
> Thanks,
> Ciara
> 
> >-----Original Message-----
> >From: Anoob Joseph <anoobj at marvell.com>
> >Sent: Friday 17 September 2021 14:15
> >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 v4 1/5] test/crypto: add lookaside IPsec tests
> >
> >Added test case for lookaside IPsec. Inbound known vector tests are added.
> >
> >Cipher list: AES-GCM 128, 192 & 256
> >
> >Signed-off-by: Anoob Joseph <anoobj at marvell.com>
> >Signed-off-by: Tejasree Kondoj <ktejasree at marvell.com>
> >
> >---
> > app/test/meson.build                               |   1 +
> > app/test/test.h                                    |   6 +
> > app/test/test_cryptodev.c                          | 232 +++++++++++++++
> > app/test/test_cryptodev_security_ipsec.c           | 212 ++++++++++++++
> > app/test/test_cryptodev_security_ipsec.h           |  66 +++++
> > .../test_cryptodev_security_ipsec_test_vectors.h   | 321
> >+++++++++++++++++++++
> <snip>
> 
> > #ifdef RTE_LIB_SECURITY
> > static int
> >+ipsec_proto_testsuite_setup(void)
> >+{
> >+	struct crypto_testsuite_params *ts_params = &testsuite_params;
> >+	struct crypto_unittest_params *ut_params = &unittest_params;
> >+	struct rte_cryptodev_info dev_info;
> >+	int ret = 0;
> >+
> >+	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
> >+
> >+	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SECURITY)) {
> >+		RTE_LOG(INFO, USER1, "Feature flag requirements for IPsec
> >Proto "
> >+				"testsuite not met\n");
> >+		return TEST_SKIPPED;
> >+	}
> >+
> >+	/* Reconfigure to enable security */
> >+	dev_configure_and_start(RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO
> >|
> >+				RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO);
> >+
> >+	/* Set action type */
> >+	ut_params->type =
> >RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL;
> >+
> >+	if (security_proto_supported(
> >+
> >	RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
> >+			RTE_SECURITY_PROTOCOL_IPSEC) < 0) {
> >+		RTE_LOG(INFO, USER1, "Capability requirements for IPsec
> >Proto "
> >+				"test not met\n");
> >+		ret = TEST_SKIPPED;
> 
> The device still needs to be stopped here I believe if capabilities not met.

[Anoob] Here we are just setting return value. Function returns below only (after stopping device). 
 
> 
> >+	}
> >+
> >+	/* Stop the device */
> >+	rte_cryptodev_stop(ts_params->valid_devs[0]);
> >+
> >+	return ret;
> >+}
> >+



More information about the dev mailing list