From 55be2162392e63d0df7fd2979e9023b2a4843940 Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Thu, 16 Apr 2020 10:25:31 +0100 Subject: [PATCH] test/crypto: check out-of-place support Before running any out-of-place test cases, check if device supports this mode. Signed-off-by: Pablo de Lara Acked-by: Adam Dybkowski Tested-by: Ruifeng Wang Acked-by: Fiona Trahe Acked-by: Akhil Goyal --- app/test/test_cryptodev_blockcipher.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c index 43f9d17daa..0c24d70cb9 100644 --- a/app/test/test_cryptodev_blockcipher.c +++ b/app/test/test_cryptodev_blockcipher.c @@ -168,6 +168,20 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, nb_segs = 3; } + if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_OOP) { + uint64_t oop_flags = RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT | + RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT | + RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT | + RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT; + if (!(feat_flags & oop_flags)) { + printf("Device doesn't support out-of-place operations." + "Test Skipped.\n"); + snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, + "SKIPPED"); + return 0; + } + } + if (tdata->cipher_key.len) memcpy(cipher_key, tdata->cipher_key.data, tdata->cipher_key.len); -- 2.20.1