DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gagandeep Singh <g.singh@nxp.com>
To: dev@dpdk.org, akhil.goyal@nxp.com
Cc: thomas@monjalon.net, Gagandeep Singh <g.singh@nxp.com>
Subject: [dpdk-dev] [PATCH] test/crypto: add a check in decryption with digest test case
Date: Thu,  4 Feb 2021 12:52:10 +0800	[thread overview]
Message-ID: <1612414330-18971-1-git-send-email-g.singh@nxp.com> (raw)

Some platforms may not support operations on encrypted digest,
So in this patch adding a check for such test cases.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
 app/test/test_cryptodev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index ae22456..f91debc 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6324,6 +6324,16 @@ static int
 test_snow3g_decryption_with_digest_test_case_1(void)
 {
 	struct snow3g_hash_test_data snow3g_hash_data;
+	struct rte_cryptodev_info dev_info;
+	struct crypto_testsuite_params *ts_params = &testsuite_params;
+
+	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) {
+		printf("Device doesn't support encrypted digest operations.\n");
+		return -ENOTSUP;
+	}
 
 	/*
 	 * Function prepare data for hash veryfication test case.
-- 
2.7.4


             reply	other threads:[~2021-02-04  4:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  4:52 Gagandeep Singh [this message]
2021-02-04 18:10 ` Akhil Goyal

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=1612414330-18971-1-git-send-email-g.singh@nxp.com \
    --to=g.singh@nxp.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).