From: Akhil Goyal <gakhil@marvell.com>
To: <dev@dpdk.org>
Cc: <anoobj@marvell.com>, <radu.nicolau@intel.com>,
<declan.doherty@intel.com>, <hemant.agrawal@nxp.com>,
<matan@nvidia.com>, <konstantin.ananyev@intel.com>,
<thomas@monjalon.net>, <roy.fan.zhang@intel.com>,
<asomalap@amd.com>, <ruifeng.wang@arm.com>,
<ajit.khaparde@broadcom.com>, <pablo.de.lara.guarch@intel.com>,
<fiona.trahe@intel.com>, <adwivedi@marvell.com>,
<michaelsh@marvell.com>, <rnagadheeraj@marvell.com>,
<jianjay.zhou@huawei.com>, Akhil Goyal <gakhil@marvell.com>
Subject: [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs
Date: Wed, 11 Aug 2021 01:20:19 +0530 [thread overview]
Message-ID: <20210810195020.1423013-4-gakhil@marvell.com> (raw)
In-Reply-To: <20210810195020.1423013-1-gakhil@marvell.com>
Some of the cryptodev APIs are not allowed to be used
by application directly. Hence removing the usage of
1. queue_pair_release: it is not required, as configure
of queue pair release the previous queue pairs and the
dev is not directly exposed to application, hence cannot
use its ops from app.
2. rte_cryptodev_stop: it can be used directly without
checking if the device is started or not.
3. rte_cryptodev_pmd_destroy: application should use
rte_cryptodev_close instead.
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
examples/fips_validation/fips_dev_self_test.c | 19 ++-----------------
examples/fips_validation/main.c | 7 ++-----
2 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/examples/fips_validation/fips_dev_self_test.c b/examples/fips_validation/fips_dev_self_test.c
index 17e85973c0..b4eab05a98 100644
--- a/examples/fips_validation/fips_dev_self_test.c
+++ b/examples/fips_validation/fips_dev_self_test.c
@@ -3,7 +3,7 @@
*/
#include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <rte_malloc.h>
#include "fips_dev_self_test.h"
@@ -1523,12 +1523,6 @@ static void
fips_dev_auto_test_uninit(uint8_t dev_id,
struct fips_dev_auto_test_env *env)
{
- struct rte_cryptodev *dev = rte_cryptodev_pmd_get_dev(dev_id);
- uint32_t i;
-
- if (!dev)
- return;
-
if (env->mbuf)
rte_pktmbuf_free(env->mbuf);
if (env->op)
@@ -1542,16 +1536,7 @@ fips_dev_auto_test_uninit(uint8_t dev_id,
if (env->sess_priv_pool)
rte_mempool_free(env->sess_priv_pool);
- if (dev->data->dev_started)
- rte_cryptodev_stop(dev_id);
-
- if (dev->data->nb_queue_pairs) {
- for (i = 0; i < dev->data->nb_queue_pairs; i++)
- (*dev->dev_ops->queue_pair_release)(dev, i);
- dev->data->nb_queue_pairs = 0;
- rte_free(dev->data->queue_pairs);
- dev->data->queue_pairs = NULL;
- }
+ rte_cryptodev_stop(dev_id);
}
static int
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index e892078f0e..a8daad1f48 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -7,7 +7,7 @@
#include <dirent.h>
#include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_string_fns.h>
@@ -73,10 +73,7 @@ cryptodev_fips_validate_app_int(void)
if (env.self_test) {
ret = fips_dev_self_test(env.dev_id, env.broken_test_config);
if (ret < 0) {
- struct rte_cryptodev *cryptodev =
- rte_cryptodev_pmd_get_dev(env.dev_id);
-
- rte_cryptodev_pmd_destroy(cryptodev);
+ rte_cryptodev_close(env.dev_id);
return ret;
}
--
2.25.1
next prev parent reply other threads:[~2021-08-10 19:51 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 20:02 [dpdk-dev] [PATCH 0/4] cryptodev: expose driver interface as internal Akhil Goyal
2021-08-05 20:02 ` [dpdk-dev] [PATCH 1/4] test/crypto: remove illegal header include Akhil Goyal
2021-08-30 20:16 ` Zhang, Roy Fan
2021-08-05 20:02 ` [dpdk-dev] [PATCH 2/4] cryptodev: change valid dev API Akhil Goyal
2021-08-30 20:16 ` Zhang, Roy Fan
2021-08-05 20:02 ` [dpdk-dev] [PATCH 3/4] examples/fips_validation: remove illegal usage of APIs Akhil Goyal
2021-08-05 20:02 ` [dpdk-dev] [PATCH 4/4] cryptodev: expose driver interface as internal Akhil Goyal
2021-08-10 19:50 ` [dpdk-dev] [PATCH v2 0/4] " Akhil Goyal
2021-08-10 19:50 ` [dpdk-dev] [PATCH v2 1/4] test/crypto: remove illegal header include Akhil Goyal
2021-08-11 6:52 ` Matan Azrad
2021-08-10 19:50 ` [dpdk-dev] [PATCH v2 2/4] cryptodev: change valid dev API Akhil Goyal
2021-08-11 6:54 ` Matan Azrad
2021-08-11 8:12 ` Akhil Goyal
2021-08-10 19:50 ` Akhil Goyal [this message]
2021-08-11 6:56 ` [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs Matan Azrad
2021-08-11 8:19 ` Akhil Goyal
2021-08-30 20:27 ` Zhang, Roy Fan
2021-08-31 7:03 ` Akhil Goyal
2021-08-31 8:38 ` Zhang, Roy Fan
2021-08-10 19:50 ` [dpdk-dev] [PATCH v2 4/4] cryptodev: expose driver interface as internal Akhil Goyal
2021-08-11 7:00 ` Matan Azrad
2021-08-11 8:20 ` Akhil Goyal
2021-08-30 20:30 ` Zhang, Roy Fan
2021-09-07 19:00 ` [dpdk-dev] [PATCH v3 0/4] " Akhil Goyal
2021-09-07 19:00 ` [dpdk-dev] [PATCH v3 1/4] test/crypto: remove illegal header include Akhil Goyal
2021-09-07 19:00 ` [dpdk-dev] [PATCH v3 2/4] cryptodev: change valid dev API Akhil Goyal
2021-09-07 19:00 ` [dpdk-dev] [PATCH v3 3/4] examples/fips_validation: remove illegal usage of APIs Akhil Goyal
2021-09-07 19:00 ` [dpdk-dev] [PATCH v3 4/4] cryptodev: expose driver interface as internal Akhil Goyal
2021-09-07 19:22 ` [dpdk-dev] [PATCH v4 0/4] " Akhil Goyal
2021-09-07 19:22 ` [dpdk-dev] [PATCH v4 1/4] test/crypto: remove illegal header include Akhil Goyal
2021-09-08 6:38 ` Hemant Agrawal
2021-09-08 8:05 ` [dpdk-dev] [EXT] " Akhil Goyal
2021-09-07 19:22 ` [dpdk-dev] [PATCH v4 2/4] cryptodev: change valid dev API Akhil Goyal
2021-09-08 15:16 ` Akhil Goyal
2021-09-07 19:22 ` [dpdk-dev] [PATCH v4 3/4] examples/fips_validation: remove illegal usage of APIs Akhil Goyal
2021-09-07 19:22 ` [dpdk-dev] [PATCH v4 4/4] cryptodev: expose driver interface as internal 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=20210810195020.1423013-4-gakhil@marvell.com \
--to=gakhil@marvell.com \
--cc=adwivedi@marvell.com \
--cc=ajit.khaparde@broadcom.com \
--cc=anoobj@marvell.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=konstantin.ananyev@intel.com \
--cc=matan@nvidia.com \
--cc=michaelsh@marvell.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=radu.nicolau@intel.com \
--cc=rnagadheeraj@marvell.com \
--cc=roy.fan.zhang@intel.com \
--cc=ruifeng.wang@arm.com \
--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).