From: Pablo de Lara Date: Thu, 16 Apr 2020 09:25:31 +0000 (+0100) Subject: test/crypto: check out-of-place support X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=55be2162392e63d0df7fd2979e9023b2a4843940;p=dpdk.git 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 --- 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);