DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ji, Kai" <kai.ji@intel.com>
To: "Finn, Emma" <emma.finn@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "gakhil@marvell.com" <gakhil@marvell.com>
Subject: Re: [v2] app/crypto-perf: Only run AEAD decrypt with valid test vector file.
Date: Tue, 29 Jul 2025 16:14:40 +0000	[thread overview]
Message-ID: <DS0PR11MB7458D995BD8E75CFDA7B95B88125A@DS0PR11MB7458.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20250729095045.1293981-1-emma.finn@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2347 bytes --]

Acked-by: Kai Ji <kai.ji@intel.com>

________________________________
From: Finn, Emma <emma.finn@intel.com>
Sent: Tuesday, July 29, 2025 10:50
To: Ji, Kai <kai.ji@intel.com>
Cc: dev@dpdk.org <dev@dpdk.org>; gakhil@marvell.com <gakhil@marvell.com>; Finn, Emma <emma.finn@intel.com>
Subject: [v2] app/crypto-perf: Only run AEAD decrypt with valid test vector file.

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.finn@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


[-- Attachment #2: Type: text/html, Size: 5313 bytes --]

      reply	other threads:[~2025-07-29 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28  8:06 [PATCH] " Emma Finn
2025-07-29  9:50 ` [v2] " Emma Finn
2025-07-29 16:14   ` Ji, Kai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DS0PR11MB7458D995BD8E75CFDA7B95B88125A@DS0PR11MB7458.namprd11.prod.outlook.com \
    --to=kai.ji@intel.com \
    --cc=dev@dpdk.org \
    --cc=emma.finn@intel.com \
    --cc=gakhil@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).