The test dummy vector data is incorrect for AEAD decryption, so we should
only run when passed a valid test vector file.

Signed-off-by: Emma Finn <emma.f...@intel.com>
---
 app/test-crypto-perf/cperf_options_parsing.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/app/test-crypto-perf/cperf_options_parsing.c 
b/app/test-crypto-perf/cperf_options_parsing.c
index 0e0dc4fd06..12623e4cfe 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -1482,11 +1482,26 @@ cperf_options_check(struct cperf_options *options)
                }
        }
 
-       if (options->test == CPERF_TEST_TYPE_THROUGHPUT &&
+       if ((options->test == CPERF_TEST_TYPE_THROUGHPUT ||
+           options->test == CPERF_TEST_TYPE_LATENCY) &&
            (options->aead_op == RTE_CRYPTO_AEAD_OP_DECRYPT ||
             options->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) &&
            !options->out_of_place) {
-               RTE_LOG(ERR, USER1, "Only out-of-place is allowed in throughput 
decryption.\n");
+               RTE_LOG(ERR, USER1, "Only out-of-place is allowed in throughput 
and"
+                           " latency decryption.\n");
+               return -EINVAL;
+       }
+
+       if ((options->test == CPERF_TEST_TYPE_THROUGHPUT ||
+                options->test == CPERF_TEST_TYPE_LATENCY) &&
+           (options->aead_op == RTE_CRYPTO_AEAD_OP_DECRYPT ||
+            options->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) &&
+                options->test_name == NULL &&
+                options->test_file == NULL) {
+               RTE_LOG(ERR, USER1, "Define path to the file with test"
+                               " vectors.\n");
+               RTE_LOG(ERR, USER1, "Define test name to get the correct digest"
+                               " from the test vectors.\n");
                return -EINVAL;
        }
 
-- 
2.34.1

Reply via email to