DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: dev@dpdk.org
Cc: Ruifeng.Wang@arm.com, declan.doherty@intel.com, asomalap@amd.com,
	anoobj@marvell.com, roy.fan.zhang@intel.com,
	fiona.trahe@intel.com, tdu@semihalf.com,
	rnagadheeraj@marvell.com, adwivedi@marvell.com, G.Singh@nxp.com,
	hemant.agrawal@nxp.com, jianjay.zhou@huawei.com,
	pablo.de.lara.guarch@intel.com, Akhil Goyal <akhil.goyal@nxp.com>,
	Apeksha Gupta <apeksha.gupta@nxp.com>
Subject: [dpdk-dev] [PATCH 4/9] test/crypto: skip unsupported sessionless cases
Date: Tue,  5 May 2020 03:28:06 +0530
Message-ID: <20200504215811.15951-5-akhil.goyal@nxp.com> (raw)
In-Reply-To: <20200504215811.15951-1-akhil.goyal@nxp.com>

There were some PMD specific checks to skip the case if
it is not supported. This patch checks the feature flag
RTE_CRYPTODEV_FF_SYM_SESSIONLESS if PMD supports it or not.

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test_cryptodev.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index c13f8f73f..e3df51985 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -8484,13 +8484,15 @@ test_authenticated_encryption_sessionless(
 	uint8_t *ciphertext, *auth_tag;
 	uint16_t plaintext_pad_len;
 	uint8_t key[tdata->key.len + 1];
+	struct rte_cryptodev_info dev_info;
 
-	/* This test is for AESNI MB and AESNI GCM PMDs only */
-	if ((gbl_driver_id != rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD))) &&
-			(gbl_driver_id != rte_cryptodev_driver_id_get(
-				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD))))
+	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_SYM_SESSIONLESS)) {
+		printf("Device doesn't support Sessionless ops.\n");
 		return -ENOTSUP;
+	}
 
 	/* not supported with CPU crypto */
 	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
@@ -8584,13 +8586,15 @@ test_authenticated_decryption_sessionless(
 	int retval;
 	uint8_t *plaintext;
 	uint8_t key[tdata->key.len + 1];
+	struct rte_cryptodev_info dev_info;
 
-	/* This test is for AESNI MB and AESNI GCM PMDs only */
-	if ((gbl_driver_id != rte_cryptodev_driver_id_get(
-			RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD))) &&
-			(gbl_driver_id != rte_cryptodev_driver_id_get(
-				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD))))
+	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_SYM_SESSIONLESS)) {
+		printf("Device doesn't support Sessionless ops.\n");
 		return -ENOTSUP;
+	}
 
 	/* not supported with CPU crypto */
 	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
-- 
2.17.1


  parent reply	other threads:[~2020-05-04 22:20 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 21:58 [dpdk-dev] [PATCH 0/9] test/crypto: code cleanup Akhil Goyal
2020-05-04 21:58 ` [dpdk-dev] [PATCH 1/9] cryptodev: add feature flag for non-byte aligned data Akhil Goyal
2020-05-05  9:57   ` Trahe, Fiona
2020-05-05 10:12     ` Akhil Goyal
2020-05-05 12:04       ` Trahe, Fiona
2020-05-04 21:58 ` [dpdk-dev] [PATCH 2/9] test/crypto: skip unsupported non-byte aligned cases Akhil Goyal
2020-05-04 21:58 ` [dpdk-dev] [PATCH 3/9] test/crypto: skip unsupported SG cases Akhil Goyal
2020-05-04 21:58 ` Akhil Goyal [this message]
2020-05-04 21:58 ` [dpdk-dev] [PATCH 5/9] test/crypto: skip unsupported session Akhil Goyal
2020-05-04 21:58 ` [dpdk-dev] [PATCH 6/9] test/crypto: run PDCP cases if supported Akhil Goyal
2020-05-04 21:58 ` [dpdk-dev] [PATCH 7/9] test/crypto: remove dpaaX_sec specific testsuites Akhil Goyal
2020-05-04 21:58 ` [dpdk-dev] [PATCH 8/9] test/crypto: remove QAT specific check Akhil Goyal
2020-05-04 21:58 ` [dpdk-dev] [PATCH 9/9] test/crypto: remove unused variable Akhil Goyal
2020-05-05 14:11 ` [dpdk-dev] [PATCH 0/9] test/crypto: code cleanup Dybkowski, AdamX
2020-05-08  8:55 ` Ruifeng Wang
2020-05-09 23:57   ` Akhil Goyal
2020-05-09 23:12 ` [dpdk-dev] [PATCH v2 " Akhil Goyal
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 1/9] cryptodev: add feature flag for non-byte aligned data Akhil Goyal
2020-05-11  9:29     ` Dybkowski, AdamX
2020-05-11 10:10       ` Akhil Goyal
2020-05-11  9:54     ` De Lara Guarch, Pablo
2020-05-11 10:05       ` Akhil Goyal
2020-05-11 14:40         ` De Lara Guarch, Pablo
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 2/9] test/crypto: skip unsupported non-byte aligned cases Akhil Goyal
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 3/9] test/crypto: skip unsupported SG cases Akhil Goyal
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 4/9] test/crypto: skip unsupported sessionless cases Akhil Goyal
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 5/9] test/crypto: skip unsupported session Akhil Goyal
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 6/9] test/crypto: run PDCP cases if supported Akhil Goyal
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 7/9] test/crypto: remove dpaaX_sec specific testsuites Akhil Goyal
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 8/9] test/crypto: remove QAT specific check Akhil Goyal
2020-05-09 23:12   ` [dpdk-dev] [PATCH v2 9/9] test/crypto: remove unused variable Akhil Goyal
2020-05-11  8:39   ` [dpdk-dev] [EXT] [PATCH v2 0/9] test/crypto: code cleanup Anoob Joseph

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=20200504215811.15951-5-akhil.goyal@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=G.Singh@nxp.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=apeksha.gupta@nxp.com \
    --cc=asomalap@amd.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=rnagadheeraj@marvell.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=tdu@semihalf.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git