diff mbox series

[2/3] test/crypto: check if device supports sessionless

Message ID 1586887459-222433-3-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers show
Series Crypto test refactoring (second phase) | expand

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/checkpatch success coding style OK

Commit Message

De Lara Guarch, Pablo April 14, 2020, 6:04 p.m. UTC
Before running any sessionless test cases,
check if device supports this mode.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev_blockcipher.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Dybkowski, AdamX April 15, 2020, 10:38 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Pablo de Lara
> Sent: Tuesday, 14 April, 2020 20:04
> To: Doherty, Declan <declan.doherty@intel.com>; ravi1.kumar@amd.com;
> ruifeng.wang@arm.com; anoobj@marvell.com; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> tdu@semihalf.com; rnagadheeraj@marvell.com; adwivedi@marvell.com;
> g.singh@nxp.com; hemant.agrawal@nxp.com; jianjay.zhou@huawei.com
> Cc: dev@dpdk.org; akhil.goyal@nxp.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH 2/3] test/crypto: check if device supports
> sessionless
> 
> Before running any sessionless test cases, check if device supports this mode.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
diff mbox series

Patch

diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 3fb1274..d730291 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -129,9 +129,16 @@  test_blockcipher_one_case(const struct blockcipher_test_case *t,
 	uint32_t nb_iterates = 0;
 
 	rte_cryptodev_info_get(dev_id, &dev_info);
+	uint64_t feat_flags = dev_info.feature_flags;
 
+	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SESSIONLESS) {
+		if (!(feat_flags & RTE_CRYPTODEV_FF_SYM_SESSIONLESS)) {
+			printf("Device doesn't support sesionless operations "
+				"Test Skipped.\n");
+			return 0;
+		}
+	}
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
-		uint64_t feat_flags = dev_info.feature_flags;
 		uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT;
 
 		if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {