DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] cryptodev: expose driver interface as internal
@ 2021-08-05 20:02 Akhil Goyal
  2021-08-05 20:02 ` [dpdk-dev] [PATCH 1/4] test/crypto: remove illegal header include Akhil Goyal
                   ` (4 more replies)
  0 siblings, 5 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-08-05 20:02 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

rte_cryptodev_pmd.* files are meant to be used for
DPDK internal usage only, but it was used illegally by
applications.
There is one API which can be used by applications to
check if the dev_id has a valid device or not.
This API is exposed and modified as rte_cryptodev_is_valid_dev()
from rte_cryptodev_pmd_is_valid_dev().

Akhil Goyal (4):
  test/crypto: remove illegal header include
  cryptodev: change valid dev API
  examples/fips_validation: remove illegal usage of APIs
  cryptodev: expose driver interface as internal

 app/test/test_cryptodev.c                     |  1 -
 app/test/test_cryptodev_asym.c                |  1 -
 app/test/test_cryptodev_blockcipher.c         |  1 -
 app/test/test_cryptodev_security_pdcp.c       |  1 -
 app/test/test_ipsec.c                         |  1 -
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_session.h      |  2 +-
 drivers/crypto/caam_jr/caam_jr.c              |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               |  2 +-
 drivers/crypto/ccp/ccp_pmd_ops.c              |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |  2 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c      |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    |  2 +-
 drivers/crypto/mlx5/mlx5_crypto.h             |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       |  2 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  2 +-
 drivers/crypto/qat/qat_asym.h                 |  2 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  2 +-
 drivers/crypto/qat/qat_sym.h                  |  2 +-
 drivers/crypto/qat/qat_sym_hw_dp.c            |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  2 +-
 drivers/crypto/qat/qat_sym_session.h          |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 +-
 drivers/crypto/virtio/virtio_rxtx.c           |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_rx.h    |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_tx.h    |  2 +-
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  4 +-
 examples/fips_validation/fips_dev_self_test.c | 19 +------
 examples/fips_validation/main.c               |  9 ++--
 examples/ip_pipeline/cryptodev.c              |  3 +-
 .../{rte_cryptodev_pmd.c => cryptodev_pmd.c}  |  2 +-
 .../{rte_cryptodev_pmd.h => cryptodev_pmd.h}  | 27 +++++-----
 lib/cryptodev/meson.build                     | 18 +++++--
 lib/cryptodev/rte_cryptodev.c                 | 52 +++++++++----------
 lib/cryptodev/rte_cryptodev.h                 | 11 ++++
 lib/cryptodev/version.map                     | 27 ++++++----
 lib/eventdev/rte_event_crypto_adapter.c       |  6 +--
 lib/eventdev/rte_eventdev.c                   |  4 +-
 lib/pipeline/rte_table_action.c               |  4 +-
 71 files changed, 149 insertions(+), 148 deletions(-)
 rename lib/cryptodev/{rte_cryptodev_pmd.c => cryptodev_pmd.c} (99%)
 rename lib/cryptodev/{rte_cryptodev_pmd.h => cryptodev_pmd.h} (97%)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH 1/4] test/crypto: remove illegal header include
  2021-08-05 20:02 [dpdk-dev] [PATCH 0/4] cryptodev: expose driver interface as internal Akhil Goyal
@ 2021-08-05 20:02 ` 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
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-08-05 20:02 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

rte_cryptodev_pmd.h is an interface between
driver and library and it is mentioned in the
file that application cannot use it directly.
Hence, removing the include.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c               | 1 -
 app/test/test_cryptodev_asym.c          | 1 -
 app/test/test_cryptodev_blockcipher.c   | 1 -
 app/test/test_cryptodev_security_pdcp.c | 1 -
 app/test/test_ipsec.c                   | 1 -
 5 files changed, 5 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 9ad0b37473..e8d63b2bc3 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -16,7 +16,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #ifdef RTE_CRYPTO_SCHEDULER
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index afa0e91a45..603b2e4609 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -12,7 +12,6 @@
 #include <rte_pause.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_crypto.h>
 
 #include "test_cryptodev.h"
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 53fd4718af..1c948eb008 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -11,7 +11,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 
 #include "test.h"
 #include "test_cryptodev.h"
diff --git a/app/test/test_cryptodev_security_pdcp.c b/app/test/test_cryptodev_security_pdcp.c
index 30f3eb892c..a7641bab7a 100644
--- a/app/test/test_cryptodev_security_pdcp.c
+++ b/app/test/test_cryptodev_security_pdcp.c
@@ -17,7 +17,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_security.h>
 
 #include <rte_lcore.h>
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index fb90130ae2..c6d6b88d6d 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -15,7 +15,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_lcore.h>
 #include <rte_ipsec.h>
 #include <rte_random.h>
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH 2/4] cryptodev: change valid dev API
  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-05 20:02 ` 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
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-08-05 20:02 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

The API rte_cryptodev_pmd_is_valid_dev, can be used
by the application as well as PMD to check whether
the device is valid or not. Hence, _pmd is removed
from the API.
The applications and drivers which use this API are
also updated.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
 examples/fips_validation/main.c               |  2 +-
 examples/ip_pipeline/cryptodev.c              |  3 +-
 lib/cryptodev/rte_cryptodev.c                 | 50 +++++++++----------
 lib/cryptodev/rte_cryptodev.h                 | 11 ++++
 lib/cryptodev/rte_cryptodev_pmd.h             | 11 ----
 lib/cryptodev/version.map                     |  2 +-
 lib/eventdev/rte_event_crypto_adapter.c       |  4 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/pipeline/rte_table_action.c               |  2 +-
 10 files changed, 44 insertions(+), 45 deletions(-)

diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
index a1a4ca5650..8e278801c5 100644
--- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
+++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
@@ -82,7 +82,7 @@ softnic_cryptodev_create(struct pmd_internals *p,
 
 		dev_id = (uint32_t)status;
 	} else {
-		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
+		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
 			return NULL;
 
 		dev_id = params->dev_id;
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index c175fe6ac2..e892078f0e 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -196,7 +196,7 @@ parse_cryptodev_id_arg(char *arg)
 	}
 
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cryptodev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cryptodev_id)) {
 		RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n",
 				cryptodev_id, arg);
 		return -1;
diff --git a/examples/ip_pipeline/cryptodev.c b/examples/ip_pipeline/cryptodev.c
index b0d9f3d217..9997d97456 100644
--- a/examples/ip_pipeline/cryptodev.c
+++ b/examples/ip_pipeline/cryptodev.c
@@ -6,7 +6,6 @@
 #include <stdio.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #include "cryptodev.h"
@@ -74,7 +73,7 @@ cryptodev_create(const char *name, struct cryptodev_params *params)
 
 		dev_id = (uint32_t)status;
 	} else {
-		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
+		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
 			return NULL;
 
 		dev_id = params->dev_id;
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 447aa9d519..37502b9b3c 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -663,7 +663,7 @@ rte_cryptodev_is_valid_device_data(uint8_t dev_id)
 }
 
 unsigned int
-rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
+rte_cryptodev_is_valid_dev(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev = NULL;
 
@@ -761,7 +761,7 @@ rte_cryptodev_socket_id(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return -1;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -1032,7 +1032,7 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 	struct rte_cryptodev *dev;
 	int diag;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1080,7 +1080,7 @@ rte_cryptodev_start(uint8_t dev_id)
 
 	CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1110,7 +1110,7 @@ rte_cryptodev_stop(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
 	}
@@ -1136,7 +1136,7 @@ rte_cryptodev_close(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	int retval;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -1;
 	}
@@ -1176,7 +1176,7 @@ rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1207,7 +1207,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1283,7 +1283,7 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
 		return NULL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		rte_errno = ENODEV;
 		return NULL;
@@ -1349,7 +1349,7 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
 		return -EINVAL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1418,7 +1418,7 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
 		return NULL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		rte_errno = ENODEV;
 		return NULL;
@@ -1484,7 +1484,7 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
 		return -EINVAL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1542,7 +1542,7 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1565,7 +1565,7 @@ rte_cryptodev_stats_reset(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
 	}
@@ -1581,7 +1581,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return;
 	}
@@ -1608,7 +1608,7 @@ rte_cryptodev_callback_register(uint8_t dev_id,
 	if (!cb_fn)
 		return -EINVAL;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1652,7 +1652,7 @@ rte_cryptodev_callback_unregister(uint8_t dev_id,
 	if (!cb_fn)
 		return -EINVAL;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1720,7 +1720,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1765,7 +1765,7 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1939,7 +1939,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	struct rte_cryptodev *dev;
 	uint8_t driver_id;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_clear(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -2079,7 +2079,7 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	unsigned int priv_sess_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return 0;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -2099,7 +2099,7 @@ rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
 	unsigned int header_size = sizeof(void *) * nb_drivers;
 	unsigned int priv_sess_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return 0;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -2156,7 +2156,7 @@ rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		sym_crypto_fill_status(vec, EINVAL);
 		return 0;
 	}
@@ -2179,7 +2179,7 @@ rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id)
 	int32_t size = sizeof(struct rte_crypto_raw_dp_ctx);
 	int32_t priv_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return -EINVAL;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 425f459143..33aac44446 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1358,6 +1358,17 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id);
 unsigned int
 rte_cryptodev_asym_get_private_session_size(uint8_t dev_id);
 
+/**
+ * Validate if the crypto device index is valid attached crypto device.
+ *
+ * @param	dev_id	Crypto device index.
+ *
+ * @return
+ *   - If the device index is valid (1) or not (0).
+ */
+unsigned int
+rte_cryptodev_is_valid_dev(uint8_t dev_id);
+
 /**
  * Provide driver identifier.
  *
diff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/rte_cryptodev_pmd.h
index 1274436870..dd2a4940a2 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.h
+++ b/lib/cryptodev/rte_cryptodev_pmd.h
@@ -94,17 +94,6 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_named_dev(const char *name);
 
-/**
- * Validate if the crypto device index is valid attached crypto device.
- *
- * @param	dev_id	Crypto device index.
- *
- * @return
- *   - If the device index is valid (1) or not (0).
- */
-unsigned int
-rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id);
-
 /**
  * The pool of rte_cryptodev structures.
  */
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 707a2e32d3..9c1f860211 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -37,6 +37,7 @@ DPDK_22 {
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_get_sec_ctx;
 	rte_cryptodev_info_get;
+	rte_cryptodev_is_valid_dev;
 	rte_cryptodev_name_get;
 	rte_cryptodev_pmd_allocate;
 	rte_cryptodev_pmd_callback_process;
@@ -45,7 +46,6 @@ DPDK_22 {
 	rte_cryptodev_pmd_destroy;
 	rte_cryptodev_pmd_get_dev;
 	rte_cryptodev_pmd_get_named_dev;
-	rte_cryptodev_pmd_is_valid_dev;
 	rte_cryptodev_pmd_parse_input_args;
 	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_queue_pair_count;
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index e1d38d383d..2d38389858 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -781,7 +781,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id,
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
 		return -EINVAL;
 	}
@@ -898,7 +898,7 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id,
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
 		return -EINVAL;
 	}
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 594dd5e759..cb0ed7b620 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -165,7 +165,7 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
 	struct rte_cryptodev *cdev;
 
 	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id))
+	if (!rte_cryptodev_is_valid_dev(cdev_id))
 		return -EINVAL;
 
 	dev = &rte_eventdevs[dev_id];
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index 98f3438774..54721ed96a 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -1732,7 +1732,7 @@ struct sym_crypto_data {
 static int
 sym_crypto_cfg_check(struct rte_table_action_sym_crypto_config *cfg)
 {
-	if (!rte_cryptodev_pmd_is_valid_dev(cfg->cryptodev_id))
+	if (!rte_cryptodev_is_valid_dev(cfg->cryptodev_id))
 		return -EINVAL;
 	if (cfg->mp_create == NULL || cfg->mp_init == NULL)
 		return -EINVAL;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH 3/4] examples/fips_validation: remove illegal usage of APIs
  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-05 20:02 ` [dpdk-dev] [PATCH 2/4] cryptodev: change valid dev API Akhil Goyal
@ 2021-08-05 20:02 ` 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
  4 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-08-05 20:02 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

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


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH 4/4] cryptodev: expose driver interface as internal
  2021-08-05 20:02 [dpdk-dev] [PATCH 0/4] cryptodev: expose driver interface as internal Akhil Goyal
                   ` (2 preceding siblings ...)
  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 ` Akhil Goyal
  2021-08-10 19:50 ` [dpdk-dev] [PATCH v2 0/4] " Akhil Goyal
  4 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-08-05 20:02 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

The rte_cryptodev_pmd.* files are for drivers only and should be
private to DPDK, and not installed for app use.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_session.h      |  2 +-
 drivers/crypto/caam_jr/caam_jr.c              |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               |  2 +-
 drivers/crypto/ccp/ccp_pmd_ops.c              |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |  2 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c      |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    |  2 +-
 drivers/crypto/mlx5/mlx5_crypto.h             |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       |  2 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  2 +-
 drivers/crypto/qat/qat_asym.h                 |  2 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  2 +-
 drivers/crypto/qat/qat_sym.h                  |  2 +-
 drivers/crypto/qat/qat_sym_hw_dp.c            |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  2 +-
 drivers/crypto/qat/qat_sym_session.h          |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 +-
 drivers/crypto/virtio/virtio_rxtx.c           |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_rx.h    |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_tx.h    |  2 +-
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
 .../{rte_cryptodev_pmd.c => cryptodev_pmd.c}  |  2 +-
 .../{rte_cryptodev_pmd.h => cryptodev_pmd.h}  | 16 +++++++++---
 lib/cryptodev/meson.build                     | 18 ++++++++++---
 lib/cryptodev/rte_cryptodev.c                 |  2 +-
 lib/cryptodev/version.map                     | 25 +++++++++++--------
 lib/eventdev/rte_event_crypto_adapter.c       |  2 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/pipeline/rte_table_action.c               |  2 +-
 62 files changed, 101 insertions(+), 76 deletions(-)
 rename lib/cryptodev/{rte_cryptodev_pmd.c => cryptodev_pmd.c} (99%)
 rename lib/cryptodev/{rte_cryptodev_pmd.h => cryptodev_pmd.h} (98%)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 886e2a5aaa..330aad8157 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 18dbc4c18c..edb7275e76 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_gcm_pmd_private.h"
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index a01c826a3c..60963a8208 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index fc7fdfec8e..48a8f91868 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -8,7 +8,7 @@
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_ether.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_mb_pmd_private.h"
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index c642ac350f..36a1a9bb4f 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 01ccfb4b23..1b2749fe62 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "armv8_pmd_private.h"
 
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index aa7fad6d70..d1dd22823e 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "bcmfs_device.h"
 #include "bcmfs_logs.h"
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.h b/drivers/crypto/bcmfs/bcmfs_sym_session.h
index 8240c6fc25..d40595b4bd 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_session.h
+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.h
@@ -8,7 +8,7 @@
 
 #include <stdbool.h>
 #include <rte_crypto.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "bcmfs_sym_defs.h"
 #include "bcmfs_sym_req.h"
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 3fb3fe0f8a..258750afe7 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -9,7 +9,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <rte_bus_vdev.h>
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index f37d35f18f..70daed791e 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -20,7 +20,7 @@
 #include <rte_memory.h>
 #include <rte_spinlock.h>
 #include <rte_string_fns.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "ccp_dev.h"
 #include "ccp_crypto.h"
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 98f964f361..0d615d311c 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_malloc.h>
 
 #include "ccp_pmd_private.h"
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index ab9416942e..a54d81de46 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_bus_vdev.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_pci.h>
 #include <rte_dev.h>
 #include <rte_malloc.h>
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index db7b5aa7c6..012eb0c051 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index 2e1a73939c..d9b53128bc 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_ip.h>
 
 #include "cn10k_cryptodev.h"
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
index d500b7d227..198e9ea5bd 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
@@ -6,7 +6,7 @@
 #define _CN10K_CRYPTODEV_OPS_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 extern struct rte_cryptodev_ops cn10k_cpt_ops;
 
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index 9ff2383d98..b12138c40b 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index 724965be5b..97fbf780fe 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "cn9k_cryptodev.h"
 #include "cn9k_cryptodev_ops.h"
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.h b/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
index 2277f6bcfb..d042d18474 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
@@ -5,7 +5,7 @@
 #ifndef _CN9K_CRYPTODEV_OPS_H_
 #define _CN9K_CRYPTODEV_OPS_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 extern struct rte_cryptodev_ops cn9k_cpt_ops;
 
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 440dbc3adb..55cfe9159c 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_errno.h>
 
 #include "roc_cpt.h"
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1ccead3641..bf69c61916 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -18,7 +18,7 @@
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 #include <rte_dev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_common.h>
 #include <rte_fslmc.h>
 #include <fslmc_vfio.h>
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 19d4684e24..3d53746ef1 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -12,7 +12,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #ifdef RTE_LIB_SECURITY
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 48b7db9e9b..d6f927417a 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 43376c1aa0..f075054807 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "kasumi_pmd_private.h"
 
diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index d49b0001f0..3c256ef275 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -8,7 +8,7 @@
 #include <stdbool.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include <mlx5_common_utils.h>
 #include <mlx5_common_devx.h>
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index ed85bb6547..a72642a772 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index fa36461276..3064b1f136 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -8,7 +8,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
 
 #include "mrvl_pmd_private.h"
diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 2768bdd2e1..f8b7edcd69 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -4,7 +4,7 @@
 
 #include <stdbool.h>
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 
 #include "nitrox_sym.h"
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 179e5ff36d..f9935d52cc 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index d67892a1bb..a8b5a06e7f 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "null_crypto_pmd_private.h"
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 3822c0d779..c294f86d79 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -5,7 +5,7 @@
 #include <rte_bus_pci.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_log.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index eac6796cfb..9b5bde53f8 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -5,7 +5,7 @@
 #include <rte_alarm.h>
 #include <rte_bus_pci.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_errno.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 75fb4f9a3b..85b1f00263 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_mempool.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
index 42100154cd..09ddbb5f34 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
@@ -4,7 +4,7 @@
 
 #include <unistd.h>
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_event_crypto_adapter.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
index 1970187f88..8d135909b3 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
@@ -5,7 +5,7 @@
 #ifndef _OTX2_CRYPTODEV_OPS_H_
 #define _OTX2_CRYPTODEV_OPS_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #define OTX2_CPT_MIN_HEADROOM_REQ	24
 #define OTX2_CPT_MIN_TAILROOM_REQ	8
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 47004337d5..f149366c2a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index ed75877581..52715f86f8 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "openssl_pmd_private.h"
 #include "compat.h"
diff --git a/drivers/crypto/qat/qat_asym.h b/drivers/crypto/qat/qat_asym.h
index 2838aee76f..308b6b2e0b 100644
--- a/drivers/crypto/qat/qat_asym.h
+++ b/drivers/crypto/qat/qat_asym.h
@@ -5,7 +5,7 @@
 #ifndef _QAT_ASYM_H_
 #define _QAT_ASYM_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto_asym.h>
 #include "icp_qat_fw_pke.h"
 #include "qat_common.h"
diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c
index 0c25cce09e..e91bb0d317 100644
--- a/drivers/crypto/qat/qat_asym_pmd.c
+++ b/drivers/crypto/qat/qat_asym_pmd.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2019 Intel Corporation
  */
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "qat_logs.h"
 
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index 20b1b53d36..e3ec7f0de4 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -5,7 +5,7 @@
 #ifndef _QAT_SYM_H_
 #define _QAT_SYM_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_net_crc.h>
 #endif
diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c
index ac9ac05363..36d11e0dc9 100644
--- a/drivers/crypto/qat/qat_sym_hw_dp.c
+++ b/drivers/crypto/qat/qat_sym_hw_dp.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "adf_transport_access_macros.h"
 #include "icp_qat_fw.h"
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 6868e5f001..efda921c05 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_dev.h>
 #include <rte_malloc.h>
 #include <rte_pci.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security_driver.h>
 #endif
diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h
index 33b236e49b..6ebc176729 100644
--- a/drivers/crypto/qat/qat_sym_session.h
+++ b/drivers/crypto/qat/qat_sym_session.h
@@ -5,7 +5,7 @@
 #define _QAT_SYM_SESSION_H_
 
 #include <rte_crypto.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security.h>
 #endif
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 1e0b4df0ca..1e0c4fe464 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -4,7 +4,7 @@
 #include <rte_string_fns.h>
 #include <rte_reorder.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_malloc.h>
 
 #include "rte_cryptodev_scheduler.h"
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 632197833c..560c26af50 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -4,7 +4,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index cb125e8027..465b88ade8 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -7,7 +7,7 @@
 #include <rte_malloc.h>
 #include <rte_dev.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_reorder.h>
 
 #include "scheduler_pmd_private.h"
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 9aab357846..8284ac0b66 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 906a0fe60b..3f46014b7d 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "snow3g_pmd_private.h"
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 4bae74a487..8faa39df4a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -9,7 +9,7 @@
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eal.h>
 
 #include "virtio_cryptodev.h"
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e1cb4ad104..a65524a306 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2018 HUAWEI TECHNOLOGIES CO., LTD.
  */
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "virtqueue.h"
 #include "virtio_cryptodev.h"
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 42b669f188..d4b343a7af 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index dc9dc25ef8..38642d45ab 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "zuc_pmd_private.h"
 
diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
index a543225376..b33cb7e139 100644
--- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
+++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
@@ -6,7 +6,7 @@
 #define _OTX2_EVDEV_CRYPTO_ADPTR_RX_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
 
 #include "cpt_pmd_logs.h"
diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
index ecf7eb9f56..1fc56f903b 100644
--- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
+++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
@@ -6,7 +6,7 @@
 #define _OTX2_EVDEV_CRYPTO_ADPTR_TX_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_eventdev.h>
 
diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
index 8e278801c5..9a7d006f1a 100644
--- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
+++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
@@ -6,7 +6,7 @@
 #include <stdio.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #include "rte_eth_softnic_internals.h"
diff --git a/lib/cryptodev/rte_cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
similarity index 99%
rename from lib/cryptodev/rte_cryptodev_pmd.c
rename to lib/cryptodev/cryptodev_pmd.c
index e342daabc4..71e34140cd 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
-#include "rte_cryptodev_pmd.h"
+#include "cryptodev_pmd.h"
 
 /**
  * Parse name from argument
diff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
similarity index 98%
rename from lib/cryptodev/rte_cryptodev_pmd.h
rename to lib/cryptodev/cryptodev_pmd.h
index dd2a4940a2..ec7bb82be8 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2015-2020 Intel Corporation.
  */
 
-#ifndef _RTE_CRYPTODEV_PMD_H_
-#define _RTE_CRYPTODEV_PMD_H_
+#ifndef _CRYPTODEV_PMD_H_
+#define _CRYPTODEV_PMD_H_
 
 /** @file
  * RTE Crypto PMD APIs
@@ -80,6 +80,7 @@ struct cryptodev_driver {
  * @return
  *   - The rte_cryptodev structure pointer for the given device ID.
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id);
 
@@ -91,6 +92,7 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
  * @return
  *   - The rte_cryptodev structure pointer for the given device ID.
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_named_dev(const char *name);
 
@@ -401,6 +403,7 @@ struct rte_cryptodev_ops {
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_allocate(const char *name, int socket_id);
 
@@ -414,6 +417,7 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id);
  * @return
  *   - 0 on success, negative on error
  */
+__rte_internal
 extern int
 rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
 
@@ -435,6 +439,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
  *  - 0 on success
  *  - errno on failure
  */
+__rte_internal
 int
 rte_cryptodev_pmd_parse_input_args(
 		struct rte_cryptodev_pmd_init_params *params,
@@ -454,6 +459,7 @@ rte_cryptodev_pmd_parse_input_args(
  *  - crypto device instance on success
  *  - NULL on creation failure
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_create(const char *name,
 		struct rte_device *device,
@@ -471,6 +477,7 @@ rte_cryptodev_pmd_create(const char *name,
  *  - 0 on success
  *  - errno on failure
  */
+__rte_internal
 int
 rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
 
@@ -484,6 +491,7 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
  * @return
  *  void
  */
+__rte_internal
 void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
 				enum rte_cryptodev_event_type event);
 
@@ -491,6 +499,7 @@ void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
  * @internal
  * Create unique device name
  */
+__rte_internal
 int
 rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
 
@@ -506,6 +515,7 @@ rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
  * @return
  *  The driver type identifier
  */
+__rte_internal
 uint8_t rte_cryptodev_allocate_driver(struct cryptodev_driver *crypto_drv,
 		const struct rte_driver *drv);
 
@@ -555,4 +565,4 @@ set_asym_session_private_data(struct rte_cryptodev_asym_session *sess,
 }
 #endif
 
-#endif /* _RTE_CRYPTODEV_PMD_H_ */
+#endif /* _CRYPTODEV_PMD_H_ */
diff --git a/lib/cryptodev/meson.build b/lib/cryptodev/meson.build
index bec80beab3..735935df4a 100644
--- a/lib/cryptodev/meson.build
+++ b/lib/cryptodev/meson.build
@@ -1,12 +1,22 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c', 'cryptodev_trace_points.c')
-headers = files('rte_cryptodev.h',
-        'rte_cryptodev_pmd.h',
+sources = files(
+        'cryptodev_pmd.c',
+	'cryptodev_trace_points.c',
+        'rte_cryptodev.c',
+)
+headers = files(
+        'rte_cryptodev.h',
         'rte_cryptodev_trace.h',
         'rte_cryptodev_trace_fp.h',
         'rte_crypto.h',
         'rte_crypto_sym.h',
-        'rte_crypto_asym.h')
+        'rte_crypto_asym.h',
+)
+
+driver_sdk_headers += files(
+        'cryptodev_pmd.h',
+)
+
 deps += ['kvargs', 'mbuf', 'rcu']
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 37502b9b3c..9fa3aff1d3 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -39,7 +39,7 @@
 
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
-#include "rte_cryptodev_pmd.h"
+#include "cryptodev_pmd.h"
 #include "rte_cryptodev_trace.h"
 
 static uint8_t nb_drivers;
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 9c1f860211..2fdf70002d 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -8,7 +8,6 @@ DPDK_22 {
 	rte_crypto_cipher_algorithm_strings;
 	rte_crypto_cipher_operation_strings;
 	rte_crypto_op_pool_create;
-	rte_cryptodev_allocate_driver;
 
 	rte_cryptodev_asym_capability_get;
 	rte_cryptodev_asym_get_header_session_size;
@@ -39,15 +38,6 @@ DPDK_22 {
 	rte_cryptodev_info_get;
 	rte_cryptodev_is_valid_dev;
 	rte_cryptodev_name_get;
-	rte_cryptodev_pmd_allocate;
-	rte_cryptodev_pmd_callback_process;
-	rte_cryptodev_pmd_create;
-	rte_cryptodev_pmd_create_dev_name;
-	rte_cryptodev_pmd_destroy;
-	rte_cryptodev_pmd_get_dev;
-	rte_cryptodev_pmd_get_named_dev;
-	rte_cryptodev_pmd_parse_input_args;
-	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
 	rte_cryptodev_socket_id;
@@ -119,3 +109,18 @@ EXPERIMENTAL {
 	rte_cryptodev_remove_enq_callback;
 
 };
+
+INTERNAL {
+	global:
+
+	rte_cryptodev_allocate_driver;
+	rte_cryptodev_pmd_allocate;
+	rte_cryptodev_pmd_callback_process;
+	rte_cryptodev_pmd_create;
+	rte_cryptodev_pmd_create_dev_name;
+	rte_cryptodev_pmd_destroy;
+	rte_cryptodev_pmd_get_dev;
+	rte_cryptodev_pmd_get_named_dev;
+	rte_cryptodev_pmd_parse_input_args;
+	rte_cryptodev_pmd_release_device;
+};
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 2d38389858..ebfc8326a8 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -9,7 +9,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_service_component.h>
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index cb0ed7b620..e347d6dfd5 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -31,7 +31,7 @@
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_telemetry.h>
 
 #include "rte_eventdev.h"
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index 54721ed96a..ad7904c0ee 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -16,7 +16,7 @@
 #include <rte_udp.h>
 #include <rte_vxlan.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "rte_table_action.h"
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v2 0/4] cryptodev: expose driver interface as internal
  2021-08-05 20:02 [dpdk-dev] [PATCH 0/4] cryptodev: expose driver interface as internal Akhil Goyal
                   ` (3 preceding siblings ...)
  2021-08-05 20:02 ` [dpdk-dev] [PATCH 4/4] cryptodev: expose driver interface as internal Akhil Goyal
@ 2021-08-10 19:50 ` Akhil Goyal
  2021-08-10 19:50   ` [dpdk-dev] [PATCH v2 1/4] test/crypto: remove illegal header include Akhil Goyal
                     ` (4 more replies)
  4 siblings, 5 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-08-10 19:50 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

rte_cryptodev_pmd.* files are meant to be used for
DPDK internal usage only, but it was used illegally by
applications.
There is one API which can be used by applications to
check if the dev_id has a valid device or not.
This API is exposed and modified as rte_cryptodev_is_valid_dev()
from rte_cryptodev_pmd_is_valid_dev().

changes in v2:
rebase over 21.08 release tag.

Akhil Goyal (4):
  test/crypto: remove illegal header include
  cryptodev: change valid dev API
  examples/fips_validation: remove illegal usage of APIs
  cryptodev: expose driver interface as internal

 app/test/test_cryptodev.c                     |  1 -
 app/test/test_cryptodev_asym.c                |  1 -
 app/test/test_cryptodev_blockcipher.c         |  1 -
 app/test/test_cryptodev_security_pdcp.c       |  1 -
 app/test/test_ipsec.c                         |  1 -
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_session.h      |  2 +-
 drivers/crypto/caam_jr/caam_jr.c              |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               |  2 +-
 drivers/crypto/ccp/ccp_pmd_ops.c              |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |  2 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c      |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    |  2 +-
 drivers/crypto/mlx5/mlx5_crypto.h             |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       |  2 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  2 +-
 drivers/crypto/qat/qat_asym.h                 |  2 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  2 +-
 drivers/crypto/qat/qat_sym.h                  |  2 +-
 drivers/crypto/qat/qat_sym_hw_dp.c            |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  2 +-
 drivers/crypto/qat/qat_sym_session.h          |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 +-
 drivers/crypto/virtio/virtio_rxtx.c           |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_rx.h    |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_tx.h    |  2 +-
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  4 +-
 examples/fips_validation/fips_dev_self_test.c | 19 +------
 examples/fips_validation/main.c               |  9 ++--
 examples/ip_pipeline/cryptodev.c              |  3 +-
 .../{rte_cryptodev_pmd.c => cryptodev_pmd.c}  |  2 +-
 .../{rte_cryptodev_pmd.h => cryptodev_pmd.h}  | 27 +++++-----
 lib/cryptodev/meson.build                     | 18 +++++--
 lib/cryptodev/rte_cryptodev.c                 | 52 +++++++++----------
 lib/cryptodev/rte_cryptodev.h                 | 11 ++++
 lib/cryptodev/version.map                     | 27 ++++++----
 lib/eventdev/rte_event_crypto_adapter.c       |  6 +--
 lib/eventdev/rte_eventdev.c                   |  4 +-
 lib/pipeline/rte_table_action.c               |  4 +-
 71 files changed, 149 insertions(+), 148 deletions(-)
 rename lib/cryptodev/{rte_cryptodev_pmd.c => cryptodev_pmd.c} (99%)
 rename lib/cryptodev/{rte_cryptodev_pmd.h => cryptodev_pmd.h} (97%)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v2 1/4] test/crypto: remove illegal header include
  2021-08-10 19:50 ` [dpdk-dev] [PATCH v2 0/4] " Akhil Goyal
@ 2021-08-10 19:50   ` 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
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-08-10 19:50 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

rte_cryptodev_pmd.h is an interface between
driver and library and it is mentioned in the
file that application cannot use it directly.
Hence, removing the include.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c               | 1 -
 app/test/test_cryptodev_asym.c          | 1 -
 app/test/test_cryptodev_blockcipher.c   | 1 -
 app/test/test_cryptodev_security_pdcp.c | 1 -
 app/test/test_ipsec.c                   | 1 -
 5 files changed, 5 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 9ad0b37473..e8d63b2bc3 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -16,7 +16,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #ifdef RTE_CRYPTO_SCHEDULER
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 847b074a4f..9d19a6d6d9 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -12,7 +12,6 @@
 #include <rte_pause.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_crypto.h>
 
 #include "test_cryptodev.h"
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 53fd4718af..1c948eb008 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -11,7 +11,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 
 #include "test.h"
 #include "test_cryptodev.h"
diff --git a/app/test/test_cryptodev_security_pdcp.c b/app/test/test_cryptodev_security_pdcp.c
index 30f3eb892c..a7641bab7a 100644
--- a/app/test/test_cryptodev_security_pdcp.c
+++ b/app/test/test_cryptodev_security_pdcp.c
@@ -17,7 +17,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_security.h>
 
 #include <rte_lcore.h>
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index fb90130ae2..c6d6b88d6d 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -15,7 +15,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_lcore.h>
 #include <rte_ipsec.h>
 #include <rte_random.h>
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v2 2/4] cryptodev: change valid dev API
  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-10 19:50   ` Akhil Goyal
  2021-08-11  6:54     ` Matan Azrad
  2021-08-10 19:50   ` [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs Akhil Goyal
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-08-10 19:50 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

The API rte_cryptodev_pmd_is_valid_dev, can be used
by the application as well as PMD to check whether
the device is valid or not. Hence, _pmd is removed
from the API.
The applications and drivers which use this API are
also updated.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
 examples/fips_validation/main.c               |  2 +-
 examples/ip_pipeline/cryptodev.c              |  3 +-
 lib/cryptodev/rte_cryptodev.c                 | 50 +++++++++----------
 lib/cryptodev/rte_cryptodev.h                 | 11 ++++
 lib/cryptodev/rte_cryptodev_pmd.h             | 11 ----
 lib/cryptodev/version.map                     |  2 +-
 lib/eventdev/rte_event_crypto_adapter.c       |  4 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/pipeline/rte_table_action.c               |  2 +-
 10 files changed, 44 insertions(+), 45 deletions(-)

diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
index a1a4ca5650..8e278801c5 100644
--- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
+++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
@@ -82,7 +82,7 @@ softnic_cryptodev_create(struct pmd_internals *p,
 
 		dev_id = (uint32_t)status;
 	} else {
-		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
+		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
 			return NULL;
 
 		dev_id = params->dev_id;
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index c175fe6ac2..e892078f0e 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -196,7 +196,7 @@ parse_cryptodev_id_arg(char *arg)
 	}
 
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cryptodev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cryptodev_id)) {
 		RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n",
 				cryptodev_id, arg);
 		return -1;
diff --git a/examples/ip_pipeline/cryptodev.c b/examples/ip_pipeline/cryptodev.c
index b0d9f3d217..9997d97456 100644
--- a/examples/ip_pipeline/cryptodev.c
+++ b/examples/ip_pipeline/cryptodev.c
@@ -6,7 +6,6 @@
 #include <stdio.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #include "cryptodev.h"
@@ -74,7 +73,7 @@ cryptodev_create(const char *name, struct cryptodev_params *params)
 
 		dev_id = (uint32_t)status;
 	} else {
-		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
+		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
 			return NULL;
 
 		dev_id = params->dev_id;
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 447aa9d519..37502b9b3c 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -663,7 +663,7 @@ rte_cryptodev_is_valid_device_data(uint8_t dev_id)
 }
 
 unsigned int
-rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
+rte_cryptodev_is_valid_dev(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev = NULL;
 
@@ -761,7 +761,7 @@ rte_cryptodev_socket_id(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return -1;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -1032,7 +1032,7 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 	struct rte_cryptodev *dev;
 	int diag;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1080,7 +1080,7 @@ rte_cryptodev_start(uint8_t dev_id)
 
 	CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1110,7 +1110,7 @@ rte_cryptodev_stop(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
 	}
@@ -1136,7 +1136,7 @@ rte_cryptodev_close(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	int retval;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -1;
 	}
@@ -1176,7 +1176,7 @@ rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1207,7 +1207,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1283,7 +1283,7 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
 		return NULL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		rte_errno = ENODEV;
 		return NULL;
@@ -1349,7 +1349,7 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
 		return -EINVAL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1418,7 +1418,7 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
 		return NULL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		rte_errno = ENODEV;
 		return NULL;
@@ -1484,7 +1484,7 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
 		return -EINVAL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1542,7 +1542,7 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1565,7 +1565,7 @@ rte_cryptodev_stats_reset(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
 	}
@@ -1581,7 +1581,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return;
 	}
@@ -1608,7 +1608,7 @@ rte_cryptodev_callback_register(uint8_t dev_id,
 	if (!cb_fn)
 		return -EINVAL;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1652,7 +1652,7 @@ rte_cryptodev_callback_unregister(uint8_t dev_id,
 	if (!cb_fn)
 		return -EINVAL;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1720,7 +1720,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1765,7 +1765,7 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1939,7 +1939,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	struct rte_cryptodev *dev;
 	uint8_t driver_id;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_clear(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -2079,7 +2079,7 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	unsigned int priv_sess_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return 0;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -2099,7 +2099,7 @@ rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
 	unsigned int header_size = sizeof(void *) * nb_drivers;
 	unsigned int priv_sess_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return 0;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -2156,7 +2156,7 @@ rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		sym_crypto_fill_status(vec, EINVAL);
 		return 0;
 	}
@@ -2179,7 +2179,7 @@ rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id)
 	int32_t size = sizeof(struct rte_crypto_raw_dp_ctx);
 	int32_t priv_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return -EINVAL;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 11f4e6fdbf..bb01f0f195 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1368,6 +1368,17 @@ __rte_experimental
 unsigned int
 rte_cryptodev_asym_get_private_session_size(uint8_t dev_id);
 
+/**
+ * Validate if the crypto device index is valid attached crypto device.
+ *
+ * @param	dev_id	Crypto device index.
+ *
+ * @return
+ *   - If the device index is valid (1) or not (0).
+ */
+unsigned int
+rte_cryptodev_is_valid_dev(uint8_t dev_id);
+
 /**
  * Provide driver identifier.
  *
diff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/rte_cryptodev_pmd.h
index 1274436870..dd2a4940a2 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.h
+++ b/lib/cryptodev/rte_cryptodev_pmd.h
@@ -94,17 +94,6 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_named_dev(const char *name);
 
-/**
- * Validate if the crypto device index is valid attached crypto device.
- *
- * @param	dev_id	Crypto device index.
- *
- * @return
- *   - If the device index is valid (1) or not (0).
- */
-unsigned int
-rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id);
-
 /**
  * The pool of rte_cryptodev structures.
  */
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 9f04737aed..593199bba6 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -25,6 +25,7 @@ DPDK_21 {
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_get_sec_ctx;
 	rte_cryptodev_info_get;
+	rte_cryptodev_is_valid_dev;
 	rte_cryptodev_name_get;
 	rte_cryptodev_pmd_allocate;
 	rte_cryptodev_pmd_callback_process;
@@ -33,7 +34,6 @@ DPDK_21 {
 	rte_cryptodev_pmd_destroy;
 	rte_cryptodev_pmd_get_dev;
 	rte_cryptodev_pmd_get_named_dev;
-	rte_cryptodev_pmd_is_valid_dev;
 	rte_cryptodev_pmd_parse_input_args;
 	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_queue_pair_count;
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index e1d38d383d..2d38389858 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -781,7 +781,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id,
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
 		return -EINVAL;
 	}
@@ -898,7 +898,7 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id,
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
 		return -EINVAL;
 	}
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 594dd5e759..cb0ed7b620 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -165,7 +165,7 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
 	struct rte_cryptodev *cdev;
 
 	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id))
+	if (!rte_cryptodev_is_valid_dev(cdev_id))
 		return -EINVAL;
 
 	dev = &rte_eventdevs[dev_id];
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index 98f3438774..54721ed96a 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -1732,7 +1732,7 @@ struct sym_crypto_data {
 static int
 sym_crypto_cfg_check(struct rte_table_action_sym_crypto_config *cfg)
 {
-	if (!rte_cryptodev_pmd_is_valid_dev(cfg->cryptodev_id))
+	if (!rte_cryptodev_is_valid_dev(cfg->cryptodev_id))
 		return -EINVAL;
 	if (cfg->mp_create == NULL || cfg->mp_init == NULL)
 		return -EINVAL;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs
  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-10 19:50   ` [dpdk-dev] [PATCH v2 2/4] cryptodev: change valid dev API Akhil Goyal
@ 2021-08-10 19:50   ` Akhil Goyal
  2021-08-11  6:56     ` Matan Azrad
  2021-08-10 19:50   ` [dpdk-dev] [PATCH v2 4/4] cryptodev: expose driver interface as internal Akhil Goyal
  2021-09-07 19:00   ` [dpdk-dev] [PATCH v3 0/4] " Akhil Goyal
  4 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-08-10 19:50 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

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


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v2 4/4] cryptodev: expose driver interface as internal
  2021-08-10 19:50 ` [dpdk-dev] [PATCH v2 0/4] " Akhil Goyal
                     ` (2 preceding siblings ...)
  2021-08-10 19:50   ` [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs Akhil Goyal
@ 2021-08-10 19:50   ` Akhil Goyal
  2021-08-11  7:00     ` Matan Azrad
  2021-08-30 20:30     ` Zhang, Roy Fan
  2021-09-07 19:00   ` [dpdk-dev] [PATCH v3 0/4] " Akhil Goyal
  4 siblings, 2 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-08-10 19:50 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

The rte_cryptodev_pmd.* files are for drivers only and should be
private to DPDK, and not installed for app use.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_session.h      |  2 +-
 drivers/crypto/caam_jr/caam_jr.c              |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               |  2 +-
 drivers/crypto/ccp/ccp_pmd_ops.c              |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |  2 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c      |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    |  2 +-
 drivers/crypto/mlx5/mlx5_crypto.h             |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       |  2 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  2 +-
 drivers/crypto/qat/qat_asym.h                 |  2 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  2 +-
 drivers/crypto/qat/qat_sym.h                  |  2 +-
 drivers/crypto/qat/qat_sym_hw_dp.c            |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  2 +-
 drivers/crypto/qat/qat_sym_session.h          |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 +-
 drivers/crypto/virtio/virtio_rxtx.c           |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_rx.h    |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_tx.h    |  2 +-
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
 .../{rte_cryptodev_pmd.c => cryptodev_pmd.c}  |  2 +-
 .../{rte_cryptodev_pmd.h => cryptodev_pmd.h}  | 16 +++++++++---
 lib/cryptodev/meson.build                     | 18 ++++++++++---
 lib/cryptodev/rte_cryptodev.c                 |  2 +-
 lib/cryptodev/version.map                     | 25 +++++++++++--------
 lib/eventdev/rte_event_crypto_adapter.c       |  2 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/pipeline/rte_table_action.c               |  2 +-
 62 files changed, 101 insertions(+), 76 deletions(-)
 rename lib/cryptodev/{rte_cryptodev_pmd.c => cryptodev_pmd.c} (99%)
 rename lib/cryptodev/{rte_cryptodev_pmd.h => cryptodev_pmd.h} (98%)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 886e2a5aaa..330aad8157 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 18dbc4c18c..edb7275e76 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_gcm_pmd_private.h"
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index a01c826a3c..60963a8208 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index fc7fdfec8e..48a8f91868 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -8,7 +8,7 @@
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_ether.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_mb_pmd_private.h"
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index c642ac350f..36a1a9bb4f 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 01ccfb4b23..1b2749fe62 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "armv8_pmd_private.h"
 
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index aa7fad6d70..d1dd22823e 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "bcmfs_device.h"
 #include "bcmfs_logs.h"
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.h b/drivers/crypto/bcmfs/bcmfs_sym_session.h
index 8240c6fc25..d40595b4bd 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_session.h
+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.h
@@ -8,7 +8,7 @@
 
 #include <stdbool.h>
 #include <rte_crypto.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "bcmfs_sym_defs.h"
 #include "bcmfs_sym_req.h"
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 3fb3fe0f8a..258750afe7 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -9,7 +9,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <rte_bus_vdev.h>
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index f37d35f18f..70daed791e 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -20,7 +20,7 @@
 #include <rte_memory.h>
 #include <rte_spinlock.h>
 #include <rte_string_fns.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "ccp_dev.h"
 #include "ccp_crypto.h"
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 98f964f361..0d615d311c 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_malloc.h>
 
 #include "ccp_pmd_private.h"
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index ab9416942e..a54d81de46 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_bus_vdev.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_pci.h>
 #include <rte_dev.h>
 #include <rte_malloc.h>
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index db7b5aa7c6..012eb0c051 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index 2e1a73939c..d9b53128bc 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_ip.h>
 
 #include "cn10k_cryptodev.h"
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
index d500b7d227..198e9ea5bd 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
@@ -6,7 +6,7 @@
 #define _CN10K_CRYPTODEV_OPS_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 extern struct rte_cryptodev_ops cn10k_cpt_ops;
 
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index 9ff2383d98..b12138c40b 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index 724965be5b..97fbf780fe 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "cn9k_cryptodev.h"
 #include "cn9k_cryptodev_ops.h"
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.h b/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
index 2277f6bcfb..d042d18474 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
@@ -5,7 +5,7 @@
 #ifndef _CN9K_CRYPTODEV_OPS_H_
 #define _CN9K_CRYPTODEV_OPS_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 extern struct rte_cryptodev_ops cn9k_cpt_ops;
 
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 440dbc3adb..55cfe9159c 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_errno.h>
 
 #include "roc_cpt.h"
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1ccead3641..bf69c61916 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -18,7 +18,7 @@
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 #include <rte_dev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_common.h>
 #include <rte_fslmc.h>
 #include <fslmc_vfio.h>
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 19d4684e24..3d53746ef1 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -12,7 +12,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #ifdef RTE_LIB_SECURITY
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 48b7db9e9b..d6f927417a 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 43376c1aa0..f075054807 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "kasumi_pmd_private.h"
 
diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index d49b0001f0..3c256ef275 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -8,7 +8,7 @@
 #include <stdbool.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include <mlx5_common_utils.h>
 #include <mlx5_common_devx.h>
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index ed85bb6547..a72642a772 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index fa36461276..3064b1f136 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -8,7 +8,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
 
 #include "mrvl_pmd_private.h"
diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 2768bdd2e1..f8b7edcd69 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -4,7 +4,7 @@
 
 #include <stdbool.h>
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 
 #include "nitrox_sym.h"
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 179e5ff36d..f9935d52cc 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index d67892a1bb..a8b5a06e7f 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "null_crypto_pmd_private.h"
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 3822c0d779..c294f86d79 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -5,7 +5,7 @@
 #include <rte_bus_pci.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_log.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index eac6796cfb..9b5bde53f8 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -5,7 +5,7 @@
 #include <rte_alarm.h>
 #include <rte_bus_pci.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_errno.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 75fb4f9a3b..85b1f00263 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_mempool.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
index 42100154cd..09ddbb5f34 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
@@ -4,7 +4,7 @@
 
 #include <unistd.h>
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_event_crypto_adapter.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
index 1970187f88..8d135909b3 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
@@ -5,7 +5,7 @@
 #ifndef _OTX2_CRYPTODEV_OPS_H_
 #define _OTX2_CRYPTODEV_OPS_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #define OTX2_CPT_MIN_HEADROOM_REQ	24
 #define OTX2_CPT_MIN_TAILROOM_REQ	8
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 47004337d5..f149366c2a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index ed75877581..52715f86f8 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "openssl_pmd_private.h"
 #include "compat.h"
diff --git a/drivers/crypto/qat/qat_asym.h b/drivers/crypto/qat/qat_asym.h
index 2838aee76f..308b6b2e0b 100644
--- a/drivers/crypto/qat/qat_asym.h
+++ b/drivers/crypto/qat/qat_asym.h
@@ -5,7 +5,7 @@
 #ifndef _QAT_ASYM_H_
 #define _QAT_ASYM_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto_asym.h>
 #include "icp_qat_fw_pke.h"
 #include "qat_common.h"
diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c
index 0c25cce09e..e91bb0d317 100644
--- a/drivers/crypto/qat/qat_asym_pmd.c
+++ b/drivers/crypto/qat/qat_asym_pmd.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2019 Intel Corporation
  */
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "qat_logs.h"
 
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index 20b1b53d36..e3ec7f0de4 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -5,7 +5,7 @@
 #ifndef _QAT_SYM_H_
 #define _QAT_SYM_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_net_crc.h>
 #endif
diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c
index ac9ac05363..36d11e0dc9 100644
--- a/drivers/crypto/qat/qat_sym_hw_dp.c
+++ b/drivers/crypto/qat/qat_sym_hw_dp.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "adf_transport_access_macros.h"
 #include "icp_qat_fw.h"
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 6868e5f001..efda921c05 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_dev.h>
 #include <rte_malloc.h>
 #include <rte_pci.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security_driver.h>
 #endif
diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h
index 33b236e49b..6ebc176729 100644
--- a/drivers/crypto/qat/qat_sym_session.h
+++ b/drivers/crypto/qat/qat_sym_session.h
@@ -5,7 +5,7 @@
 #define _QAT_SYM_SESSION_H_
 
 #include <rte_crypto.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security.h>
 #endif
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 1e0b4df0ca..1e0c4fe464 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -4,7 +4,7 @@
 #include <rte_string_fns.h>
 #include <rte_reorder.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_malloc.h>
 
 #include "rte_cryptodev_scheduler.h"
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 632197833c..560c26af50 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -4,7 +4,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index cb125e8027..465b88ade8 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -7,7 +7,7 @@
 #include <rte_malloc.h>
 #include <rte_dev.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_reorder.h>
 
 #include "scheduler_pmd_private.h"
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 9aab357846..8284ac0b66 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 906a0fe60b..3f46014b7d 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "snow3g_pmd_private.h"
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 4bae74a487..8faa39df4a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -9,7 +9,7 @@
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eal.h>
 
 #include "virtio_cryptodev.h"
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e1cb4ad104..a65524a306 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2018 HUAWEI TECHNOLOGIES CO., LTD.
  */
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "virtqueue.h"
 #include "virtio_cryptodev.h"
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 42b669f188..d4b343a7af 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index dc9dc25ef8..38642d45ab 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "zuc_pmd_private.h"
 
diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
index a543225376..b33cb7e139 100644
--- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
+++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
@@ -6,7 +6,7 @@
 #define _OTX2_EVDEV_CRYPTO_ADPTR_RX_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
 
 #include "cpt_pmd_logs.h"
diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
index ecf7eb9f56..1fc56f903b 100644
--- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
+++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
@@ -6,7 +6,7 @@
 #define _OTX2_EVDEV_CRYPTO_ADPTR_TX_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_eventdev.h>
 
diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
index 8e278801c5..9a7d006f1a 100644
--- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
+++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
@@ -6,7 +6,7 @@
 #include <stdio.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #include "rte_eth_softnic_internals.h"
diff --git a/lib/cryptodev/rte_cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
similarity index 99%
rename from lib/cryptodev/rte_cryptodev_pmd.c
rename to lib/cryptodev/cryptodev_pmd.c
index e342daabc4..71e34140cd 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
-#include "rte_cryptodev_pmd.h"
+#include "cryptodev_pmd.h"
 
 /**
  * Parse name from argument
diff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
similarity index 98%
rename from lib/cryptodev/rte_cryptodev_pmd.h
rename to lib/cryptodev/cryptodev_pmd.h
index dd2a4940a2..ec7bb82be8 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2015-2020 Intel Corporation.
  */
 
-#ifndef _RTE_CRYPTODEV_PMD_H_
-#define _RTE_CRYPTODEV_PMD_H_
+#ifndef _CRYPTODEV_PMD_H_
+#define _CRYPTODEV_PMD_H_
 
 /** @file
  * RTE Crypto PMD APIs
@@ -80,6 +80,7 @@ struct cryptodev_driver {
  * @return
  *   - The rte_cryptodev structure pointer for the given device ID.
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id);
 
@@ -91,6 +92,7 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
  * @return
  *   - The rte_cryptodev structure pointer for the given device ID.
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_named_dev(const char *name);
 
@@ -401,6 +403,7 @@ struct rte_cryptodev_ops {
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_allocate(const char *name, int socket_id);
 
@@ -414,6 +417,7 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id);
  * @return
  *   - 0 on success, negative on error
  */
+__rte_internal
 extern int
 rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
 
@@ -435,6 +439,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
  *  - 0 on success
  *  - errno on failure
  */
+__rte_internal
 int
 rte_cryptodev_pmd_parse_input_args(
 		struct rte_cryptodev_pmd_init_params *params,
@@ -454,6 +459,7 @@ rte_cryptodev_pmd_parse_input_args(
  *  - crypto device instance on success
  *  - NULL on creation failure
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_create(const char *name,
 		struct rte_device *device,
@@ -471,6 +477,7 @@ rte_cryptodev_pmd_create(const char *name,
  *  - 0 on success
  *  - errno on failure
  */
+__rte_internal
 int
 rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
 
@@ -484,6 +491,7 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
  * @return
  *  void
  */
+__rte_internal
 void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
 				enum rte_cryptodev_event_type event);
 
@@ -491,6 +499,7 @@ void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
  * @internal
  * Create unique device name
  */
+__rte_internal
 int
 rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
 
@@ -506,6 +515,7 @@ rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
  * @return
  *  The driver type identifier
  */
+__rte_internal
 uint8_t rte_cryptodev_allocate_driver(struct cryptodev_driver *crypto_drv,
 		const struct rte_driver *drv);
 
@@ -555,4 +565,4 @@ set_asym_session_private_data(struct rte_cryptodev_asym_session *sess,
 }
 #endif
 
-#endif /* _RTE_CRYPTODEV_PMD_H_ */
+#endif /* _CRYPTODEV_PMD_H_ */
diff --git a/lib/cryptodev/meson.build b/lib/cryptodev/meson.build
index bec80beab3..735935df4a 100644
--- a/lib/cryptodev/meson.build
+++ b/lib/cryptodev/meson.build
@@ -1,12 +1,22 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c', 'cryptodev_trace_points.c')
-headers = files('rte_cryptodev.h',
-        'rte_cryptodev_pmd.h',
+sources = files(
+        'cryptodev_pmd.c',
+	'cryptodev_trace_points.c',
+        'rte_cryptodev.c',
+)
+headers = files(
+        'rte_cryptodev.h',
         'rte_cryptodev_trace.h',
         'rte_cryptodev_trace_fp.h',
         'rte_crypto.h',
         'rte_crypto_sym.h',
-        'rte_crypto_asym.h')
+        'rte_crypto_asym.h',
+)
+
+driver_sdk_headers += files(
+        'cryptodev_pmd.h',
+)
+
 deps += ['kvargs', 'mbuf', 'rcu']
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 37502b9b3c..9fa3aff1d3 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -39,7 +39,7 @@
 
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
-#include "rte_cryptodev_pmd.h"
+#include "cryptodev_pmd.h"
 #include "rte_cryptodev_trace.h"
 
 static uint8_t nb_drivers;
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 593199bba6..ad7b9d8fbe 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -8,7 +8,6 @@ DPDK_21 {
 	rte_crypto_cipher_algorithm_strings;
 	rte_crypto_cipher_operation_strings;
 	rte_crypto_op_pool_create;
-	rte_cryptodev_allocate_driver;
 	rte_cryptodev_callback_register;
 	rte_cryptodev_callback_unregister;
 	rte_cryptodev_close;
@@ -27,15 +26,6 @@ DPDK_21 {
 	rte_cryptodev_info_get;
 	rte_cryptodev_is_valid_dev;
 	rte_cryptodev_name_get;
-	rte_cryptodev_pmd_allocate;
-	rte_cryptodev_pmd_callback_process;
-	rte_cryptodev_pmd_create;
-	rte_cryptodev_pmd_create_dev_name;
-	rte_cryptodev_pmd_destroy;
-	rte_cryptodev_pmd_get_dev;
-	rte_cryptodev_pmd_get_named_dev;
-	rte_cryptodev_pmd_parse_input_args;
-	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
 	rte_cryptodev_socket_id;
@@ -117,3 +107,18 @@ EXPERIMENTAL {
 	rte_cryptodev_remove_enq_callback;
 
 };
+
+INTERNAL {
+	global:
+
+	rte_cryptodev_allocate_driver;
+	rte_cryptodev_pmd_allocate;
+	rte_cryptodev_pmd_callback_process;
+	rte_cryptodev_pmd_create;
+	rte_cryptodev_pmd_create_dev_name;
+	rte_cryptodev_pmd_destroy;
+	rte_cryptodev_pmd_get_dev;
+	rte_cryptodev_pmd_get_named_dev;
+	rte_cryptodev_pmd_parse_input_args;
+	rte_cryptodev_pmd_release_device;
+};
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 2d38389858..ebfc8326a8 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -9,7 +9,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_service_component.h>
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index cb0ed7b620..e347d6dfd5 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -31,7 +31,7 @@
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_telemetry.h>
 
 #include "rte_eventdev.h"
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index 54721ed96a..ad7904c0ee 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -16,7 +16,7 @@
 #include <rte_udp.h>
 #include <rte_vxlan.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "rte_table_action.h"
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/4] test/crypto: remove illegal header include
  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
  0 siblings, 0 replies; 36+ messages in thread
From: Matan Azrad @ 2021-08-11  6:52 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal,
	konstantin.ananyev, NBU-Contact-Thomas Monjalon, roy.fan.zhang,
	asomalap, ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch,
	fiona.trahe, adwivedi, michaelsh, rnagadheeraj, jianjay.zhou



From: Akhil Goyal
> rte_cryptodev_pmd.h is an interface between driver and library and it is
> mentioned in the file that application cannot use it directly.
> Hence, removing the include.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Matan Azrad <matan@nvidia.com>

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/4] cryptodev: change valid dev API
  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
  0 siblings, 1 reply; 36+ messages in thread
From: Matan Azrad @ 2021-08-11  6:54 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal,
	konstantin.ananyev, NBU-Contact-Thomas Monjalon, roy.fan.zhang,
	asomalap, ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch,
	fiona.trahe, adwivedi, michaelsh, rnagadheeraj, jianjay.zhou



From: Akhil Goyal
> The API rte_cryptodev_pmd_is_valid_dev, can be used by the application as
> well as PMD to check whether the device is valid or not. Hence, _pmd is
> removed from the API.
> The applications and drivers which use this API are also updated.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>

Agree.

What's about updating the release notes on this change?

Matan

> ---
>  .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
>  examples/fips_validation/main.c               |  2 +-
>  examples/ip_pipeline/cryptodev.c              |  3 +-
>  lib/cryptodev/rte_cryptodev.c                 | 50 +++++++++----------
>  lib/cryptodev/rte_cryptodev.h                 | 11 ++++
>  lib/cryptodev/rte_cryptodev_pmd.h             | 11 ----
>  lib/cryptodev/version.map                     |  2 +-
>  lib/eventdev/rte_event_crypto_adapter.c       |  4 +-
>  lib/eventdev/rte_eventdev.c                   |  2 +-
>  lib/pipeline/rte_table_action.c               |  2 +-
>  10 files changed, 44 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
> b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
> index a1a4ca5650..8e278801c5 100644
> --- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
> +++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
> @@ -82,7 +82,7 @@ softnic_cryptodev_create(struct pmd_internals *p,
> 
>                 dev_id = (uint32_t)status;
>         } else {
> -               if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
> +               if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
>                         return NULL;
> 
>                 dev_id = params->dev_id; diff --git
> a/examples/fips_validation/main.c b/examples/fips_validation/main.c index
> c175fe6ac2..e892078f0e 100644
> --- a/examples/fips_validation/main.c
> +++ b/examples/fips_validation/main.c
> @@ -196,7 +196,7 @@ parse_cryptodev_id_arg(char *arg)
>         }
> 
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(cryptodev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(cryptodev_id)) {
>                 RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n",
>                                 cryptodev_id, arg);
>                 return -1;
> diff --git a/examples/ip_pipeline/cryptodev.c
> b/examples/ip_pipeline/cryptodev.c
> index b0d9f3d217..9997d97456 100644
> --- a/examples/ip_pipeline/cryptodev.c
> +++ b/examples/ip_pipeline/cryptodev.c
> @@ -6,7 +6,6 @@
>  #include <stdio.h>
> 
>  #include <rte_cryptodev.h>
> -#include <rte_cryptodev_pmd.h>
>  #include <rte_string_fns.h>
> 
>  #include "cryptodev.h"
> @@ -74,7 +73,7 @@ cryptodev_create(const char *name, struct
> cryptodev_params *params)
> 
>                 dev_id = (uint32_t)status;
>         } else {
> -               if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
> +               if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
>                         return NULL;
> 
>                 dev_id = params->dev_id; diff --git a/lib/cryptodev/rte_cryptodev.c
> b/lib/cryptodev/rte_cryptodev.c index 447aa9d519..37502b9b3c 100644
> --- a/lib/cryptodev/rte_cryptodev.c
> +++ b/lib/cryptodev/rte_cryptodev.c
> @@ -663,7 +663,7 @@ rte_cryptodev_is_valid_device_data(uint8_t dev_id)
> }
> 
>  unsigned int
> -rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
> +rte_cryptodev_is_valid_dev(uint8_t dev_id)
>  {
>         struct rte_cryptodev *dev = NULL;
> 
> @@ -761,7 +761,7 @@ rte_cryptodev_socket_id(uint8_t dev_id)  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
> +       if (!rte_cryptodev_is_valid_dev(dev_id))
>                 return -1;
> 
>         dev = rte_cryptodev_pmd_get_dev(dev_id);
> @@ -1032,7 +1032,7 @@ rte_cryptodev_configure(uint8_t dev_id, struct
> rte_cryptodev_config *config)
>         struct rte_cryptodev *dev;
>         int diag;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1080,7 +1080,7 @@ rte_cryptodev_start(uint8_t dev_id)
> 
>         CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id);
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1110,7 +1110,7 @@ rte_cryptodev_stop(uint8_t dev_id)  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return;
>         }
> @@ -1136,7 +1136,7 @@ rte_cryptodev_close(uint8_t dev_id)
>         struct rte_cryptodev *dev;
>         int retval;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -1;
>         }
> @@ -1176,7 +1176,7 @@ rte_cryptodev_get_qp_status(uint8_t dev_id,
> uint16_t queue_pair_id)  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1207,7 +1207,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id,
> uint16_t queue_pair_id,  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1283,7 +1283,7 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
>                 return NULL;
>         }
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>                 rte_errno = ENODEV;
>                 return NULL;
> @@ -1349,7 +1349,7 @@ rte_cryptodev_remove_enq_callback(uint8_t
> dev_id,
>                 return -EINVAL;
>         }
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>                 return -ENODEV;
>         }
> @@ -1418,7 +1418,7 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
>                 return NULL;
>         }
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>                 rte_errno = ENODEV;
>                 return NULL;
> @@ -1484,7 +1484,7 @@ rte_cryptodev_remove_deq_callback(uint8_t
> dev_id,
>                 return -EINVAL;
>         }
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>                 return -ENODEV;
>         }
> @@ -1542,7 +1542,7 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct
> rte_cryptodev_stats *stats)  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>                 return -ENODEV;
>         }
> @@ -1565,7 +1565,7 @@ rte_cryptodev_stats_reset(uint8_t dev_id)  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return;
>         }
> @@ -1581,7 +1581,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct
> rte_cryptodev_info *dev_info)  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>                 return;
>         }
> @@ -1608,7 +1608,7 @@ rte_cryptodev_callback_register(uint8_t dev_id,
>         if (!cb_fn)
>                 return -EINVAL;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1652,7 +1652,7 @@ rte_cryptodev_callback_unregister(uint8_t dev_id,
>         if (!cb_fn)
>                 return -EINVAL;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1720,7 +1720,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
>         uint8_t index;
>         int ret;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1765,7 +1765,7 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
>         uint8_t index;
>         int ret;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1939,7 +1939,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
>         struct rte_cryptodev *dev;
>         uint8_t driver_id;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_clear(uint8_t
> dev_id,  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>                 return -EINVAL;
>         }
> @@ -2079,7 +2079,7 @@
> rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
>         struct rte_cryptodev *dev;
>         unsigned int priv_sess_size;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
> +       if (!rte_cryptodev_is_valid_dev(dev_id))
>                 return 0;
> 
>         dev = rte_cryptodev_pmd_get_dev(dev_id);
> @@ -2099,7 +2099,7 @@
> rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
>         unsigned int header_size = sizeof(void *) * nb_drivers;
>         unsigned int priv_sess_size;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
> +       if (!rte_cryptodev_is_valid_dev(dev_id))
>                 return 0;
> 
>         dev = rte_cryptodev_pmd_get_dev(dev_id);
> @@ -2156,7 +2156,7 @@ rte_cryptodev_sym_cpu_crypto_process(uint8_t
> dev_id,  {
>         struct rte_cryptodev *dev;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(dev_id)) {
>                 sym_crypto_fill_status(vec, EINVAL);
>                 return 0;
>         }
> @@ -2179,7 +2179,7 @@ rte_cryptodev_get_raw_dp_ctx_size(uint8_t
> dev_id)
>         int32_t size = sizeof(struct rte_crypto_raw_dp_ctx);
>         int32_t priv_size;
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
> +       if (!rte_cryptodev_is_valid_dev(dev_id))
>                 return -EINVAL;
> 
>         dev = rte_cryptodev_pmd_get_dev(dev_id);
> diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
> index 11f4e6fdbf..bb01f0f195 100644
> --- a/lib/cryptodev/rte_cryptodev.h
> +++ b/lib/cryptodev/rte_cryptodev.h
> @@ -1368,6 +1368,17 @@ __rte_experimental  unsigned int
> rte_cryptodev_asym_get_private_session_size(uint8_t dev_id);
> 
> +/**
> + * Validate if the crypto device index is valid attached crypto device.
> + *
> + * @param      dev_id  Crypto device index.
> + *
> + * @return
> + *   - If the device index is valid (1) or not (0).
> + */
> +unsigned int
> +rte_cryptodev_is_valid_dev(uint8_t dev_id);
> +
>  /**
>   * Provide driver identifier.
>   *
> diff --git a/lib/cryptodev/rte_cryptodev_pmd.h
> b/lib/cryptodev/rte_cryptodev_pmd.h
> index 1274436870..dd2a4940a2 100644
> --- a/lib/cryptodev/rte_cryptodev_pmd.h
> +++ b/lib/cryptodev/rte_cryptodev_pmd.h
> @@ -94,17 +94,6 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);  struct
> rte_cryptodev *  rte_cryptodev_pmd_get_named_dev(const char *name);
> 
> -/**
> - * Validate if the crypto device index is valid attached crypto device.
> - *
> - * @param      dev_id  Crypto device index.
> - *
> - * @return
> - *   - If the device index is valid (1) or not (0).
> - */
> -unsigned int
> -rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id);
> -
>  /**
>   * The pool of rte_cryptodev structures.
>   */
> diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map index
> 9f04737aed..593199bba6 100644
> --- a/lib/cryptodev/version.map
> +++ b/lib/cryptodev/version.map
> @@ -25,6 +25,7 @@ DPDK_21 {
>         rte_cryptodev_get_feature_name;
>         rte_cryptodev_get_sec_ctx;
>         rte_cryptodev_info_get;
> +       rte_cryptodev_is_valid_dev;
>         rte_cryptodev_name_get;
>         rte_cryptodev_pmd_allocate;
>         rte_cryptodev_pmd_callback_process;
> @@ -33,7 +34,6 @@ DPDK_21 {
>         rte_cryptodev_pmd_destroy;
>         rte_cryptodev_pmd_get_dev;
>         rte_cryptodev_pmd_get_named_dev;
> -       rte_cryptodev_pmd_is_valid_dev;
>         rte_cryptodev_pmd_parse_input_args;
>         rte_cryptodev_pmd_release_device;
>         rte_cryptodev_queue_pair_count;
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c
> b/lib/eventdev/rte_event_crypto_adapter.c
> index e1d38d383d..2d38389858 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -781,7 +781,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t
> id,
> 
>         EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(cdev_id)) {
>                 RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
>                 return -EINVAL;
>         }
> @@ -898,7 +898,7 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t
> id, uint8_t cdev_id,
> 
>         EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
> 
> -       if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
> +       if (!rte_cryptodev_is_valid_dev(cdev_id)) {
>                 RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
>                 return -EINVAL;
>         }
> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
> index 594dd5e759..cb0ed7b620 100644
> --- a/lib/eventdev/rte_eventdev.c
> +++ b/lib/eventdev/rte_eventdev.c
> @@ -165,7 +165,7 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id,
> uint8_t cdev_id,
>         struct rte_cryptodev *cdev;
> 
>         RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
> -       if (!rte_cryptodev_pmd_is_valid_dev(cdev_id))
> +       if (!rte_cryptodev_is_valid_dev(cdev_id))
>                 return -EINVAL;
> 
>         dev = &rte_eventdevs[dev_id];
> diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
> index 98f3438774..54721ed96a 100644
> --- a/lib/pipeline/rte_table_action.c
> +++ b/lib/pipeline/rte_table_action.c
> @@ -1732,7 +1732,7 @@ struct sym_crypto_data {  static int
> sym_crypto_cfg_check(struct rte_table_action_sym_crypto_config *cfg)  {
> -       if (!rte_cryptodev_pmd_is_valid_dev(cfg->cryptodev_id))
> +       if (!rte_cryptodev_is_valid_dev(cfg->cryptodev_id))
>                 return -EINVAL;
>         if (cfg->mp_create == NULL || cfg->mp_init == NULL)
>                 return -EINVAL;
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs
  2021-08-10 19:50   ` [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs Akhil Goyal
@ 2021-08-11  6:56     ` Matan Azrad
  2021-08-11  8:19       ` Akhil Goyal
  0 siblings, 1 reply; 36+ messages in thread
From: Matan Azrad @ 2021-08-11  6:56 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal,
	konstantin.ananyev, NBU-Contact-Thomas Monjalon, roy.fan.zhang,
	asomalap, ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch,
	fiona.trahe, adwivedi, michaelsh, rnagadheeraj, jianjay.zhou



From: Akhil Goyal
> 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>

Look's like it should be backported to stable releases with a Fixes reference.
What do you think?

Besides,
Acked-by: Matan Azrad <matan@nvidia.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


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/4] cryptodev: expose driver interface as internal
  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
  1 sibling, 1 reply; 36+ messages in thread
From: Matan Azrad @ 2021-08-11  7:00 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal,
	konstantin.ananyev, NBU-Contact-Thomas Monjalon, roy.fan.zhang,
	asomalap, ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch,
	fiona.trahe, adwivedi, michaelsh, rnagadheeraj, jianjay.zhou



From: Akhil Goyal
> The rte_cryptodev_pmd.* files are for drivers only and should be private to
> DPDK, and not installed for app use.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>

Please consider adding to release notes.

Acked-by: Matan Azrad <matan@nvidia.com>


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 2/4] cryptodev: change valid dev API
  2021-08-11  6:54     ` Matan Azrad
@ 2021-08-11  8:12       ` Akhil Goyal
  0 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-08-11  8:12 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Anoob Joseph, radu.nicolau, declan.doherty, hemant.agrawal,
	konstantin.ananyev, NBU-Contact-Thomas Monjalon, roy.fan.zhang,
	asomalap, ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch,
	fiona.trahe, Ankur Dwivedi, Michael Shamis, Nagadheeraj Rottela,
	jianjay.zhou

> 
> 
> From: Akhil Goyal
> > The API rte_cryptodev_pmd_is_valid_dev, can be used by the application
> as
> > well as PMD to check whether the device is valid or not. Hence, _pmd is
> > removed from the API.
> > The applications and drivers which use this API are also updated.
> >
> > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> 
> Agree.
> 
> What's about updating the release notes on this change?
> 
Yes this need to be updated in release notes.
21.11 release notes file is not yet created, will add it once it is available.


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs
  2021-08-11  6:56     ` Matan Azrad
@ 2021-08-11  8:19       ` Akhil Goyal
  2021-08-30 20:27         ` Zhang, Roy Fan
  0 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-08-11  8:19 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Anoob Joseph, radu.nicolau, declan.doherty, hemant.agrawal,
	konstantin.ananyev, NBU-Contact-Thomas Monjalon, roy.fan.zhang,
	asomalap, ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch,
	fiona.trahe, Ankur Dwivedi, Michael Shamis, Nagadheeraj Rottela,
	jianjay.zhou

> 
> From: Akhil Goyal
> > 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>
> 
> Look's like it should be backported to stable releases with a Fixes reference.
> What do you think?
> 
> Besides,
> Acked-by: Matan Azrad <matan@nvidia.com>
> 
Yes, Agreed.
I wanted to get opinion from the Maintainer of fips app first if the changes are 
Correct or not.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/4] cryptodev: expose driver interface as internal
  2021-08-11  7:00     ` Matan Azrad
@ 2021-08-11  8:20       ` Akhil Goyal
  0 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-08-11  8:20 UTC (permalink / raw)
  To: Matan Azrad, dev
  Cc: Anoob Joseph, radu.nicolau, declan.doherty, hemant.agrawal,
	konstantin.ananyev, NBU-Contact-Thomas Monjalon, roy.fan.zhang,
	asomalap, ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch,
	fiona.trahe, Ankur Dwivedi, Michael Shamis, Nagadheeraj Rottela,
	jianjay.zhou

> From: Akhil Goyal
> > The rte_cryptodev_pmd.* files are for drivers only and should be private to
> > DPDK, and not installed for app use.
> >
> > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> 
> Please consider adding to release notes.
> 
> Acked-by: Matan Azrad <matan@nvidia.com>
Yes will do so when it is available.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH 1/4] test/crypto: remove illegal header include
  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
  0 siblings, 0 replies; 36+ messages in thread
From: Zhang, Roy Fan @ 2021-08-30 20:16 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: anoobj, Nicolau, Radu, Doherty, Declan, hemant.agrawal, matan,
	Ananyev, Konstantin, thomas, asomalap, ruifeng.wang,
	ajit.khaparde, De Lara Guarch, Pablo, Trahe, Fiona, adwivedi,
	michaelsh, rnagadheeraj, jianjay.zhou

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, August 5, 2021 9:03 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; Nicolau, Radu <radu.nicolau@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>; hemant.agrawal@nxp.com;
> matan@nvidia.com; Ananyev, Konstantin <konstantin.ananyev@intel.com>;
> thomas@monjalon.net; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> adwivedi@marvell.com; michaelsh@marvell.com;
> rnagadheeraj@marvell.com; jianjay.zhou@huawei.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH 1/4] test/crypto: remove illegal header include
> 
> rte_cryptodev_pmd.h is an interface between
> driver and library and it is mentioned in the
> file that application cannot use it directly.
> Hence, removing the include.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---
Apart from release note update
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH 2/4] cryptodev: change valid dev API
  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
  0 siblings, 0 replies; 36+ messages in thread
From: Zhang, Roy Fan @ 2021-08-30 20:16 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: anoobj, Nicolau, Radu, Doherty, Declan, hemant.agrawal, matan,
	Ananyev, Konstantin, thomas, asomalap, ruifeng.wang,
	ajit.khaparde, De Lara Guarch, Pablo, Trahe, Fiona, adwivedi,
	michaelsh, rnagadheeraj, jianjay.zhou

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, August 5, 2021 9:03 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; Nicolau, Radu <radu.nicolau@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>; hemant.agrawal@nxp.com;
> matan@nvidia.com; Ananyev, Konstantin <konstantin.ananyev@intel.com>;
> thomas@monjalon.net; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> adwivedi@marvell.com; michaelsh@marvell.com;
> rnagadheeraj@marvell.com; jianjay.zhou@huawei.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH 2/4] cryptodev: change valid dev API
> 
> The API rte_cryptodev_pmd_is_valid_dev, can be used
> by the application as well as PMD to check whether
> the device is valid or not. Hence, _pmd is removed
> from the API.
> The applications and drivers which use this API are
> also updated.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---

Apart from release note update not provided
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs
  2021-08-11  8:19       ` Akhil Goyal
@ 2021-08-30 20:27         ` Zhang, Roy Fan
  2021-08-31  7:03           ` Akhil Goyal
  0 siblings, 1 reply; 36+ messages in thread
From: Zhang, Roy Fan @ 2021-08-30 20:27 UTC (permalink / raw)
  To: Akhil Goyal, Matan Azrad, dev
  Cc: Anoob Joseph, Nicolau, Radu, Doherty, Declan, hemant.agrawal,
	Ananyev, Konstantin, NBU-Contact-Thomas Monjalon, asomalap,
	ruifeng.wang, ajit.khaparde, De Lara Guarch, Pablo, Trahe, Fiona,
	Ankur Dwivedi, Michael Shamis, Nagadheeraj Rottela, jianjay.zhou

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Wednesday, August 11, 2021 9:20 AM
> To: Matan Azrad <matan@nvidia.com>; dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; Nicolau, Radu
> <radu.nicolau@intel.com>; Doherty, Declan <declan.doherty@intel.com>;
> hemant.agrawal@nxp.com; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; NBU-Contact-Thomas Monjalon
> <thomas@monjalon.net>; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> Ankur Dwivedi <adwivedi@marvell.com>; Michael Shamis
> <michaelsh@marvell.com>; Nagadheeraj Rottela
> <rnagadheeraj@marvell.com>; jianjay.zhou@huawei.com
> Subject: RE: [PATCH v2 3/4] examples/fips_validation: remove illegal usage of
> APIs
> 
> >
> > From: Akhil Goyal
> > > 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>
> >
> > Look's like it should be backported to stable releases with a Fixes reference.
> > What do you think?
> >
> > Besides,
> > Acked-by: Matan Azrad <matan@nvidia.com>
> >
> Yes, Agreed.
> I wanted to get opinion from the Maintainer of fips app first if the changes
> are
> Correct or not.

Hi Akhil,

FIPS requirement is upon failure of running self-test the device memory
shall be destroyed completely and not visible by the application at all -
rte_cryptodev_close does not provide this functionality. 

In this case we may need new API rte_cryptodev_destroy() to replace 
rte_cryptodev_pmd_destroy().

Regards,
Fan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 4/4] cryptodev: expose driver interface as internal
  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-30 20:30     ` Zhang, Roy Fan
  1 sibling, 0 replies; 36+ messages in thread
From: Zhang, Roy Fan @ 2021-08-30 20:30 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: anoobj, Nicolau, Radu, Doherty, Declan, hemant.agrawal, matan,
	Ananyev, Konstantin, thomas, asomalap, ruifeng.wang,
	ajit.khaparde, De Lara Guarch, Pablo, Trahe, Fiona, adwivedi,
	michaelsh, rnagadheeraj, jianjay.zhou

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Tuesday, August 10, 2021 8:50 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; Nicolau, Radu <radu.nicolau@intel.com>; Doherty,
> Declan <declan.doherty@intel.com>; hemant.agrawal@nxp.com;
> matan@nvidia.com; Ananyev, Konstantin <konstantin.ananyev@intel.com>;
> thomas@monjalon.net; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> adwivedi@marvell.com; michaelsh@marvell.com;
> rnagadheeraj@marvell.com; jianjay.zhou@huawei.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH v2 4/4] cryptodev: expose driver interface as internal
> 
> The rte_cryptodev_pmd.* files are for drivers only and should be
> private to DPDK, and not installed for app use.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs
  2021-08-30 20:27         ` Zhang, Roy Fan
@ 2021-08-31  7:03           ` Akhil Goyal
  2021-08-31  8:38             ` Zhang, Roy Fan
  0 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-08-31  7:03 UTC (permalink / raw)
  To: Zhang, Roy Fan, Matan Azrad, dev
  Cc: Anoob Joseph, Nicolau, Radu, Doherty, Declan, hemant.agrawal,
	Ananyev, Konstantin, NBU-Contact-Thomas Monjalon, asomalap,
	ruifeng.wang, ajit.khaparde, De Lara Guarch, Pablo, Trahe, Fiona,
	Ankur Dwivedi, Michael Shamis, Nagadheeraj Rottela, jianjay.zhou

Hi Fan,
> > > > 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>
> > >
> > > Look's like it should be backported to stable releases with a Fixes
> reference.
> > > What do you think?
> > >
> > > Besides,
> > > Acked-by: Matan Azrad <matan@nvidia.com>
> > >
> > Yes, Agreed.
> > I wanted to get opinion from the Maintainer of fips app first if the changes
> > are
> > Correct or not.
> 
> Hi Akhil,
> 
> FIPS requirement is upon failure of running self-test the device memory
> shall be destroyed completely and not visible by the application at all -
> rte_cryptodev_close does not provide this functionality.
> 
> In this case we may need new API rte_cryptodev_destroy() to replace
> rte_cryptodev_pmd_destroy().
> 
_create and _destroy are called from device probe and remove.
If the requirement is to use pmd_destroy, how is the driver created again?
I do not see the use of rte_cryptodev_pmd_create() function.

The use of pmd APIs is not allowed from the application and it looks something
Is not correct here for the use of destroy API.
Please check and fix as required.

Regards,
Akhil

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs
  2021-08-31  7:03           ` Akhil Goyal
@ 2021-08-31  8:38             ` Zhang, Roy Fan
  0 siblings, 0 replies; 36+ messages in thread
From: Zhang, Roy Fan @ 2021-08-31  8:38 UTC (permalink / raw)
  To: Akhil Goyal, Matan Azrad, dev
  Cc: Anoob Joseph, Nicolau, Radu, Doherty, Declan, hemant.agrawal,
	Ananyev, Konstantin, NBU-Contact-Thomas Monjalon, asomalap,
	ruifeng.wang, ajit.khaparde, De Lara Guarch, Pablo, Trahe, Fiona,
	Ankur Dwivedi, Michael Shamis, Nagadheeraj Rottela, jianjay.zhou

Hi Akhil

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Tuesday, August 31, 2021 8:04 AM
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>; Matan Azrad
> <matan@nvidia.com>; dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; Nicolau, Radu
> <radu.nicolau@intel.com>; Doherty, Declan <declan.doherty@intel.com>;
> hemant.agrawal@nxp.com; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; NBU-Contact-Thomas Monjalon
> <thomas@monjalon.net>; asomalap@amd.com; ruifeng.wang@arm.com;
> ajit.khaparde@broadcom.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> Ankur Dwivedi <adwivedi@marvell.com>; Michael Shamis
> <michaelsh@marvell.com>; Nagadheeraj Rottela
> <rnagadheeraj@marvell.com>; jianjay.zhou@huawei.com
> Subject: RE: [PATCH v2 3/4] examples/fips_validation: remove illegal usage of
> APIs
> 
> Hi Fan,
> > > > > 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>
> > > >
> > > > Look's like it should be backported to stable releases with a Fixes
> > reference.
> > > > What do you think?
> > > >
> > > > Besides,
> > > > Acked-by: Matan Azrad <matan@nvidia.com>
> > > >
> > > Yes, Agreed.
> > > I wanted to get opinion from the Maintainer of fips app first if the
> changes
> > > are
> > > Correct or not.
> >
> > Hi Akhil,
> >
> > FIPS requirement is upon failure of running self-test the device memory
> > shall be destroyed completely and not visible by the application at all -
> > rte_cryptodev_close does not provide this functionality.
> >
> > In this case we may need new API rte_cryptodev_destroy() to replace
> > rte_cryptodev_pmd_destroy().
> >
> _create and _destroy are called from device probe and remove.
> If the requirement is to use pmd_destroy, how is the driver created again?
> I do not see the use of rte_cryptodev_pmd_create() function.
> 
> The use of pmd APIs is not allowed from the application and it looks
> something
> Is not correct here for the use of destroy API.
> Please check and fix as required.
> 
> Regards,
> Akhil

Will fix for Intel PMDs. 

Regards,
Fan

^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v3 0/4] cryptodev: expose driver interface as internal
  2021-08-10 19:50 ` [dpdk-dev] [PATCH v2 0/4] " Akhil Goyal
                     ` (3 preceding siblings ...)
  2021-08-10 19:50   ` [dpdk-dev] [PATCH v2 4/4] cryptodev: expose driver interface as internal Akhil Goyal
@ 2021-09-07 19:00   ` Akhil Goyal
  2021-09-07 19:00     ` [dpdk-dev] [PATCH v3 1/4] test/crypto: remove illegal header include Akhil Goyal
                       ` (4 more replies)
  4 siblings, 5 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:00 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

rte_cryptodev_pmd.* files are meant to be used for
DPDK internal usage only, but it was used illegally by
applications.
There is one API which can be used by applications to
check if the dev_id has a valid device or not.
This API is exposed and modified as rte_cryptodev_is_valid_dev()
from rte_cryptodev_pmd_is_valid_dev().

Changes in v3:
Added release notes.

changes in v2:
rebase over 21.08 release tag.


Akhil Goyal (4):
  test/crypto: remove illegal header include
  cryptodev: change valid dev API
  examples/fips_validation: remove illegal usage of APIs
  cryptodev: expose driver interface as internal

 app/test/test_cryptodev.c                     |  1 -
 app/test/test_cryptodev_asym.c                |  1 -
 app/test/test_cryptodev_blockcipher.c         |  1 -
 app/test/test_cryptodev_security_pdcp.c       |  1 -
 app/test/test_ipsec.c                         |  1 -
 doc/guides/rel_notes/release_21_11.rst        |  8 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_session.h      |  2 +-
 drivers/crypto/caam_jr/caam_jr.c              |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               |  2 +-
 drivers/crypto/ccp/ccp_pmd_ops.c              |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |  2 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c      |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    |  2 +-
 drivers/crypto/mlx5/mlx5_crypto.h             |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       |  2 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  2 +-
 drivers/crypto/qat/qat_asym.h                 |  2 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  2 +-
 drivers/crypto/qat/qat_sym.h                  |  2 +-
 drivers/crypto/qat/qat_sym_hw_dp.c            |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  2 +-
 drivers/crypto/qat/qat_sym_session.h          |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 +-
 drivers/crypto/virtio/virtio_rxtx.c           |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_rx.h    |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_tx.h    |  2 +-
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  4 +-
 examples/fips_validation/fips_dev_self_test.c | 19 +------
 examples/fips_validation/main.c               |  9 ++--
 examples/ip_pipeline/cryptodev.c              |  3 +-
 .../{rte_cryptodev_pmd.c => cryptodev_pmd.c}  |  2 +-
 .../{rte_cryptodev_pmd.h => cryptodev_pmd.h}  | 27 +++++-----
 lib/cryptodev/meson.build                     | 18 +++++--
 lib/cryptodev/rte_cryptodev.c                 | 52 +++++++++----------
 lib/cryptodev/rte_cryptodev.h                 | 11 ++++
 lib/cryptodev/version.map                     | 27 ++++++----
 lib/eventdev/rte_event_crypto_adapter.c       |  6 +--
 lib/eventdev/rte_eventdev.c                   |  4 +-
 lib/pipeline/rte_table_action.c               |  4 +-
 72 files changed, 157 insertions(+), 148 deletions(-)
 rename lib/cryptodev/{rte_cryptodev_pmd.c => cryptodev_pmd.c} (99%)
 rename lib/cryptodev/{rte_cryptodev_pmd.h => cryptodev_pmd.h} (97%)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v3 1/4] test/crypto: remove illegal header include
  2021-09-07 19:00   ` [dpdk-dev] [PATCH v3 0/4] " Akhil Goyal
@ 2021-09-07 19:00     ` Akhil Goyal
  2021-09-07 19:00     ` [dpdk-dev] [PATCH v3 2/4] cryptodev: change valid dev API Akhil Goyal
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:00 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

rte_cryptodev_pmd.h is an interface between
driver and library and it is mentioned in the
file that application cannot use it directly.
Hence, removing the include.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test/test_cryptodev.c               | 1 -
 app/test/test_cryptodev_asym.c          | 1 -
 app/test/test_cryptodev_blockcipher.c   | 1 -
 app/test/test_cryptodev_security_pdcp.c | 1 -
 app/test/test_ipsec.c                   | 1 -
 5 files changed, 5 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 843d07ba37..9e823db1e6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -16,7 +16,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #ifdef RTE_CRYPTO_SCHEDULER
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 847b074a4f..9d19a6d6d9 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -12,7 +12,6 @@
 #include <rte_pause.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_crypto.h>
 
 #include "test_cryptodev.h"
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 53fd4718af..1c948eb008 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -11,7 +11,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 
 #include "test.h"
 #include "test_cryptodev.h"
diff --git a/app/test/test_cryptodev_security_pdcp.c b/app/test/test_cryptodev_security_pdcp.c
index 30f3eb892c..a7641bab7a 100644
--- a/app/test/test_cryptodev_security_pdcp.c
+++ b/app/test/test_cryptodev_security_pdcp.c
@@ -17,7 +17,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_security.h>
 
 #include <rte_lcore.h>
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index fb90130ae2..c6d6b88d6d 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -15,7 +15,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_lcore.h>
 #include <rte_ipsec.h>
 #include <rte_random.h>
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v3 2/4] cryptodev: change valid dev API
  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     ` Akhil Goyal
  2021-09-07 19:00     ` [dpdk-dev] [PATCH v3 3/4] examples/fips_validation: remove illegal usage of APIs Akhil Goyal
                       ` (2 subsequent siblings)
  4 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:00 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

The API rte_cryptodev_pmd_is_valid_dev, can be used
by the application as well as PMD to check whether
the device is valid or not. Hence, _pmd is removed
from the API.
The applications and drivers which use this API are
also updated.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 doc/guides/rel_notes/release_21_11.rst        |  4 ++
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
 examples/fips_validation/main.c               |  2 +-
 examples/ip_pipeline/cryptodev.c              |  3 +-
 lib/cryptodev/rte_cryptodev.c                 | 50 +++++++++----------
 lib/cryptodev/rte_cryptodev.h                 | 11 ++++
 lib/cryptodev/rte_cryptodev_pmd.h             | 11 ----
 lib/cryptodev/version.map                     |  2 +-
 lib/eventdev/rte_event_crypto_adapter.c       |  4 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/pipeline/rte_table_action.c               |  2 +-
 11 files changed, 48 insertions(+), 45 deletions(-)

diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index 411fa9530a..e7ad50ba09 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -102,6 +102,10 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* cryptodev: The API rte_cryptodev_pmd_is_valid_dev is modified to
+  rte_cryptodev_is_valid_dev as it can be used by the application as
+  well as PMD to check whether the device is valid or not.
+
 
 ABI Changes
 -----------
diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
index a1a4ca5650..8e278801c5 100644
--- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
+++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
@@ -82,7 +82,7 @@ softnic_cryptodev_create(struct pmd_internals *p,
 
 		dev_id = (uint32_t)status;
 	} else {
-		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
+		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
 			return NULL;
 
 		dev_id = params->dev_id;
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index c175fe6ac2..e892078f0e 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -196,7 +196,7 @@ parse_cryptodev_id_arg(char *arg)
 	}
 
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cryptodev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cryptodev_id)) {
 		RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n",
 				cryptodev_id, arg);
 		return -1;
diff --git a/examples/ip_pipeline/cryptodev.c b/examples/ip_pipeline/cryptodev.c
index b0d9f3d217..9997d97456 100644
--- a/examples/ip_pipeline/cryptodev.c
+++ b/examples/ip_pipeline/cryptodev.c
@@ -6,7 +6,6 @@
 #include <stdio.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #include "cryptodev.h"
@@ -74,7 +73,7 @@ cryptodev_create(const char *name, struct cryptodev_params *params)
 
 		dev_id = (uint32_t)status;
 	} else {
-		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
+		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
 			return NULL;
 
 		dev_id = params->dev_id;
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 447aa9d519..37502b9b3c 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -663,7 +663,7 @@ rte_cryptodev_is_valid_device_data(uint8_t dev_id)
 }
 
 unsigned int
-rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
+rte_cryptodev_is_valid_dev(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev = NULL;
 
@@ -761,7 +761,7 @@ rte_cryptodev_socket_id(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return -1;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -1032,7 +1032,7 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 	struct rte_cryptodev *dev;
 	int diag;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1080,7 +1080,7 @@ rte_cryptodev_start(uint8_t dev_id)
 
 	CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1110,7 +1110,7 @@ rte_cryptodev_stop(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
 	}
@@ -1136,7 +1136,7 @@ rte_cryptodev_close(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	int retval;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -1;
 	}
@@ -1176,7 +1176,7 @@ rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1207,7 +1207,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1283,7 +1283,7 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
 		return NULL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		rte_errno = ENODEV;
 		return NULL;
@@ -1349,7 +1349,7 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
 		return -EINVAL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1418,7 +1418,7 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
 		return NULL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		rte_errno = ENODEV;
 		return NULL;
@@ -1484,7 +1484,7 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
 		return -EINVAL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1542,7 +1542,7 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1565,7 +1565,7 @@ rte_cryptodev_stats_reset(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
 	}
@@ -1581,7 +1581,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return;
 	}
@@ -1608,7 +1608,7 @@ rte_cryptodev_callback_register(uint8_t dev_id,
 	if (!cb_fn)
 		return -EINVAL;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1652,7 +1652,7 @@ rte_cryptodev_callback_unregister(uint8_t dev_id,
 	if (!cb_fn)
 		return -EINVAL;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1720,7 +1720,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1765,7 +1765,7 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1939,7 +1939,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	struct rte_cryptodev *dev;
 	uint8_t driver_id;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_clear(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -2079,7 +2079,7 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	unsigned int priv_sess_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return 0;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -2099,7 +2099,7 @@ rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
 	unsigned int header_size = sizeof(void *) * nb_drivers;
 	unsigned int priv_sess_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return 0;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -2156,7 +2156,7 @@ rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		sym_crypto_fill_status(vec, EINVAL);
 		return 0;
 	}
@@ -2179,7 +2179,7 @@ rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id)
 	int32_t size = sizeof(struct rte_crypto_raw_dp_ctx);
 	int32_t priv_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return -EINVAL;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 11f4e6fdbf..bb01f0f195 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1368,6 +1368,17 @@ __rte_experimental
 unsigned int
 rte_cryptodev_asym_get_private_session_size(uint8_t dev_id);
 
+/**
+ * Validate if the crypto device index is valid attached crypto device.
+ *
+ * @param	dev_id	Crypto device index.
+ *
+ * @return
+ *   - If the device index is valid (1) or not (0).
+ */
+unsigned int
+rte_cryptodev_is_valid_dev(uint8_t dev_id);
+
 /**
  * Provide driver identifier.
  *
diff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/rte_cryptodev_pmd.h
index 1274436870..dd2a4940a2 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.h
+++ b/lib/cryptodev/rte_cryptodev_pmd.h
@@ -94,17 +94,6 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_named_dev(const char *name);
 
-/**
- * Validate if the crypto device index is valid attached crypto device.
- *
- * @param	dev_id	Crypto device index.
- *
- * @return
- *   - If the device index is valid (1) or not (0).
- */
-unsigned int
-rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id);
-
 /**
  * The pool of rte_cryptodev structures.
  */
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 979d823a7c..1a7f759c57 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -25,6 +25,7 @@ DPDK_22 {
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_get_sec_ctx;
 	rte_cryptodev_info_get;
+	rte_cryptodev_is_valid_dev;
 	rte_cryptodev_name_get;
 	rte_cryptodev_pmd_allocate;
 	rte_cryptodev_pmd_callback_process;
@@ -33,7 +34,6 @@ DPDK_22 {
 	rte_cryptodev_pmd_destroy;
 	rte_cryptodev_pmd_get_dev;
 	rte_cryptodev_pmd_get_named_dev;
-	rte_cryptodev_pmd_is_valid_dev;
 	rte_cryptodev_pmd_parse_input_args;
 	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_queue_pair_count;
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index e1d38d383d..2d38389858 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -781,7 +781,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id,
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
 		return -EINVAL;
 	}
@@ -898,7 +898,7 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id,
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
 		return -EINVAL;
 	}
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 594dd5e759..cb0ed7b620 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -165,7 +165,7 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
 	struct rte_cryptodev *cdev;
 
 	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id))
+	if (!rte_cryptodev_is_valid_dev(cdev_id))
 		return -EINVAL;
 
 	dev = &rte_eventdevs[dev_id];
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index 98f3438774..54721ed96a 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -1732,7 +1732,7 @@ struct sym_crypto_data {
 static int
 sym_crypto_cfg_check(struct rte_table_action_sym_crypto_config *cfg)
 {
-	if (!rte_cryptodev_pmd_is_valid_dev(cfg->cryptodev_id))
+	if (!rte_cryptodev_is_valid_dev(cfg->cryptodev_id))
 		return -EINVAL;
 	if (cfg->mp_create == NULL || cfg->mp_init == NULL)
 		return -EINVAL;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v3 3/4] examples/fips_validation: remove illegal usage of APIs
  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     ` 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
  4 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:00 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

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>
Acked-by: Matan Azrad <matan@nvidia.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


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v3 4/4] cryptodev: expose driver interface as internal
  2021-09-07 19:00   ` [dpdk-dev] [PATCH v3 0/4] " Akhil Goyal
                       ` (2 preceding siblings ...)
  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     ` Akhil Goyal
  2021-09-07 19:22     ` [dpdk-dev] [PATCH v4 0/4] " Akhil Goyal
  4 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:00 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

The rte_cryptodev_pmd.* files are for drivers only and should be
private to DPDK, and not installed for app use.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 doc/guides/rel_notes/release_21_11.rst        |  4 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_session.h      |  2 +-
 drivers/crypto/caam_jr/caam_jr.c              |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               |  2 +-
 drivers/crypto/ccp/ccp_pmd_ops.c              |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |  2 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c      |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    |  2 +-
 drivers/crypto/mlx5/mlx5_crypto.h             |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       |  2 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  2 +-
 drivers/crypto/qat/qat_asym.h                 |  2 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  2 +-
 drivers/crypto/qat/qat_sym.h                  |  2 +-
 drivers/crypto/qat/qat_sym_hw_dp.c            |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  2 +-
 drivers/crypto/qat/qat_sym_session.h          |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 +-
 drivers/crypto/virtio/virtio_rxtx.c           |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_rx.h    |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_tx.h    |  2 +-
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
 .../{rte_cryptodev_pmd.c => cryptodev_pmd.c}  |  2 +-
 .../{rte_cryptodev_pmd.h => cryptodev_pmd.h}  | 16 +++++++++---
 lib/cryptodev/meson.build                     | 18 ++++++++++---
 lib/cryptodev/rte_cryptodev.c                 |  2 +-
 lib/cryptodev/version.map                     | 25 +++++++++++--------
 lib/eventdev/rte_event_crypto_adapter.c       |  2 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/pipeline/rte_table_action.c               |  2 +-
 63 files changed, 105 insertions(+), 76 deletions(-)
 rename lib/cryptodev/{rte_cryptodev_pmd.c => cryptodev_pmd.c} (99%)
 rename lib/cryptodev/{rte_cryptodev_pmd.h => cryptodev_pmd.h} (98%)

diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index e7ad50ba09..8785b25ff6 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -106,6 +106,10 @@ API Changes
   rte_cryptodev_is_valid_dev as it can be used by the application as
   well as PMD to check whether the device is valid or not.
 
+* cryptodev: The rte_cryptodev_pmd.* files are renamed as cryptodev_pmd.*
+  as it is for drivers only and should be private to DPDK, and not
+  installed for app use.
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 886e2a5aaa..330aad8157 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 18dbc4c18c..edb7275e76 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_gcm_pmd_private.h"
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index a01c826a3c..60963a8208 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index fc7fdfec8e..48a8f91868 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -8,7 +8,7 @@
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_ether.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_mb_pmd_private.h"
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index c642ac350f..36a1a9bb4f 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 01ccfb4b23..1b2749fe62 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "armv8_pmd_private.h"
 
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index aa7fad6d70..d1dd22823e 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "bcmfs_device.h"
 #include "bcmfs_logs.h"
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.h b/drivers/crypto/bcmfs/bcmfs_sym_session.h
index 8240c6fc25..d40595b4bd 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_session.h
+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.h
@@ -8,7 +8,7 @@
 
 #include <stdbool.h>
 #include <rte_crypto.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "bcmfs_sym_defs.h"
 #include "bcmfs_sym_req.h"
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 3fb3fe0f8a..258750afe7 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -9,7 +9,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <rte_bus_vdev.h>
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index f37d35f18f..70daed791e 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -20,7 +20,7 @@
 #include <rte_memory.h>
 #include <rte_spinlock.h>
 #include <rte_string_fns.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "ccp_dev.h"
 #include "ccp_crypto.h"
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 98f964f361..0d615d311c 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_malloc.h>
 
 #include "ccp_pmd_private.h"
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index ab9416942e..a54d81de46 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_bus_vdev.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_pci.h>
 #include <rte_dev.h>
 #include <rte_malloc.h>
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index db7b5aa7c6..012eb0c051 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index cccca77f60..3a1a4a2e29 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_ip.h>
 
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
index b03d2eee14..d7e9f87396 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
@@ -6,7 +6,7 @@
 #define _CN10K_CRYPTODEV_OPS_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 extern struct rte_cryptodev_ops cn10k_cpt_ops;
 
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index e60b352fac..6b8cb01a12 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index 40109acc3f..75277936b0 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_ip.h>
 #include <rte_vect.h>
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.h b/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
index 1255de33ae..309f507346 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
@@ -5,7 +5,7 @@
 #ifndef _CN9K_CRYPTODEV_OPS_H_
 #define _CN9K_CRYPTODEV_OPS_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 extern struct rte_cryptodev_ops cn9k_cpt_ops;
 
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 957c78063f..41d8fe49e1 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_errno.h>
 
 #include "roc_cpt.h"
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1ccead3641..bf69c61916 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -18,7 +18,7 @@
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 #include <rte_dev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_common.h>
 #include <rte_fslmc.h>
 #include <fslmc_vfio.h>
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 19d4684e24..3d53746ef1 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -12,7 +12,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #ifdef RTE_LIB_SECURITY
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 48b7db9e9b..d6f927417a 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 43376c1aa0..f075054807 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "kasumi_pmd_private.h"
 
diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index 722acb8d19..d589e0ac3d 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -8,7 +8,7 @@
 #include <stdbool.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include <mlx5_common_utils.h>
 #include <mlx5_common_devx.h>
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index ed85bb6547..a72642a772 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index fa36461276..3064b1f136 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -8,7 +8,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
 
 #include "mrvl_pmd_private.h"
diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 2768bdd2e1..f8b7edcd69 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -4,7 +4,7 @@
 
 #include <stdbool.h>
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 
 #include "nitrox_sym.h"
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 179e5ff36d..f9935d52cc 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index d67892a1bb..a8b5a06e7f 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "null_crypto_pmd_private.h"
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 3822c0d779..c294f86d79 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -5,7 +5,7 @@
 #include <rte_bus_pci.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_log.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index eac6796cfb..9b5bde53f8 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -5,7 +5,7 @@
 #include <rte_alarm.h>
 #include <rte_bus_pci.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_errno.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 75fb4f9a3b..85b1f00263 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_mempool.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
index 42100154cd..09ddbb5f34 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
@@ -4,7 +4,7 @@
 
 #include <unistd.h>
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_event_crypto_adapter.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
index 1970187f88..8d135909b3 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
@@ -5,7 +5,7 @@
 #ifndef _OTX2_CRYPTODEV_OPS_H_
 #define _OTX2_CRYPTODEV_OPS_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #define OTX2_CPT_MIN_HEADROOM_REQ	24
 #define OTX2_CPT_MIN_TAILROOM_REQ	8
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 37b969b916..13c6ea8724 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index ed75877581..52715f86f8 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "openssl_pmd_private.h"
 #include "compat.h"
diff --git a/drivers/crypto/qat/qat_asym.h b/drivers/crypto/qat/qat_asym.h
index 2838aee76f..308b6b2e0b 100644
--- a/drivers/crypto/qat/qat_asym.h
+++ b/drivers/crypto/qat/qat_asym.h
@@ -5,7 +5,7 @@
 #ifndef _QAT_ASYM_H_
 #define _QAT_ASYM_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto_asym.h>
 #include "icp_qat_fw_pke.h"
 #include "qat_common.h"
diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c
index 0c25cce09e..e91bb0d317 100644
--- a/drivers/crypto/qat/qat_asym_pmd.c
+++ b/drivers/crypto/qat/qat_asym_pmd.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2019 Intel Corporation
  */
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "qat_logs.h"
 
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index 20b1b53d36..e3ec7f0de4 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -5,7 +5,7 @@
 #ifndef _QAT_SYM_H_
 #define _QAT_SYM_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_net_crc.h>
 #endif
diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c
index ac9ac05363..36d11e0dc9 100644
--- a/drivers/crypto/qat/qat_sym_hw_dp.c
+++ b/drivers/crypto/qat/qat_sym_hw_dp.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "adf_transport_access_macros.h"
 #include "icp_qat_fw.h"
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 6868e5f001..efda921c05 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_dev.h>
 #include <rte_malloc.h>
 #include <rte_pci.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security_driver.h>
 #endif
diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h
index 33b236e49b..6ebc176729 100644
--- a/drivers/crypto/qat/qat_sym_session.h
+++ b/drivers/crypto/qat/qat_sym_session.h
@@ -5,7 +5,7 @@
 #define _QAT_SYM_SESSION_H_
 
 #include <rte_crypto.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security.h>
 #endif
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 1e0b4df0ca..1e0c4fe464 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -4,7 +4,7 @@
 #include <rte_string_fns.h>
 #include <rte_reorder.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_malloc.h>
 
 #include "rte_cryptodev_scheduler.h"
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 632197833c..560c26af50 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -4,7 +4,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index cb125e8027..465b88ade8 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -7,7 +7,7 @@
 #include <rte_malloc.h>
 #include <rte_dev.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_reorder.h>
 
 #include "scheduler_pmd_private.h"
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 9aab357846..8284ac0b66 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 906a0fe60b..3f46014b7d 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "snow3g_pmd_private.h"
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 4bae74a487..8faa39df4a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -9,7 +9,7 @@
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eal.h>
 
 #include "virtio_cryptodev.h"
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e1cb4ad104..a65524a306 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2018 HUAWEI TECHNOLOGIES CO., LTD.
  */
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "virtqueue.h"
 #include "virtio_cryptodev.h"
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 42b669f188..d4b343a7af 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index dc9dc25ef8..38642d45ab 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "zuc_pmd_private.h"
 
diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
index a543225376..b33cb7e139 100644
--- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
+++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
@@ -6,7 +6,7 @@
 #define _OTX2_EVDEV_CRYPTO_ADPTR_RX_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
 
 #include "cpt_pmd_logs.h"
diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
index ecf7eb9f56..1fc56f903b 100644
--- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
+++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
@@ -6,7 +6,7 @@
 #define _OTX2_EVDEV_CRYPTO_ADPTR_TX_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_eventdev.h>
 
diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
index 8e278801c5..9a7d006f1a 100644
--- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
+++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
@@ -6,7 +6,7 @@
 #include <stdio.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #include "rte_eth_softnic_internals.h"
diff --git a/lib/cryptodev/rte_cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
similarity index 99%
rename from lib/cryptodev/rte_cryptodev_pmd.c
rename to lib/cryptodev/cryptodev_pmd.c
index e342daabc4..71e34140cd 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
-#include "rte_cryptodev_pmd.h"
+#include "cryptodev_pmd.h"
 
 /**
  * Parse name from argument
diff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
similarity index 98%
rename from lib/cryptodev/rte_cryptodev_pmd.h
rename to lib/cryptodev/cryptodev_pmd.h
index dd2a4940a2..ec7bb82be8 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2015-2020 Intel Corporation.
  */
 
-#ifndef _RTE_CRYPTODEV_PMD_H_
-#define _RTE_CRYPTODEV_PMD_H_
+#ifndef _CRYPTODEV_PMD_H_
+#define _CRYPTODEV_PMD_H_
 
 /** @file
  * RTE Crypto PMD APIs
@@ -80,6 +80,7 @@ struct cryptodev_driver {
  * @return
  *   - The rte_cryptodev structure pointer for the given device ID.
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id);
 
@@ -91,6 +92,7 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
  * @return
  *   - The rte_cryptodev structure pointer for the given device ID.
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_named_dev(const char *name);
 
@@ -401,6 +403,7 @@ struct rte_cryptodev_ops {
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_allocate(const char *name, int socket_id);
 
@@ -414,6 +417,7 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id);
  * @return
  *   - 0 on success, negative on error
  */
+__rte_internal
 extern int
 rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
 
@@ -435,6 +439,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
  *  - 0 on success
  *  - errno on failure
  */
+__rte_internal
 int
 rte_cryptodev_pmd_parse_input_args(
 		struct rte_cryptodev_pmd_init_params *params,
@@ -454,6 +459,7 @@ rte_cryptodev_pmd_parse_input_args(
  *  - crypto device instance on success
  *  - NULL on creation failure
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_create(const char *name,
 		struct rte_device *device,
@@ -471,6 +477,7 @@ rte_cryptodev_pmd_create(const char *name,
  *  - 0 on success
  *  - errno on failure
  */
+__rte_internal
 int
 rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
 
@@ -484,6 +491,7 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
  * @return
  *  void
  */
+__rte_internal
 void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
 				enum rte_cryptodev_event_type event);
 
@@ -491,6 +499,7 @@ void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
  * @internal
  * Create unique device name
  */
+__rte_internal
 int
 rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
 
@@ -506,6 +515,7 @@ rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
  * @return
  *  The driver type identifier
  */
+__rte_internal
 uint8_t rte_cryptodev_allocate_driver(struct cryptodev_driver *crypto_drv,
 		const struct rte_driver *drv);
 
@@ -555,4 +565,4 @@ set_asym_session_private_data(struct rte_cryptodev_asym_session *sess,
 }
 #endif
 
-#endif /* _RTE_CRYPTODEV_PMD_H_ */
+#endif /* _CRYPTODEV_PMD_H_ */
diff --git a/lib/cryptodev/meson.build b/lib/cryptodev/meson.build
index bec80beab3..735935df4a 100644
--- a/lib/cryptodev/meson.build
+++ b/lib/cryptodev/meson.build
@@ -1,12 +1,22 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c', 'cryptodev_trace_points.c')
-headers = files('rte_cryptodev.h',
-        'rte_cryptodev_pmd.h',
+sources = files(
+        'cryptodev_pmd.c',
+	'cryptodev_trace_points.c',
+        'rte_cryptodev.c',
+)
+headers = files(
+        'rte_cryptodev.h',
         'rte_cryptodev_trace.h',
         'rte_cryptodev_trace_fp.h',
         'rte_crypto.h',
         'rte_crypto_sym.h',
-        'rte_crypto_asym.h')
+        'rte_crypto_asym.h',
+)
+
+driver_sdk_headers += files(
+        'cryptodev_pmd.h',
+)
+
 deps += ['kvargs', 'mbuf', 'rcu']
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 37502b9b3c..9fa3aff1d3 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -39,7 +39,7 @@
 
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
-#include "rte_cryptodev_pmd.h"
+#include "cryptodev_pmd.h"
 #include "rte_cryptodev_trace.h"
 
 static uint8_t nb_drivers;
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 1a7f759c57..8294c9f64f 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -8,7 +8,6 @@ DPDK_22 {
 	rte_crypto_cipher_algorithm_strings;
 	rte_crypto_cipher_operation_strings;
 	rte_crypto_op_pool_create;
-	rte_cryptodev_allocate_driver;
 	rte_cryptodev_callback_register;
 	rte_cryptodev_callback_unregister;
 	rte_cryptodev_close;
@@ -27,15 +26,6 @@ DPDK_22 {
 	rte_cryptodev_info_get;
 	rte_cryptodev_is_valid_dev;
 	rte_cryptodev_name_get;
-	rte_cryptodev_pmd_allocate;
-	rte_cryptodev_pmd_callback_process;
-	rte_cryptodev_pmd_create;
-	rte_cryptodev_pmd_create_dev_name;
-	rte_cryptodev_pmd_destroy;
-	rte_cryptodev_pmd_get_dev;
-	rte_cryptodev_pmd_get_named_dev;
-	rte_cryptodev_pmd_parse_input_args;
-	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
 	rte_cryptodev_socket_id;
@@ -117,3 +107,18 @@ EXPERIMENTAL {
 	rte_cryptodev_remove_enq_callback;
 
 };
+
+INTERNAL {
+	global:
+
+	rte_cryptodev_allocate_driver;
+	rte_cryptodev_pmd_allocate;
+	rte_cryptodev_pmd_callback_process;
+	rte_cryptodev_pmd_create;
+	rte_cryptodev_pmd_create_dev_name;
+	rte_cryptodev_pmd_destroy;
+	rte_cryptodev_pmd_get_dev;
+	rte_cryptodev_pmd_get_named_dev;
+	rte_cryptodev_pmd_parse_input_args;
+	rte_cryptodev_pmd_release_device;
+};
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 2d38389858..ebfc8326a8 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -9,7 +9,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_service_component.h>
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index cb0ed7b620..e347d6dfd5 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -31,7 +31,7 @@
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_telemetry.h>
 
 #include "rte_eventdev.h"
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index 54721ed96a..ad7904c0ee 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -16,7 +16,7 @@
 #include <rte_udp.h>
 #include <rte_vxlan.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "rte_table_action.h"
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v4 0/4] cryptodev: expose driver interface as internal
  2021-09-07 19:00   ` [dpdk-dev] [PATCH v3 0/4] " Akhil Goyal
                       ` (3 preceding siblings ...)
  2021-09-07 19:00     ` [dpdk-dev] [PATCH v3 4/4] cryptodev: expose driver interface as internal Akhil Goyal
@ 2021-09-07 19:22     ` Akhil Goyal
  2021-09-07 19:22       ` [dpdk-dev] [PATCH v4 1/4] test/crypto: remove illegal header include Akhil Goyal
                         ` (3 more replies)
  4 siblings, 4 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:22 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

rte_cryptodev_pmd.* files are meant to be used for
DPDK internal usage only, but it was used illegally by
applications.
There is one API which can be used by applications to
check if the dev_id has a valid device or not.
This API is exposed and modified as rte_cryptodev_is_valid_dev()
from rte_cryptodev_pmd_is_valid_dev().

Changes in v4:
removed deprecation notice

Changes in v3:
Added release notes.

changes in v2:
rebase over 21.08 release tag.


Akhil Goyal (4):
  test/crypto: remove illegal header include
  cryptodev: change valid dev API
  examples/fips_validation: remove illegal usage of APIs
  cryptodev: expose driver interface as internal

 app/test/test_cryptodev.c                     |  1 -
 app/test/test_cryptodev_asym.c                |  1 -
 app/test/test_cryptodev_blockcipher.c         |  1 -
 app/test/test_cryptodev_security_pdcp.c       |  1 -
 app/test/test_ipsec.c                         |  1 -
 doc/guides/rel_notes/deprecation.rst          |  3 --
 doc/guides/rel_notes/release_21_11.rst        |  8 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_session.h      |  2 +-
 drivers/crypto/caam_jr/caam_jr.c              |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               |  2 +-
 drivers/crypto/ccp/ccp_pmd_ops.c              |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |  2 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c      |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    |  2 +-
 drivers/crypto/mlx5/mlx5_crypto.h             |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       |  2 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  2 +-
 drivers/crypto/qat/qat_asym.h                 |  2 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  2 +-
 drivers/crypto/qat/qat_sym.h                  |  2 +-
 drivers/crypto/qat/qat_sym_hw_dp.c            |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  2 +-
 drivers/crypto/qat/qat_sym_session.h          |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 +-
 drivers/crypto/virtio/virtio_rxtx.c           |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_rx.h    |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_tx.h    |  2 +-
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  4 +-
 examples/fips_validation/fips_dev_self_test.c | 19 +------
 examples/fips_validation/main.c               |  9 ++--
 examples/ip_pipeline/cryptodev.c              |  3 +-
 .../{rte_cryptodev_pmd.c => cryptodev_pmd.c}  |  2 +-
 .../{rte_cryptodev_pmd.h => cryptodev_pmd.h}  | 27 +++++-----
 lib/cryptodev/meson.build                     | 18 +++++--
 lib/cryptodev/rte_cryptodev.c                 | 52 +++++++++----------
 lib/cryptodev/rte_cryptodev.h                 | 11 ++++
 lib/cryptodev/version.map                     | 27 ++++++----
 lib/eventdev/rte_event_crypto_adapter.c       |  6 +--
 lib/eventdev/rte_eventdev.c                   |  4 +-
 lib/pipeline/rte_table_action.c               |  4 +-
 73 files changed, 157 insertions(+), 151 deletions(-)
 rename lib/cryptodev/{rte_cryptodev_pmd.c => cryptodev_pmd.c} (99%)
 rename lib/cryptodev/{rte_cryptodev_pmd.h => cryptodev_pmd.h} (97%)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v4 1/4] test/crypto: remove illegal header include
  2021-09-07 19:22     ` [dpdk-dev] [PATCH v4 0/4] " Akhil Goyal
@ 2021-09-07 19:22       ` Akhil Goyal
  2021-09-08  6:38         ` Hemant Agrawal
  2021-09-07 19:22       ` [dpdk-dev] [PATCH v4 2/4] cryptodev: change valid dev API Akhil Goyal
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:22 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

rte_cryptodev_pmd.h is an interface between
driver and library and it is mentioned in the
file that application cannot use it directly.
Hence, removing the include.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 app/test/test_cryptodev.c               | 1 -
 app/test/test_cryptodev_asym.c          | 1 -
 app/test/test_cryptodev_blockcipher.c   | 1 -
 app/test/test_cryptodev_security_pdcp.c | 1 -
 app/test/test_ipsec.c                   | 1 -
 5 files changed, 5 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 843d07ba37..9e823db1e6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -16,7 +16,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #ifdef RTE_CRYPTO_SCHEDULER
diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 847b074a4f..9d19a6d6d9 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -12,7 +12,6 @@
 #include <rte_pause.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_crypto.h>
 
 #include "test_cryptodev.h"
diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 53fd4718af..1c948eb008 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -11,7 +11,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 
 #include "test.h"
 #include "test_cryptodev.h"
diff --git a/app/test/test_cryptodev_security_pdcp.c b/app/test/test_cryptodev_security_pdcp.c
index 30f3eb892c..a7641bab7a 100644
--- a/app/test/test_cryptodev_security_pdcp.c
+++ b/app/test/test_cryptodev_security_pdcp.c
@@ -17,7 +17,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_security.h>
 
 #include <rte_lcore.h>
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index fb90130ae2..c6d6b88d6d 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -15,7 +15,6 @@
 
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_lcore.h>
 #include <rte_ipsec.h>
 #include <rte_random.h>
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v4 2/4] cryptodev: change valid dev API
  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-07 19:22       ` 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
  3 siblings, 1 reply; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:22 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

The API rte_cryptodev_pmd_is_valid_dev, can be used
by the application as well as PMD to check whether
the device is valid or not. Hence, _pmd is removed
from the API.
The applications and drivers which use this API are
also updated.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 doc/guides/rel_notes/release_21_11.rst        |  4 ++
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
 examples/fips_validation/main.c               |  2 +-
 examples/ip_pipeline/cryptodev.c              |  3 +-
 lib/cryptodev/rte_cryptodev.c                 | 50 +++++++++----------
 lib/cryptodev/rte_cryptodev.h                 | 11 ++++
 lib/cryptodev/rte_cryptodev_pmd.h             | 11 ----
 lib/cryptodev/version.map                     |  2 +-
 lib/eventdev/rte_event_crypto_adapter.c       |  4 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/pipeline/rte_table_action.c               |  2 +-
 11 files changed, 48 insertions(+), 45 deletions(-)

diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index 411fa9530a..e7ad50ba09 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -102,6 +102,10 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* cryptodev: The API rte_cryptodev_pmd_is_valid_dev is modified to
+  rte_cryptodev_is_valid_dev as it can be used by the application as
+  well as PMD to check whether the device is valid or not.
+
 
 ABI Changes
 -----------
diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
index a1a4ca5650..8e278801c5 100644
--- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
+++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
@@ -82,7 +82,7 @@ softnic_cryptodev_create(struct pmd_internals *p,
 
 		dev_id = (uint32_t)status;
 	} else {
-		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
+		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
 			return NULL;
 
 		dev_id = params->dev_id;
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index c175fe6ac2..e892078f0e 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -196,7 +196,7 @@ parse_cryptodev_id_arg(char *arg)
 	}
 
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cryptodev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cryptodev_id)) {
 		RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n",
 				cryptodev_id, arg);
 		return -1;
diff --git a/examples/ip_pipeline/cryptodev.c b/examples/ip_pipeline/cryptodev.c
index b0d9f3d217..9997d97456 100644
--- a/examples/ip_pipeline/cryptodev.c
+++ b/examples/ip_pipeline/cryptodev.c
@@ -6,7 +6,6 @@
 #include <stdio.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #include "cryptodev.h"
@@ -74,7 +73,7 @@ cryptodev_create(const char *name, struct cryptodev_params *params)
 
 		dev_id = (uint32_t)status;
 	} else {
-		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
+		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
 			return NULL;
 
 		dev_id = params->dev_id;
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 447aa9d519..37502b9b3c 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -663,7 +663,7 @@ rte_cryptodev_is_valid_device_data(uint8_t dev_id)
 }
 
 unsigned int
-rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
+rte_cryptodev_is_valid_dev(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev = NULL;
 
@@ -761,7 +761,7 @@ rte_cryptodev_socket_id(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return -1;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -1032,7 +1032,7 @@ rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 	struct rte_cryptodev *dev;
 	int diag;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1080,7 +1080,7 @@ rte_cryptodev_start(uint8_t dev_id)
 
 	CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1110,7 +1110,7 @@ rte_cryptodev_stop(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
 	}
@@ -1136,7 +1136,7 @@ rte_cryptodev_close(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	int retval;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -1;
 	}
@@ -1176,7 +1176,7 @@ rte_cryptodev_get_qp_status(uint8_t dev_id, uint16_t queue_pair_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1207,7 +1207,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1283,7 +1283,7 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
 		return NULL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		rte_errno = ENODEV;
 		return NULL;
@@ -1349,7 +1349,7 @@ rte_cryptodev_remove_enq_callback(uint8_t dev_id,
 		return -EINVAL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1418,7 +1418,7 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
 		return NULL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		rte_errno = ENODEV;
 		return NULL;
@@ -1484,7 +1484,7 @@ rte_cryptodev_remove_deq_callback(uint8_t dev_id,
 		return -EINVAL;
 	}
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1542,7 +1542,7 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct rte_cryptodev_stats *stats)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return -ENODEV;
 	}
@@ -1565,7 +1565,7 @@ rte_cryptodev_stats_reset(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return;
 	}
@@ -1581,7 +1581,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return;
 	}
@@ -1608,7 +1608,7 @@ rte_cryptodev_callback_register(uint8_t dev_id,
 	if (!cb_fn)
 		return -EINVAL;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1652,7 +1652,7 @@ rte_cryptodev_callback_unregister(uint8_t dev_id,
 	if (!cb_fn)
 		return -EINVAL;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1720,7 +1720,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1765,7 +1765,7 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
 	uint8_t index;
 	int ret;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1939,7 +1939,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	struct rte_cryptodev *dev;
 	uint8_t driver_id;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_clear(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
 		return -EINVAL;
 	}
@@ -2079,7 +2079,7 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 	struct rte_cryptodev *dev;
 	unsigned int priv_sess_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return 0;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -2099,7 +2099,7 @@ rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
 	unsigned int header_size = sizeof(void *) * nb_drivers;
 	unsigned int priv_sess_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return 0;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
@@ -2156,7 +2156,7 @@ rte_cryptodev_sym_cpu_crypto_process(uint8_t dev_id,
 {
 	struct rte_cryptodev *dev;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
+	if (!rte_cryptodev_is_valid_dev(dev_id)) {
 		sym_crypto_fill_status(vec, EINVAL);
 		return 0;
 	}
@@ -2179,7 +2179,7 @@ rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id)
 	int32_t size = sizeof(struct rte_crypto_raw_dp_ctx);
 	int32_t priv_size;
 
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
+	if (!rte_cryptodev_is_valid_dev(dev_id))
 		return -EINVAL;
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 11f4e6fdbf..bb01f0f195 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1368,6 +1368,17 @@ __rte_experimental
 unsigned int
 rte_cryptodev_asym_get_private_session_size(uint8_t dev_id);
 
+/**
+ * Validate if the crypto device index is valid attached crypto device.
+ *
+ * @param	dev_id	Crypto device index.
+ *
+ * @return
+ *   - If the device index is valid (1) or not (0).
+ */
+unsigned int
+rte_cryptodev_is_valid_dev(uint8_t dev_id);
+
 /**
  * Provide driver identifier.
  *
diff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/rte_cryptodev_pmd.h
index 1274436870..dd2a4940a2 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.h
+++ b/lib/cryptodev/rte_cryptodev_pmd.h
@@ -94,17 +94,6 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_named_dev(const char *name);
 
-/**
- * Validate if the crypto device index is valid attached crypto device.
- *
- * @param	dev_id	Crypto device index.
- *
- * @return
- *   - If the device index is valid (1) or not (0).
- */
-unsigned int
-rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id);
-
 /**
  * The pool of rte_cryptodev structures.
  */
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 979d823a7c..1a7f759c57 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -25,6 +25,7 @@ DPDK_22 {
 	rte_cryptodev_get_feature_name;
 	rte_cryptodev_get_sec_ctx;
 	rte_cryptodev_info_get;
+	rte_cryptodev_is_valid_dev;
 	rte_cryptodev_name_get;
 	rte_cryptodev_pmd_allocate;
 	rte_cryptodev_pmd_callback_process;
@@ -33,7 +34,6 @@ DPDK_22 {
 	rte_cryptodev_pmd_destroy;
 	rte_cryptodev_pmd_get_dev;
 	rte_cryptodev_pmd_get_named_dev;
-	rte_cryptodev_pmd_is_valid_dev;
 	rte_cryptodev_pmd_parse_input_args;
 	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_queue_pair_count;
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index e1d38d383d..2d38389858 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -781,7 +781,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id,
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
 		return -EINVAL;
 	}
@@ -898,7 +898,7 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t id, uint8_t cdev_id,
 
 	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
 
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
+	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
 		return -EINVAL;
 	}
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 594dd5e759..cb0ed7b620 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -165,7 +165,7 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id,
 	struct rte_cryptodev *cdev;
 
 	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
-	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id))
+	if (!rte_cryptodev_is_valid_dev(cdev_id))
 		return -EINVAL;
 
 	dev = &rte_eventdevs[dev_id];
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index 98f3438774..54721ed96a 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -1732,7 +1732,7 @@ struct sym_crypto_data {
 static int
 sym_crypto_cfg_check(struct rte_table_action_sym_crypto_config *cfg)
 {
-	if (!rte_cryptodev_pmd_is_valid_dev(cfg->cryptodev_id))
+	if (!rte_cryptodev_is_valid_dev(cfg->cryptodev_id))
 		return -EINVAL;
 	if (cfg->mp_create == NULL || cfg->mp_init == NULL)
 		return -EINVAL;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v4 3/4] examples/fips_validation: remove illegal usage of APIs
  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-07 19:22       ` [dpdk-dev] [PATCH v4 2/4] cryptodev: change valid dev API Akhil Goyal
@ 2021-09-07 19:22       ` Akhil Goyal
  2021-09-07 19:22       ` [dpdk-dev] [PATCH v4 4/4] cryptodev: expose driver interface as internal Akhil Goyal
  3 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:22 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

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>
Acked-by: Matan Azrad <matan@nvidia.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


^ permalink raw reply	[flat|nested] 36+ messages in thread

* [dpdk-dev] [PATCH v4 4/4] cryptodev: expose driver interface as internal
  2021-09-07 19:22     ` [dpdk-dev] [PATCH v4 0/4] " Akhil Goyal
                         ` (2 preceding siblings ...)
  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       ` Akhil Goyal
  3 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-07 19:22 UTC (permalink / raw)
  To: dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou, Akhil Goyal

The rte_cryptodev_pmd.* files are for drivers only and should be
private to DPDK, and not installed for app use.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 doc/guides/rel_notes/deprecation.rst          |  3 ---
 doc/guides/rel_notes/release_21_11.rst        |  4 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  2 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  |  2 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  2 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd.c          |  2 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  2 +-
 drivers/crypto/bcmfs/bcmfs_sym_session.h      |  2 +-
 drivers/crypto/caam_jr/caam_jr.c              |  2 +-
 drivers/crypto/ccp/ccp_crypto.c               |  2 +-
 drivers/crypto/ccp/ccp_pmd_ops.c              |  2 +-
 drivers/crypto/ccp/rte_ccp_pmd.c              |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev.c         |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.c     |  2 +-
 drivers/crypto/cnxk/cn10k_cryptodev_ops.h     |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev.c          |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.c      |  2 +-
 drivers/crypto/cnxk/cn9k_cryptodev_ops.h      |  2 +-
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c      |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c            |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  2 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    |  2 +-
 drivers/crypto/mlx5/mlx5_crypto.h             |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       |  2 +-
 drivers/crypto/nitrox/nitrox_sym.c            |  2 +-
 drivers/crypto/null/null_crypto_pmd.c         |  2 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     |  2 +-
 drivers/crypto/octeontx/otx_cryptodev.c       |  2 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c   |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c     |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c |  2 +-
 drivers/crypto/octeontx2/otx2_cryptodev_ops.h |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c      |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  |  2 +-
 drivers/crypto/qat/qat_asym.h                 |  2 +-
 drivers/crypto/qat/qat_asym_pmd.c             |  2 +-
 drivers/crypto/qat/qat_sym.h                  |  2 +-
 drivers/crypto/qat/qat_sym_hw_dp.c            |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c              |  2 +-
 drivers/crypto/qat/qat_sym_session.h          |  2 +-
 .../scheduler/rte_cryptodev_scheduler.c       |  2 +-
 drivers/crypto/scheduler/scheduler_pmd.c      |  2 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c  |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    |  2 +-
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 +-
 drivers/crypto/virtio/virtio_rxtx.c           |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c              |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_rx.h    |  2 +-
 .../octeontx2/otx2_evdev_crypto_adptr_tx.h    |  2 +-
 .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
 .../{rte_cryptodev_pmd.c => cryptodev_pmd.c}  |  2 +-
 .../{rte_cryptodev_pmd.h => cryptodev_pmd.h}  | 16 +++++++++---
 lib/cryptodev/meson.build                     | 18 ++++++++++---
 lib/cryptodev/rte_cryptodev.c                 |  2 +-
 lib/cryptodev/version.map                     | 25 +++++++++++--------
 lib/eventdev/rte_event_crypto_adapter.c       |  2 +-
 lib/eventdev/rte_eventdev.c                   |  2 +-
 lib/pipeline/rte_table_action.c               |  2 +-
 64 files changed, 105 insertions(+), 79 deletions(-)
 rename lib/cryptodev/{rte_cryptodev_pmd.c => cryptodev_pmd.c} (99%)
 rename lib/cryptodev/{rte_cryptodev_pmd.h => cryptodev_pmd.h} (98%)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 76a4abfd6b..59445a6f42 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -223,9 +223,6 @@ Deprecation Notices
   session and the private data of session. An opaque pointer can be exposed
   directly to application which can be attached to the ``rte_crypto_op``.
 
-* cryptodev: The interface between library and drivers will be marked
-  as internal in DPDK 21.11.
-
 * security: Hide structure ``rte_security_session`` and expose an opaque
   pointer for the private data to the application which can be attached
   to the packet while enqueuing.
diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
index e7ad50ba09..8785b25ff6 100644
--- a/doc/guides/rel_notes/release_21_11.rst
+++ b/doc/guides/rel_notes/release_21_11.rst
@@ -106,6 +106,10 @@ API Changes
   rte_cryptodev_is_valid_dev as it can be used by the application as
   well as PMD to check whether the device is valid or not.
 
+* cryptodev: The rte_cryptodev_pmd.* files are renamed as cryptodev_pmd.*
+  as it is for drivers only and should be private to DPDK, and not
+  installed for app use.
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 886e2a5aaa..330aad8157 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 18dbc4c18c..edb7275e76 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_gcm_pmd_private.h"
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index a01c826a3c..60963a8208 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index fc7fdfec8e..48a8f91868 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -8,7 +8,7 @@
 #include <rte_common.h>
 #include <rte_malloc.h>
 #include <rte_ether.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "aesni_mb_pmd_private.h"
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index c642ac350f..36a1a9bb4f 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 01ccfb4b23..1b2749fe62 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "armv8_pmd_private.h"
 
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
index aa7fad6d70..d1dd22823e 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "bcmfs_device.h"
 #include "bcmfs_logs.h"
diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.h b/drivers/crypto/bcmfs/bcmfs_sym_session.h
index 8240c6fc25..d40595b4bd 100644
--- a/drivers/crypto/bcmfs/bcmfs_sym_session.h
+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.h
@@ -8,7 +8,7 @@
 
 #include <stdbool.h>
 #include <rte_crypto.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "bcmfs_sym_defs.h"
 #include "bcmfs_sym_req.h"
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 3fb3fe0f8a..258750afe7 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -9,7 +9,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #include <rte_bus_vdev.h>
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index f37d35f18f..70daed791e 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -20,7 +20,7 @@
 #include <rte_memory.h>
 #include <rte_spinlock.h>
 #include <rte_string_fns.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "ccp_dev.h"
 #include "ccp_crypto.h"
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 98f964f361..0d615d311c 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -5,7 +5,7 @@
 #include <string.h>
 
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_malloc.h>
 
 #include "ccp_pmd_private.h"
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index ab9416942e..a54d81de46 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_bus_vdev.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_pci.h>
 #include <rte_dev.h>
 #include <rte_malloc.h>
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index db7b5aa7c6..012eb0c051 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index cccca77f60..3a1a4a2e29 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_ip.h>
 
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
index b03d2eee14..d7e9f87396 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
@@ -6,7 +6,7 @@
 #define _CN10K_CRYPTODEV_OPS_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 extern struct rte_cryptodev_ops cn10k_cpt_ops;
 
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index e60b352fac..6b8cb01a12 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
index 40109acc3f..75277936b0 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_ip.h>
 #include <rte_vect.h>
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.h b/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
index 1255de33ae..309f507346 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.h
@@ -5,7 +5,7 @@
 #ifndef _CN9K_CRYPTODEV_OPS_H_
 #define _CN9K_CRYPTODEV_OPS_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 extern struct rte_cryptodev_ops cn9k_cpt_ops;
 
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 957c78063f..41d8fe49e1 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_errno.h>
 
 #include "roc_cpt.h"
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1ccead3641..bf69c61916 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -18,7 +18,7 @@
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 #include <rte_dev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_common.h>
 #include <rte_fslmc.h>
 #include <fslmc_vfio.h>
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 19d4684e24..3d53746ef1 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -12,7 +12,7 @@
 
 #include <rte_byteorder.h>
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
 #ifdef RTE_LIB_SECURITY
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 48b7db9e9b..d6f927417a 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 43376c1aa0..f075054807 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "kasumi_pmd_private.h"
 
diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h
index 722acb8d19..d589e0ac3d 100644
--- a/drivers/crypto/mlx5/mlx5_crypto.h
+++ b/drivers/crypto/mlx5/mlx5_crypto.h
@@ -8,7 +8,7 @@
 #include <stdbool.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include <mlx5_common_utils.h>
 #include <mlx5_common_devx.h>
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index ed85bb6547..a72642a772 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index fa36461276..3064b1f136 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -8,7 +8,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_security_driver.h>
 
 #include "mrvl_pmd_private.h"
diff --git a/drivers/crypto/nitrox/nitrox_sym.c b/drivers/crypto/nitrox/nitrox_sym.c
index 2768bdd2e1..f8b7edcd69 100644
--- a/drivers/crypto/nitrox/nitrox_sym.c
+++ b/drivers/crypto/nitrox/nitrox_sym.c
@@ -4,7 +4,7 @@
 
 #include <stdbool.h>
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto.h>
 
 #include "nitrox_sym.h"
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 179e5ff36d..f9935d52cc 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -3,7 +3,7 @@
  */
 
 #include <rte_common.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index d67892a1bb..a8b5a06e7f 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "null_crypto_pmd_private.h"
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c
index 3822c0d779..c294f86d79 100644
--- a/drivers/crypto/octeontx/otx_cryptodev.c
+++ b/drivers/crypto/octeontx/otx_cryptodev.c
@@ -5,7 +5,7 @@
 #include <rte_bus_pci.h>
 #include <rte_common.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_log.h>
 #include <rte_pci.h>
 
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index eac6796cfb..9b5bde53f8 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -5,7 +5,7 @@
 #include <rte_alarm.h>
 #include <rte_bus_pci.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_errno.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 75fb4f9a3b..85b1f00263 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -6,7 +6,7 @@
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_mempool.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
index 42100154cd..09ddbb5f34 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
@@ -4,7 +4,7 @@
 
 #include <unistd.h>
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_event_crypto_adapter.h>
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
index 1970187f88..8d135909b3 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h
@@ -5,7 +5,7 @@
 #ifndef _OTX2_CRYPTODEV_OPS_H_
 #define _OTX2_CRYPTODEV_OPS_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #define OTX2_CPT_MIN_HEADROOM_REQ	24
 #define OTX2_CPT_MIN_TAILROOM_REQ	8
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 37b969b916..13c6ea8724 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index ed75877581..52715f86f8 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "openssl_pmd_private.h"
 #include "compat.h"
diff --git a/drivers/crypto/qat/qat_asym.h b/drivers/crypto/qat/qat_asym.h
index 2838aee76f..308b6b2e0b 100644
--- a/drivers/crypto/qat/qat_asym.h
+++ b/drivers/crypto/qat/qat_asym.h
@@ -5,7 +5,7 @@
 #ifndef _QAT_ASYM_H_
 #define _QAT_ASYM_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_crypto_asym.h>
 #include "icp_qat_fw_pke.h"
 #include "qat_common.h"
diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c
index 0c25cce09e..e91bb0d317 100644
--- a/drivers/crypto/qat/qat_asym_pmd.c
+++ b/drivers/crypto/qat/qat_asym_pmd.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2019 Intel Corporation
  */
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "qat_logs.h"
 
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index 20b1b53d36..e3ec7f0de4 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -5,7 +5,7 @@
 #ifndef _QAT_SYM_H_
 #define _QAT_SYM_H_
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_net_crc.h>
 #endif
diff --git a/drivers/crypto/qat/qat_sym_hw_dp.c b/drivers/crypto/qat/qat_sym_hw_dp.c
index ac9ac05363..36d11e0dc9 100644
--- a/drivers/crypto/qat/qat_sym_hw_dp.c
+++ b/drivers/crypto/qat/qat_sym_hw_dp.c
@@ -2,7 +2,7 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "adf_transport_access_macros.h"
 #include "icp_qat_fw.h"
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 6868e5f001..efda921c05 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -7,7 +7,7 @@
 #include <rte_dev.h>
 #include <rte_malloc.h>
 #include <rte_pci.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security_driver.h>
 #endif
diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h
index 33b236e49b..6ebc176729 100644
--- a/drivers/crypto/qat/qat_sym_session.h
+++ b/drivers/crypto/qat/qat_sym_session.h
@@ -5,7 +5,7 @@
 #define _QAT_SYM_SESSION_H_
 
 #include <rte_crypto.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #ifdef RTE_LIB_SECURITY
 #include <rte_security.h>
 #endif
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
index 1e0b4df0ca..1e0c4fe464 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c
@@ -4,7 +4,7 @@
 #include <rte_string_fns.h>
 #include <rte_reorder.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_malloc.h>
 
 #include "rte_cryptodev_scheduler.h"
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 632197833c..560c26af50 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -4,7 +4,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index cb125e8027..465b88ade8 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -7,7 +7,7 @@
 #include <rte_malloc.h>
 #include <rte_dev.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_reorder.h>
 
 #include "scheduler_pmd_private.h"
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 9aab357846..8284ac0b66 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 906a0fe60b..3f46014b7d 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "snow3g_pmd_private.h"
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 4bae74a487..8faa39df4a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -9,7 +9,7 @@
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eal.h>
 
 #include "virtio_cryptodev.h"
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index e1cb4ad104..a65524a306 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2018 HUAWEI TECHNOLOGIES CO., LTD.
  */
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "virtqueue.h"
 #include "virtio_cryptodev.h"
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 42b669f188..d4b343a7af 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_bus_vdev.h>
 #include <rte_malloc.h>
 #include <rte_cpuflags.h>
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index dc9dc25ef8..38642d45ab 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -6,7 +6,7 @@
 
 #include <rte_common.h>
 #include <rte_malloc.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "zuc_pmd_private.h"
 
diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
index a543225376..b33cb7e139 100644
--- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
+++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_rx.h
@@ -6,7 +6,7 @@
 #define _OTX2_EVDEV_CRYPTO_ADPTR_RX_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_eventdev.h>
 
 #include "cpt_pmd_logs.h"
diff --git a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
index ecf7eb9f56..1fc56f903b 100644
--- a/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
+++ b/drivers/event/octeontx2/otx2_evdev_crypto_adptr_tx.h
@@ -6,7 +6,7 @@
 #define _OTX2_EVDEV_CRYPTO_ADPTR_TX_H_
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_event_crypto_adapter.h>
 #include <rte_eventdev.h>
 
diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
index 8e278801c5..9a7d006f1a 100644
--- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
+++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
@@ -6,7 +6,7 @@
 #include <stdio.h>
 
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_string_fns.h>
 
 #include "rte_eth_softnic_internals.h"
diff --git a/lib/cryptodev/rte_cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
similarity index 99%
rename from lib/cryptodev/rte_cryptodev_pmd.c
rename to lib/cryptodev/cryptodev_pmd.c
index e342daabc4..71e34140cd 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -5,7 +5,7 @@
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 
-#include "rte_cryptodev_pmd.h"
+#include "cryptodev_pmd.h"
 
 /**
  * Parse name from argument
diff --git a/lib/cryptodev/rte_cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
similarity index 98%
rename from lib/cryptodev/rte_cryptodev_pmd.h
rename to lib/cryptodev/cryptodev_pmd.h
index dd2a4940a2..ec7bb82be8 100644
--- a/lib/cryptodev/rte_cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -2,8 +2,8 @@
  * Copyright(c) 2015-2020 Intel Corporation.
  */
 
-#ifndef _RTE_CRYPTODEV_PMD_H_
-#define _RTE_CRYPTODEV_PMD_H_
+#ifndef _CRYPTODEV_PMD_H_
+#define _CRYPTODEV_PMD_H_
 
 /** @file
  * RTE Crypto PMD APIs
@@ -80,6 +80,7 @@ struct cryptodev_driver {
  * @return
  *   - The rte_cryptodev structure pointer for the given device ID.
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_dev(uint8_t dev_id);
 
@@ -91,6 +92,7 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
  * @return
  *   - The rte_cryptodev structure pointer for the given device ID.
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_get_named_dev(const char *name);
 
@@ -401,6 +403,7 @@ struct rte_cryptodev_ops {
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_allocate(const char *name, int socket_id);
 
@@ -414,6 +417,7 @@ rte_cryptodev_pmd_allocate(const char *name, int socket_id);
  * @return
  *   - 0 on success, negative on error
  */
+__rte_internal
 extern int
 rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
 
@@ -435,6 +439,7 @@ rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
  *  - 0 on success
  *  - errno on failure
  */
+__rte_internal
 int
 rte_cryptodev_pmd_parse_input_args(
 		struct rte_cryptodev_pmd_init_params *params,
@@ -454,6 +459,7 @@ rte_cryptodev_pmd_parse_input_args(
  *  - crypto device instance on success
  *  - NULL on creation failure
  */
+__rte_internal
 struct rte_cryptodev *
 rte_cryptodev_pmd_create(const char *name,
 		struct rte_device *device,
@@ -471,6 +477,7 @@ rte_cryptodev_pmd_create(const char *name,
  *  - 0 on success
  *  - errno on failure
  */
+__rte_internal
 int
 rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
 
@@ -484,6 +491,7 @@ rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
  * @return
  *  void
  */
+__rte_internal
 void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
 				enum rte_cryptodev_event_type event);
 
@@ -491,6 +499,7 @@ void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
  * @internal
  * Create unique device name
  */
+__rte_internal
 int
 rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
 
@@ -506,6 +515,7 @@ rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
  * @return
  *  The driver type identifier
  */
+__rte_internal
 uint8_t rte_cryptodev_allocate_driver(struct cryptodev_driver *crypto_drv,
 		const struct rte_driver *drv);
 
@@ -555,4 +565,4 @@ set_asym_session_private_data(struct rte_cryptodev_asym_session *sess,
 }
 #endif
 
-#endif /* _RTE_CRYPTODEV_PMD_H_ */
+#endif /* _CRYPTODEV_PMD_H_ */
diff --git a/lib/cryptodev/meson.build b/lib/cryptodev/meson.build
index bec80beab3..735935df4a 100644
--- a/lib/cryptodev/meson.build
+++ b/lib/cryptodev/meson.build
@@ -1,12 +1,22 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-sources = files('rte_cryptodev.c', 'rte_cryptodev_pmd.c', 'cryptodev_trace_points.c')
-headers = files('rte_cryptodev.h',
-        'rte_cryptodev_pmd.h',
+sources = files(
+        'cryptodev_pmd.c',
+	'cryptodev_trace_points.c',
+        'rte_cryptodev.c',
+)
+headers = files(
+        'rte_cryptodev.h',
         'rte_cryptodev_trace.h',
         'rte_cryptodev_trace_fp.h',
         'rte_crypto.h',
         'rte_crypto_sym.h',
-        'rte_crypto_asym.h')
+        'rte_crypto_asym.h',
+)
+
+driver_sdk_headers += files(
+        'cryptodev_pmd.h',
+)
+
 deps += ['kvargs', 'mbuf', 'rcu']
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 37502b9b3c..9fa3aff1d3 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -39,7 +39,7 @@
 
 #include "rte_crypto.h"
 #include "rte_cryptodev.h"
-#include "rte_cryptodev_pmd.h"
+#include "cryptodev_pmd.h"
 #include "rte_cryptodev_trace.h"
 
 static uint8_t nb_drivers;
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index 1a7f759c57..8294c9f64f 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -8,7 +8,6 @@ DPDK_22 {
 	rte_crypto_cipher_algorithm_strings;
 	rte_crypto_cipher_operation_strings;
 	rte_crypto_op_pool_create;
-	rte_cryptodev_allocate_driver;
 	rte_cryptodev_callback_register;
 	rte_cryptodev_callback_unregister;
 	rte_cryptodev_close;
@@ -27,15 +26,6 @@ DPDK_22 {
 	rte_cryptodev_info_get;
 	rte_cryptodev_is_valid_dev;
 	rte_cryptodev_name_get;
-	rte_cryptodev_pmd_allocate;
-	rte_cryptodev_pmd_callback_process;
-	rte_cryptodev_pmd_create;
-	rte_cryptodev_pmd_create_dev_name;
-	rte_cryptodev_pmd_destroy;
-	rte_cryptodev_pmd_get_dev;
-	rte_cryptodev_pmd_get_named_dev;
-	rte_cryptodev_pmd_parse_input_args;
-	rte_cryptodev_pmd_release_device;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
 	rte_cryptodev_socket_id;
@@ -117,3 +107,18 @@ EXPERIMENTAL {
 	rte_cryptodev_remove_enq_callback;
 
 };
+
+INTERNAL {
+	global:
+
+	rte_cryptodev_allocate_driver;
+	rte_cryptodev_pmd_allocate;
+	rte_cryptodev_pmd_callback_process;
+	rte_cryptodev_pmd_create;
+	rte_cryptodev_pmd_create_dev_name;
+	rte_cryptodev_pmd_destroy;
+	rte_cryptodev_pmd_get_dev;
+	rte_cryptodev_pmd_get_named_dev;
+	rte_cryptodev_pmd_parse_input_args;
+	rte_cryptodev_pmd_release_device;
+};
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 2d38389858..ebfc8326a8 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -9,7 +9,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_service_component.h>
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index cb0ed7b620..e347d6dfd5 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -31,7 +31,7 @@
 #include <rte_errno.h>
 #include <rte_ethdev.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 #include <rte_telemetry.h>
 
 #include "rte_eventdev.h"
diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
index 54721ed96a..ad7904c0ee 100644
--- a/lib/pipeline/rte_table_action.c
+++ b/lib/pipeline/rte_table_action.c
@@ -16,7 +16,7 @@
 #include <rte_udp.h>
 #include <rte_vxlan.h>
 #include <rte_cryptodev.h>
-#include <rte_cryptodev_pmd.h>
+#include <cryptodev_pmd.h>
 
 #include "rte_table_action.h"
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v4 1/4] test/crypto: remove illegal header include
  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
  0 siblings, 1 reply; 36+ messages in thread
From: Hemant Agrawal @ 2021-09-08  6:38 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: anoobj, radu.nicolau, declan.doherty, hemant.agrawal, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	adwivedi, michaelsh, rnagadheeraj, jianjay.zhou


On 9/8/2021 12:52 AM, Akhil Goyal wrote:
> rte_cryptodev_pmd.h is an interface between
> driver and library and it is mentioned in the
> file that application cannot use it directly.
> Hence, removing the include.
>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> Acked-by: Matan Azrad <matan@nvidia.com>

Series-

Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>



> ---
>   app/test/test_cryptodev.c               | 1 -
>   app/test/test_cryptodev_asym.c          | 1 -
>   app/test/test_cryptodev_blockcipher.c   | 1 -
>   app/test/test_cryptodev_security_pdcp.c | 1 -
>   app/test/test_ipsec.c                   | 1 -
>   5 files changed, 5 deletions(-)
>
> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
> index 843d07ba37..9e823db1e6 100644
> --- a/app/test/test_cryptodev.c
> +++ b/app/test/test_cryptodev.c
> @@ -16,7 +16,6 @@
>   
>   #include <rte_crypto.h>
>   #include <rte_cryptodev.h>
> -#include <rte_cryptodev_pmd.h>
>   #include <rte_string_fns.h>
>   
>   #ifdef RTE_CRYPTO_SCHEDULER
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index 847b074a4f..9d19a6d6d9 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -12,7 +12,6 @@
>   #include <rte_pause.h>
>   
>   #include <rte_cryptodev.h>
> -#include <rte_cryptodev_pmd.h>
>   #include <rte_crypto.h>
>   
>   #include "test_cryptodev.h"
> diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
> index 53fd4718af..1c948eb008 100644
> --- a/app/test/test_cryptodev_blockcipher.c
> +++ b/app/test/test_cryptodev_blockcipher.c
> @@ -11,7 +11,6 @@
>   
>   #include <rte_crypto.h>
>   #include <rte_cryptodev.h>
> -#include <rte_cryptodev_pmd.h>
>   
>   #include "test.h"
>   #include "test_cryptodev.h"
> diff --git a/app/test/test_cryptodev_security_pdcp.c b/app/test/test_cryptodev_security_pdcp.c
> index 30f3eb892c..a7641bab7a 100644
> --- a/app/test/test_cryptodev_security_pdcp.c
> +++ b/app/test/test_cryptodev_security_pdcp.c
> @@ -17,7 +17,6 @@
>   
>   #include <rte_crypto.h>
>   #include <rte_cryptodev.h>
> -#include <rte_cryptodev_pmd.h>
>   #include <rte_security.h>
>   
>   #include <rte_lcore.h>
> diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
> index fb90130ae2..c6d6b88d6d 100644
> --- a/app/test/test_ipsec.c
> +++ b/app/test/test_ipsec.c
> @@ -15,7 +15,6 @@
>   
>   #include <rte_crypto.h>
>   #include <rte_cryptodev.h>
> -#include <rte_cryptodev_pmd.h>
>   #include <rte_lcore.h>
>   #include <rte_ipsec.h>
>   #include <rte_random.h>

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [EXT] Re: [PATCH v4 1/4] test/crypto: remove illegal header include
  2021-09-08  6:38         ` Hemant Agrawal
@ 2021-09-08  8:05           ` Akhil Goyal
  0 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-08  8:05 UTC (permalink / raw)
  To: hemant.agrawal, dev
  Cc: Anoob Joseph, radu.nicolau, declan.doherty, matan,
	konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	Ankur Dwivedi, Michael Shamis, Nagadheeraj Rottela, jianjay.zhou

> 
> On 9/8/2021 12:52 AM, Akhil Goyal wrote:
> > rte_cryptodev_pmd.h is an interface between
> > driver and library and it is mentioned in the
> > file that application cannot use it directly.
> > Hence, removing the include.
> >
> > Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> > Acked-by: Matan Azrad <matan@nvidia.com>
> 
> Series-
> 
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Series Applied to dpdk-next-crypto



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: [dpdk-dev] [PATCH v4 2/4] cryptodev: change valid dev API
  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
  0 siblings, 0 replies; 36+ messages in thread
From: Akhil Goyal @ 2021-09-08 15:16 UTC (permalink / raw)
  To: Akhil Goyal, dev, Ray Kinsella, techboard
  Cc: Anoob Joseph, radu.nicolau, declan.doherty, hemant.agrawal,
	matan, konstantin.ananyev, thomas, roy.fan.zhang, asomalap,
	ruifeng.wang, ajit.khaparde, pablo.de.lara.guarch, fiona.trahe,
	Ankur Dwivedi, Michael Shamis, Nagadheeraj Rottela, jianjay.zhou

> Subject: [PATCH v4 2/4] cryptodev: change valid dev API
> 
> The API rte_cryptodev_pmd_is_valid_dev, can be used
> by the application as well as PMD to check whether
> the device is valid or not. Hence, _pmd is removed
> from the API.
> The applications and drivers which use this API are
> also updated.
> 
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>

This patch is merged on dpdk-next-crypto.
As discussed in DPDK techboard meeting, adding Ray and Techboard to
take a better look so that changes(if any) can be made before merging to main.

> ---
>  doc/guides/rel_notes/release_21_11.rst        |  4 ++
>  .../net/softnic/rte_eth_softnic_cryptodev.c   |  2 +-
>  examples/fips_validation/main.c               |  2 +-
>  examples/ip_pipeline/cryptodev.c              |  3 +-
>  lib/cryptodev/rte_cryptodev.c                 | 50 +++++++++----------
>  lib/cryptodev/rte_cryptodev.h                 | 11 ++++
>  lib/cryptodev/rte_cryptodev_pmd.h             | 11 ----
>  lib/cryptodev/version.map                     |  2 +-
>  lib/eventdev/rte_event_crypto_adapter.c       |  4 +-
>  lib/eventdev/rte_eventdev.c                   |  2 +-
>  lib/pipeline/rte_table_action.c               |  2 +-
>  11 files changed, 48 insertions(+), 45 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_21_11.rst
> b/doc/guides/rel_notes/release_21_11.rst
> index 411fa9530a..e7ad50ba09 100644
> --- a/doc/guides/rel_notes/release_21_11.rst
> +++ b/doc/guides/rel_notes/release_21_11.rst
> @@ -102,6 +102,10 @@ API Changes
>     Also, make sure to start the actual text at the margin.
>     =======================================================
> 
> +* cryptodev: The API rte_cryptodev_pmd_is_valid_dev is modified to
> +  rte_cryptodev_is_valid_dev as it can be used by the application as
> +  well as PMD to check whether the device is valid or not.
> +
> 
>  ABI Changes
>  -----------
> diff --git a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
> b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
> index a1a4ca5650..8e278801c5 100644
> --- a/drivers/net/softnic/rte_eth_softnic_cryptodev.c
> +++ b/drivers/net/softnic/rte_eth_softnic_cryptodev.c
> @@ -82,7 +82,7 @@ softnic_cryptodev_create(struct pmd_internals *p,
> 
>  		dev_id = (uint32_t)status;
>  	} else {
> -		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
> +		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
>  			return NULL;
> 
>  		dev_id = params->dev_id;
> diff --git a/examples/fips_validation/main.c
> b/examples/fips_validation/main.c
> index c175fe6ac2..e892078f0e 100644
> --- a/examples/fips_validation/main.c
> +++ b/examples/fips_validation/main.c
> @@ -196,7 +196,7 @@ parse_cryptodev_id_arg(char *arg)
>  	}
> 
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(cryptodev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(cryptodev_id)) {
>  		RTE_LOG(ERR, USER1, "Error %i: invalid cryptodev id %s\n",
>  				cryptodev_id, arg);
>  		return -1;
> diff --git a/examples/ip_pipeline/cryptodev.c
> b/examples/ip_pipeline/cryptodev.c
> index b0d9f3d217..9997d97456 100644
> --- a/examples/ip_pipeline/cryptodev.c
> +++ b/examples/ip_pipeline/cryptodev.c
> @@ -6,7 +6,6 @@
>  #include <stdio.h>
> 
>  #include <rte_cryptodev.h>
> -#include <rte_cryptodev_pmd.h>
>  #include <rte_string_fns.h>
> 
>  #include "cryptodev.h"
> @@ -74,7 +73,7 @@ cryptodev_create(const char *name, struct
> cryptodev_params *params)
> 
>  		dev_id = (uint32_t)status;
>  	} else {
> -		if (rte_cryptodev_pmd_is_valid_dev(params->dev_id) == 0)
> +		if (rte_cryptodev_is_valid_dev(params->dev_id) == 0)
>  			return NULL;
> 
>  		dev_id = params->dev_id;
> diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
> index 447aa9d519..37502b9b3c 100644
> --- a/lib/cryptodev/rte_cryptodev.c
> +++ b/lib/cryptodev/rte_cryptodev.c
> @@ -663,7 +663,7 @@ rte_cryptodev_is_valid_device_data(uint8_t dev_id)
>  }
> 
>  unsigned int
> -rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
> +rte_cryptodev_is_valid_dev(uint8_t dev_id)
>  {
>  	struct rte_cryptodev *dev = NULL;
> 
> @@ -761,7 +761,7 @@ rte_cryptodev_socket_id(uint8_t dev_id)
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
> +	if (!rte_cryptodev_is_valid_dev(dev_id))
>  		return -1;
> 
>  	dev = rte_cryptodev_pmd_get_dev(dev_id);
> @@ -1032,7 +1032,7 @@ rte_cryptodev_configure(uint8_t dev_id, struct
> rte_cryptodev_config *config)
>  	struct rte_cryptodev *dev;
>  	int diag;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1080,7 +1080,7 @@ rte_cryptodev_start(uint8_t dev_id)
> 
>  	CDEV_LOG_DEBUG("Start dev_id=%" PRIu8, dev_id);
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1110,7 +1110,7 @@ rte_cryptodev_stop(uint8_t dev_id)
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return;
>  	}
> @@ -1136,7 +1136,7 @@ rte_cryptodev_close(uint8_t dev_id)
>  	struct rte_cryptodev *dev;
>  	int retval;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -1;
>  	}
> @@ -1176,7 +1176,7 @@ rte_cryptodev_get_qp_status(uint8_t dev_id,
> uint16_t queue_pair_id)
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1207,7 +1207,7 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id,
> uint16_t queue_pair_id,
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1283,7 +1283,7 @@ rte_cryptodev_add_enq_callback(uint8_t dev_id,
>  		return NULL;
>  	}
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>  		rte_errno = ENODEV;
>  		return NULL;
> @@ -1349,7 +1349,7 @@ rte_cryptodev_remove_enq_callback(uint8_t
> dev_id,
>  		return -EINVAL;
>  	}
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>  		return -ENODEV;
>  	}
> @@ -1418,7 +1418,7 @@ rte_cryptodev_add_deq_callback(uint8_t dev_id,
>  		return NULL;
>  	}
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>  		rte_errno = ENODEV;
>  		return NULL;
> @@ -1484,7 +1484,7 @@ rte_cryptodev_remove_deq_callback(uint8_t
> dev_id,
>  		return -EINVAL;
>  	}
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>  		return -ENODEV;
>  	}
> @@ -1542,7 +1542,7 @@ rte_cryptodev_stats_get(uint8_t dev_id, struct
> rte_cryptodev_stats *stats)
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>  		return -ENODEV;
>  	}
> @@ -1565,7 +1565,7 @@ rte_cryptodev_stats_reset(uint8_t dev_id)
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return;
>  	}
> @@ -1581,7 +1581,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct
> rte_cryptodev_info *dev_info)
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
>  		return;
>  	}
> @@ -1608,7 +1608,7 @@ rte_cryptodev_callback_register(uint8_t dev_id,
>  	if (!cb_fn)
>  		return -EINVAL;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1652,7 +1652,7 @@ rte_cryptodev_callback_unregister(uint8_t dev_id,
>  	if (!cb_fn)
>  		return -EINVAL;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1720,7 +1720,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
>  	uint8_t index;
>  	int ret;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1765,7 +1765,7 @@ rte_cryptodev_asym_session_init(uint8_t dev_id,
>  	uint8_t index;
>  	int ret;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1939,7 +1939,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
>  	struct rte_cryptodev *dev;
>  	uint8_t driver_id;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -1969,7 +1969,7 @@ rte_cryptodev_asym_session_clear(uint8_t dev_id,
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
>  		return -EINVAL;
>  	}
> @@ -2079,7 +2079,7 @@
> rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
>  	struct rte_cryptodev *dev;
>  	unsigned int priv_sess_size;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
> +	if (!rte_cryptodev_is_valid_dev(dev_id))
>  		return 0;
> 
>  	dev = rte_cryptodev_pmd_get_dev(dev_id);
> @@ -2099,7 +2099,7 @@
> rte_cryptodev_asym_get_private_session_size(uint8_t dev_id)
>  	unsigned int header_size = sizeof(void *) * nb_drivers;
>  	unsigned int priv_sess_size;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
> +	if (!rte_cryptodev_is_valid_dev(dev_id))
>  		return 0;
> 
>  	dev = rte_cryptodev_pmd_get_dev(dev_id);
> @@ -2156,7 +2156,7 @@ rte_cryptodev_sym_cpu_crypto_process(uint8_t
> dev_id,
>  {
>  	struct rte_cryptodev *dev;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(dev_id)) {
>  		sym_crypto_fill_status(vec, EINVAL);
>  		return 0;
>  	}
> @@ -2179,7 +2179,7 @@ rte_cryptodev_get_raw_dp_ctx_size(uint8_t
> dev_id)
>  	int32_t size = sizeof(struct rte_crypto_raw_dp_ctx);
>  	int32_t priv_size;
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(dev_id))
> +	if (!rte_cryptodev_is_valid_dev(dev_id))
>  		return -EINVAL;
> 
>  	dev = rte_cryptodev_pmd_get_dev(dev_id);
> diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
> index 11f4e6fdbf..bb01f0f195 100644
> --- a/lib/cryptodev/rte_cryptodev.h
> +++ b/lib/cryptodev/rte_cryptodev.h
> @@ -1368,6 +1368,17 @@ __rte_experimental
>  unsigned int
>  rte_cryptodev_asym_get_private_session_size(uint8_t dev_id);
> 
> +/**
> + * Validate if the crypto device index is valid attached crypto device.
> + *
> + * @param	dev_id	Crypto device index.
> + *
> + * @return
> + *   - If the device index is valid (1) or not (0).
> + */
> +unsigned int
> +rte_cryptodev_is_valid_dev(uint8_t dev_id);
> +
>  /**
>   * Provide driver identifier.
>   *
> diff --git a/lib/cryptodev/rte_cryptodev_pmd.h
> b/lib/cryptodev/rte_cryptodev_pmd.h
> index 1274436870..dd2a4940a2 100644
> --- a/lib/cryptodev/rte_cryptodev_pmd.h
> +++ b/lib/cryptodev/rte_cryptodev_pmd.h
> @@ -94,17 +94,6 @@ rte_cryptodev_pmd_get_dev(uint8_t dev_id);
>  struct rte_cryptodev *
>  rte_cryptodev_pmd_get_named_dev(const char *name);
> 
> -/**
> - * Validate if the crypto device index is valid attached crypto device.
> - *
> - * @param	dev_id	Crypto device index.
> - *
> - * @return
> - *   - If the device index is valid (1) or not (0).
> - */
> -unsigned int
> -rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id);
> -
>  /**
>   * The pool of rte_cryptodev structures.
>   */
> diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
> index 979d823a7c..1a7f759c57 100644
> --- a/lib/cryptodev/version.map
> +++ b/lib/cryptodev/version.map
> @@ -25,6 +25,7 @@ DPDK_22 {
>  	rte_cryptodev_get_feature_name;
>  	rte_cryptodev_get_sec_ctx;
>  	rte_cryptodev_info_get;
> +	rte_cryptodev_is_valid_dev;
>  	rte_cryptodev_name_get;
>  	rte_cryptodev_pmd_allocate;
>  	rte_cryptodev_pmd_callback_process;
> @@ -33,7 +34,6 @@ DPDK_22 {
>  	rte_cryptodev_pmd_destroy;
>  	rte_cryptodev_pmd_get_dev;
>  	rte_cryptodev_pmd_get_named_dev;
> -	rte_cryptodev_pmd_is_valid_dev;
>  	rte_cryptodev_pmd_parse_input_args;
>  	rte_cryptodev_pmd_release_device;
>  	rte_cryptodev_queue_pair_count;
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c
> b/lib/eventdev/rte_event_crypto_adapter.c
> index e1d38d383d..2d38389858 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -781,7 +781,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t
> id,
> 
>  	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
>  		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
>  		return -EINVAL;
>  	}
> @@ -898,7 +898,7 @@ rte_event_crypto_adapter_queue_pair_del(uint8_t
> id, uint8_t cdev_id,
> 
>  	EVENT_CRYPTO_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
> 
> -	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) {
> +	if (!rte_cryptodev_is_valid_dev(cdev_id)) {
>  		RTE_EDEV_LOG_ERR("Invalid dev_id=%" PRIu8, cdev_id);
>  		return -EINVAL;
>  	}
> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
> index 594dd5e759..cb0ed7b620 100644
> --- a/lib/eventdev/rte_eventdev.c
> +++ b/lib/eventdev/rte_eventdev.c
> @@ -165,7 +165,7 @@ rte_event_crypto_adapter_caps_get(uint8_t dev_id,
> uint8_t cdev_id,
>  	struct rte_cryptodev *cdev;
> 
>  	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
> -	if (!rte_cryptodev_pmd_is_valid_dev(cdev_id))
> +	if (!rte_cryptodev_is_valid_dev(cdev_id))
>  		return -EINVAL;
> 
>  	dev = &rte_eventdevs[dev_id];
> diff --git a/lib/pipeline/rte_table_action.c b/lib/pipeline/rte_table_action.c
> index 98f3438774..54721ed96a 100644
> --- a/lib/pipeline/rte_table_action.c
> +++ b/lib/pipeline/rte_table_action.c
> @@ -1732,7 +1732,7 @@ struct sym_crypto_data {
>  static int
>  sym_crypto_cfg_check(struct rte_table_action_sym_crypto_config *cfg)
>  {
> -	if (!rte_cryptodev_pmd_is_valid_dev(cfg->cryptodev_id))
> +	if (!rte_cryptodev_is_valid_dev(cfg->cryptodev_id))
>  		return -EINVAL;
>  	if (cfg->mp_create == NULL || cfg->mp_init == NULL)
>  		return -EINVAL;
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2021-09-08 15:16 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs Akhil Goyal
2021-08-11  6:56     ` 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

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).