Before running any out-of-place test cases,
check if device supports this mode.

Signed-off-by: Pablo de Lara <pablo.de.lara.gua...@intel.com>
---
 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 43f9d17da..0c24d70cb 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.25.2

Reply via email to