DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/6] Cryptodev API changes
@ 2018-06-08 22:02 Pablo de Lara
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
                   ` (10 more replies)
  0 siblings, 11 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

API changes in the cryptodev library, announced
in the previous release, 18.05.


Pablo de Lara (6):
  cryptodev: replace bus specific struct with generic dev
  cryptodev: remove max number of sessions per queue
  cryptodev: remove max number of sessions
  cryptodev: remove queue start/stop functions
  cryptodev: remove old get session size functions
  cryptodev: replace mbuf scatter gather flag

 config/common_base                            | 12 ----
 config/rte_config.h                           | 14 ----
 doc/guides/cryptodevs/aesni_gcm.rst           |  4 +-
 doc/guides/cryptodevs/aesni_mb.rst            |  4 +-
 doc/guides/cryptodevs/armv8.rst               |  1 -
 doc/guides/cryptodevs/ccp.rst                 |  2 -
 doc/guides/cryptodevs/dpaa2_sec.rst           |  5 --
 doc/guides/cryptodevs/dpaa_sec.rst            |  5 --
 doc/guides/cryptodevs/kasumi.rst              |  4 +-
 doc/guides/cryptodevs/mvsam.rst               |  1 -
 doc/guides/cryptodevs/null.rst                |  4 +-
 doc/guides/cryptodevs/openssl.rst             |  1 -
 doc/guides/cryptodevs/scheduler.rst           |  4 --
 doc/guides/cryptodevs/snow3g.rst              |  4 +-
 doc/guides/cryptodevs/zuc.rst                 |  4 +-
 doc/guides/prog_guide/cryptodev_lib.rst       | 11 +--
 doc/guides/rel_notes/deprecation.rst          | 17 -----
 doc/guides/rel_notes/release_18_08.rst        | 23 +++++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c      |  7 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  | 19 -----
 .../crypto/aesni_gcm/aesni_gcm_pmd_private.h  |  2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  5 +-
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    | 19 -----
 .../aesni_mb/rte_aesni_mb_pmd_private.h       |  2 -
 drivers/crypto/armv8/rte_armv8_pmd.c          |  5 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      | 19 -----
 drivers/crypto/armv8/rte_armv8_pmd_private.h  |  2 -
 drivers/crypto/ccp/ccp_pmd_ops.c              | 17 -----
 drivers/crypto/ccp/ccp_pmd_private.h          |  1 -
 drivers/crypto/ccp/rte_ccp_pmd.c              | 16 +----
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   | 27 +------
 drivers/crypto/dpaa_sec/dpaa_sec.c            | 29 +-------
 drivers/crypto/dpaa_sec/dpaa_sec.h            |  1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c        |  5 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    | 19 -----
 .../crypto/kasumi/rte_kasumi_pmd_private.h    |  2 -
 drivers/crypto/mvsam/rte_mrvl_pmd.c           |  6 --
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       | 29 --------
 drivers/crypto/mvsam/rte_mrvl_pmd_private.h   |  1 -
 drivers/crypto/null/null_crypto_pmd.c         |  6 +-
 drivers/crypto/null/null_crypto_pmd_ops.c     | 19 -----
 drivers/crypto/null/null_crypto_pmd_private.h |  1 -
 drivers/crypto/openssl/rte_openssl_pmd.c      |  5 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  | 19 -----
 .../crypto/openssl/rte_openssl_pmd_private.h  |  2 -
 drivers/crypto/qat/qat_crypto.c               |  2 -
 drivers/crypto/qat/qat_crypto.h               |  2 -
 drivers/crypto/qat/rte_qat_cryptodev.c        |  9 +--
 drivers/crypto/scheduler/scheduler_pmd.c      | 13 +---
 drivers/crypto/scheduler/scheduler_pmd_ops.c  | 25 -------
 drivers/crypto/snow3g/rte_snow3g_pmd.c        |  3 -
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    | 19 -----
 .../crypto/snow3g/rte_snow3g_pmd_private.h    |  2 -
 drivers/crypto/virtio/virtio_cryptodev.c      |  6 --
 drivers/crypto/zuc/rte_zuc_pmd.c              |  5 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          | 19 -----
 drivers/crypto/zuc/rte_zuc_pmd_private.h      |  2 -
 lib/librte_cryptodev/rte_cryptodev.c          | 57 ++-------------
 lib/librte_cryptodev/rte_cryptodev.h          | 71 +++----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.c      | 12 +---
 lib/librte_cryptodev/rte_cryptodev_pmd.h      | 30 --------
 .../rte_cryptodev_version.map                 |  4 --
 test/test/test_cryptodev.c                    | 54 +++++++++-----
 test/test/test_cryptodev_blockcipher.c        | 11 +--
 64 files changed, 108 insertions(+), 643 deletions(-)

-- 
2.17.0

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

* [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
@ 2018-06-08 22:02 ` Pablo de Lara
  2018-06-21 12:43   ` Akhil Goyal
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 2/6] cryptodev: remove max number of sessions per queue Pablo de Lara
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.

This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst  | 2 +-
 doc/guides/rel_notes/deprecation.rst     | 2 --
 doc/guides/rel_notes/release_18_08.rst   | 5 ++++-
 drivers/crypto/qat/qat_crypto.c          | 1 -
 drivers/crypto/virtio/virtio_cryptodev.c | 1 -
 lib/librte_cryptodev/rte_cryptodev.c     | 1 +
 lib/librte_cryptodev/rte_cryptodev.h     | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
     struct rte_cryptodev_info {
         const char *driver_name;
         uint8_t driver_id;
-        struct rte_pci_device *pci_dev;
+        struct rte_device *device;
 
         uint64_t feature_flags;
 
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
   - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
     containing fields not relevant anymore since the session mempool
     is not internal in the crypto device anymore.
-  - Replacement of ``pci_dev`` field with the more generic ``rte_device``
-    structure.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 5bc23c537..ba710e845 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -55,6 +55,9 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+  has been replaced with field ``struct rte_device *device``.
+
 
 ABI Changes
 -----------
@@ -113,7 +116,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_cmdline.so.2
      librte_common_octeontx.so.1
      librte_compressdev.so.1
-     librte_cryptodev.so.4
+   + librte_cryptodev.so.5
      librte_distributor.so.1
      librte_eal.so.7
      librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index d9ce2a136..768dcbae0 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -1656,7 +1656,6 @@ void qat_dev_info_get(struct rte_cryptodev *dev,
 		info->capabilities = internals->qat_dev_capabilities;
 		info->sym.max_nb_sessions = internals->max_nb_sessions;
 		info->driver_id = cryptodev_qat_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 	}
 }
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 
 	if (info != NULL) {
 		info->driver_id = cryptodev_virtio_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
 		info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
 
 	dev_info->driver_name = dev->device->driver->name;
+	dev_info->device = dev->device;
 }
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 92ce6d49a..80cd6b474 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -371,7 +371,7 @@ rte_cryptodev_get_feature_name(uint64_t flag);
 struct rte_cryptodev_info {
 	const char *driver_name;		/**< Driver name. */
 	uint8_t driver_id;			/**< Driver identifier */
-	struct rte_pci_device *pci_dev;		/**< PCI information. */
+	struct rte_device *device;		/**< Generic device information. */
 
 	uint64_t feature_flags;
 	/**< Feature flags exposes HW/SW features for the given device */
-- 
2.17.0

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

* [dpdk-dev] [PATCH 2/6] cryptodev: remove max number of sessions per queue
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-06-08 22:02 ` Pablo de Lara
  2018-06-21 13:03   ` Akhil Goyal
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The cryptodev info structure currently contains
the maximum number of sessions that can be used in a queue pair.
This is only set in DPAA_SEC PMD, and since it is calculated
based on the maximum number of sessions (which is not used
anymore), this field can be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c   | 3 ---
 lib/librte_cryptodev/rte_cryptodev.h | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 06f7e4373..73cae483b 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2215,9 +2215,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa_sec_capabilities;
 		info->sym.max_nb_sessions = internals->max_nb_sessions;
-		info->sym.max_nb_sessions_per_qp =
-			RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS /
-			RTE_DPAA_MAX_NB_SEC_QPS;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 80cd6b474..a4b8cccc2 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -385,10 +385,6 @@ struct rte_cryptodev_info {
 	struct {
 		unsigned max_nb_sessions;
 		/**< Maximum number of sessions supported by device. */
-		unsigned int max_nb_sessions_per_qp;
-		/**< Maximum number of sessions per queue pair.
-		 * Default 0 for infinite sessions
-		 */
 	} sym;
 };
 
-- 
2.17.0

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

* [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 2/6] cryptodev: remove max number of sessions per queue Pablo de Lara
@ 2018-06-08 22:02 ` Pablo de Lara
  2018-06-12 11:37   ` Tomasz Duszynski
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Sessions are not created and stored in the crypto device
anymore, since now the session mempool is created
at the application level.

Therefore the limitation of the maximum number of sessions
that can be created should not be dependent of the crypto device.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 config/common_base                               | 12 ------------
 config/rte_config.h                              | 14 --------------
 doc/guides/cryptodevs/aesni_gcm.rst              |  4 +---
 doc/guides/cryptodevs/aesni_mb.rst               |  4 +---
 doc/guides/cryptodevs/armv8.rst                  |  1 -
 doc/guides/cryptodevs/ccp.rst                    |  2 --
 doc/guides/cryptodevs/dpaa2_sec.rst              |  5 -----
 doc/guides/cryptodevs/dpaa_sec.rst               |  5 -----
 doc/guides/cryptodevs/kasumi.rst                 |  4 +---
 doc/guides/cryptodevs/mvsam.rst                  |  1 -
 doc/guides/cryptodevs/null.rst                   |  4 +---
 doc/guides/cryptodevs/openssl.rst                |  1 -
 doc/guides/cryptodevs/scheduler.rst              |  4 ----
 doc/guides/cryptodevs/snow3g.rst                 |  4 +---
 doc/guides/cryptodevs/zuc.rst                    |  4 +---
 doc/guides/prog_guide/cryptodev_lib.rst          |  9 ++-------
 doc/guides/rel_notes/deprecation.rst             |  3 ---
 doc/guides/rel_notes/release_18_08.rst           |  3 ++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c         |  5 +----
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c     |  1 -
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h |  2 --
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c       |  5 +----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c   |  1 -
 .../crypto/aesni_mb/rte_aesni_mb_pmd_private.h   |  2 --
 drivers/crypto/armv8/rte_armv8_pmd.c             |  5 +----
 drivers/crypto/armv8/rte_armv8_pmd_ops.c         |  1 -
 drivers/crypto/armv8/rte_armv8_pmd_private.h     |  2 --
 drivers/crypto/ccp/ccp_pmd_ops.c                 |  1 -
 drivers/crypto/ccp/ccp_pmd_private.h             |  1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                 | 16 +---------------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c      |  3 ++-
 drivers/crypto/dpaa_sec/dpaa_sec.c               |  1 -
 drivers/crypto/dpaa_sec/dpaa_sec.h               |  1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c           |  5 +----
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c       |  1 -
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h   |  2 --
 drivers/crypto/mvsam/rte_mrvl_pmd.c              |  6 ------
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c          |  1 -
 drivers/crypto/mvsam/rte_mrvl_pmd_private.h      |  1 -
 drivers/crypto/null/null_crypto_pmd.c            |  3 ---
 drivers/crypto/null/null_crypto_pmd_ops.c        |  1 -
 drivers/crypto/null/null_crypto_pmd_private.h    |  1 -
 drivers/crypto/openssl/rte_openssl_pmd.c         |  3 ---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c     |  1 -
 drivers/crypto/openssl/rte_openssl_pmd_private.h |  2 --
 drivers/crypto/qat/qat_crypto.c                  |  1 -
 drivers/crypto/qat/qat_crypto.h                  |  2 --
 drivers/crypto/qat/rte_qat_cryptodev.c           |  4 +---
 drivers/crypto/scheduler/scheduler_pmd.c         | 13 +------------
 drivers/crypto/scheduler/scheduler_pmd_ops.c     |  7 -------
 drivers/crypto/snow3g/rte_snow3g_pmd.c           |  3 ---
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c       |  1 -
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h   |  2 --
 drivers/crypto/virtio/virtio_cryptodev.c         |  3 ---
 drivers/crypto/zuc/rte_zuc_pmd.c                 |  5 +----
 drivers/crypto/zuc/rte_zuc_pmd_ops.c             |  1 -
 drivers/crypto/zuc/rte_zuc_pmd_private.h         |  2 --
 lib/librte_cryptodev/rte_cryptodev.h             |  5 -----
 lib/librte_cryptodev/rte_cryptodev_pmd.c         | 12 ++----------
 lib/librte_cryptodev/rte_cryptodev_pmd.h         |  4 ----
 test/test/test_cryptodev.c                       | 13 +++++++------
 61 files changed, 30 insertions(+), 206 deletions(-)

diff --git a/config/common_base b/config/common_base
index 6b0d1cbbb..db6dec335 100644
--- a/config/common_base
+++ b/config/common_base
@@ -473,14 +473,12 @@ CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
 # Compile NXP DPAA2 crypto sec driver for CAAM HW
 #
 CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n
-CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048
 
 #
 # NXP DPAA caam - crypto driver
 #
 CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n
 CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4
-CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048
 
 #
 # Compile PMD for QuickAssist based devices
@@ -490,11 +488,6 @@ CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n
 CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n
 CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n
-#
-# Number of sessions to create in the session memory pool
-# on a single QuickAssist device.
-#
-CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048
 
 #
 # Compile PMD for virtio crypto devices
@@ -504,11 +497,6 @@ CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO=y
 # Number of maximum virtio crypto devices
 #
 CONFIG_RTE_MAX_VIRTIO_CRYPTO=32
-#
-# Number of sessions to create in the session memory pool
-# on a single virtio crypto device.
-#
-CONFIG_RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS=1024
 
 #
 # Compile PMD for AESNI backed device
diff --git a/config/rte_config.h b/config/rte_config.h
index a1d01759e..7261d28d6 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -85,23 +85,9 @@
 
 /****** driver defines ********/
 
-/*
- * Number of sessions to create in the session memory pool
- * on a single instance of crypto HW device.
- */
-/* QuickAssist device */
-#define RTE_QAT_PMD_MAX_NB_SESSIONS 2048
-
 /* virtio crypto defines */
-#define RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS 1024
 #define RTE_MAX_VIRTIO_CRYPTO 32
 
-/* DPAA2_SEC */
-#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
-
-/* DPAA_SEC */
-#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
-
 /* DPAA SEC max cryptodev devices*/
 #define RTE_LIBRTE_DPAA_MAX_CRYPTODEV	4
 
diff --git a/doc/guides/cryptodevs/aesni_gcm.rst b/doc/guides/cryptodevs/aesni_gcm.rst
index 01590e850..2cfd1e9f7 100644
--- a/doc/guides/cryptodevs/aesni_gcm.rst
+++ b/doc/guides/cryptodevs/aesni_gcm.rst
@@ -83,11 +83,9 @@ The following parameters (all optional) can be provided in the previous two call
 
 * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
 
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
 Example:
 
 .. code-block:: console
 
-    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0,max_nb_sessions=128" \
+    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0" \
     -- -p 1 --cdev SW --chain AEAD --aead_algo "aes-gcm"
diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
index 236828c0a..a0602a10d 100644
--- a/doc/guides/cryptodevs/aesni_mb.rst
+++ b/doc/guides/cryptodevs/aesni_mb.rst
@@ -106,13 +106,11 @@ The following parameters (all optional) can be provided in the previous two call
 
 * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
 
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
 Example:
 
 .. code-block:: console
 
-    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_mb,socket_id=0,max_nb_sessions=128" \
+    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_mb,socket_id=0" \
     -- -p 1 --cdev SW --chain CIPHER_HASH --cipher_algo "aes-cbc" --auth_algo "sha1-hmac"
 
 Extra notes
diff --git a/doc/guides/cryptodevs/armv8.rst b/doc/guides/cryptodevs/armv8.rst
index 725398daf..4adf3cf40 100644
--- a/doc/guides/cryptodevs/armv8.rst
+++ b/doc/guides/cryptodevs/armv8.rst
@@ -64,7 +64,6 @@ For performance test cryptodev_sw_armv8_perftest can be used.
 Limitations
 -----------
 
-* Maximum number of sessions is 2048.
 * Only chained operations are supported.
 * AES-128-CBC is the only supported cipher variant.
 * Cipher input data has to be a multiple of 16 bytes.
diff --git a/doc/guides/cryptodevs/ccp.rst b/doc/guides/cryptodevs/ccp.rst
index 034d20367..d577d5a1c 100644
--- a/doc/guides/cryptodevs/ccp.rst
+++ b/doc/guides/cryptodevs/ccp.rst
@@ -101,8 +101,6 @@ The following parameters (all optional) can be provided in the previous two call
 
 * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device.
 
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
 * ccp_auth_opt: Specify authentication operations to perform on CPU using openssl APIs.
 
 To validate ccp pmd, l2fwd-crypto example can be used with following command:
diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst
index 3ea24c8aa..990befeb7 100644
--- a/doc/guides/cryptodevs/dpaa2_sec.rst
+++ b/doc/guides/cryptodevs/dpaa2_sec.rst
@@ -200,11 +200,6 @@ Please note that enabling debugging options may affect system performance.
   By default it is only enabled in defconfig_arm64-dpaa2-* config.
   Toggle compilation of the ``librte_pmd_dpaa2_sec`` driver.
 
-* ``CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS``
-  By default it is set as 2048 in defconfig_arm64-dpaa2-* config.
-  It indicates Number of sessions to create in the session memory pool
-  on a single DPAA2 SEC device.
-
 Installations
 -------------
 To compile the DPAA2_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
index c14d6d7b1..c5097a84f 100644
--- a/doc/guides/cryptodevs/dpaa_sec.rst
+++ b/doc/guides/cryptodevs/dpaa_sec.rst
@@ -145,11 +145,6 @@ Please note that enabling debugging options may affect system performance.
   By default it is only enabled in defconfig_arm64-dpaa-* config.
   Toggle compilation of the ``librte_pmd_dpaa_sec`` driver.
 
-* ``CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS``
-  By default it is set as 2048 in defconfig_arm64-dpaa-* config.
-  It indicates Number of sessions to create in the session memory pool
-  on a single DPAA SEC device.
-
 Installations
 -------------
 To compile the DPAA_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/cryptodevs/kasumi.rst b/doc/guides/cryptodevs/kasumi.rst
index 2265eee4e..74bc4d840 100644
--- a/doc/guides/cryptodevs/kasumi.rst
+++ b/doc/guides/cryptodevs/kasumi.rst
@@ -87,13 +87,11 @@ The following parameters (all optional) can be provided in the previous two call
 
 * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
 
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
 Example:
 
 .. code-block:: console
 
-    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_kasumi,socket_id=0,max_nb_sessions=128" \
+    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_kasumi,socket_id=0" \
     -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "kasumi-f8"
 
 Extra notes on KASUMI F9
diff --git a/doc/guides/cryptodevs/mvsam.rst b/doc/guides/cryptodevs/mvsam.rst
index fd418c264..b91bb0fb6 100644
--- a/doc/guides/cryptodevs/mvsam.rst
+++ b/doc/guides/cryptodevs/mvsam.rst
@@ -115,7 +115,6 @@ loaded:
 The following parameters (all optional) are exported by the driver:
 
 * max_nb_queue_pairs: maximum number of queue pairs in the device (8 by default).
-* max_nb_sessions: maximum number of sessions that can be created (2048 by default).
 * socket_id: socket on which to allocate the device resources on.
 
 l2fwd-crypto example application can be used to verify MVSAM CRYPTO PMD
diff --git a/doc/guides/cryptodevs/null.rst b/doc/guides/cryptodevs/null.rst
index c980e0ac8..ca39fe444 100644
--- a/doc/guides/cryptodevs/null.rst
+++ b/doc/guides/cryptodevs/null.rst
@@ -61,11 +61,9 @@ The following parameters (all optional) can be provided in the previous two call
 
 * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
 
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
 Example:
 
 .. code-block:: console
 
-    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0,max_nb_sessions=128" \
+    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0" \
     -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "null"
diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
index 427fc807c..153ad0657 100644
--- a/doc/guides/cryptodevs/openssl.rst
+++ b/doc/guides/cryptodevs/openssl.rst
@@ -98,7 +98,6 @@ To verify real traffic l2fwd-crypto example can be used with this command:
 Limitations
 -----------
 
-* Maximum number of sessions is 2048.
 * Chained mbufs are supported only for source mbuf (destination must be
   contiguous).
 * Hash only is not supported for GCM and GMAC.
diff --git a/doc/guides/cryptodevs/scheduler.rst b/doc/guides/cryptodevs/scheduler.rst
index d67894d55..e266ec5a3 100644
--- a/doc/guides/cryptodevs/scheduler.rst
+++ b/doc/guides/cryptodevs/scheduler.rst
@@ -58,10 +58,6 @@ two calls:
   to be allocated (by default, socket_id will be the socket where the core
   that is creating the PMD is running on).
 
-* max_nb_sessions: Specify the maximum number of sessions that can be
-  created. This value may be overwritten internally if there are too
-  many devices are attached.
-
 * slave: If a cryptodev has been initialized with specific name, it can be
   attached to the scheduler using this parameter, simply filling the name
   here. Multiple cryptodevs can be attached initially by presenting this
diff --git a/doc/guides/cryptodevs/snow3g.rst b/doc/guides/cryptodevs/snow3g.rst
index 7cba712c1..e0b9a73f7 100644
--- a/doc/guides/cryptodevs/snow3g.rst
+++ b/doc/guides/cryptodevs/snow3g.rst
@@ -79,11 +79,9 @@ The following parameters (all optional) can be provided in the previous two call
 
 * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
 
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
 Example:
 
 .. code-block:: console
 
-    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_snow3g,socket_id=0,max_nb_sessions=128" \
+    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_snow3g,socket_id=0" \
     -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "snow3g-uea2"
diff --git a/doc/guides/cryptodevs/zuc.rst b/doc/guides/cryptodevs/zuc.rst
index e38989968..7bebbb48b 100644
--- a/doc/guides/cryptodevs/zuc.rst
+++ b/doc/guides/cryptodevs/zuc.rst
@@ -79,11 +79,9 @@ The following parameters (all optional) can be provided in the previous two call
 
 * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
 
-* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
-
 Example:
 
 .. code-block:: console
 
-    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_zuc,socket_id=0,max_nb_sessions=128" \
+    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_zuc,socket_id=0" \
     -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "zuc-eea3"
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index d02bb7514..c83184fe9 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
 
 .. code-block:: console
 
-   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
+   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
 
 .. Note::
 
@@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
 .. code-block:: c
 
    rte_vdev_init("crypto_aesni_mb",
-                     "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
+                     "max_nb_queue_pairs=2,socket_id=0")
 
 All virtual Crypto devices support the following initialization parameters:
 
 * ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
-* ``max_nb_sessions`` - maximum number of sessions supported by the device
 * ``socket_id`` - socket on which to allocate the device resources on.
 
 
@@ -276,10 +275,6 @@ relevant information for the device.
         const struct rte_cryptodev_capabilities *capabilities;
 
         unsigned max_nb_queue_pairs;
-
-        struct {
-            unsigned max_nb_sessions;
-        } sym;
     };
 
 
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index b71080bb8..dc014da21 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -101,9 +101,6 @@ Deprecation Notices
 * cryptodev: The following changes will be made in the library
   for 18.08:
 
-  - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
-    containing fields not relevant anymore since the session mempool
-    is not internal in the crypto device anymore.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index ba710e845..a6f31713a 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -56,7 +56,8 @@ API Changes
    =========================================================
 
 * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
-  has been replaced with field ``struct rte_device *device``.
+  has been replaced with field ``struct rte_device *device`` and
+  field ``sym`` has been removed.
 
 
 ABI Changes
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 80360dd9c..cd5b1952b 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
 	internals->vector_mode = vector_mode;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_gcm_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 6f542137c..b05122c1b 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -143,7 +143,6 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->capabilities = aesni_gcm_pmd_capabilities;
 
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 	}
 }
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 3d60583b0..b496377dd 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -39,8 +39,6 @@ struct aesni_gcm_private {
 	/**< Vector mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct aesni_gcm_qp {
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index bb35c66ab..bb647f736 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
 
 	internals->vector_mode = vector_mode;
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_mb_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
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 01530523f..7c735f5dc 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -387,7 +387,6 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = aesni_mb_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 	}
 }
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
index a33b2f695..9520cdf9c 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
@@ -124,8 +124,6 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** AESNI Multi buffer queue pair */
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index fbb08f729..db0d8a2a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct armv8_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index c64aef09f..d31ef7d66 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -154,7 +154,6 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = armv8_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 	}
 }
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
index b8966e934..7feb021db 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
+++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
@@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
 struct armv8_crypto_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** ARMv8 crypto queue pair */
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 80b75ccb0..7e383feed 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -624,7 +624,6 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
 		if (internals->auth_opt == 1)
 			dev_info->capabilities = ccp_crypto_cap_complete;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 	}
 }
 
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index f4498048f..79752f687 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -40,7 +40,6 @@
 /* private data structure for each CCP crypto device */
 struct ccp_private {
 	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;	/**< Max number of sessions */
 	uint8_t crypto_num_dev;		/**< Number of working crypto devices */
 	bool auth_opt;			/**< Authentication offload option */
 	struct ccp_device *last_dev;	/**< Last working crypto device */
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 2061f465e..d70640f6d 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
 #define CCP_CRYPTODEV_PARAM_NAME		("name")
 #define CCP_CRYPTODEV_PARAM_SOCKET_ID		("socket_id")
 #define CCP_CRYPTODEV_PARAM_MAX_NB_QP		("max_nb_queue_pairs")
-#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS		("max_nb_sessions")
 #define CCP_CRYPTODEV_PARAM_AUTH_OPT		("ccp_auth_opt")
 
 const char *ccp_pmd_valid_params[] = {
 	CCP_CRYPTODEV_PARAM_NAME,
 	CCP_CRYPTODEV_PARAM_SOCKET_ID,
 	CCP_CRYPTODEV_PARAM_MAX_NB_QP,
-	CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
 	CCP_CRYPTODEV_PARAM_AUTH_OPT,
 };
 
@@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-					 CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
-					 &parse_integer_arg,
-					 &params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 					 CCP_CRYPTODEV_PARAM_SOCKET_ID,
 					 &parse_integer_arg,
@@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
 	internals->auth_opt = init_params->auth_opt;
 	internals->crypto_num_dev = cryptodev_cnt;
 
@@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct ccp_private),
 			rte_socket_id(),
-			CCP_PMD_MAX_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			CCP_PMD_MAX_QUEUE_PAIRS
 		},
 		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
 	};
@@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 		init_params.def_p.socket_id);
 	RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
 		init_params.def_p.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
-		init_params.def_p.max_nb_sessions);
 	RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
 		((init_params.auth_opt == 0) ? "CCP" : "CPU"));
 
@@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"ccp_auth_opt=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 56fa969d3..16ab0b6a6 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -55,6 +55,8 @@ typedef uint64_t	dma_addr_t;
 #define SEC_FLC_DHR_OUTBOUND	-114
 #define SEC_FLC_DHR_INBOUND	0
 
+#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
+
 enum rta_sec_era rta_sec_era = RTA_SEC_ERA_8;
 
 static uint8_t cryptodev_driver_id;
@@ -2626,7 +2628,6 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa2_sec_capabilities;
-		info->sym.max_nb_sessions = internals->max_nb_sessions;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..909583bd0 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2214,7 +2214,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa_sec_capabilities;
-		info->sym.max_nb_sessions = internals->max_nb_sessions;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
index e15e373fd..91df68009 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
@@ -137,6 +137,7 @@ struct dpaa_sec_qp {
 };
 
 #define RTE_DPAA_MAX_NB_SEC_QPS 8
+#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
 #define RTE_DPAA_MAX_RX_QUEUE RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS
 #define DPAA_MAX_DEQUEUE_NUM_FRAMES 63
 
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 205dc1de7..65376b211 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -555,7 +555,6 @@ cryptodev_kasumi_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -573,8 +572,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct kasumi_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index a388dbb63..284669341 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -126,7 +126,6 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = kasumi_pmd_capabilities;
 	}
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
index a397bee65..2b12818bc 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
@@ -36,8 +36,6 @@
 struct kasumi_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** KASUMI buffer queue pair */
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 1b6029a56..822b6cac7 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	/*
 	 * ret == -EEXIST is correct, it means DMA
@@ -734,8 +733,6 @@ cryptodev_mrvl_crypto_create(const char *name,
 			"DMA memory has been already initialized by a different driver.");
 	}
 
-	sam_params.max_num_sessions = internals->max_nb_sessions;
-
 	return sam_init(&sam_params);
 
 init_error:
@@ -766,8 +763,6 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 
 	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
 	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
-	init_params.max_nb_sessions =
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
 	init_params.socket_id = rte_socket_id();
 
 	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
@@ -823,7 +818,6 @@ static struct cryptodev_driver mrvl_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_MRVL_PMD, cryptodev_mrvl_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..944a415cf 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -471,7 +471,6 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = mrvl_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 	}
 }
 
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
index c16d95b46..bb528493a 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
@@ -51,7 +51,6 @@ enum mrvl_crypto_chain_order {
 /** Private data structure for each crypto device. */
 struct mrvl_crypto_private {
 	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;	/**< Max number of sessions */
 };
 
 /** MRVL crypto queue pair structure. */
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 052b6546c..a8499cf94 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -182,7 +182,6 @@ cryptodev_null_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -196,7 +195,6 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
 		sizeof(struct null_crypto_private),
 		rte_socket_id(),
 		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name, *args;
 	int retval;
@@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index f8e5f61f1..3ca1370e8 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -121,7 +121,6 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = null_crypto_pmd_capabilities;
 	}
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 0fd133625..d7d769f3d 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -32,7 +32,6 @@
 /** private data structure for each NULL crypto device */
 struct null_crypto_private {
 	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
-	unsigned max_nb_sessions;	/**< Max number of sessions */
 };
 
 /** NULL crypto queue pair */
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 93c6d7e5d..965cab9f2 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -1687,7 +1686,6 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 		sizeof(struct openssl_private),
 		rte_socket_id(),
 		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name;
 	const char *input_args;
@@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
 	cryptodev_openssl_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 1cb87d59a..485c80e7f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -547,7 +547,6 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = openssl_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 	}
 }
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
index bc8dc7cdc..02ea81d5c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
+++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
@@ -62,8 +62,6 @@ enum openssl_auth_mode {
 struct openssl_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** OPENSSL crypto queue pair */
diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 768dcbae0..e89d3bc11 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -1654,7 +1654,6 @@ void qat_dev_info_get(struct rte_cryptodev *dev,
 				ADF_NUM_BUNDLES_PER_DEV;
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = internals->qat_dev_capabilities;
-		info->sym.max_nb_sessions = internals->max_nb_sessions;
 		info->driver_id = cryptodev_qat_driver_id;
 	}
 }
diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h
index 281a142b9..c84cf669f 100644
--- a/drivers/crypto/qat/qat_crypto.h
+++ b/drivers/crypto/qat/qat_crypto.h
@@ -75,8 +75,6 @@ struct qat_qp {
 struct qat_pmd_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 	enum qat_device_gen qat_dev_gen;
 	/**< QAT device generation */
 	const struct rte_cryptodev_capabilities *qat_dev_capabilities;
diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
index c8da07af6..74a903d3a 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -94,7 +94,6 @@ crypto_qat_create(const char *name, struct rte_pci_device *pci_dev,
 			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
 
 	internals = cryptodev->data->dev_private;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 	switch (pci_dev->id.device_id) {
 	case 0x0443:
 		internals->qat_dev_gen = QAT_GEN1;
@@ -131,8 +130,7 @@ static int crypto_qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	struct rte_cryptodev_pmd_init_params init_params = {
 		.name = "",
 		.socket_id = pci_dev->device.numa_node,
-		.private_data_size = sizeof(struct qat_pmd_private),
-		.max_nb_sessions = RTE_QAT_PMD_MAX_NB_SESSIONS
+		.private_data_size = sizeof(struct qat_pmd_private)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 25d6409f3..32a19c106 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -31,7 +31,6 @@ struct scheduler_init_params {
 #define RTE_CRYPTODEV_VDEV_MODE			("mode")
 #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
 #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
 #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
 #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
 #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
@@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MODE,
 	RTE_CRYPTODEV_VDEV_ORDERING,
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
 	RTE_CRYPTODEV_VDEV_CORELIST
@@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
-				&parse_integer_arg,
-				&params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
 				&parse_integer_arg,
 				&params->def_p.socket_id);
@@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct scheduler_ctx),
 			rte_socket_id(),
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 		},
 		.nb_slaves = 0,
 		.mode = CDEV_SCHED_MODE_NOT_SET,
@@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
 	cryptodev_scheduler_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"slave=<name>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 147dc51e9..88be72a05 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -321,8 +321,6 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info *dev_info)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
-	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
-			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
 	uint32_t i;
 
 	if (!dev_info)
@@ -338,17 +336,12 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info slave_info;
 
 		rte_cryptodev_info_get(slave_dev_id, &slave_info);
-		max_nb_sessions = slave_info.sym.max_nb_sessions <
-				max_nb_sessions ?
-				slave_info.sym.max_nb_sessions :
-				max_nb_sessions;
 	}
 
 	dev_info->driver_id = dev->driver_id;
 	dev_info->feature_flags = dev->feature_flags;
 	dev_info->capabilities = sched_ctx->capabilities;
 	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
-	dev_info->sym.max_nb_sessions = max_nb_sessions;
 }
 
 /** Release queue pair */
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 72751e35e..fe595abe1 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -574,7 +573,6 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 		sizeof(struct snow3g_private),
 		rte_socket_id(),
 		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index f60b47598..fff4644c0 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -130,7 +130,6 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = snow3g_pmd_capabilities;
 	}
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
index eea900e0a..2c6e1a948 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
@@ -36,8 +36,6 @@
 struct snow3g_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** SNOW 3G buffer queue pair */
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 482edea1a..8395801a4 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1411,8 +1411,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 		info->driver_id = cryptodev_virtio_driver_id;
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
-		info->sym.max_nb_sessions =
-			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
 		info->capabilities = hw->virtio_dev_capabilities;
 	}
 }
@@ -1426,7 +1424,6 @@ crypto_virtio_pci_probe(
 		.name = "",
 		.socket_id = rte_socket_id(),
 		.private_data_size = sizeof(struct virtio_crypto_hw),
-		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a805b2278..396f25975 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -479,7 +479,6 @@ cryptodev_zuc_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -497,8 +496,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct zuc_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -541,7 +539,6 @@ static struct cryptodev_driver zuc_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 8abac8989..ac509e70d 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -130,7 +130,6 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = zuc_pmd_capabilities;
 	}
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
index b83c4a047..2bd378ad6 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
+++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
@@ -37,8 +37,6 @@
 struct zuc_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** ZUC buffer queue pair */
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a4b8cccc2..78be5bdb8 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -381,11 +381,6 @@ struct rte_cryptodev_info {
 
 	unsigned max_nb_queue_pairs;
 	/**< Maximum number of queues pairs supported by device. */
-
-	struct {
-		unsigned max_nb_sessions;
-		/**< Maximum number of sessions supported by device. */
-	} sym;
 };
 
 #define RTE_CRYPTODEV_DETACHED  (0)
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index f2aac24b7..2088ac3f3 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
-				&rte_cryptodev_pmd_parse_uint_arg,
-				&params->max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
 				&rte_cryptodev_pmd_parse_uint_arg,
@@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
 			device->driver->name, name);
 
 	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
-			"socket id: %d, max queue pairs: %u, max sessions: %u",
+			"socket id: %d, max queue pairs: %u",
 			device->driver->name, name,
-			params->socket_id, params->max_nb_queue_pairs,
-			params->max_nb_sessions);
+			params->socket_id, params->max_nb_queue_pairs);
 
 	/* allocate device structure */
 	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 69d776934..0739ce065 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -59,18 +59,15 @@ extern "C" {
 
 
 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
-#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
 
 #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
 #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
 #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
 
 
 static const char * const cryptodev_pmd_valid_params[] = {
 	RTE_CRYPTODEV_PMD_NAME_ARG,
 	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
 };
 
@@ -83,7 +80,6 @@ struct rte_cryptodev_pmd_init_params {
 	size_t private_data_size;
 	int socket_id;
 	unsigned int max_nb_queue_pairs;
-	unsigned int max_nb_sessions;
 };
 
 /** Global structure used for maintaining state of allocated crypto devices */
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 389f79677..2c687bd7c 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -39,6 +39,7 @@
 #include "test_cryptodev_hmac_test_vectors.h"
 
 #define VDEV_ARGS_SIZE 100
+#define MAX_NB_SESSIONS            4
 
 static int gbl_driver_id;
 
@@ -437,7 +438,7 @@ testsuite_setup(void)
 	 */
 	ts_params->session_mpool = rte_mempool_create(
 				"test_sess_mp",
-				info.sym.max_nb_sessions * 2,
+				MAX_NB_SESSIONS * 2,
 				session_size,
 				0, 0, NULL, NULL, NULL,
 				NULL, SOCKET_ID_ANY,
@@ -6499,10 +6500,10 @@ test_multi_session(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *) *
-			dev_info.sym.max_nb_sessions) + 1, 0);
+			MAX_NB_SESSIONS) + 1, 0);
 
 	/* Create multiple crypto sessions*/
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 
 		sessions[i] = rte_cryptodev_sym_session_create(
 				ts_params->session_mpool);
@@ -6551,7 +6552,7 @@ test_multi_session(void)
 	TEST_ASSERT_NULL(sessions[i],
 			"Session creation succeeded unexpectedly!");
 
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 		rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
 				sessions[i]);
 		rte_cryptodev_sym_session_free(sessions[i]);
@@ -6610,7 +6611,7 @@ test_multi_session_random_usage(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *)
-					* dev_info.sym.max_nb_sessions) + 1, 0);
+					* MAX_NB_SESSIONS) + 1, 0);
 
 	for (i = 0; i < MB_SESSION_NUMBER; i++) {
 		sessions[i] = rte_cryptodev_sym_session_create(
@@ -8545,7 +8546,7 @@ test_scheduler_attach_slave_op(void)
 		if (ts_params->session_mpool == NULL) {
 			ts_params->session_mpool = rte_mempool_create(
 					"test_sess_mp",
-					info.sym.max_nb_sessions * 2,
+					MAX_NB_SESSIONS * 2,
 					session_size,
 					0, 0, NULL, NULL, NULL,
 					NULL, SOCKET_ID_ANY,
-- 
2.17.0

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

* [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
                   ` (2 preceding siblings ...)
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
@ 2018-06-08 22:02 ` Pablo de Lara
  2018-06-21 12:50   ` Akhil Goyal
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst          |  4 --
 doc/guides/rel_notes/release_18_08.rst        |  5 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c  | 18 --------
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    | 18 --------
 drivers/crypto/armv8/rte_armv8_pmd_ops.c      | 18 --------
 drivers/crypto/ccp/ccp_pmd_ops.c              | 16 -------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c   | 22 ----------
 drivers/crypto/dpaa_sec/dpaa_sec.c            | 22 ----------
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c    | 18 --------
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c       | 28 ------------
 drivers/crypto/null/null_crypto_pmd_ops.c     | 18 --------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c  | 18 --------
 drivers/crypto/qat/rte_qat_cryptodev.c        |  2 -
 drivers/crypto/scheduler/scheduler_pmd_ops.c  | 18 --------
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c    | 18 --------
 drivers/crypto/virtio/virtio_cryptodev.c      |  2 -
 drivers/crypto/zuc/rte_zuc_pmd_ops.c          | 18 --------
 lib/librte_cryptodev/rte_cryptodev.c          | 44 -------------------
 lib/librte_cryptodev/rte_cryptodev.h          | 37 ----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h      | 26 -----------
 .../rte_cryptodev_version.map                 |  2 -
 21 files changed, 5 insertions(+), 367 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Functions ``rte_cryptodev_queue_pair_start()`` and
-    ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
-    and removed in 18.08, as there are no drivers doing anything useful
-    with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
   - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index a6f31713a..3fa9a6e68 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -59,6 +59,11 @@ API Changes
   has been replaced with field ``struct rte_device *device`` and
   field ``sym`` has been removed.
 
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+  - ``rte_cryptodev_queue_pair_start``
+  - ``rte_cryptodev_queue_pair_stop``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index b05122c1b..2a3ca4e26 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -241,22 +241,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -338,8 +322,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 
 		.queue_pair_setup	= aesni_gcm_pmd_qp_setup,
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
-		.queue_pair_start	= aesni_gcm_pmd_qp_start,
-		.queue_pair_stop	= aesni_gcm_pmd_qp_stop,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
 		.session_get_size	= aesni_gcm_pmd_session_get_size,
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 7c735f5dc..1044946ec 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -507,22 +507,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -605,8 +589,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 
 		.queue_pair_setup	= aesni_mb_pmd_qp_setup,
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
-		.queue_pair_start	= aesni_mb_pmd_qp_start,
-		.queue_pair_stop	= aesni_mb_pmd_qp_stop,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
 		.session_get_size	= aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index d31ef7d66..05217a1a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -256,22 +256,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -352,8 +336,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 
 		.queue_pair_setup	= armv8_crypto_pmd_qp_setup,
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
-		.queue_pair_start	= armv8_crypto_pmd_qp_start,
-		.queue_pair_stop	= armv8_crypto_pmd_qp_stop,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
 		.session_get_size	= armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 7e383feed..ff815f6ca 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -746,20 +746,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
-		 uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
-		uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
 static uint32_t
 ccp_pmd_qp_count(struct rte_cryptodev *dev)
 {
@@ -835,8 +821,6 @@ struct rte_cryptodev_ops ccp_ops = {
 
 		.queue_pair_setup	= ccp_pmd_qp_setup,
 		.queue_pair_release	= ccp_pmd_qp_release,
-		.queue_pair_start	= ccp_pmd_qp_start,
-		.queue_pair_stop	= ccp_pmd_qp_stop,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
 		.session_get_size	= ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 16ab0b6a6..471ad1cbb 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1472,26 +1472,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return retcode;
 }
 
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			   __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.stats_reset	      = dpaa2_sec_stats_reset,
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
-	.queue_pair_start     = dpaa2_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa2_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
 	.session_get_size     = dpaa2_sec_session_get_size,
 	.session_configure    = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 909583bd0..e7ae33c5e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			 __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2226,8 +2206,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.dev_infos_get        = dpaa_sec_dev_infos_get,
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
-	.queue_pair_start     = dpaa_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 284669341..64dba3024 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -227,22 +227,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -323,8 +307,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 
 		.queue_pair_setup   = kasumi_pmd_qp_setup,
 		.queue_pair_release = kasumi_pmd_qp_release,
-		.queue_pair_start   = kasumi_pmd_qp_start,
-		.queue_pair_stop    = kasumi_pmd_qp_stop,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
 		.session_get_size   = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 944a415cf..c131b40e8 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -594,32 +594,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs (PMD ops callback).
  *
  * @param dev Pointer to the device structure.
@@ -737,8 +711,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 
 		.queue_pair_setup	= mrvl_crypto_pmd_qp_setup,
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
-		.queue_pair_start	= mrvl_crypto_pmd_qp_start,
-		.queue_pair_stop	= mrvl_crypto_pmd_qp_stop,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
 		.session_get_size	= mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 3ca1370e8..769879136 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -238,22 +238,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -334,8 +318,6 @@ struct rte_cryptodev_ops pmd_ops = {
 
 		.queue_pair_setup	= null_crypto_pmd_qp_setup,
 		.queue_pair_release	= null_crypto_pmd_qp_release,
-		.queue_pair_start	= null_crypto_pmd_qp_start,
-		.queue_pair_stop	= null_crypto_pmd_qp_stop,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
 		.session_get_size	= null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 485c80e7f..396a32d73 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -646,22 +646,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -744,8 +728,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 
 		.queue_pair_setup	= openssl_pmd_qp_setup,
 		.queue_pair_release	= openssl_pmd_qp_release,
-		.queue_pair_start	= openssl_pmd_qp_start,
-		.queue_pair_stop	= openssl_pmd_qp_stop,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
 		.session_get_size	= openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
index 74a903d3a..bb109f8ba 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -38,8 +38,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.stats_reset		= qat_crypto_sym_stats_reset,
 		.queue_pair_setup	= qat_crypto_sym_qp_setup,
 		.queue_pair_release	= qat_crypto_sym_qp_release,
-		.queue_pair_start	= NULL,
-		.queue_pair_stop	= NULL,
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 88be72a05..c3ad364eb 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -432,22 +432,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -528,8 +512,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 
 		.queue_pair_setup	= scheduler_pmd_qp_setup,
 		.queue_pair_release	= scheduler_pmd_qp_release,
-		.queue_pair_start	= scheduler_pmd_qp_start,
-		.queue_pair_stop	= scheduler_pmd_qp_stop,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
 		.session_get_size	= scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index fff4644c0..63c2e245f 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -229,22 +229,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 
 		.queue_pair_setup   = snow3g_pmd_qp_setup,
 		.queue_pair_release = snow3g_pmd_qp_release,
-		.queue_pair_start   = snow3g_pmd_qp_start,
-		.queue_pair_stop    = snow3g_pmd_qp_stop,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
 		.session_get_size   = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 8395801a4..1e74f0485 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 
 	.queue_pair_setup                = virtio_crypto_qp_setup,
 	.queue_pair_release              = virtio_crypto_qp_release,
-	.queue_pair_start                = NULL,
-	.queue_pair_stop                 = NULL,
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index ac509e70d..5d0f057de 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -229,22 +229,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 
 		.queue_pair_setup   = zuc_pmd_qp_setup,
 		.queue_pair_release = zuc_pmd_qp_release,
-		.queue_pair_start   = zuc_pmd_qp_start,
-		.queue_pair_stop    = zuc_pmd_qp_stop,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
 		.session_get_size   = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
 	return 0;
 }
 
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
 int
 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 78be5bdb8..90487bffc 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -593,43 +593,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
 		struct rte_mempool *session_pool);
 
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to start. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_crypto_dev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to stop. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_cryptodev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
 /**
  * Get the number of queue pairs on a specific crypto device
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 0739ce065..b47730eaf 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -211,28 +211,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
 typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
 				struct rte_cryptodev_info *dev_info);
 
-/**
- * Start queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
 /**
  * Setup a queue pair for a device.
  *
@@ -371,10 +349,6 @@ struct rte_cryptodev_ops {
 	/**< Set up a device queue pair. */
 	cryptodev_queue_pair_release_t queue_pair_release;
 	/**< Release a queue pair. */
-	cryptodev_queue_pair_start_t queue_pair_start;
-	/**< Start a queue pair. */
-	cryptodev_queue_pair_stop_t queue_pair_stop;
-	/**< Stop a queue pair. */
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
 	rte_cryptodev_stop;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
-	rte_cryptodev_queue_pair_start;
-	rte_cryptodev_queue_pair_stop;
 	rte_crypto_op_pool_create;
 
 	local: *;
-- 
2.17.0

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

* [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
                   ` (3 preceding siblings ...)
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-06-08 22:02 ` Pablo de Lara
  2018-06-21 12:59   ` Akhil Goyal
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag Pablo de Lara
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  6 ------
 doc/guides/rel_notes/release_18_08.rst         |  8 ++++++++
 lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
 lib/librte_cryptodev/rte_cryptodev.h           | 11 -----------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 5 files changed, 8 insertions(+), 25 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
     with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
-  - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
-    It will be removed in 18.08.
-  - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
-    It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 3fa9a6e68..0624f3701 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -64,6 +64,14 @@ API Changes
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
 
+* cryptodev: Following functions were deprecated and are replaced by
+  other functions in 18.08:
+
+  - ``rte_cryptodev_get_header_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_header_session_size``
+  - ``rte_cryptodev_get_private_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_private_session_size``
+
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..40e249e79 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 	return 0;
 }
 
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
-	return rte_cryptodev_sym_get_header_session_size();
-}
-
 unsigned int
 rte_cryptodev_sym_get_header_session_size(void)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 90487bffc..8e8a59522 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -925,17 +925,6 @@ int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 			struct rte_cryptodev_sym_session *sess);
 
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- *   Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
 /**
  * @deprecated
  * Get the size of the private session data for a device.
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
 	rte_cryptodev_driver_id_get;
 	rte_cryptodev_driver_name_get;
 	rte_cryptodev_get_aead_algo_enum;
-	rte_cryptodev_get_header_session_size;
-	rte_cryptodev_get_private_session_size;
 	rte_cryptodev_sym_capability_check_aead;
 	rte_cryptodev_sym_session_init;
 	rte_cryptodev_sym_session_clear;
-- 
2.17.0

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

* [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
                   ` (4 preceding siblings ...)
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-06-08 22:02 ` Pablo de Lara
  2018-06-18  6:29   ` Akhil Goyal
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-08 22:02 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not.

Therefore, two new flags will replace this flag:
RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN and
RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst        |  2 -
 doc/guides/rel_notes/release_18_08.rst      |  4 ++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c    |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  2 +-
 drivers/crypto/dpaa_sec/dpaa_sec.c          |  3 +-
 drivers/crypto/null/null_crypto_pmd.c       |  3 +-
 drivers/crypto/openssl/rte_openssl_pmd.c    |  2 +-
 drivers/crypto/qat/rte_qat_cryptodev.c      |  3 +-
 lib/librte_cryptodev/rte_cryptodev.c        |  6 ++-
 lib/librte_cryptodev/rte_cryptodev.h        | 12 +++---
 test/test/test_cryptodev.c                  | 41 ++++++++++++++-------
 test/test/test_cryptodev_blockcipher.c      | 11 ++++--
 12 files changed, 59 insertions(+), 32 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
-    so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 0624f3701..89b84846c 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -72,6 +72,10 @@ API Changes
   - ``rte_cryptodev_get_private_session_size`` is replaced with
     ``rte_cryptodev_sym_get_private_session_size``
 
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+  replaced with the more explicit``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN``
+  and ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT`` flags.
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index cd5b1952b..aa795cbbc 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN;
 
 	switch (vector_mode) {
 	case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 471ad1cbb..cadfeddeb 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN;
 
 	internals = cryptodev->data->dev_private;
 	internals->max_nb_sessions = RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS;
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index e7ae33c5e..54540d7f6 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2270,7 +2270,8 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN |
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index a8499cf94..d9dc22e0f 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -177,7 +177,8 @@ cryptodev_null_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN |
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT;
 
 	internals = dev->data->dev_private;
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 965cab9f2..6878baa4c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN;
 
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
index bb109f8ba..4f1ba5f30 100644
--- a/drivers/crypto/qat/rte_qat_cryptodev.c
+++ b/drivers/crypto/qat/rte_qat_cryptodev.c
@@ -89,7 +89,8 @@ crypto_qat_create(const char *name, struct rte_pci_device *pci_dev,
 	cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN |
+			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT;
 
 	internals = cryptodev->data->dev_private;
 	switch (pci_dev->id.device_id) {
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 40e249e79..b180d4c84 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,10 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		return "CPU_AESNI";
 	case RTE_CRYPTODEV_FF_HW_ACCELERATED:
 		return "HW_ACCELERATED";
-	case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
-		return "MBUF_SCATTER_GATHER";
+	case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN:
+		return "MBUF_INPUT_SCATTER_GATHER";
+	case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT:
+		return "MBUF_OUTPUT_SCATTER_GATHER";
 	case RTE_CRYPTODEV_FF_CPU_NEON:
 		return "CPU_NEON";
 	case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 8e8a59522..bfb52e7f2 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -345,13 +345,15 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
 /**< Operations are off-loaded to an external hardware accelerator */
 #define	RTE_CRYPTODEV_FF_CPU_AVX512		(1ULL << 8)
 /**< Utilises CPU SIMD AVX512 instructions */
-#define	RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER	(1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define	RTE_CRYPTODEV_FF_CPU_NEON		(1ULL << 10)
+#define	RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN	(1ULL << 9)
+/**< Scatter-gather input mbufs are supported */
+#define RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT (1ULL << 10)
+/**< Scatter-gather output mbufs are supported */
+#define	RTE_CRYPTODEV_FF_CPU_NEON		(1ULL << 11)
 /**< Utilises CPU NEON instructions */
-#define	RTE_CRYPTODEV_FF_CPU_ARM_CE		(1ULL << 11)
+#define	RTE_CRYPTODEV_FF_CPU_ARM_CE		(1ULL << 12)
 /**< Utilises ARM CPU Cryptographic Extensions */
-#define	RTE_CRYPTODEV_FF_SECURITY		(1ULL << 12)
+#define	RTE_CRYPTODEV_FF_SECURITY		(1ULL << 13)
 /**< Support Security Protocol Processing */
 
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 2c687bd7c..627c3b1b3 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3152,9 +3152,13 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
-				"Test Skipped.\n");
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+			!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+		printf("Device doesn't support scatter-gather in both input "
+				"and output mbufs. Test Skipped.\n");
 		return 0;
 	}
 
@@ -3300,9 +3304,12 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
-				"Test Skipped.\n");
+
+	uint64_t feat_flags = dev_info.feature_flags;
+	if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+			!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+		printf("Device doesn't support scatter-gather in both input "
+				"and output mbufs. Test Skipped.\n");
 		return 0;
 	}
 
@@ -3651,9 +3658,13 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
-				"Test Skipped.\n");
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+			!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+		printf("Device doesn't support scatter-gather in both input "
+				"and output mbufs. Test Skipped.\n");
 		return 0;
 	}
 
@@ -4485,10 +4496,14 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 		return -ENOTSUP;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
-				"Test Skipped.\n");
-		return -ENOTSUP;
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+			!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+		printf("Device doesn't support scatter-gather in both input "
+				"and output mbufs. Test Skipped.\n");
+		return 0;
 	}
 
 	plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..7a56171e9 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,10 +77,13 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
 		rte_cryptodev_info_get(dev_id, &dev_info);
-		if (!(dev_info.feature_flags &
-				RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-			printf("Device doesn't support scatter-gather. "
-					"Test Skipped.\n");
+		uint64_t feat_flags = dev_info.feature_flags;
+
+		if (!(feat_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN) ||
+				!(feat_flags &
+					RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT)) {
+			printf("Device doesn't support scatter-gather in both input "
+				"and output mbufs. Test Skipped.\n");
 			return 0;
 		}
 		nb_segs = 3;
-- 
2.17.0

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

* Re: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
@ 2018-06-12 11:37   ` Tomasz Duszynski
  2018-06-12 13:53     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 135+ messages in thread
From: Tomasz Duszynski @ 2018-06-12 11:37 UTC (permalink / raw)
  To: Pablo de Lara
  Cc: declan.doherty, akhil.goyal, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou, dev

Hello Pablo,

On Fri, Jun 08, 2018 at 11:02:31PM +0100, Pablo de Lara wrote:
> Sessions are not created and stored in the crypto device
> anymore, since now the session mempool is created
> at the application level.
>
> Therefore the limitation of the maximum number of sessions
> that can be created should not be dependent of the crypto device.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  config/common_base                               | 12 ------------
>  config/rte_config.h                              | 14 --------------
>  doc/guides/cryptodevs/aesni_gcm.rst              |  4 +---
>  doc/guides/cryptodevs/aesni_mb.rst               |  4 +---
>  doc/guides/cryptodevs/armv8.rst                  |  1 -
>  doc/guides/cryptodevs/ccp.rst                    |  2 --
>  doc/guides/cryptodevs/dpaa2_sec.rst              |  5 -----
>  doc/guides/cryptodevs/dpaa_sec.rst               |  5 -----
>  doc/guides/cryptodevs/kasumi.rst                 |  4 +---
>  doc/guides/cryptodevs/mvsam.rst                  |  1 -
>  doc/guides/cryptodevs/null.rst                   |  4 +---
>  doc/guides/cryptodevs/openssl.rst                |  1 -
>  doc/guides/cryptodevs/scheduler.rst              |  4 ----
>  doc/guides/cryptodevs/snow3g.rst                 |  4 +---
>  doc/guides/cryptodevs/zuc.rst                    |  4 +---
>  doc/guides/prog_guide/cryptodev_lib.rst          |  9 ++-------
>  doc/guides/rel_notes/deprecation.rst             |  3 ---
>  doc/guides/rel_notes/release_18_08.rst           |  3 ++-
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c         |  5 +----
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c     |  1 -
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h |  2 --
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c       |  5 +----
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c   |  1 -
>  .../crypto/aesni_mb/rte_aesni_mb_pmd_private.h   |  2 --
>  drivers/crypto/armv8/rte_armv8_pmd.c             |  5 +----
>  drivers/crypto/armv8/rte_armv8_pmd_ops.c         |  1 -
>  drivers/crypto/armv8/rte_armv8_pmd_private.h     |  2 --
>  drivers/crypto/ccp/ccp_pmd_ops.c                 |  1 -
>  drivers/crypto/ccp/ccp_pmd_private.h             |  1 -
>  drivers/crypto/ccp/rte_ccp_pmd.c                 | 16 +---------------
>  drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c      |  3 ++-
>  drivers/crypto/dpaa_sec/dpaa_sec.c               |  1 -
>  drivers/crypto/dpaa_sec/dpaa_sec.h               |  1 +
>  drivers/crypto/kasumi/rte_kasumi_pmd.c           |  5 +----
>  drivers/crypto/kasumi/rte_kasumi_pmd_ops.c       |  1 -
>  drivers/crypto/kasumi/rte_kasumi_pmd_private.h   |  2 --
>  drivers/crypto/mvsam/rte_mrvl_pmd.c              |  6 ------
>  drivers/crypto/mvsam/rte_mrvl_pmd_ops.c          |  1 -
>  drivers/crypto/mvsam/rte_mrvl_pmd_private.h      |  1 -
>  drivers/crypto/null/null_crypto_pmd.c            |  3 ---
>  drivers/crypto/null/null_crypto_pmd_ops.c        |  1 -
>  drivers/crypto/null/null_crypto_pmd_private.h    |  1 -
>  drivers/crypto/openssl/rte_openssl_pmd.c         |  3 ---
>  drivers/crypto/openssl/rte_openssl_pmd_ops.c     |  1 -
>  drivers/crypto/openssl/rte_openssl_pmd_private.h |  2 --
>  drivers/crypto/qat/qat_crypto.c                  |  1 -
>  drivers/crypto/qat/qat_crypto.h                  |  2 --
>  drivers/crypto/qat/rte_qat_cryptodev.c           |  4 +---
>  drivers/crypto/scheduler/scheduler_pmd.c         | 13 +------------
>  drivers/crypto/scheduler/scheduler_pmd_ops.c     |  7 -------
>  drivers/crypto/snow3g/rte_snow3g_pmd.c           |  3 ---
>  drivers/crypto/snow3g/rte_snow3g_pmd_ops.c       |  1 -
>  drivers/crypto/snow3g/rte_snow3g_pmd_private.h   |  2 --
>  drivers/crypto/virtio/virtio_cryptodev.c         |  3 ---
>  drivers/crypto/zuc/rte_zuc_pmd.c                 |  5 +----
>  drivers/crypto/zuc/rte_zuc_pmd_ops.c             |  1 -
>  drivers/crypto/zuc/rte_zuc_pmd_private.h         |  2 --
>  lib/librte_cryptodev/rte_cryptodev.h             |  5 -----
>  lib/librte_cryptodev/rte_cryptodev_pmd.c         | 12 ++----------
>  lib/librte_cryptodev/rte_cryptodev_pmd.h         |  4 ----
>  test/test/test_cryptodev.c                       | 13 +++++++------
>  61 files changed, 30 insertions(+), 206 deletions(-)
>
> diff --git a/config/common_base b/config/common_base
> index 6b0d1cbbb..db6dec335 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -473,14 +473,12 @@ CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
>  # Compile NXP DPAA2 crypto sec driver for CAAM HW
>  #
>  CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n
> -CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048
>
>  #
>  # NXP DPAA caam - crypto driver
>  #
>  CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n
>  CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4
> -CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048
>
>  #
>  # Compile PMD for QuickAssist based devices
> @@ -490,11 +488,6 @@ CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n
>  CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n
>  CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n
>  CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n
> -#
> -# Number of sessions to create in the session memory pool
> -# on a single QuickAssist device.
> -#
> -CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048
>
>  #
>  # Compile PMD for virtio crypto devices
> @@ -504,11 +497,6 @@ CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO=y
>  # Number of maximum virtio crypto devices
>  #
>  CONFIG_RTE_MAX_VIRTIO_CRYPTO=32
> -#
> -# Number of sessions to create in the session memory pool
> -# on a single virtio crypto device.
> -#
> -CONFIG_RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS=1024
>
>  #
>  # Compile PMD for AESNI backed device
> diff --git a/config/rte_config.h b/config/rte_config.h
> index a1d01759e..7261d28d6 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -85,23 +85,9 @@
>
>  /****** driver defines ********/
>
> -/*
> - * Number of sessions to create in the session memory pool
> - * on a single instance of crypto HW device.
> - */
> -/* QuickAssist device */
> -#define RTE_QAT_PMD_MAX_NB_SESSIONS 2048
> -
>  /* virtio crypto defines */
> -#define RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS 1024
>  #define RTE_MAX_VIRTIO_CRYPTO 32
>
> -/* DPAA2_SEC */
> -#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
> -
> -/* DPAA_SEC */
> -#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
> -
>  /* DPAA SEC max cryptodev devices*/
>  #define RTE_LIBRTE_DPAA_MAX_CRYPTODEV	4
>
> diff --git a/doc/guides/cryptodevs/aesni_gcm.rst b/doc/guides/cryptodevs/aesni_gcm.rst
> index 01590e850..2cfd1e9f7 100644
> --- a/doc/guides/cryptodevs/aesni_gcm.rst
> +++ b/doc/guides/cryptodevs/aesni_gcm.rst
> @@ -83,11 +83,9 @@ The following parameters (all optional) can be provided in the previous two call
>
>  * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
>  Example:
>
>  .. code-block:: console
>
> -    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0,max_nb_sessions=128" \
> +    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_gcm,socket_id=0" \
>      -- -p 1 --cdev SW --chain AEAD --aead_algo "aes-gcm"
> diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
> index 236828c0a..a0602a10d 100644
> --- a/doc/guides/cryptodevs/aesni_mb.rst
> +++ b/doc/guides/cryptodevs/aesni_mb.rst
> @@ -106,13 +106,11 @@ The following parameters (all optional) can be provided in the previous two call
>
>  * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
>  Example:
>
>  .. code-block:: console
>
> -    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_mb,socket_id=0,max_nb_sessions=128" \
> +    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_aesni_mb,socket_id=0" \
>      -- -p 1 --cdev SW --chain CIPHER_HASH --cipher_algo "aes-cbc" --auth_algo "sha1-hmac"
>
>  Extra notes
> diff --git a/doc/guides/cryptodevs/armv8.rst b/doc/guides/cryptodevs/armv8.rst
> index 725398daf..4adf3cf40 100644
> --- a/doc/guides/cryptodevs/armv8.rst
> +++ b/doc/guides/cryptodevs/armv8.rst
> @@ -64,7 +64,6 @@ For performance test cryptodev_sw_armv8_perftest can be used.
>  Limitations
>  -----------
>
> -* Maximum number of sessions is 2048.
>  * Only chained operations are supported.
>  * AES-128-CBC is the only supported cipher variant.
>  * Cipher input data has to be a multiple of 16 bytes.
> diff --git a/doc/guides/cryptodevs/ccp.rst b/doc/guides/cryptodevs/ccp.rst
> index 034d20367..d577d5a1c 100644
> --- a/doc/guides/cryptodevs/ccp.rst
> +++ b/doc/guides/cryptodevs/ccp.rst
> @@ -101,8 +101,6 @@ The following parameters (all optional) can be provided in the previous two call
>
>  * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device.
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
>  * ccp_auth_opt: Specify authentication operations to perform on CPU using openssl APIs.
>
>  To validate ccp pmd, l2fwd-crypto example can be used with following command:
> diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst
> index 3ea24c8aa..990befeb7 100644
> --- a/doc/guides/cryptodevs/dpaa2_sec.rst
> +++ b/doc/guides/cryptodevs/dpaa2_sec.rst
> @@ -200,11 +200,6 @@ Please note that enabling debugging options may affect system performance.
>    By default it is only enabled in defconfig_arm64-dpaa2-* config.
>    Toggle compilation of the ``librte_pmd_dpaa2_sec`` driver.
>
> -* ``CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS``
> -  By default it is set as 2048 in defconfig_arm64-dpaa2-* config.
> -  It indicates Number of sessions to create in the session memory pool
> -  on a single DPAA2 SEC device.
> -
>  Installations
>  -------------
>  To compile the DPAA2_SEC PMD for Linux arm64 gcc target, run the
> diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
> index c14d6d7b1..c5097a84f 100644
> --- a/doc/guides/cryptodevs/dpaa_sec.rst
> +++ b/doc/guides/cryptodevs/dpaa_sec.rst
> @@ -145,11 +145,6 @@ Please note that enabling debugging options may affect system performance.
>    By default it is only enabled in defconfig_arm64-dpaa-* config.
>    Toggle compilation of the ``librte_pmd_dpaa_sec`` driver.
>
> -* ``CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS``
> -  By default it is set as 2048 in defconfig_arm64-dpaa-* config.
> -  It indicates Number of sessions to create in the session memory pool
> -  on a single DPAA SEC device.
> -
>  Installations
>  -------------
>  To compile the DPAA_SEC PMD for Linux arm64 gcc target, run the
> diff --git a/doc/guides/cryptodevs/kasumi.rst b/doc/guides/cryptodevs/kasumi.rst
> index 2265eee4e..74bc4d840 100644
> --- a/doc/guides/cryptodevs/kasumi.rst
> +++ b/doc/guides/cryptodevs/kasumi.rst
> @@ -87,13 +87,11 @@ The following parameters (all optional) can be provided in the previous two call
>
>  * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
>  Example:
>
>  .. code-block:: console
>
> -    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_kasumi,socket_id=0,max_nb_sessions=128" \
> +    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_kasumi,socket_id=0" \
>      -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "kasumi-f8"
>
>  Extra notes on KASUMI F9
> diff --git a/doc/guides/cryptodevs/mvsam.rst b/doc/guides/cryptodevs/mvsam.rst
> index fd418c264..b91bb0fb6 100644
> --- a/doc/guides/cryptodevs/mvsam.rst
> +++ b/doc/guides/cryptodevs/mvsam.rst
> @@ -115,7 +115,6 @@ loaded:
>  The following parameters (all optional) are exported by the driver:
>
>  * max_nb_queue_pairs: maximum number of queue pairs in the device (8 by default).
> -* max_nb_sessions: maximum number of sessions that can be created (2048 by default).
>  * socket_id: socket on which to allocate the device resources on.
>
>  l2fwd-crypto example application can be used to verify MVSAM CRYPTO PMD
> diff --git a/doc/guides/cryptodevs/null.rst b/doc/guides/cryptodevs/null.rst
> index c980e0ac8..ca39fe444 100644
> --- a/doc/guides/cryptodevs/null.rst
> +++ b/doc/guides/cryptodevs/null.rst
> @@ -61,11 +61,9 @@ The following parameters (all optional) can be provided in the previous two call
>
>  * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
>  Example:
>
>  .. code-block:: console
>
> -    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0,max_nb_sessions=128" \
> +    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_null,socket_id=0" \
>      -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "null"
> diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
> index 427fc807c..153ad0657 100644
> --- a/doc/guides/cryptodevs/openssl.rst
> +++ b/doc/guides/cryptodevs/openssl.rst
> @@ -98,7 +98,6 @@ To verify real traffic l2fwd-crypto example can be used with this command:
>  Limitations
>  -----------
>
> -* Maximum number of sessions is 2048.
>  * Chained mbufs are supported only for source mbuf (destination must be
>    contiguous).
>  * Hash only is not supported for GCM and GMAC.
> diff --git a/doc/guides/cryptodevs/scheduler.rst b/doc/guides/cryptodevs/scheduler.rst
> index d67894d55..e266ec5a3 100644
> --- a/doc/guides/cryptodevs/scheduler.rst
> +++ b/doc/guides/cryptodevs/scheduler.rst
> @@ -58,10 +58,6 @@ two calls:
>    to be allocated (by default, socket_id will be the socket where the core
>    that is creating the PMD is running on).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be
> -  created. This value may be overwritten internally if there are too
> -  many devices are attached.
> -
>  * slave: If a cryptodev has been initialized with specific name, it can be
>    attached to the scheduler using this parameter, simply filling the name
>    here. Multiple cryptodevs can be attached initially by presenting this
> diff --git a/doc/guides/cryptodevs/snow3g.rst b/doc/guides/cryptodevs/snow3g.rst
> index 7cba712c1..e0b9a73f7 100644
> --- a/doc/guides/cryptodevs/snow3g.rst
> +++ b/doc/guides/cryptodevs/snow3g.rst
> @@ -79,11 +79,9 @@ The following parameters (all optional) can be provided in the previous two call
>
>  * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
>  Example:
>
>  .. code-block:: console
>
> -    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_snow3g,socket_id=0,max_nb_sessions=128" \
> +    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_snow3g,socket_id=0" \
>      -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "snow3g-uea2"
> diff --git a/doc/guides/cryptodevs/zuc.rst b/doc/guides/cryptodevs/zuc.rst
> index e38989968..7bebbb48b 100644
> --- a/doc/guides/cryptodevs/zuc.rst
> +++ b/doc/guides/cryptodevs/zuc.rst
> @@ -79,11 +79,9 @@ The following parameters (all optional) can be provided in the previous two call
>
>  * max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default).
>
> -* max_nb_sessions: Specify the maximum number of sessions that can be created (2048 by default).
> -
>  Example:
>
>  .. code-block:: console
>
> -    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_zuc,socket_id=0,max_nb_sessions=128" \
> +    ./l2fwd-crypto -l 1 -n 4 --vdev="crypto_zuc,socket_id=0" \
>      -- -p 1 --cdev SW --chain CIPHER_ONLY --cipher_algo "zuc-eea3"
> diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
> index d02bb7514..c83184fe9 100644
> --- a/doc/guides/prog_guide/cryptodev_lib.rst
> +++ b/doc/guides/prog_guide/cryptodev_lib.rst
> @@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
>
>  .. code-block:: console
>
> -   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
> +   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
>
>  .. Note::
>
> @@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
>  .. code-block:: c
>
>     rte_vdev_init("crypto_aesni_mb",
> -                     "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
> +                     "max_nb_queue_pairs=2,socket_id=0")
>
>  All virtual Crypto devices support the following initialization parameters:
>
>  * ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
> -* ``max_nb_sessions`` - maximum number of sessions supported by the device
>  * ``socket_id`` - socket on which to allocate the device resources on.
>
>
> @@ -276,10 +275,6 @@ relevant information for the device.
>          const struct rte_cryptodev_capabilities *capabilities;
>
>          unsigned max_nb_queue_pairs;
> -
> -        struct {
> -            unsigned max_nb_sessions;
> -        } sym;
>      };
>
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index b71080bb8..dc014da21 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -101,9 +101,6 @@ Deprecation Notices
>  * cryptodev: The following changes will be made in the library
>    for 18.08:
>
> -  - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
> -    containing fields not relevant anymore since the session mempool
> -    is not internal in the crypto device anymore.
>    - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
>      ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
>      18.05 and removed in 18.08, as there are no drivers doing anything useful
> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
> index ba710e845..a6f31713a 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -56,7 +56,8 @@ API Changes
>     =========================================================
>
>  * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
> -  has been replaced with field ``struct rte_device *device``.
> +  has been replaced with field ``struct rte_device *device`` and
> +  field ``sym`` has been removed.
>
>
>  ABI Changes
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> index 80360dd9c..cd5b1952b 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> @@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
>  	internals->vector_mode = vector_mode;
>
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  }
> @@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct aesni_gcm_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> index 6f542137c..b05122c1b 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
> @@ -143,7 +143,6 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->capabilities = aesni_gcm_pmd_capabilities;
>
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  	}
>  }
>
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
> index 3d60583b0..b496377dd 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
> @@ -39,8 +39,6 @@ struct aesni_gcm_private {
>  	/**< Vector mode */
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  struct aesni_gcm_qp {
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index bb35c66ab..bb647f736 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
>
>  	internals->vector_mode = vector_mode;
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  }
> @@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct aesni_mb_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name, *args;
>  	int retval;
> @@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
>  		cryptodev_aesni_mb_pmd_drv.driver,
> 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 01530523f..7c735f5dc 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
> @@ -387,7 +387,6 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = aesni_mb_pmd_capabilities;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  	}
>  }
>
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
> index a33b2f695..9520cdf9c 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
> @@ -124,8 +124,6 @@ struct aesni_mb_private {
>  	/**< CPU vector instruction set mode */
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  /** AESNI Multi buffer queue pair */
> diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
> index fbb08f729..db0d8a2a9 100644
> --- a/drivers/crypto/armv8/rte_armv8_pmd.c
> +++ b/drivers/crypto/armv8/rte_armv8_pmd.c
> @@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>
> @@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct armv8_crypto_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
> index c64aef09f..d31ef7d66 100644
> --- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
> +++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
> @@ -154,7 +154,6 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = armv8_crypto_pmd_capabilities;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  	}
>  }
>
> diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
> index b8966e934..7feb021db 100644
> --- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
> +++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
> @@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
>  struct armv8_crypto_private {
>  	unsigned int max_nb_qpairs;
>  	/**< Max number of queue pairs */
> -	unsigned int max_nb_sessions;
> -	/**< Max number of sessions */
>  };
>
>  /** ARMv8 crypto queue pair */
> diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
> index 80b75ccb0..7e383feed 100644
> --- a/drivers/crypto/ccp/ccp_pmd_ops.c
> +++ b/drivers/crypto/ccp/ccp_pmd_ops.c
> @@ -624,7 +624,6 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
>  		if (internals->auth_opt == 1)
>  			dev_info->capabilities = ccp_crypto_cap_complete;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  	}
>  }
>
> diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
> index f4498048f..79752f687 100644
> --- a/drivers/crypto/ccp/ccp_pmd_private.h
> +++ b/drivers/crypto/ccp/ccp_pmd_private.h
> @@ -40,7 +40,6 @@
>  /* private data structure for each CCP crypto device */
>  struct ccp_private {
>  	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
> -	unsigned int max_nb_sessions;	/**< Max number of sessions */
>  	uint8_t crypto_num_dev;		/**< Number of working crypto devices */
>  	bool auth_opt;			/**< Authentication offload option */
>  	struct ccp_device *last_dev;	/**< Last working crypto device */
> diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
> index 2061f465e..d70640f6d 100644
> --- a/drivers/crypto/ccp/rte_ccp_pmd.c
> +++ b/drivers/crypto/ccp/rte_ccp_pmd.c
> @@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
>  #define CCP_CRYPTODEV_PARAM_NAME		("name")
>  #define CCP_CRYPTODEV_PARAM_SOCKET_ID		("socket_id")
>  #define CCP_CRYPTODEV_PARAM_MAX_NB_QP		("max_nb_queue_pairs")
> -#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS		("max_nb_sessions")
>  #define CCP_CRYPTODEV_PARAM_AUTH_OPT		("ccp_auth_opt")
>
>  const char *ccp_pmd_valid_params[] = {
>  	CCP_CRYPTODEV_PARAM_NAME,
>  	CCP_CRYPTODEV_PARAM_SOCKET_ID,
>  	CCP_CRYPTODEV_PARAM_MAX_NB_QP,
> -	CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
>  	CCP_CRYPTODEV_PARAM_AUTH_OPT,
>  };
>
> @@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
>  		if (ret < 0)
>  			goto free_kvlist;
>
> -		ret = rte_kvargs_process(kvlist,
> -					 CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
> -					 &parse_integer_arg,
> -					 &params->def_p.max_nb_sessions);
> -		if (ret < 0)
> -			goto free_kvlist;
> -
>  		ret = rte_kvargs_process(kvlist,
>  					 CCP_CRYPTODEV_PARAM_SOCKET_ID,
>  					 &parse_integer_arg,
> @@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
>  	internals->auth_opt = init_params->auth_opt;
>  	internals->crypto_num_dev = cryptodev_cnt;
>
> @@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
>  			"",
>  			sizeof(struct ccp_private),
>  			rte_socket_id(),
> -			CCP_PMD_MAX_QUEUE_PAIRS,
> -			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +			CCP_PMD_MAX_QUEUE_PAIRS
>  		},
>  		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
>  	};
> @@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
>  		init_params.def_p.socket_id);
>  	RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
>  		init_params.def_p.max_nb_queue_pairs);
> -	RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
> -		init_params.def_p.max_nb_sessions);
>  	RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
>  		((init_params.auth_opt == 0) ? "CCP" : "CPU"));
>
> @@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
>  RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int> "
>  	"ccp_auth_opt=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
> diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> index 56fa969d3..16ab0b6a6 100644
> --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> @@ -55,6 +55,8 @@ typedef uint64_t	dma_addr_t;
>  #define SEC_FLC_DHR_OUTBOUND	-114
>  #define SEC_FLC_DHR_INBOUND	0
>
> +#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
> +
>  enum rta_sec_era rta_sec_era = RTA_SEC_ERA_8;
>
>  static uint8_t cryptodev_driver_id;
> @@ -2626,7 +2628,6 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
>  		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
>  		info->feature_flags = dev->feature_flags;
>  		info->capabilities = dpaa2_sec_capabilities;
> -		info->sym.max_nb_sessions = internals->max_nb_sessions;
>  		info->driver_id = cryptodev_driver_id;
>  	}
>  }
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
> index 73cae483b..909583bd0 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> @@ -2214,7 +2214,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
>  		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
>  		info->feature_flags = dev->feature_flags;
>  		info->capabilities = dpaa_sec_capabilities;
> -		info->sym.max_nb_sessions = internals->max_nb_sessions;
>  		info->driver_id = cryptodev_driver_id;
>  	}
>  }
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
> index e15e373fd..91df68009 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.h
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
> @@ -137,6 +137,7 @@ struct dpaa_sec_qp {
>  };
>
>  #define RTE_DPAA_MAX_NB_SEC_QPS 8
> +#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
>  #define RTE_DPAA_MAX_RX_QUEUE RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS
>  #define DPAA_MAX_DEQUEUE_NUM_FRAMES 63
>
> diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
> index 205dc1de7..65376b211 100644
> --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
> +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
> @@ -555,7 +555,6 @@ cryptodev_kasumi_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  init_error:
> @@ -573,8 +572,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct kasumi_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
>  		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
> index a388dbb63..284669341 100644
> --- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
> +++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
> @@ -126,7 +126,6 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = kasumi_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
> index a397bee65..2b12818bc 100644
> --- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
> +++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
> @@ -36,8 +36,6 @@
>  struct kasumi_private {
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  /** KASUMI buffer queue pair */
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> index 1b6029a56..822b6cac7 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> @@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	/*
>  	 * ret == -EEXIST is correct, it means DMA
> @@ -734,8 +733,6 @@ cryptodev_mrvl_crypto_create(const char *name,
>  			"DMA memory has been already initialized by a different driver.");
>  	}
>
> -	sam_params.max_num_sessions = internals->max_nb_sessions;

This will not fly since library maintains separate list of sessions.
We have to initialize this number to something sane. Since we cannot
get it from userspace perhaps make that compile-time configurable
by adding separate CONFIG_?

> -
>  	return sam_init(&sam_params);
>
>  init_error:
> @@ -766,8 +763,6 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
>
>  	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
>  	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
> -	init_params.max_nb_sessions =
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
>  	init_params.socket_id = rte_socket_id();
>
>  	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
> @@ -823,7 +818,6 @@ static struct cryptodev_driver mrvl_crypto_drv;
>  RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_MRVL_PMD, cryptodev_mrvl_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_MRVL_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(mrvl_crypto_drv, cryptodev_mrvl_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> index 3f8de37b7..944a415cf 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> @@ -471,7 +471,6 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = mrvl_crypto_pmd_capabilities;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  	}
>  }
>
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
> index c16d95b46..bb528493a 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_private.h
> @@ -51,7 +51,6 @@ enum mrvl_crypto_chain_order {
>  /** Private data structure for each crypto device. */
>  struct mrvl_crypto_private {
>  	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
> -	unsigned int max_nb_sessions;	/**< Max number of sessions */
>  };
>
>  /** MRVL crypto queue pair structure. */
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index 052b6546c..a8499cf94 100644
> --- a/drivers/crypto/null/null_crypto_pmd.c
> +++ b/drivers/crypto/null/null_crypto_pmd.c
> @@ -182,7 +182,6 @@ cryptodev_null_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  }
> @@ -196,7 +195,6 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
>  		sizeof(struct null_crypto_private),
>  		rte_socket_id(),
>  		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
>  	};
>  	const char *name, *args;
>  	int retval;
> @@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
> index f8e5f61f1..3ca1370e8 100644
> --- a/drivers/crypto/null/null_crypto_pmd_ops.c
> +++ b/drivers/crypto/null/null_crypto_pmd_ops.c
> @@ -121,7 +121,6 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = null_crypto_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
> index 0fd133625..d7d769f3d 100644
> --- a/drivers/crypto/null/null_crypto_pmd_private.h
> +++ b/drivers/crypto/null/null_crypto_pmd_private.h
> @@ -32,7 +32,6 @@
>  /** private data structure for each NULL crypto device */
>  struct null_crypto_private {
>  	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
> -	unsigned max_nb_sessions;	/**< Max number of sessions */
>  };
>
>  /** NULL crypto queue pair */
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 93c6d7e5d..965cab9f2 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>
> @@ -1687,7 +1686,6 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
>  		sizeof(struct openssl_private),
>  		rte_socket_id(),
>  		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
>  	cryptodev_openssl_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
>  		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> index 1cb87d59a..485c80e7f 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> @@ -547,7 +547,6 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = openssl_pmd_capabilities;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  	}
>  }
>
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
> index bc8dc7cdc..02ea81d5c 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
> @@ -62,8 +62,6 @@ enum openssl_auth_mode {
>  struct openssl_private {
>  	unsigned int max_nb_qpairs;
>  	/**< Max number of queue pairs */
> -	unsigned int max_nb_sessions;
> -	/**< Max number of sessions */
>  };
>
>  /** OPENSSL crypto queue pair */
> diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
> index 768dcbae0..e89d3bc11 100644
> --- a/drivers/crypto/qat/qat_crypto.c
> +++ b/drivers/crypto/qat/qat_crypto.c
> @@ -1654,7 +1654,6 @@ void qat_dev_info_get(struct rte_cryptodev *dev,
>  				ADF_NUM_BUNDLES_PER_DEV;
>  		info->feature_flags = dev->feature_flags;
>  		info->capabilities = internals->qat_dev_capabilities;
> -		info->sym.max_nb_sessions = internals->max_nb_sessions;
>  		info->driver_id = cryptodev_qat_driver_id;
>  	}
>  }
> diff --git a/drivers/crypto/qat/qat_crypto.h b/drivers/crypto/qat/qat_crypto.h
> index 281a142b9..c84cf669f 100644
> --- a/drivers/crypto/qat/qat_crypto.h
> +++ b/drivers/crypto/qat/qat_crypto.h
> @@ -75,8 +75,6 @@ struct qat_qp {
>  struct qat_pmd_private {
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  	enum qat_device_gen qat_dev_gen;
>  	/**< QAT device generation */
>  	const struct rte_cryptodev_capabilities *qat_dev_capabilities;
> diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c
> index c8da07af6..74a903d3a 100644
> --- a/drivers/crypto/qat/rte_qat_cryptodev.c
> +++ b/drivers/crypto/qat/rte_qat_cryptodev.c
> @@ -94,7 +94,6 @@ crypto_qat_create(const char *name, struct rte_pci_device *pci_dev,
>  			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
>
>  	internals = cryptodev->data->dev_private;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>  	switch (pci_dev->id.device_id) {
>  	case 0x0443:
>  		internals->qat_dev_gen = QAT_GEN1;
> @@ -131,8 +130,7 @@ static int crypto_qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  		.name = "",
>  		.socket_id = pci_dev->device.numa_node,
> -		.private_data_size = sizeof(struct qat_pmd_private),
> -		.max_nb_sessions = RTE_QAT_PMD_MAX_NB_SESSIONS
> +		.private_data_size = sizeof(struct qat_pmd_private)
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>
> diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
> index 25d6409f3..32a19c106 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd.c
> @@ -31,7 +31,6 @@ struct scheduler_init_params {
>  #define RTE_CRYPTODEV_VDEV_MODE			("mode")
>  #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
>  #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
> -#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
>  #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
>  #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
>  #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
> @@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
>  	RTE_CRYPTODEV_VDEV_MODE,
>  	RTE_CRYPTODEV_VDEV_ORDERING,
>  	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
> -	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
>  	RTE_CRYPTODEV_VDEV_SOCKET_ID,
>  	RTE_CRYPTODEV_VDEV_COREMASK,
>  	RTE_CRYPTODEV_VDEV_CORELIST
> @@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
>  		if (ret < 0)
>  			goto free_kvlist;
>
> -		ret = rte_kvargs_process(kvlist,
> -				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
> -				&parse_integer_arg,
> -				&params->def_p.max_nb_sessions);
> -		if (ret < 0)
> -			goto free_kvlist;
> -
>  		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
>  				&parse_integer_arg,
>  				&params->def_p.socket_id);
> @@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
>  			"",
>  			sizeof(struct scheduler_ctx),
>  			rte_socket_id(),
> -			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  		},
>  		.nb_slaves = 0,
>  		.mode = CDEV_SCHED_MODE_NOT_SET,
> @@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
>  	cryptodev_scheduler_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int> "
>  	"slave=<name>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
> diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> index 147dc51e9..88be72a05 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> @@ -321,8 +321,6 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
>  		struct rte_cryptodev_info *dev_info)
>  {
>  	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
> -	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
> -			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
>  	uint32_t i;
>
>  	if (!dev_info)
> @@ -338,17 +336,12 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
>  		struct rte_cryptodev_info slave_info;
>
>  		rte_cryptodev_info_get(slave_dev_id, &slave_info);
> -		max_nb_sessions = slave_info.sym.max_nb_sessions <
> -				max_nb_sessions ?
> -				slave_info.sym.max_nb_sessions :
> -				max_nb_sessions;
>  	}
>
>  	dev_info->driver_id = dev->driver_id;
>  	dev_info->feature_flags = dev->feature_flags;
>  	dev_info->capabilities = sched_ctx->capabilities;
>  	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
> -	dev_info->sym.max_nb_sessions = max_nb_sessions;
>  }
>
>  /** Release queue pair */
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> index 72751e35e..fe595abe1 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> @@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  init_error:
> @@ -574,7 +573,6 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
>  		sizeof(struct snow3g_private),
>  		rte_socket_id(),
>  		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
>  		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> index f60b47598..fff4644c0 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> @@ -130,7 +130,6 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = snow3g_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> index eea900e0a..2c6e1a948 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> @@ -36,8 +36,6 @@
>  struct snow3g_private {
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  /** SNOW 3G buffer queue pair */
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
> index 482edea1a..8395801a4 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -1411,8 +1411,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
>  		info->driver_id = cryptodev_virtio_driver_id;
>  		info->feature_flags = dev->feature_flags;
>  		info->max_nb_queue_pairs = hw->max_dataqueues;
> -		info->sym.max_nb_sessions =
> -			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
>  		info->capabilities = hw->virtio_dev_capabilities;
>  	}
>  }
> @@ -1426,7 +1424,6 @@ crypto_virtio_pci_probe(
>  		.name = "",
>  		.socket_id = rte_socket_id(),
>  		.private_data_size = sizeof(struct virtio_crypto_hw),
> -		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
> index a805b2278..396f25975 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd.c
> @@ -479,7 +479,6 @@ cryptodev_zuc_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  init_error:
> @@ -497,8 +496,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct zuc_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -541,7 +539,6 @@ static struct cryptodev_driver zuc_crypto_drv;
>  RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> index 8abac8989..ac509e70d 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> @@ -130,7 +130,6 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = zuc_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
> index b83c4a047..2bd378ad6 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
> @@ -37,8 +37,6 @@
>  struct zuc_private {
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  /** ZUC buffer queue pair */
> diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
> index a4b8cccc2..78be5bdb8 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -381,11 +381,6 @@ struct rte_cryptodev_info {
>
>  	unsigned max_nb_queue_pairs;
>  	/**< Maximum number of queues pairs supported by device. */
> -
> -	struct {
> -		unsigned max_nb_sessions;
> -		/**< Maximum number of sessions supported by device. */
> -	} sym;
>  };
>
>  #define RTE_CRYPTODEV_DETACHED  (0)
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> index f2aac24b7..2088ac3f3 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> @@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
>  		if (ret < 0)
>  			goto free_kvlist;
>
> -		ret = rte_kvargs_process(kvlist,
> -				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
> -				&rte_cryptodev_pmd_parse_uint_arg,
> -				&params->max_nb_sessions);
> -		if (ret < 0)
> -			goto free_kvlist;
> -
>  		ret = rte_kvargs_process(kvlist,
>  				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
>  				&rte_cryptodev_pmd_parse_uint_arg,
> @@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
>  			device->driver->name, name);
>
>  	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
> -			"socket id: %d, max queue pairs: %u, max sessions: %u",
> +			"socket id: %d, max queue pairs: %u",
>  			device->driver->name, name,
> -			params->socket_id, params->max_nb_queue_pairs,
> -			params->max_nb_sessions);
> +			params->socket_id, params->max_nb_queue_pairs);
>
>  	/* allocate device structure */
>  	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> index 69d776934..0739ce065 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> @@ -59,18 +59,15 @@ extern "C" {
>
>
>  #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
> -#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
>
>  #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
>  #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
> -#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
>  #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
>
>
>  static const char * const cryptodev_pmd_valid_params[] = {
>  	RTE_CRYPTODEV_PMD_NAME_ARG,
>  	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
> -	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
>  	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
>  };
>
> @@ -83,7 +80,6 @@ struct rte_cryptodev_pmd_init_params {
>  	size_t private_data_size;
>  	int socket_id;
>  	unsigned int max_nb_queue_pairs;
> -	unsigned int max_nb_sessions;
>  };
>
>  /** Global structure used for maintaining state of allocated crypto devices */
> diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
> index 389f79677..2c687bd7c 100644
> --- a/test/test/test_cryptodev.c
> +++ b/test/test/test_cryptodev.c
> @@ -39,6 +39,7 @@
>  #include "test_cryptodev_hmac_test_vectors.h"
>
>  #define VDEV_ARGS_SIZE 100
> +#define MAX_NB_SESSIONS            4
>
>  static int gbl_driver_id;
>
> @@ -437,7 +438,7 @@ testsuite_setup(void)
>  	 */
>  	ts_params->session_mpool = rte_mempool_create(
>  				"test_sess_mp",
> -				info.sym.max_nb_sessions * 2,
> +				MAX_NB_SESSIONS * 2,
>  				session_size,
>  				0, 0, NULL, NULL, NULL,
>  				NULL, SOCKET_ID_ANY,
> @@ -6499,10 +6500,10 @@ test_multi_session(void)
>
>  	sessions = rte_malloc(NULL,
>  			(sizeof(struct rte_cryptodev_sym_session *) *
> -			dev_info.sym.max_nb_sessions) + 1, 0);
> +			MAX_NB_SESSIONS) + 1, 0);
>
>  	/* Create multiple crypto sessions*/
> -	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
> +	for (i = 0; i < MAX_NB_SESSIONS; i++) {
>
>  		sessions[i] = rte_cryptodev_sym_session_create(
>  				ts_params->session_mpool);
> @@ -6551,7 +6552,7 @@ test_multi_session(void)
>  	TEST_ASSERT_NULL(sessions[i],
>  			"Session creation succeeded unexpectedly!");
>
> -	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
> +	for (i = 0; i < MAX_NB_SESSIONS; i++) {
>  		rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
>  				sessions[i]);
>  		rte_cryptodev_sym_session_free(sessions[i]);
> @@ -6610,7 +6611,7 @@ test_multi_session_random_usage(void)
>
>  	sessions = rte_malloc(NULL,
>  			(sizeof(struct rte_cryptodev_sym_session *)
> -					* dev_info.sym.max_nb_sessions) + 1, 0);
> +					* MAX_NB_SESSIONS) + 1, 0);
>
>  	for (i = 0; i < MB_SESSION_NUMBER; i++) {
>  		sessions[i] = rte_cryptodev_sym_session_create(
> @@ -8545,7 +8546,7 @@ test_scheduler_attach_slave_op(void)
>  		if (ts_params->session_mpool == NULL) {
>  			ts_params->session_mpool = rte_mempool_create(
>  					"test_sess_mp",
> -					info.sym.max_nb_sessions * 2,
> +					MAX_NB_SESSIONS * 2,
>  					session_size,
>  					0, 0, NULL, NULL, NULL,
>  					NULL, SOCKET_ID_ANY,
> --
> 2.17.0
>

--
- Tomasz Duszyński

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

* Re: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
  2018-06-12 11:37   ` Tomasz Duszynski
@ 2018-06-12 13:53     ` De Lara Guarch, Pablo
  2018-06-13  6:11       ` Tomasz Duszynski
  0 siblings, 1 reply; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-06-12 13:53 UTC (permalink / raw)
  To: Tomasz Duszynski
  Cc: Doherty, Declan, akhil.goyal, ravi1.kumar, jerin.jacob, Zhang,
	Roy Fan, Trahe, Fiona, jianjay.zhou, dev



> -----Original Message-----
> From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> Sent: Tuesday, June 12, 2018 12:38 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> tdu@semihalf.com; jianjay.zhou@huawei.com; dev@dpdk.org
> Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> 
> Hello Pablo,
> 
> On Fri, Jun 08, 2018 at 11:02:31PM +0100, Pablo de Lara wrote:
> > Sessions are not created and stored in the crypto device
> > anymore, since now the session mempool is created
> > at the application level.
> >
> > Therefore the limitation of the maximum number of sessions
> > that can be created should not be dependent of the crypto device.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

...

> > diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > index 1b6029a56..822b6cac7 100644
> > --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > @@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> >  	internals = dev->data->dev_private;
> >
> >  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> > -	internals->max_nb_sessions = init_params->max_nb_sessions;
> >
> >  	/*
> >  	 * ret == -EEXIST is correct, it means DMA
> > @@ -734,8 +733,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> >  			"DMA memory has been already initialized by a
> different driver.");
> >  	}
> >
> > -	sam_params.max_num_sessions = internals->max_nb_sessions;
> 
> This will not fly since library maintains separate list of sessions.
> We have to initialize this number to something sane. Since we cannot
> get it from userspace perhaps make that compile-time configurable
> by adding separate CONFIG_?

Hi Tomasz,

If you need to have an actual limit, you could define it internally
(not adding an external configuration option), but bear in mind that
This won't prevent an application from trying to allocate more sessions.

If your PMD has a limitation on the maximum number of sessions, then maybe this change
won't work for you (removing the maximum number of sessions), so let me know and we can discuss this.

Thanks,
Pablo

P.S. Please, next time, strip out the code that you are not commenting, as it was hard to find this question :)


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

* Re: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
  2018-06-12 13:53     ` De Lara Guarch, Pablo
@ 2018-06-13  6:11       ` Tomasz Duszynski
  2018-06-13  8:23         ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 135+ messages in thread
From: Tomasz Duszynski @ 2018-06-13  6:11 UTC (permalink / raw)
  To: De Lara Guarch, Pablo
  Cc: Tomasz Duszynski, Doherty, Declan, akhil.goyal, ravi1.kumar,
	jerin.jacob, Zhang, Roy Fan, Trahe, Fiona, jianjay.zhou, dev

On Tue, Jun 12, 2018 at 01:53:36PM +0000, De Lara Guarch, Pablo wrote:
>
>
> > -----Original Message-----
> > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > Sent: Tuesday, June 12, 2018 12:38 PM
> > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> > ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> > <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> > tdu@semihalf.com; jianjay.zhou@huawei.com; dev@dpdk.org
> > Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> >
> > Hello Pablo,
> >
> > On Fri, Jun 08, 2018 at 11:02:31PM +0100, Pablo de Lara wrote:
> > > Sessions are not created and stored in the crypto device
> > > anymore, since now the session mempool is created
> > > at the application level.
> > >
> > > Therefore the limitation of the maximum number of sessions
> > > that can be created should not be dependent of the crypto device.
> > >
> > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>
> ...
>
> > > diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > index 1b6029a56..822b6cac7 100644
> > > --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > @@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> > >  	internals = dev->data->dev_private;
> > >
> > >  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> > > -	internals->max_nb_sessions = init_params->max_nb_sessions;
> > >
> > >  	/*
> > >  	 * ret == -EEXIST is correct, it means DMA
> > > @@ -734,8 +733,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> > >  			"DMA memory has been already initialized by a
> > different driver.");
> > >  	}
> > >
> > > -	sam_params.max_num_sessions = internals->max_nb_sessions;
> >
> > This will not fly since library maintains separate list of sessions.
> > We have to initialize this number to something sane. Since we cannot
> > get it from userspace perhaps make that compile-time configurable
> > by adding separate CONFIG_?
>
> Hi Tomasz,
>
> If you need to have an actual limit, you could define it internally
> (not adding an external configuration option), but bear in mind that
> This won't prevent an application from trying to allocate more sessions.

You can define arbitrary number of session on condition you have enough
memory. So no hard limit here. What bothers me is the case where
app wants to initialize more session than the library internally has.
If this happens userspace will get an error. On the other hand
requesting some arbitrary large number of session from library and
hoping app will never use so many wastes memory (which might be valuable
on resource constrained systems).

That is why keeping the number of sessions in app and library in sync
is important.

Do we have any option in DPDK now to workaround this?

>
> If your PMD has a limitation on the maximum number of sessions, then maybe this change
> won't work for you (removing the maximum number of sessions), so let me know and we can discuss this.
>
> Thanks,
> Pablo
>
> P.S. Please, next time, strip out the code that you are not commenting, as it was hard to find this question :)
>

--
- Tomasz Duszyński

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

* Re: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
  2018-06-13  6:11       ` Tomasz Duszynski
@ 2018-06-13  8:23         ` De Lara Guarch, Pablo
  2018-06-13 10:11           ` Tomasz Duszynski
  0 siblings, 1 reply; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-06-13  8:23 UTC (permalink / raw)
  To: Tomasz Duszynski
  Cc: Doherty, Declan, akhil.goyal, ravi1.kumar, jerin.jacob, Zhang,
	Roy Fan, Trahe, Fiona, jianjay.zhou, dev

Hi Tomasz,

> -----Original Message-----
> From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> Sent: Wednesday, June 13, 2018 7:12 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: Tomasz Duszynski <tdu@semihalf.com>; Doherty, Declan
> <declan.doherty@intel.com>; akhil.goyal@nxp.com; ravi1.kumar@amd.com;
> jerin.jacob@caviumnetworks.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> Trahe, Fiona <fiona.trahe@intel.com>; jianjay.zhou@huawei.com;
> dev@dpdk.org
> Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> 
> On Tue, Jun 12, 2018 at 01:53:36PM +0000, De Lara Guarch, Pablo wrote:
> >
> >
> > > -----Original Message-----
> > > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > > Sent: Tuesday, June 12, 2018 12:38 PM
> > > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > > Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> > > ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> > > <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> > > tdu@semihalf.com; jianjay.zhou@huawei.com; dev@dpdk.org
> > > Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> > >
> > > Hello Pablo,
> > >
> > > On Fri, Jun 08, 2018 at 11:02:31PM +0100, Pablo de Lara wrote:
> > > > Sessions are not created and stored in the crypto device anymore,
> > > > since now the session mempool is created at the application level.
> > > >
> > > > Therefore the limitation of the maximum number of sessions that
> > > > can be created should not be dependent of the crypto device.
> > > >
> > > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >
> > ...
> >
> > > > diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > index 1b6029a56..822b6cac7 100644
> > > > --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > @@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> > > >  	internals = dev->data->dev_private;
> > > >
> > > >  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> > > > -	internals->max_nb_sessions = init_params->max_nb_sessions;
> > > >
> > > >  	/*
> > > >  	 * ret == -EEXIST is correct, it means DMA @@ -734,8 +733,6 @@
> > > > cryptodev_mrvl_crypto_create(const char *name,
> > > >  			"DMA memory has been already initialized by a
> > > different driver.");
> > > >  	}
> > > >
> > > > -	sam_params.max_num_sessions = internals->max_nb_sessions;
> > >
> > > This will not fly since library maintains separate list of sessions.
> > > We have to initialize this number to something sane. Since we cannot
> > > get it from userspace perhaps make that compile-time configurable by
> > > adding separate CONFIG_?
> >
> > Hi Tomasz,
> >
> > If you need to have an actual limit, you could define it internally
> > (not adding an external configuration option), but bear in mind that
> > This won't prevent an application from trying to allocate more sessions.
> 
> You can define arbitrary number of session on condition you have enough
> memory. So no hard limit here. What bothers me is the case where app wants to
> initialize more session than the library internally has.
> If this happens userspace will get an error. On the other hand requesting some
> arbitrary large number of session from library and hoping app will never use so
> many wastes memory (which might be valuable on resource constrained
> systems).
> 
> That is why keeping the number of sessions in app and library in sync is
> important.
> 
> Do we have any option in DPDK now to workaround this?

Ok I see, so actually the MUSDK library needs a maximum number of sessions.
I'd say then we should keep this field, but we can add a special case: 0.
In this case, the PMD does not have any maximum number of sessions
(which would be applicable to most PMDs).

So, for this PMD, this special case is not supported. If 0 is passed,
either return that unlimited number of sessions is not supported,
or set it to a default value (defined inside the PMD, such as 2048).
If no value is passed, this number can be set to the default value too.

How does this sound?

Thanks,
Pablo


> 
> >
> > If your PMD has a limitation on the maximum number of sessions, then
> > maybe this change won't work for you (removing the maximum number of
> sessions), so let me know and we can discuss this.
> >
> > Thanks,
> > Pablo
> >
> > P.S. Please, next time, strip out the code that you are not
> > commenting, as it was hard to find this question :)
> >
> 
> --
> - Tomasz Duszyński

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

* Re: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
  2018-06-13  8:23         ` De Lara Guarch, Pablo
@ 2018-06-13 10:11           ` Tomasz Duszynski
  2018-06-19 13:20             ` Trahe, Fiona
  0 siblings, 1 reply; 135+ messages in thread
From: Tomasz Duszynski @ 2018-06-13 10:11 UTC (permalink / raw)
  To: De Lara Guarch, Pablo
  Cc: Tomasz Duszynski, Doherty, Declan, akhil.goyal, ravi1.kumar,
	jerin.jacob, Zhang, Roy Fan, Trahe, Fiona, jianjay.zhou, dev

On Wed, Jun 13, 2018 at 08:23:36AM +0000, De Lara Guarch, Pablo wrote:
> Hi Tomasz,
>
> > -----Original Message-----
> > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > Sent: Wednesday, June 13, 2018 7:12 AM
> > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > Cc: Tomasz Duszynski <tdu@semihalf.com>; Doherty, Declan
> > <declan.doherty@intel.com>; akhil.goyal@nxp.com; ravi1.kumar@amd.com;
> > jerin.jacob@caviumnetworks.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> > Trahe, Fiona <fiona.trahe@intel.com>; jianjay.zhou@huawei.com;
> > dev@dpdk.org
> > Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> >
> > On Tue, Jun 12, 2018 at 01:53:36PM +0000, De Lara Guarch, Pablo wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > > > Sent: Tuesday, June 12, 2018 12:38 PM
> > > > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > > > Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> > > > ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> > > > <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> > > > tdu@semihalf.com; jianjay.zhou@huawei.com; dev@dpdk.org
> > > > Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> > > >
> > > > Hello Pablo,
> > > >
> > > > On Fri, Jun 08, 2018 at 11:02:31PM +0100, Pablo de Lara wrote:
> > > > > Sessions are not created and stored in the crypto device anymore,
> > > > > since now the session mempool is created at the application level.
> > > > >
> > > > > Therefore the limitation of the maximum number of sessions that
> > > > > can be created should not be dependent of the crypto device.
> > > > >
> > > > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > >
> > > ...
> > >
> > > > > diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > index 1b6029a56..822b6cac7 100644
> > > > > --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > @@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> > > > >  	internals = dev->data->dev_private;
> > > > >
> > > > >  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> > > > > -	internals->max_nb_sessions = init_params->max_nb_sessions;
> > > > >
> > > > >  	/*
> > > > >  	 * ret == -EEXIST is correct, it means DMA @@ -734,8 +733,6 @@
> > > > > cryptodev_mrvl_crypto_create(const char *name,
> > > > >  			"DMA memory has been already initialized by a
> > > > different driver.");
> > > > >  	}
> > > > >
> > > > > -	sam_params.max_num_sessions = internals->max_nb_sessions;
> > > >
> > > > This will not fly since library maintains separate list of sessions.
> > > > We have to initialize this number to something sane. Since we cannot
> > > > get it from userspace perhaps make that compile-time configurable by
> > > > adding separate CONFIG_?
> > >
> > > Hi Tomasz,
> > >
> > > If you need to have an actual limit, you could define it internally
> > > (not adding an external configuration option), but bear in mind that
> > > This won't prevent an application from trying to allocate more sessions.
> >
> > You can define arbitrary number of session on condition you have enough
> > memory. So no hard limit here. What bothers me is the case where app wants to
> > initialize more session than the library internally has.
> > If this happens userspace will get an error. On the other hand requesting some
> > arbitrary large number of session from library and hoping app will never use so
> > many wastes memory (which might be valuable on resource constrained
> > systems).
> >
> > That is why keeping the number of sessions in app and library in sync is
> > important.
> >
> > Do we have any option in DPDK now to workaround this?
>
> Ok I see, so actually the MUSDK library needs a maximum number of sessions.
> I'd say then we should keep this field, but we can add a special case: 0.
> In this case, the PMD does not have any maximum number of sessions
> (which would be applicable to most PMDs).
>
> So, for this PMD, this special case is not supported. If 0 is passed,
> either return that unlimited number of sessions is not supported,
> or set it to a default value (defined inside the PMD, such as 2048).
> If no value is passed, this number can be set to the default value too.
>
> How does this sound?

Who is going to pass that value? App? Or the old way is retained
i.e PMD parameters?

OK, my understanding is that we have 3 options:

1. 0 is passed which for most of the drivers translates to "you should
   not care about sessions number created by userspace application". In
   case PMD supports that it returns either success or failure.

2. Nothing is passed which means PMD should not care about number of
   sessions except mvsam which sets some default value.

3. Passing some arbitrary value which which sets number of sessions
   for PMDs that care about that (mvsam). In that case app would
   respect that number and not allocate more than specified? This is
   what DPDK has now.

Right? Doesn't is sound like the mechanism that gets removed from DPDK with
some extra handling added?

Other solution might be to remove the old API as planned and change
the PMD itself so that it defers library initialization until
PMD is started. During session configuration necessary information
would be saved and reused later on (i.e during PMD start).

>
> Thanks,
> Pablo
>
>
> >
> > >
> > > If your PMD has a limitation on the maximum number of sessions, then
> > > maybe this change won't work for you (removing the maximum number of
> > sessions), so let me know and we can discuss this.
> > >
> > > Thanks,
> > > Pablo
> > >
> > > P.S. Please, next time, strip out the code that you are not
> > > commenting, as it was hard to find this question :)
> > >
> >
> > --
> > - Tomasz Duszyński

--
- Tomasz Duszyński

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

* Re: [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-06-18  6:29   ` Akhil Goyal
  2018-06-25 16:43     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 135+ messages in thread
From: Akhil Goyal @ 2018-06-18  6:29 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, akhil.goyal, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

Hi Pablo,
On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> The current mbuf scatter gatter feature flag is
> too ambiguous, as it is not clear if input and/or output
> buffers can be scatter gather mbufs or not.
>
> Therefore, two new flags will replace this flag:
> RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN and
> RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT.
>
There may be a case, SG supported in input buffer and we use in-place 
processing and driver may support that but may not support SG for out 
buffers in case of OOP. How can we handle this type of case?

> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  doc/guides/rel_notes/deprecation.rst        |  2 -
>  doc/guides/rel_notes/release_18_08.rst      |  4 ++
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c    |  2 +-
>  drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  2 +-
>  drivers/crypto/dpaa_sec/dpaa_sec.c          |  3 +-
>  drivers/crypto/null/null_crypto_pmd.c       |  3 +-
>  drivers/crypto/openssl/rte_openssl_pmd.c    |  2 +-
>  drivers/crypto/qat/rte_qat_cryptodev.c      |  3 +-
>  lib/librte_cryptodev/rte_cryptodev.c        |  6 ++-
>  lib/librte_cryptodev/rte_cryptodev.h        | 12 +++---
>  test/test/test_cryptodev.c                  | 41 ++++++++++++++-------
>  test/test/test_cryptodev_blockcipher.c      | 11 ++++--
>  12 files changed, 59 insertions(+), 32 deletions(-)
>

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

* Re: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
  2018-06-13 10:11           ` Tomasz Duszynski
@ 2018-06-19 13:20             ` Trahe, Fiona
  2018-06-25 16:42               ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 135+ messages in thread
From: Trahe, Fiona @ 2018-06-19 13:20 UTC (permalink / raw)
  To: Tomasz Duszynski, De Lara Guarch, Pablo
  Cc: Doherty, Declan, akhil.goyal, ravi1.kumar, jerin.jacob, Zhang,
	Roy Fan, jianjay.zhou, dev, Trahe, Fiona

Hi Tomasz, Pablo,

> -----Original Message-----
> From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> Sent: Wednesday, June 13, 2018 11:11 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: Tomasz Duszynski <tdu@semihalf.com>; Doherty, Declan <declan.doherty@intel.com>;
> akhil.goyal@nxp.com; ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>; jianjay.zhou@huawei.com;
> dev@dpdk.org
> Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> 
> On Wed, Jun 13, 2018 at 08:23:36AM +0000, De Lara Guarch, Pablo wrote:
> > Hi Tomasz,
> >
> > > -----Original Message-----
> > > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > > Sent: Wednesday, June 13, 2018 7:12 AM
> > > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > > Cc: Tomasz Duszynski <tdu@semihalf.com>; Doherty, Declan
> > > <declan.doherty@intel.com>; akhil.goyal@nxp.com; ravi1.kumar@amd.com;
> > > jerin.jacob@caviumnetworks.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> > > Trahe, Fiona <fiona.trahe@intel.com>; jianjay.zhou@huawei.com;
> > > dev@dpdk.org
> > > Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> > >
> > > On Tue, Jun 12, 2018 at 01:53:36PM +0000, De Lara Guarch, Pablo wrote:
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > > > > Sent: Tuesday, June 12, 2018 12:38 PM
> > > > > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > > > > Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> > > > > ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> > > > > <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> > > > > tdu@semihalf.com; jianjay.zhou@huawei.com; dev@dpdk.org
> > > > > Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> > > > >
> > > > > Hello Pablo,
> > > > >
> > > > > On Fri, Jun 08, 2018 at 11:02:31PM +0100, Pablo de Lara wrote:
> > > > > > Sessions are not created and stored in the crypto device anymore,
> > > > > > since now the session mempool is created at the application level.
> > > > > >
> > > > > > Therefore the limitation of the maximum number of sessions that
> > > > > > can be created should not be dependent of the crypto device.
> > > > > >
> > > > > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > > >
> > > > ...
> > > >
> > > > > > diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > > index 1b6029a56..822b6cac7 100644
> > > > > > --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > > +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > > @@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> > > > > >  	internals = dev->data->dev_private;
> > > > > >
> > > > > >  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> > > > > > -	internals->max_nb_sessions = init_params->max_nb_sessions;
> > > > > >
> > > > > >  	/*
> > > > > >  	 * ret == -EEXIST is correct, it means DMA @@ -734,8 +733,6 @@
> > > > > > cryptodev_mrvl_crypto_create(const char *name,
> > > > > >  			"DMA memory has been already initialized by a
> > > > > different driver.");
> > > > > >  	}
> > > > > >
> > > > > > -	sam_params.max_num_sessions = internals->max_nb_sessions;
> > > > >
> > > > > This will not fly since library maintains separate list of sessions.
> > > > > We have to initialize this number to something sane. Since we cannot
> > > > > get it from userspace perhaps make that compile-time configurable by
> > > > > adding separate CONFIG_?
> > > >
> > > > Hi Tomasz,
> > > >
> > > > If you need to have an actual limit, you could define it internally
> > > > (not adding an external configuration option), but bear in mind that
> > > > This won't prevent an application from trying to allocate more sessions.
> > >
> > > You can define arbitrary number of session on condition you have enough
> > > memory. So no hard limit here. What bothers me is the case where app wants to
> > > initialize more session than the library internally has.
> > > If this happens userspace will get an error. On the other hand requesting some
> > > arbitrary large number of session from library and hoping app will never use so
> > > many wastes memory (which might be valuable on resource constrained
> > > systems).
> > >
> > > That is why keeping the number of sessions in app and library in sync is
> > > important.
> > >
> > > Do we have any option in DPDK now to workaround this?
> >
> > Ok I see, so actually the MUSDK library needs a maximum number of sessions.
> > I'd say then we should keep this field, but we can add a special case: 0.
> > In this case, the PMD does not have any maximum number of sessions
> > (which would be applicable to most PMDs).
> >
> > So, for this PMD, this special case is not supported. If 0 is passed,
> > either return that unlimited number of sessions is not supported,
> > or set it to a default value (defined inside the PMD, such as 2048).
> > If no value is passed, this number can be set to the default value too.
> >
> > How does this sound?
> 
> Who is going to pass that value? App? Or the old way is retained
> i.e PMD parameters?
> 
> OK, my understanding is that we have 3 options:
> 
> 1. 0 is passed which for most of the drivers translates to "you should
>    not care about sessions number created by userspace application". In
>    case PMD supports that it returns either success or failure.
> 
> 2. Nothing is passed which means PMD should not care about number of
>    sessions except mvsam which sets some default value.
> 
> 3. Passing some arbitrary value which which sets number of sessions
>    for PMDs that care about that (mvsam). In that case app would
>    respect that number and not allocate more than specified? This is
>    what DPDK has now.
> 
> Right? Doesn't is sound like the mechanism that gets removed from DPDK with
> some extra handling added?
> 
> Other solution might be to remove the old API as planned and change
> the PMD itself so that it defers library initialization until
> PMD is started. During session configuration necessary information
> would be saved and reused later on (i.e during PMD start).
> 
[Fiona] I'd suggest we keep max_nb_sessions in the info struct.
mvsam - or any other PMD which wants an internal PMD limit - 
should set it via hard-coding or a PMD-specific item in the config file. 
For all other PMDs currently which don't have a limit the 
config file item can be removed. For these, 0, indicating No Limit, should be
returned in the info struct. 
But I think it's optional what an app does with this max_nb_sessions.
It could take it into account and create a session pool of (max_nb_sessions * num_PMDs)
and be careful not to send more than max_nb_sessions to a PMD with a limit.
Or it could just ignore it, create whatever size session pool it wants and if it calls 
rte_cryptodev_sym_session_init() too many times on a PMD handle the -ENOMEM which I'd expect the PMD to return. Possibly route the session to a different device with available resources.
Does that work for everyone?



> >
> > Thanks,
> > Pablo
> >
> >
> > >
> > > >
> > > > If your PMD has a limitation on the maximum number of sessions, then
> > > > maybe this change won't work for you (removing the maximum number of
> > > sessions), so let me know and we can discuss this.
> > > >
> > > > Thanks,
> > > > Pablo
> > > >
> > > > P.S. Please, next time, strip out the code that you are not
> > > > commenting, as it was hard to find this question :)
> > > >
> > >
> > > --
> > > - Tomasz Duszyński
> 
> --
> - Tomasz Duszyński

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

* Re: [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-06-21 12:43   ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-06-21 12:43 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev


On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> Structure rte_cryptodev_info has currently PCI device
> information ("struct rte_pci_device") in it.
>
> This information is not generic to all devices,
> so this gets replaced with the generic "rte_device" structure,
> compatible with all crypto devices.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-06-21 12:50   ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-06-21 12:50 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> Removed cryptodev queue start/stop functions,
> as they were marked deprecated in 18.05, since they
> were not implemented by any driver.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-06-21 12:59   ` Akhil Goyal
  2018-06-22 17:02     ` Verma, Shally
  0 siblings, 1 reply; 135+ messages in thread
From: Akhil Goyal @ 2018-06-21 12:59 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

Hi Pablo,


On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> Removed rte_cryptodev_get_header_session_size
> and rte_cryptodev_get_private_session_size functions,
> as they have been substituted with functions
> specific for symmetric operations, with _sym_ word
> after "rte_cryptodev_".
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>   doc/guides/rel_notes/deprecation.rst           |  6 ------
>   doc/guides/rel_notes/release_18_08.rst         |  8 ++++++++
>   lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
>   lib/librte_cryptodev/rte_cryptodev.h           | 11 -----------
>   lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
>   5 files changed, 8 insertions(+), 25 deletions(-)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 91592534e..9a73b1d8e 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -107,9 +107,3 @@ Deprecation Notices
>       with them.
>     - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
>       so some will be replaced by more explicit flags.
> -  - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
> -    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
> -    It will be removed in 18.08.
> -  - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
> -    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
> -    It will be removed in 18.08.
> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
> index 3fa9a6e68..0624f3701 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -64,6 +64,14 @@ API Changes
>     - ``rte_cryptodev_queue_pair_start``
>     - ``rte_cryptodev_queue_pair_stop``
>   
> +* cryptodev: Following functions were deprecated and are replaced by
> +  other functions in 18.08:
> +
> +  - ``rte_cryptodev_get_header_session_size`` is replaced with
> +    ``rte_cryptodev_sym_get_header_session_size``
> +  - ``rte_cryptodev_get_private_session_size`` is replaced with
> +    ``rte_cryptodev_sym_get_private_session_size``
> +
rte_cryptodev_get_private_session_size is not removed in this patch. I 
think you missed it in your patch.

-Akhil
>   
>   ABI Changes
>   -----------
> diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
> index a07904fb9..40e249e79 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
>   	return 0;
>   }
>   
> -unsigned int
> -rte_cryptodev_get_header_session_size(void)
> -{
> -	return rte_cryptodev_sym_get_header_session_size();
> -}
> -
>   unsigned int
>   rte_cryptodev_sym_get_header_session_size(void)
>   {
> diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
> index 90487bffc..8e8a59522 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -925,17 +925,6 @@ int
>   rte_cryptodev_sym_session_clear(uint8_t dev_id,
>   			struct rte_cryptodev_sym_session *sess);
>   
> -/**
> - * @deprecated
> - * Get the size of the header session, for all registered drivers.
> - *
> - * @return
> - *   Size of the header session.
> - */
> -__rte_deprecated
> -unsigned int
> -rte_cryptodev_get_header_session_size(void);
> -
>   /**
>    * @deprecated
>    * Get the size of the private session data for a device.
> diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
> index 020b45754..0ab6d5195 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_version.map
> +++ b/lib/librte_cryptodev/rte_cryptodev_version.map
> @@ -63,8 +63,6 @@ DPDK_17.08 {
>   	rte_cryptodev_driver_id_get;
>   	rte_cryptodev_driver_name_get;
>   	rte_cryptodev_get_aead_algo_enum;
> -	rte_cryptodev_get_header_session_size;
> -	rte_cryptodev_get_private_session_size;
>   	rte_cryptodev_sym_capability_check_aead;
>   	rte_cryptodev_sym_session_init;
>   	rte_cryptodev_sym_session_clear;

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

* Re: [dpdk-dev] [PATCH 2/6] cryptodev: remove max number of sessions per queue
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 2/6] cryptodev: remove max number of sessions per queue Pablo de Lara
@ 2018-06-21 13:03   ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-06-21 13:03 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, ravi1.kumar, jerin.jacob,
	roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> The cryptodev info structure currently contains
> the maximum number of sessions that can be used in a queue pair.
> This is only set in DPAA_SEC PMD, and since it is calculated
> based on the maximum number of sessions (which is not used
> anymore), this field can be removed.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
  2018-06-21 12:59   ` Akhil Goyal
@ 2018-06-22 17:02     ` Verma, Shally
  2018-06-25 16:40       ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 135+ messages in thread
From: Verma, Shally @ 2018-06-22 17:02 UTC (permalink / raw)
  To: Akhil Goyal, Pablo de Lara, declan.doherty, ravi1.kumar, Jacob,
	 Jerin, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

Hi Pablo

>-----Original Message-----
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
>Sent: 21 June 2018 18:29
>To: Pablo de Lara <pablo.de.lara.guarch@intel.com>; declan.doherty@intel.com; ravi1.kumar@amd.com; Jacob, Jerin
><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com; fiona.trahe@intel.com; tdu@semihalf.com;
>jianjay.zhou@huawei.com
>Cc: dev@dpdk.org
>Subject: Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
>
>External Email
>
>Hi Pablo,
>
>
>On 6/9/2018 3:32 AM, Pablo de Lara wrote:
>> Removed rte_cryptodev_get_header_session_size
>> and rte_cryptodev_get_private_session_size functions,
>> as they have been substituted with functions
>> specific for symmetric operations, with _sym_ word
>> after "rte_cryptodev_".
>>
>> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>> ---
>>   doc/guides/rel_notes/deprecation.rst           |  6 ------
>>   doc/guides/rel_notes/release_18_08.rst         |  8 ++++++++
>>   lib/librte_cryptodev/rte_cryptodev.c           |  6 ------
>>   lib/librte_cryptodev/rte_cryptodev.h           | 11 -----------
>>   lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
>>   5 files changed, 8 insertions(+), 25 deletions(-)
>>
>> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
>> index 91592534e..9a73b1d8e 100644
>> --- a/doc/guides/rel_notes/deprecation.rst
>> +++ b/doc/guides/rel_notes/deprecation.rst
>> @@ -107,9 +107,3 @@ Deprecation Notices
>>       with them.
>>     - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
>>       so some will be replaced by more explicit flags.
>> -  - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
>> -    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
>> -    It will be removed in 18.08.
>> -  - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
>> -    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
>> -    It will be removed in 18.08.
>> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
>> index 3fa9a6e68..0624f3701 100644
>> --- a/doc/guides/rel_notes/release_18_08.rst
>> +++ b/doc/guides/rel_notes/release_18_08.rst
>> @@ -64,6 +64,14 @@ API Changes
>>     - ``rte_cryptodev_queue_pair_start``
>>     - ``rte_cryptodev_queue_pair_stop``
>>
>> +* cryptodev: Following functions were deprecated and are replaced by
>> +  other functions in 18.08:
>> +
>> +  - ``rte_cryptodev_get_header_session_size`` is replaced with
>> +    ``rte_cryptodev_sym_get_header_session_size``
>> +  - ``rte_cryptodev_get_private_session_size`` is replaced with
>> +    ``rte_cryptodev_sym_get_private_session_size``
>> +
>rte_cryptodev_get_private_session_size is not removed in this patch. I
>think you missed it in your patch.
>
>-Akhil
>>
>>   ABI Changes
>>   -----------
>> diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
>> index a07904fb9..40e249e79 100644
>> --- a/lib/librte_cryptodev/rte_cryptodev.c
>> +++ b/lib/librte_cryptodev/rte_cryptodev.c
>> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
>>       return 0;
>>   }
>>
>> -unsigned int
>> -rte_cryptodev_get_header_session_size(void)
>> -{
>> -     return rte_cryptodev_sym_get_header_session_size();
>> -}
>> -
>>   unsigned int
>>   rte_cryptodev_sym_get_header_session_size(void)
>>   {

[Shally] I missed this before. I think this implementation either should change to use nb_drivers which support symmetric or else I am not seeing a need for separate sym specific API for header_size since it will always be same for both sym and asym.

Thanks
Shally

>> diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
>> index 90487bffc..8e8a59522 100644
>> --- a/lib/librte_cryptodev/rte_cryptodev.h
>> +++ b/lib/librte_cryptodev/rte_cryptodev.h
>> @@ -925,17 +925,6 @@ int
>>   rte_cryptodev_sym_session_clear(uint8_t dev_id,
>>                       struct rte_cryptodev_sym_session *sess);
>>
>> -/**
>> - * @deprecated
>> - * Get the size of the header session, for all registered drivers.
>> - *
>> - * @return
>> - *   Size of the header session.
>> - */
>> -__rte_deprecated
>> -unsigned int
>> -rte_cryptodev_get_header_session_size(void);
>> -
>>   /**
>>    * @deprecated
>>    * Get the size of the private session data for a device.
>> diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
>> index 020b45754..0ab6d5195 100644
>> --- a/lib/librte_cryptodev/rte_cryptodev_version.map
>> +++ b/lib/librte_cryptodev/rte_cryptodev_version.map
>> @@ -63,8 +63,6 @@ DPDK_17.08 {
>>       rte_cryptodev_driver_id_get;
>>       rte_cryptodev_driver_name_get;
>>       rte_cryptodev_get_aead_algo_enum;
>> -     rte_cryptodev_get_header_session_size;
>> -     rte_cryptodev_get_private_session_size;
>>       rte_cryptodev_sym_capability_check_aead;
>>       rte_cryptodev_sym_session_init;
>>       rte_cryptodev_sym_session_clear;


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

* [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
                   ` (5 preceding siblings ...)
  2018-06-08 22:02 ` [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-06-25  8:48 ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
                     ` (14 more replies)
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                   ` (3 subsequent siblings)
  10 siblings, 15 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

API changes in the cryptodev library, announced
in the previous release, 18.05.

Changes in v2:
- Instead of removing max_nb_sessions in info structure,
  a new value `0` is allowed, to indicate that the PMD
  does not have any limitation on the number of sessions
  to be managed
- Modified crypto applications to check for new value `0`
  on max_nb_sessions
- Modified MVSAM PMD to parse max_nb_sessions,
  since that parameter is not generic to any PMD anymore
- Removed attach/detach session API, as announced
- Removed deprecated function that was not removed in
  previous patchset
- Renamed PMD symmetric session API, to allow asymmetric
  session API to be added in the future


Pablo de Lara (15):
  cryptodev: replace bus specific struct with generic dev
  cryptodev: remove max number of sessions per queue
  app/crypto-perf: limit number of sessions
  test/crypto: limit number of sessions
  examples/l2fwd-crypto: limit number of sessions
  examples/ipsec-secgw: check for max supported sessions
  crypto/mvsam: parse max number of sessions
  cryptodev: define value for unlimited sessions
  cryptodev: remove max number of sessions parameter
  doc: remove unneeded deprecation notice
  cryptodev: remove queue start/stop functions
  cryptodev: remove old get session size functions
  cryptodev: replace mbuf scatter gather flag
  cryptodev: remove attach/detach session API
  cryptodev: rename PMD symmetric session API

 app/test-crypto-perf/main.c                        |  31 +++-
 doc/guides/prog_guide/cryptodev_lib.rst            |   7 +-
 doc/guides/rel_notes/deprecation.rst               |  25 ----
 doc/guides/rel_notes/release_18_08.rst             |  30 +++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |   7 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  33 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |   2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |   5 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  33 ++---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   2 -
 drivers/crypto/armv8/rte_armv8_pmd.c               |   5 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  33 ++---
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |   2 -
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  31 ++--
 drivers/crypto/ccp/ccp_pmd_private.h               |   1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   |  16 +--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  44 ++----
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |   2 -
 drivers/crypto/dpaa_sec/dpaa_sec.c                 |  73 ++--------
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |   5 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  33 ++---
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |   2 -
 drivers/crypto/mvsam/rte_mrvl_pmd.c                | 132 +++++++++++++++--
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c            |  43 ++----
 drivers/crypto/null/null_crypto_pmd.c              |   7 +-
 drivers/crypto/null/null_crypto_pmd_ops.c          |  33 ++---
 drivers/crypto/null/null_crypto_pmd_private.h      |   1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |   7 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  33 ++---
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |   2 -
 drivers/crypto/qat/qat_sym_pmd.c                   |  21 +--
 drivers/crypto/qat/qat_sym_pmd.h                   |   1 -
 drivers/crypto/scheduler/scheduler_pmd.c           |  13 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c       |  46 ++----
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |   5 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  33 ++---
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |   2 -
 drivers/crypto/virtio/virtio_cryptodev.c           |  18 +--
 drivers/crypto/zuc/rte_zuc_pmd.c                   |   5 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  33 ++---
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |   2 -
 examples/ipsec-secgw/ipsec-secgw.c                 |   6 +
 examples/l2fwd-crypto/main.c                       |  19 ++-
 lib/librte_cryptodev/rte_cryptodev.c               | 132 +++--------------
 lib/librte_cryptodev/rte_cryptodev.h               | 157 +++++----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.c           |  12 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  66 +--------
 lib/librte_cryptodev/rte_cryptodev_version.map     |   6 -
 test/test/test_cryptodev.c                         |  60 ++++++--
 test/test/test_cryptodev_blockcipher.c             |  21 ++-
 50 files changed, 471 insertions(+), 867 deletions(-)

-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 02/15] cryptodev: remove max number of sessions per queue Pablo de Lara
                     ` (13 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.

This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst  | 2 +-
 doc/guides/rel_notes/deprecation.rst     | 2 --
 doc/guides/rel_notes/release_18_08.rst   | 5 ++++-
 drivers/crypto/qat/qat_sym_pmd.c         | 1 -
 drivers/crypto/virtio/virtio_cryptodev.c | 1 -
 lib/librte_cryptodev/rte_cryptodev.c     | 1 +
 lib/librte_cryptodev/rte_cryptodev.h     | 6 +++---
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
     struct rte_cryptodev_info {
         const char *driver_name;
         uint8_t driver_id;
-        struct rte_pci_device *pci_dev;
+        struct rte_device *device;
 
         uint64_t feature_flags;
 
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
   - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
     containing fields not relevant anymore since the session mempool
     is not internal in the crypto device anymore.
-  - Replacement of ``pci_dev`` field with the more generic ``rte_device``
-    structure.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..6bf53dc31 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+  has been replaced with field ``struct rte_device *device``.
+
 
 ABI Changes
 -----------
@@ -118,7 +121,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_cmdline.so.2
      librte_common_octeontx.so.1
      librte_compressdev.so.1
-     librte_cryptodev.so.4
+   + librte_cryptodev.so.5
      librte_distributor.so.1
      librte_eal.so.7
      librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 		info->capabilities = internals->qat_dev_capabilities;
 		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 	}
 }
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 
 	if (info != NULL) {
 		info->driver_id = cryptodev_virtio_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
 		info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
 
 	dev_info->driver_name = dev->device->driver->name;
+	dev_info->device = dev->device;
 }
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 92ce6d49a..9a49f9d86 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -369,9 +369,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
 
 /**  Crypto device information */
 struct rte_cryptodev_info {
-	const char *driver_name;		/**< Driver name. */
-	uint8_t driver_id;			/**< Driver identifier */
-	struct rte_pci_device *pci_dev;		/**< PCI information. */
+	const char *driver_name;	/**< Driver name. */
+	uint8_t driver_id;		/**< Driver identifier */
+	struct rte_device *device;	/**< Generic device information. */
 
 	uint64_t feature_flags;
 	/**< Feature flags exposes HW/SW features for the given device */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 02/15] cryptodev: remove max number of sessions per queue
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 03/15] app/crypto-perf: limit number of sessions Pablo de Lara
                     ` (12 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The cryptodev info structure currently contains
the maximum number of sessions that can be used in a queue pair.
This is only set in DPAA_SEC PMD, and since it is calculated
based on the maximum number of sessions (which is not used
anymore), this field can be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c   | 3 ---
 lib/librte_cryptodev/rte_cryptodev.h | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 06f7e4373..73cae483b 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2215,9 +2215,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa_sec_capabilities;
 		info->sym.max_nb_sessions = internals->max_nb_sessions;
-		info->sym.max_nb_sessions_per_qp =
-			RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS /
-			RTE_DPAA_MAX_NB_SEC_QPS;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 9a49f9d86..0a4dd39b1 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -385,10 +385,6 @@ struct rte_cryptodev_info {
 	struct {
 		unsigned max_nb_sessions;
 		/**< Maximum number of sessions supported by device. */
-		unsigned int max_nb_sessions_per_qp;
-		/**< Maximum number of sessions per queue pair.
-		 * Default 0 for infinite sessions
-		 */
 	} sym;
 };
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 03/15] app/crypto-perf: limit number of sessions
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 02/15] cryptodev: remove max number of sessions per queue Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 04/15] test/crypto: " Pablo de Lara
                     ` (11 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of creating a fixed number of sessions,
calculate the necessary number based on number of devices
and queue pairs used.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/main.c | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 4ae14390b..b02d3f597 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -21,7 +21,6 @@
 #include "cperf_test_verify.h"
 #include "cperf_test_pmd_cyclecount.h"
 
-#define NUM_SESSIONS 2048
 #define SESS_MEMPOOL_CACHE_SIZE 64
 
 const char *cperf_test_type_strs[] = {
@@ -149,15 +148,41 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 			.nb_descriptors = opts->nb_descriptors
 		};
 
+		uint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions;
+		/* Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		uint32_t sessions_needed = 2 * enabled_cdev_count *
+						opts->nb_qps;
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+		if (!strcmp((const char *)opts->device_type,
+					"crypto_scheduler")) {
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count *
+				opts->nb_qps * nb_slaves;
+		}
+#endif
+		/*
+		 * A single session is required per queue pair
+		 * in each device
+		 */
+		if (dev_max_nb_sess < opts->nb_qps) {
+			RTE_LOG(ERR, USER1,
+				"Device does not support at least "
+				"%u sessions\n", opts->nb_qps);
+			return -ENOTSUP;
+		}
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
 
 			snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
 				"sess_mp_%u", socket_id);
-
 			sess_mp = rte_mempool_create(mp_name,
-						NUM_SESSIONS,
+						sessions_needed,
 						max_sess_size,
 						SESS_MEMPOOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 04/15] test/crypto: limit number of sessions
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (2 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 03/15] app/crypto-perf: limit number of sessions Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 05/15] examples/l2fwd-crypto: " Pablo de Lara
                     ` (10 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of using the maximum number of sessions
allowed by the PMDs (which will change to unlimited most
of the PMDs), limit the number to a small sufficient amount.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 test/test/test_cryptodev.c | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 389f79677..5c906cfae 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -39,6 +39,7 @@
 #include "test_cryptodev_hmac_test_vectors.h"
 
 #define VDEV_ARGS_SIZE 100
+#define MAX_NB_SESSIONS            4
 
 static int gbl_driver_id;
 
@@ -435,9 +436,16 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
+	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		RTE_LOG(ERR, USER1, "Device does not support "
+				"at least %u sessions\n",
+				MAX_NB_SESSIONS);
+		return TEST_FAILED;
+	}
+
 	ts_params->session_mpool = rte_mempool_create(
 				"test_sess_mp",
-				info.sym.max_nb_sessions * 2,
+				MAX_NB_SESSIONS * 2,
 				session_size,
 				0, 0, NULL, NULL, NULL,
 				NULL, SOCKET_ID_ANY,
@@ -6499,10 +6507,10 @@ test_multi_session(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *) *
-			dev_info.sym.max_nb_sessions) + 1, 0);
+			MAX_NB_SESSIONS) + 1, 0);
 
 	/* Create multiple crypto sessions*/
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 
 		sessions[i] = rte_cryptodev_sym_session_create(
 				ts_params->session_mpool);
@@ -6551,7 +6559,7 @@ test_multi_session(void)
 	TEST_ASSERT_NULL(sessions[i],
 			"Session creation succeeded unexpectedly!");
 
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 		rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
 				sessions[i]);
 		rte_cryptodev_sym_session_free(sessions[i]);
@@ -6610,7 +6618,7 @@ test_multi_session_random_usage(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *)
-					* dev_info.sym.max_nb_sessions) + 1, 0);
+					* MAX_NB_SESSIONS) + 1, 0);
 
 	for (i = 0; i < MB_SESSION_NUMBER; i++) {
 		sessions[i] = rte_cryptodev_sym_session_create(
@@ -8538,6 +8546,13 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
+		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+			RTE_LOG(ERR, USER1,
+					"Device does not support "
+					"at least %u sessions\n",
+					MAX_NB_SESSIONS);
+			return TEST_FAILED;
+		}
 		/*
 		 * Create mempool with maximum number of sessions * 2,
 		 * to include the session headers
@@ -8545,7 +8560,7 @@ test_scheduler_attach_slave_op(void)
 		if (ts_params->session_mpool == NULL) {
 			ts_params->session_mpool = rte_mempool_create(
 					"test_sess_mp",
-					info.sym.max_nb_sessions * 2,
+					MAX_NB_SESSIONS * 2,
 					session_size,
 					0, 0, NULL, NULL, NULL,
 					NULL, SOCKET_ID_ANY,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 05/15] examples/l2fwd-crypto: limit number of sessions
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (3 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 04/15] test/crypto: " Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 06/15] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
                     ` (9 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Calculate the number of sessions required for the application,
knowing that there is only one session required per device.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4bca87b19..e8384b0c1 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -42,6 +42,9 @@
 #include <rte_prefetch.h>
 #include <rte_random.h>
 #include <rte_hexdump.h>
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+#include <rte_cryptodev_scheduler.h>
+#endif
 
 enum cdev_type {
 	CDEV_TYPE_ANY,
@@ -59,7 +62,6 @@ enum cdev_type {
 #define MAX_AAD_SIZE 65535
 #define MAX_PKT_BURST 32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
-#define MAX_SESSIONS 32
 #define SESSION_POOL_CACHE_SIZE 0
 
 #define MAXIMUM_IV_LENGTH	16
@@ -2010,6 +2012,19 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 		rte_cryptodev_info_get(cdev_id, &dev_info);
 
+		/* Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		uint32_t sessions_needed = 2 * enabled_cdev_count;
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+		if (!strcmp(dev_info.driver_name, "crypto_scheduler")) {
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count * nb_slaves;
+		}
+#endif
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
@@ -2022,7 +2037,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 			 * device private data
 			 */
 			sess_mp = rte_mempool_create(mp_name,
-						MAX_SESSIONS * 2,
+						sessions_needed,
 						max_sess_sz,
 						SESSION_POOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 06/15] examples/ipsec-secgw: check for max supported sessions
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (4 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 05/15] examples/l2fwd-crypto: " Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 07/15] crypto/mvsam: parse max number of sessions Pablo de Lara
                     ` (8 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b280..2582dcb6e 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1440,6 +1440,12 @@ cryptodevs_init(void)
 		dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
 		dev_conf.nb_queue_pairs = qp;
 
+		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
+		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+			rte_exit(EXIT_FAILURE,
+				"Device does not support at least %u "
+				"sessions", CDEV_MP_NB_OBJS / 2);
+
 		if (!socket_ctx[dev_conf.socket_id].session_pool) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 07/15] crypto/mvsam: parse max number of sessions
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (5 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 06/15] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions Pablo de Lara
                     ` (7 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The maximum number of sessions device argument will be removed,
as most PMDs do not have a limitation on this number.
Therefore, the MVSAM PMD needs to parse this value internally.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/mvsam/rte_mrvl_pmd.c | 132 ++++++++++++++++++++++++++++++++----
 1 file changed, 120 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 1b6029a56..a7f5389ee 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -16,8 +16,23 @@
 
 #define MRVL_MUSDK_DMA_MEMSIZE 41943040
 
+#define MRVL_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
+#define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS	2048
+
 static uint8_t cryptodev_driver_id;
 
+struct mrvl_pmd_init_params {
+	struct rte_cryptodev_pmd_init_params common;
+	uint32_t max_nb_sessions;
+};
+
+const char *mrvl_pmd_valid_params[] = {
+	RTE_CRYPTODEV_PMD_NAME_ARG,
+	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+	MRVL_PMD_MAX_NB_SESS_ARG
+};
+
 /**
  * Flag if particular crypto algorithm is supported by PMD/MUSDK.
  *
@@ -691,14 +706,15 @@ mrvl_crypto_pmd_dequeue_burst(void *queue_pair,
 static int
 cryptodev_mrvl_crypto_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_cryptodev_pmd_init_params *init_params)
+		struct mrvl_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct mrvl_crypto_private *internals;
 	struct sam_init_params	sam_params;
 	int ret;
 
-	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device,
+			&init_params->common);
 	if (dev == NULL) {
 		MRVL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -718,7 +734,7 @@ cryptodev_mrvl_crypto_create(const char *name,
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
 
-	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
+	internals->max_nb_qpairs = init_params->common.max_nb_queue_pairs;
 	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	/*
@@ -740,12 +756,99 @@ cryptodev_mrvl_crypto_create(const char *name,
 
 init_error:
 	MRVL_CRYPTO_LOG_ERR(
-		"driver %s: %s failed", init_params->name, __func__);
+		"driver %s: %s failed", init_params->common.name, __func__);
 
 	cryptodev_mrvl_crypto_uninit(vdev);
 	return -EFAULT;
 }
 
+/** Parse integer from integer argument */
+static int
+parse_integer_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	int *i = (int *) extra_args;
+
+	*i = atoi(value);
+	if (*i < 0) {
+		MRVL_CRYPTO_LOG_ERR("Argument has to be positive.\n");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+/** Parse name */
+static int
+parse_name_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	struct rte_cryptodev_pmd_init_params *params = extra_args;
+
+	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
+		MRVL_CRYPTO_LOG_ERR("Invalid name %s, should be less than "
+				"%u bytes.\n", value,
+				RTE_CRYPTODEV_NAME_MAX_LEN - 1);
+		return -EINVAL;
+	}
+
+	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
+
+	return 0;
+}
+
+static int
+mrvl_pmd_parse_input_args(struct mrvl_pmd_init_params *params,
+			 const char *input_args)
+{
+	struct rte_kvargs *kvlist = NULL;
+	int ret = 0;
+
+	if (params == NULL)
+		return -EINVAL;
+
+	if (input_args) {
+		kvlist = rte_kvargs_parse(input_args,
+					  mrvl_pmd_valid_params);
+		if (kvlist == NULL)
+			return -1;
+
+		/* Common VDEV parameters */
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+					 &parse_integer_arg,
+					 &params->common.max_nb_queue_pairs);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+					 &parse_integer_arg,
+					 &params->common.socket_id);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_NAME_ARG,
+					 &parse_name_arg,
+					 &params->common);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 MRVL_PMD_MAX_NB_SESS_ARG,
+					 &parse_integer_arg,
+					 params);
+		if (ret < 0)
+			goto free_kvlist;
+
+	}
+
+free_kvlist:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
 /**
  * Initialize the crypto device.
  *
@@ -755,7 +858,18 @@ cryptodev_mrvl_crypto_create(const char *name,
 static int
 cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 {
-	struct rte_cryptodev_pmd_init_params init_params = { };
+	struct mrvl_pmd_init_params init_params = {
+		.common = {
+			.name = "",
+			.private_data_size =
+				sizeof(struct mrvl_crypto_private),
+			.max_nb_queue_pairs =
+				sam_get_num_inst() * SAM_HW_RING_NUM,
+			.socket_id = rte_socket_id()
+		},
+		.max_nb_sessions = MRVL_PMD_DEFAULT_MAX_NB_SESSIONS
+	};
+
 	const char *name, *args;
 	int ret;
 
@@ -764,13 +878,7 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	args = rte_vdev_device_args(vdev);
 
-	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
-	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
-	init_params.max_nb_sessions =
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
-	init_params.socket_id = rte_socket_id();
-
-	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
+	ret = mrvl_pmd_parse_input_args(&init_params, args);
 	if (ret) {
 		RTE_LOG(ERR, PMD,
 			"Failed to parse initialisation arguments[%s]\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (6 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 07/15] crypto/mvsam: parse max number of sessions Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 09/15] cryptodev: remove max number of sessions parameter Pablo de Lara
                     ` (6 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.

Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/main.c            | 2 +-
 doc/guides/rel_notes/release_18_08.rst | 2 ++
 examples/ipsec-secgw/ipsec-secgw.c     | 2 +-
 lib/librte_cryptodev/rte_cryptodev.h   | 5 ++++-
 test/test/test_cryptodev.c             | 6 ++++--
 5 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index b02d3f597..87aaba0ce 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -169,7 +169,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 		 * A single session is required per queue pair
 		 * in each device
 		 */
-		if (dev_max_nb_sess < opts->nb_qps) {
+		if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
 			RTE_LOG(ERR, USER1,
 				"Device does not support at least "
 				"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 6bf53dc31..2b994ee78 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
 
 * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
   has been replaced with field ``struct rte_device *device``.
+  Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+  supports an unlimited number of sessions.
 
 
 ABI Changes
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
 		dev_conf.nb_queue_pairs = qp;
 
 		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
-		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+		if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
 			rte_exit(EXIT_FAILURE,
 				"Device does not support at least %u "
 				"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 0a4dd39b1..64ffbafca 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -384,7 +384,10 @@ struct rte_cryptodev_info {
 
 	struct {
 		unsigned max_nb_sessions;
-		/**< Maximum number of sessions supported by device. */
+		/**< Maximum number of sessions supported by device.
+		 * If 0, the device does not have any limitation in
+		 * number of sessions that can be used.
+		 */
 	} sym;
 };
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5c906cfae..73aadaced 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
-	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+	if (info.sym.max_nb_sessions != 0 &&
+			info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 		RTE_LOG(ERR, USER1, "Device does not support "
 				"at least %u sessions\n",
 				MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
-		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		if (info.sym.max_nb_sessions != 0 &&
+				info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 			RTE_LOG(ERR, USER1,
 					"Device does not support "
 					"at least %u sessions\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 09/15] cryptodev: remove max number of sessions parameter
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (7 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-29  8:02     ` Tomasz Duszynski
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 10/15] doc: remove unneeded deprecation notice Pablo de Lara
                     ` (5 subsequent siblings)
  14 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Most crypto PMDs do not have a limitation
of the number of the sessions that can be handled
internally. The value that was set before was not
actually used at all, since the sessions are created
at the application level.
Therefore, this value is not parsed from the initial
crypto parameters anymore and it is set to 0,
meaning that there is no actual limit.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst            |  5 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  5 +----
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  3 ++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |  2 --
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  5 +----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  3 ++-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |  2 --
 drivers/crypto/armv8/rte_armv8_pmd.c               |  5 +----
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  3 ++-
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |  2 --
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  3 ++-
 drivers/crypto/ccp/ccp_pmd_private.h               |  1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   | 16 +---------------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |  2 --
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  5 +----
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  3 ++-
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |  2 --
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c            |  3 ++-
 drivers/crypto/null/null_crypto_pmd.c              |  5 +----
 drivers/crypto/null/null_crypto_pmd_ops.c          |  3 ++-
 drivers/crypto/null/null_crypto_pmd_private.h      |  1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  5 +----
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  3 ++-
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |  2 --
 drivers/crypto/qat/qat_sym_pmd.c                   |  6 +++---
 drivers/crypto/qat/qat_sym_pmd.h                   |  1 -
 drivers/crypto/scheduler/scheduler_pmd.c           | 13 +------------
 drivers/crypto/scheduler/scheduler_pmd_ops.c       | 14 +++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  5 +----
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  3 ++-
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |  2 --
 drivers/crypto/virtio/virtio_cryptodev.c           |  7 +++----
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  5 +----
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  3 ++-
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |  2 --
 lib/librte_cryptodev/rte_cryptodev_pmd.c           | 12 ++----------
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  4 ----
 38 files changed, 49 insertions(+), 121 deletions(-)

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index d02bb7514..d2a74a362 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
 
 .. code-block:: console
 
-   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
+   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
 
 .. Note::
 
@@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
 .. code-block:: c
 
    rte_vdev_init("crypto_aesni_mb",
-                     "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
+                     "max_nb_queue_pairs=2,socket_id=0")
 
 All virtual Crypto devices support the following initialization parameters:
 
 * ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
-* ``max_nb_sessions`` - maximum number of sessions supported by the device
 * ``socket_id`` - socket on which to allocate the device resources on.
 
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 80360dd9c..cd5b1952b 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
 	internals->vector_mode = vector_mode;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_gcm_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 6f542137c..796ccdbd8 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -143,7 +143,8 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->capabilities = aesni_gcm_pmd_capabilities;
 
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 3d60583b0..b496377dd 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -39,8 +39,6 @@ struct aesni_gcm_private {
 	/**< Vector mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct aesni_gcm_qp {
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index bb35c66ab..bb647f736 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
 
 	internals->vector_mode = vector_mode;
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_mb_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
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 01530523f..101fdc5c6 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -387,7 +387,8 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = aesni_mb_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
index a33b2f695..9520cdf9c 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
@@ -124,8 +124,6 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** AESNI Multi buffer queue pair */
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index fbb08f729..db0d8a2a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct armv8_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index c64aef09f..b654f7528 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -154,7 +154,8 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = armv8_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
index b8966e934..7feb021db 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
+++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
@@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
 struct armv8_crypto_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** ARMv8 crypto queue pair */
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 80b75ccb0..dbe545c10 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -624,7 +624,8 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
 		if (internals->auth_opt == 1)
 			dev_info->capabilities = ccp_crypto_cap_complete;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index f4498048f..79752f687 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -40,7 +40,6 @@
 /* private data structure for each CCP crypto device */
 struct ccp_private {
 	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;	/**< Max number of sessions */
 	uint8_t crypto_num_dev;		/**< Number of working crypto devices */
 	bool auth_opt;			/**< Authentication offload option */
 	struct ccp_device *last_dev;	/**< Last working crypto device */
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 2061f465e..d70640f6d 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
 #define CCP_CRYPTODEV_PARAM_NAME		("name")
 #define CCP_CRYPTODEV_PARAM_SOCKET_ID		("socket_id")
 #define CCP_CRYPTODEV_PARAM_MAX_NB_QP		("max_nb_queue_pairs")
-#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS		("max_nb_sessions")
 #define CCP_CRYPTODEV_PARAM_AUTH_OPT		("ccp_auth_opt")
 
 const char *ccp_pmd_valid_params[] = {
 	CCP_CRYPTODEV_PARAM_NAME,
 	CCP_CRYPTODEV_PARAM_SOCKET_ID,
 	CCP_CRYPTODEV_PARAM_MAX_NB_QP,
-	CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
 	CCP_CRYPTODEV_PARAM_AUTH_OPT,
 };
 
@@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-					 CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
-					 &parse_integer_arg,
-					 &params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 					 CCP_CRYPTODEV_PARAM_SOCKET_ID,
 					 &parse_integer_arg,
@@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
 	internals->auth_opt = init_params->auth_opt;
 	internals->crypto_num_dev = cryptodev_cnt;
 
@@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct ccp_private),
 			rte_socket_id(),
-			CCP_PMD_MAX_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			CCP_PMD_MAX_QUEUE_PAIRS
 		},
 		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
 	};
@@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 		init_params.def_p.socket_id);
 	RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
 		init_params.def_p.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
-		init_params.def_p.max_nb_sessions);
 	RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
 		((init_params.auth_opt == 0) ? "CCP" : "CPU"));
 
@@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"ccp_auth_opt=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 56fa969d3..bc091c560 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2626,7 +2626,8 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa2_sec_capabilities;
-		info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
@@ -2786,7 +2787,6 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
 
 	internals = cryptodev->data->dev_private;
-	internals->max_nb_sessions = RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS;
 
 	/*
 	 * For secondary processes, we don't initialise any further as primary
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
index a9d83ebce..d015be1e9 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
@@ -23,8 +23,6 @@ struct dpaa2_sec_dev_private {
 	uint16_t token; /**< Token required by DPxxx objects */
 	unsigned int max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct dpaa2_sec_qp {
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 205dc1de7..65376b211 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -555,7 +555,6 @@ cryptodev_kasumi_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -573,8 +572,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct kasumi_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index a388dbb63..e72f2ae0b 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -126,7 +126,8 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = kasumi_pmd_capabilities;
 	}
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
index a397bee65..2b12818bc 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
@@ -36,8 +36,6 @@
 struct kasumi_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** KASUMI buffer queue pair */
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..07850098b 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -471,7 +471,8 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = mrvl_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 052b6546c..478ac0b62 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -182,7 +182,6 @@ cryptodev_null_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -195,8 +194,7 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
 		"",
 		sizeof(struct null_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index f8e5f61f1..2842498af 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -121,7 +121,8 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = null_crypto_pmd_capabilities;
 	}
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 0fd133625..d7d769f3d 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -32,7 +32,6 @@
 /** private data structure for each NULL crypto device */
 struct null_crypto_private {
 	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
-	unsigned max_nb_sessions;	/**< Max number of sessions */
 };
 
 /** NULL crypto queue pair */
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 93c6d7e5d..972e2adfe 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -1686,8 +1685,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct openssl_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
 	cryptodev_openssl_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 1cb87d59a..d194e3657 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -547,7 +547,8 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = openssl_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
index bc8dc7cdc..02ea81d5c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
+++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
@@ -62,8 +62,6 @@ enum openssl_auth_mode {
 struct openssl_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** OPENSSL crypto queue pair */
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 0bc042a75..84dd5bec8 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -72,8 +72,9 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 			qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC);
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = internals->qat_dev_capabilities;
-		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 	}
 }
 
@@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	struct rte_cryptodev_pmd_init_params init_params = {
 			.name = "",
 			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
-			.private_data_size = sizeof(struct qat_sym_dev_private),
-			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
+			.private_data_size = sizeof(struct qat_sym_dev_private)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 	struct rte_cryptodev *cryptodev;
diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
index 80a198741..efa3b0775 100644
--- a/drivers/crypto/qat/qat_sym_pmd.h
+++ b/drivers/crypto/qat/qat_sym_pmd.h
@@ -13,7 +13,6 @@
 
 /**< Intel(R) QAT Symmetric Crypto PMD device name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
-#define QAT_SYM_PMD_MAX_NB_SESSIONS	2048
 
 extern uint8_t cryptodev_qat_driver_id;
 
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 25d6409f3..32a19c106 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -31,7 +31,6 @@ struct scheduler_init_params {
 #define RTE_CRYPTODEV_VDEV_MODE			("mode")
 #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
 #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
 #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
 #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
 #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
@@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MODE,
 	RTE_CRYPTODEV_VDEV_ORDERING,
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
 	RTE_CRYPTODEV_VDEV_CORELIST
@@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
-				&parse_integer_arg,
-				&params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
 				&parse_integer_arg,
 				&params->def_p.socket_id);
@@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct scheduler_ctx),
 			rte_socket_id(),
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 		},
 		.nb_slaves = 0,
 		.mode = CDEV_SCHED_MODE_NOT_SET,
@@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
 	cryptodev_scheduler_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"slave=<name>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 147dc51e9..16a8021c8 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -321,8 +321,7 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info *dev_info)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
-	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
-			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
+	uint32_t max_nb_sess = 0;
 	uint32_t i;
 
 	if (!dev_info)
@@ -338,17 +337,18 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info slave_info;
 
 		rte_cryptodev_info_get(slave_dev_id, &slave_info);
-		max_nb_sessions = slave_info.sym.max_nb_sessions <
-				max_nb_sessions ?
-				slave_info.sym.max_nb_sessions :
-				max_nb_sessions;
+		uint32_t dev_max_sess = slave_info.sym.max_nb_sessions;
+		if (dev_max_sess != 0) {
+			if (max_nb_sess == 0 ||	dev_max_sess < max_nb_sess)
+				max_nb_sess = slave_info.sym.max_nb_sessions;
+		}
 	}
 
 	dev_info->driver_id = dev->driver_id;
 	dev_info->feature_flags = dev->feature_flags;
 	dev_info->capabilities = sched_ctx->capabilities;
 	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
-	dev_info->sym.max_nb_sessions = max_nb_sessions;
+	dev_info->sym.max_nb_sessions = max_nb_sess;
 }
 
 /** Release queue pair */
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 72751e35e..26dfbbc38 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -573,8 +572,7 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct snow3g_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index f60b47598..6f8b9e2c6 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -130,7 +130,8 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = snow3g_pmd_capabilities;
 	}
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
index eea900e0a..2c6e1a948 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
@@ -36,8 +36,6 @@
 struct snow3g_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** SNOW 3G buffer queue pair */
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 482edea1a..1da4ae871 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1411,8 +1411,8 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 		info->driver_id = cryptodev_virtio_driver_id;
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
-		info->sym.max_nb_sessions =
-			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->capabilities = hw->virtio_dev_capabilities;
 	}
 }
@@ -1425,8 +1425,7 @@ crypto_virtio_pci_probe(
 	struct rte_cryptodev_pmd_init_params init_params = {
 		.name = "",
 		.socket_id = rte_socket_id(),
-		.private_data_size = sizeof(struct virtio_crypto_hw),
-		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
+		.private_data_size = sizeof(struct virtio_crypto_hw)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a805b2278..396f25975 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -479,7 +479,6 @@ cryptodev_zuc_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -497,8 +496,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct zuc_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -541,7 +539,6 @@ static struct cryptodev_driver zuc_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 8abac8989..b39e35b9f 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -130,7 +130,8 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = zuc_pmd_capabilities;
 	}
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
index b83c4a047..2bd378ad6 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
+++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
@@ -37,8 +37,6 @@
 struct zuc_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** ZUC buffer queue pair */
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index f2aac24b7..2088ac3f3 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
-				&rte_cryptodev_pmd_parse_uint_arg,
-				&params->max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
 				&rte_cryptodev_pmd_parse_uint_arg,
@@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
 			device->driver->name, name);
 
 	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
-			"socket id: %d, max queue pairs: %u, max sessions: %u",
+			"socket id: %d, max queue pairs: %u",
 			device->driver->name, name,
-			params->socket_id, params->max_nb_queue_pairs,
-			params->max_nb_sessions);
+			params->socket_id, params->max_nb_queue_pairs);
 
 	/* allocate device structure */
 	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 69d776934..0739ce065 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -59,18 +59,15 @@ extern "C" {
 
 
 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
-#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
 
 #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
 #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
 #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
 
 
 static const char * const cryptodev_pmd_valid_params[] = {
 	RTE_CRYPTODEV_PMD_NAME_ARG,
 	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
 };
 
@@ -83,7 +80,6 @@ struct rte_cryptodev_pmd_init_params {
 	size_t private_data_size;
 	int socket_id;
 	unsigned int max_nb_queue_pairs;
-	unsigned int max_nb_sessions;
 };
 
 /** Global structure used for maintaining state of allocated crypto devices */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 10/15] doc: remove unneeded deprecation notice
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (8 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 09/15] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions Pablo de Lara
                     ` (4 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

In release 18.05, a deprecation notice to remove the `sym`
structure in the cryptodev info structure was sent.
However, only one of the fields inside the structure will
be removed, so the notice is not actually correct.
In any case, it needs to be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index b71080bb8..dc014da21 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -101,9 +101,6 @@ Deprecation Notices
 * cryptodev: The following changes will be made in the library
   for 18.08:
 
-  - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
-    containing fields not relevant anymore since the session mempool
-    is not internal in the crypto device anymore.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (9 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 10/15] doc: remove unneeded deprecation notice Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions Pablo de Lara
                     ` (3 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  4 ---
 doc/guides/rel_notes/release_18_08.rst         |  5 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 -----------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 16 ----------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 22 -------------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 22 -------------
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 -----------
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 28 ----------------
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 -----------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 -----------
 drivers/crypto/qat/qat_sym_pmd.c               |  2 --
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 18 -----------
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 -----------
 drivers/crypto/virtio/virtio_cryptodev.c       |  2 --
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 -----------
 lib/librte_cryptodev/rte_cryptodev.c           | 44 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 37 ----------------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 26 ---------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 21 files changed, 5 insertions(+), 367 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Functions ``rte_cryptodev_queue_pair_start()`` and
-    ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
-    and removed in 18.08, as there are no drivers doing anything useful
-    with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
   - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2b994ee78..cfb2885a1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
   Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
   supports an unlimited number of sessions.
 
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+  - ``rte_cryptodev_queue_pair_start``
+  - ``rte_cryptodev_queue_pair_stop``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 796ccdbd8..e24453a7e 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -243,22 +243,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -340,8 +324,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 
 		.queue_pair_setup	= aesni_gcm_pmd_qp_setup,
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
-		.queue_pair_start	= aesni_gcm_pmd_qp_start,
-		.queue_pair_stop	= aesni_gcm_pmd_qp_stop,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
 		.session_get_size	= aesni_gcm_pmd_session_get_size,
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 101fdc5c6..6eb37a5bf 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 
 		.queue_pair_setup	= aesni_mb_pmd_qp_setup,
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
-		.queue_pair_start	= aesni_mb_pmd_qp_start,
-		.queue_pair_stop	= aesni_mb_pmd_qp_stop,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
 		.session_get_size	= aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 
 		.queue_pair_setup	= armv8_crypto_pmd_qp_setup,
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
-		.queue_pair_start	= armv8_crypto_pmd_qp_start,
-		.queue_pair_stop	= armv8_crypto_pmd_qp_stop,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
 		.session_get_size	= armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
-		 uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
-		uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
 static uint32_t
 ccp_pmd_qp_count(struct rte_cryptodev *dev)
 {
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
 
 		.queue_pair_setup	= ccp_pmd_qp_setup,
 		.queue_pair_release	= ccp_pmd_qp_release,
-		.queue_pair_start	= ccp_pmd_qp_start,
-		.queue_pair_stop	= ccp_pmd_qp_stop,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
 		.session_get_size	= ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return retcode;
 }
 
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			   __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.stats_reset	      = dpaa2_sec_stats_reset,
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
-	.queue_pair_start     = dpaa2_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa2_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
 	.session_get_size     = dpaa2_sec_session_get_size,
 	.session_configure    = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			 __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.dev_infos_get        = dpaa_sec_dev_infos_get,
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
-	.queue_pair_start     = dpaa_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index e72f2ae0b..4174f1f80 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 
 		.queue_pair_setup   = kasumi_pmd_qp_setup,
 		.queue_pair_release = kasumi_pmd_qp_release,
-		.queue_pair_start   = kasumi_pmd_qp_start,
-		.queue_pair_stop    = kasumi_pmd_qp_stop,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
 		.session_get_size   = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 07850098b..8710ba3b7 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -596,32 +596,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs (PMD ops callback).
  *
  * @param dev Pointer to the device structure.
@@ -739,8 +713,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 
 		.queue_pair_setup	= mrvl_crypto_pmd_qp_setup,
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
-		.queue_pair_start	= mrvl_crypto_pmd_qp_start,
-		.queue_pair_stop	= mrvl_crypto_pmd_qp_stop,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
 		.session_get_size	= mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 2842498af..e43fba7db 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -240,22 +240,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -336,8 +320,6 @@ struct rte_cryptodev_ops pmd_ops = {
 
 		.queue_pair_setup	= null_crypto_pmd_qp_setup,
 		.queue_pair_release	= null_crypto_pmd_qp_release,
-		.queue_pair_start	= null_crypto_pmd_qp_start,
-		.queue_pair_stop	= null_crypto_pmd_qp_stop,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
 		.session_get_size	= null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index d194e3657..554177d20 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 
 		.queue_pair_setup	= openssl_pmd_qp_setup,
 		.queue_pair_release	= openssl_pmd_qp_release,
-		.queue_pair_start	= openssl_pmd_qp_start,
-		.queue_pair_stop	= openssl_pmd_qp_stop,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
 		.session_get_size	= openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.stats_reset		= qat_sym_stats_reset,
 		.queue_pair_setup	= qat_sym_qp_setup,
 		.queue_pair_release	= qat_sym_qp_release,
-		.queue_pair_start	= NULL,
-		.queue_pair_stop	= NULL,
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 16a8021c8..f363e3257 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 
 		.queue_pair_setup	= scheduler_pmd_qp_setup,
 		.queue_pair_release	= scheduler_pmd_qp_release,
-		.queue_pair_start	= scheduler_pmd_qp_start,
-		.queue_pair_stop	= scheduler_pmd_qp_stop,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
 		.session_get_size	= scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 6f8b9e2c6..fe882c366 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 
 		.queue_pair_setup   = snow3g_pmd_qp_setup,
 		.queue_pair_release = snow3g_pmd_qp_release,
-		.queue_pair_start   = snow3g_pmd_qp_start,
-		.queue_pair_stop    = snow3g_pmd_qp_stop,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
 		.session_get_size   = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1da4ae871..0be435c8c 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 
 	.queue_pair_setup                = virtio_crypto_qp_setup,
 	.queue_pair_release              = virtio_crypto_qp_release,
-	.queue_pair_start                = NULL,
-	.queue_pair_stop                 = NULL,
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index b39e35b9f..79326d8f5 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 
 		.queue_pair_setup   = zuc_pmd_qp_setup,
 		.queue_pair_release = zuc_pmd_qp_release,
-		.queue_pair_start   = zuc_pmd_qp_start,
-		.queue_pair_stop    = zuc_pmd_qp_stop,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
 		.session_get_size   = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
 	return 0;
 }
 
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
 int
 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 64ffbafca..0d994397d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -601,43 +601,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
 		struct rte_mempool *session_pool);
 
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to start. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_crypto_dev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to stop. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_cryptodev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
 /**
  * Get the number of queue pairs on a specific crypto device
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 0739ce065..b47730eaf 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -211,28 +211,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
 typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
 				struct rte_cryptodev_info *dev_info);
 
-/**
- * Start queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
 /**
  * Setup a queue pair for a device.
  *
@@ -371,10 +349,6 @@ struct rte_cryptodev_ops {
 	/**< Set up a device queue pair. */
 	cryptodev_queue_pair_release_t queue_pair_release;
 	/**< Release a queue pair. */
-	cryptodev_queue_pair_start_t queue_pair_start;
-	/**< Start a queue pair. */
-	cryptodev_queue_pair_stop_t queue_pair_stop;
-	/**< Stop a queue pair. */
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
 	rte_cryptodev_stop;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
-	rte_cryptodev_queue_pair_start;
-	rte_cryptodev_queue_pair_stop;
 	rte_crypto_op_pool_create;
 
 	local: *;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (10 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag Pablo de Lara
                     ` (2 subsequent siblings)
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  6 ------
 doc/guides/rel_notes/release_18_08.rst         |  8 ++++++++
 lib/librte_cryptodev/rte_cryptodev.c           | 12 ------------
 lib/librte_cryptodev/rte_cryptodev.h           | 25 -------------------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 5 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
     with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
-  - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
-    It will be removed in 18.08.
-  - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
-    It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index cfb2885a1..e482d3d5f 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
 
+* cryptodev: Following functions were deprecated and are replaced by
+  other functions in 18.08:
+
+  - ``rte_cryptodev_get_header_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_header_session_size``
+  - ``rte_cryptodev_get_private_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_private_session_size``
+
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 	return 0;
 }
 
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
-	return rte_cryptodev_sym_get_header_session_size();
-}
-
 unsigned int
 rte_cryptodev_sym_get_header_session_size(void)
 {
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
 	return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
 }
 
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
-	return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 0d994397d..a60eb38e4 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -933,31 +933,6 @@ int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 			struct rte_cryptodev_sym_session *sess);
 
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- *   Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param	dev_id		The device identifier.
- *
- * @return
- *   - Size of the private data, if successful
- *   - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
 /**
  * Get the size of the header session, for all registered drivers.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
 	rte_cryptodev_driver_id_get;
 	rte_cryptodev_driver_name_get;
 	rte_cryptodev_get_aead_algo_enum;
-	rte_cryptodev_get_header_session_size;
-	rte_cryptodev_get_private_session_size;
 	rte_cryptodev_sym_capability_check_aead;
 	rte_cryptodev_sym_session_init;
 	rte_cryptodev_sym_session_clear;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (11 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 14/15] cryptodev: remove attach/detach session API Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 15/15] cryptodev: rename PMD symmetric " Pablo de Lara
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.

Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst        |  2 --
 doc/guides/rel_notes/release_18_08.rst      |  8 +++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c    |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  6 +++-
 drivers/crypto/dpaa_sec/dpaa_sec.c          |  6 +++-
 drivers/crypto/null/null_crypto_pmd.c       |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c    |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c            |  6 +++-
 lib/librte_cryptodev/rte_cryptodev.c        | 12 ++++++--
 lib/librte_cryptodev/rte_cryptodev.h        | 46 +++++++++++++++++++----------
 test/test/test_cryptodev.c                  | 31 +++++++++++++------
 test/test/test_cryptodev_blockcipher.c      | 21 ++++++++++---
 12 files changed, 106 insertions(+), 38 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
-    so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..2a136d88c 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
   - ``rte_cryptodev_get_private_session_size`` is replaced with
     ``rte_cryptodev_sym_get_private_session_size``
 
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+  replaced with the following more explicit flags:
+  - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
+  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index cd5b1952b..03917f220 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
 
 	switch (vector_mode) {
 	case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..4daee5f59 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..8ad25f2be 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 478ac0b62..224ba7233 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -177,7 +177,7 @@ cryptodev_null_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL;
 
 	internals = dev->data->dev_private;
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 972e2adfe..94b6e2de9 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
 
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..629904e2f 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..15110661b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		return "CPU_AESNI";
 	case RTE_CRYPTODEV_FF_HW_ACCELERATED:
 		return "HW_ACCELERATED";
-	case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
-		return "MBUF_SCATTER_GATHER";
+	case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+		return "IN_PLACE_SGL";
+	case RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT:
+		return "OUT_OF_PLACE_SGL_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT:
+		return "OUT_OF_PLACE_SGL_IN_FB_OUT";
+	case RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT:
+		return "OUT_OF_PLACE_FB_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT:
+		return "OUT_OF_PLACE_FB_IN_FB_OUT";
 	case RTE_CRYPTODEV_FF_CPU_NEON:
 		return "CPU_NEON";
 	case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a60eb38e4..c897dc6e2 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -327,31 +327,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
  *
  * Keep these flags synchronised with rte_cryptodev_get_feature_name()
  */
-#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO	(1ULL << 0)
+#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO		(1ULL << 0)
 /**< Symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO	(1ULL << 1)
+#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO		(1ULL << 1)
 /**< Asymmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING	(1ULL << 2)
+#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING		(1ULL << 2)
 /**< Chaining symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_CPU_SSE		(1ULL << 3)
+#define	RTE_CRYPTODEV_FF_CPU_SSE			(1ULL << 3)
 /**< Utilises CPU SIMD SSE instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX		(1ULL << 4)
+#define	RTE_CRYPTODEV_FF_CPU_AVX			(1ULL << 4)
 /**< Utilises CPU SIMD AVX instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX2		(1ULL << 5)
+#define	RTE_CRYPTODEV_FF_CPU_AVX2			(1ULL << 5)
 /**< Utilises CPU SIMD AVX2 instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AESNI		(1ULL << 6)
+#define	RTE_CRYPTODEV_FF_CPU_AESNI			(1ULL << 6)
 /**< Utilises CPU AES-NI instructions */
-#define	RTE_CRYPTODEV_FF_HW_ACCELERATED		(1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define	RTE_CRYPTODEV_FF_CPU_AVX512		(1ULL << 8)
+#define	RTE_CRYPTODEV_FF_HW_ACCELERATED			(1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define	RTE_CRYPTODEV_FF_CPU_AVX512			(1ULL << 8)
 /**< Utilises CPU SIMD AVX512 instructions */
-#define	RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER	(1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define	RTE_CRYPTODEV_FF_CPU_NEON		(1ULL << 10)
+#define	RTE_CRYPTODEV_FF_IN_PLACE_SGL			(1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT	(1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT	(1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, but only flat buffers (FB) are supported in output
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT	(1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, but only flat buffers (FB) are supported in input
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT	(1ULL << 13)
+/**< Only flat buffers (FB) are supported in input and output */
+#define	RTE_CRYPTODEV_FF_CPU_NEON			(1ULL << 14)
 /**< Utilises CPU NEON instructions */
-#define	RTE_CRYPTODEV_FF_CPU_ARM_CE		(1ULL << 11)
+#define	RTE_CRYPTODEV_FF_CPU_ARM_CE			(1ULL << 15)
 /**< Utilises ARM CPU Cryptographic Extensions */
-#define	RTE_CRYPTODEV_FF_SECURITY		(1ULL << 12)
+#define	RTE_CRYPTODEV_FF_SECURITY			(1ULL << 16)
 /**< Support Security Protocol Processing */
 
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..84fcf0651 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 		return -ENOTSUP;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
-		return -ENOTSUP;
+		return 0;
 	}
 
 	plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..7a11b3af8 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
 		rte_cryptodev_info_get(dev_id, &dev_info);
-		if (!(dev_info.feature_flags &
-				RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-			printf("Device doesn't support scatter-gather. "
+		uint64_t feat_flags = dev_info.feature_flags;
+		uint64_t oop_flag = RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
+
+		if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+			if (!(feat_flags & oop_flag)) {
+				printf("Device doesn't support out-of-place "
+					"scatter-gather in input mbuf. "
+					"Test Skipped.\n");
+				return 0;
+			}
+		} else {
+			if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+				printf("Device doesn't support in-place "
+					"scatter-gather mbufs. "
 					"Test Skipped.\n");
-			return 0;
+				return 0;
+			}
 		}
+
 		nb_segs = 3;
 	}
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 14/15] cryptodev: remove attach/detach session API
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (12 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 15/15] cryptodev: rename PMD symmetric " Pablo de Lara
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

As announced in the previous release,
The API to attach/dettach a session to a queue pair
is removed, as it was only used in DPAA, and it is not
actually needed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  8 ----
 doc/guides/rel_notes/release_18_08.rst         |  2 +
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 32 +--------------
 drivers/crypto/virtio/virtio_cryptodev.c       |  4 +-
 lib/librte_cryptodev/rte_cryptodev.c           | 54 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 36 -----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 30 --------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 -
 8 files changed, 4 insertions(+), 164 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 62d635b74..8bdaaaf5d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -97,11 +97,3 @@ Deprecation Notices
   - ``rte_pdump_set_socket_dir`` will be removed;
   - The parameter, ``path``, of ``rte_pdump_init`` will be removed;
   - The enum ``rte_pdump_socktype`` will be removed.
-
-* cryptodev: The following changes will be made in the library
-  for 18.08:
-
-  - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
-    ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
-    18.05 and removed in 18.08, as there are no drivers doing anything useful
-    with them.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2a136d88c..ba824c094 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -69,6 +69,8 @@ API Changes
 
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
+  - ``rte_cryptodev_queue_pair_attach_sym_session``
+  - ``rte_cryptodev_queue_pair_detach_sym_session``
 
 * cryptodev: Following functions were deprecated and are replaced by
   other functions in 18.08:
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 8ad25f2be..3de7df93c 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1734,34 +1734,6 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess)
 	return ret;
 }
 
-static int
-dpaa_sec_qp_attach_sess(struct rte_cryptodev *dev __rte_unused,
-			uint16_t qp_id __rte_unused,
-			void *ses __rte_unused)
-{
-	PMD_INIT_FUNC_TRACE();
-	return 0;
-}
-
-static int
-dpaa_sec_qp_detach_sess(struct rte_cryptodev *dev,
-			uint16_t qp_id  __rte_unused,
-			void *ses)
-{
-	dpaa_sec_session *sess = ses;
-	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
-
-	PMD_INIT_FUNC_TRACE();
-
-	if (sess->inq)
-		dpaa_sec_detach_rxq(qi, sess->inq);
-	sess->inq = NULL;
-
-	sess->qp = NULL;
-
-	return 0;
-}
-
 static int
 dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 			    struct rte_crypto_sym_xform *xform,	void *sess)
@@ -2210,9 +2182,7 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear,
-	.qp_attach_session    = dpaa_sec_qp_attach_sess,
-	.qp_detach_session    = dpaa_sec_qp_detach_sess,
+	.session_clear        = dpaa_sec_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 0be435c8c..f7021b38b 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -520,9 +520,7 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	/* Crypto related operations */
 	.session_get_size	= virtio_crypto_sym_get_session_private_size,
 	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session,
-	.qp_attach_session = NULL,
-	.qp_detach_session = NULL
+	.session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 15110661b..8c3f324c0 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1095,60 +1095,6 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 	return sess;
 }
 
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_attach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_attach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to attach qp: %d with session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_detach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_detach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to detach qp: %d from session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 		struct rte_cryptodev_sym_session *sess)
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index c897dc6e2..2fd6f11ee 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -972,42 +972,6 @@ rte_cryptodev_sym_get_header_session_size(void);
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id);
 
-/**
- * @deprecated
- * Attach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session will be attached.
- * @param	qp_id		Queue pair to which the session will be attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
-/**
- * @deprecated
- * Detach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session is attached.
- * @param	qp_id		Queue pair to which the session is attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
 /**
  * Provide driver identifier.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index b47730eaf..387e377f3 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -305,32 +305,6 @@ typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
 typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess);
 
-/**
- * Optional API for drivers to attach sessions with queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for attaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_attach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
-/**
- * Optional API for drivers to detach sessions from queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for detaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_detach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
 /** Crypto device operations function pointer table */
 struct rte_cryptodev_ops {
 	cryptodev_configure_t dev_configure;	/**< Configure device. */
@@ -358,10 +332,6 @@ struct rte_cryptodev_ops {
 	/**< Configure a Crypto session. */
 	cryptodev_sym_free_session_t session_clear;
 	/**< Clear a Crypto sessions private data. */
-	cryptodev_sym_queue_pair_attach_session_t qp_attach_session;
-	/**< Attach session to queue pair. */
-	cryptodev_sym_queue_pair_detach_session_t qp_detach_session;
-	/**< Detach session from queue pair. */
 };
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 0ab6d5195..77abd8ddc 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -50,8 +50,6 @@ DPDK_17.05 {
 
 	rte_cryptodev_get_auth_algo_enum;
 	rte_cryptodev_get_cipher_algo_enum;
-	rte_cryptodev_queue_pair_attach_sym_session;
-	rte_cryptodev_queue_pair_detach_sym_session;
 
 } DPDK_17.02;
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v2 15/15] cryptodev: rename PMD symmetric session API
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (13 preceding siblings ...)
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 14/15] cryptodev: remove attach/detach session API Pablo de Lara
@ 2018-06-25  8:48   ` Pablo de Lara
  14 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-25  8:48 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The PMD specific API to configure, clear and
obtain session private size is renamed, including
the word _sym_ to clarify that it is API
for symmetric sessions, so there will not be any
conflicts for asymmetric and other type of sessions
in the future.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 12 ++++++------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 12 ++++++------
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 12 ++++++------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 12 ++++++------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 12 ++++++------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 12 ++++++------
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 12 ++++++------
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 12 ++++++------
 drivers/crypto/null/null_crypto_pmd_ops.c      | 12 ++++++------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 12 ++++++------
 drivers/crypto/qat/qat_sym_pmd.c               |  6 +++---
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 14 +++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 12 ++++++------
 drivers/crypto/virtio/virtio_cryptodev.c       |  6 +++---
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 12 ++++++------
 lib/librte_cryptodev/rte_cryptodev.c           |  9 +++++----
 lib/librte_cryptodev/rte_cryptodev_pmd.h       |  6 +++---
 17 files changed, 93 insertions(+), 92 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index e24453a7e..2a60cb85e 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -252,14 +252,14 @@ aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned
-aesni_gcm_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_gcm_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_gcm_session);
 }
 
 /** Configure a aesni gcm session from a crypto xform chain */
 static int
-aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+aesni_gcm_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -296,7 +296,7 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_gcm_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_gcm_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -326,9 +326,9 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
-		.session_get_size	= aesni_gcm_pmd_session_get_size,
-		.session_configure	= aesni_gcm_pmd_session_configure,
-		.session_clear		= aesni_gcm_pmd_session_clear
+		.sym_session_get_size	= aesni_gcm_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_gcm_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_gcm_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_gcm_pmd_ops = &aesni_gcm_pmd_ops;
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 6eb37a5bf..272ac2c38 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -518,14 +518,14 @@ aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni multi-buffer session structure */
 static unsigned
-aesni_mb_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_mb_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_mb_session);
 }
 
 /** Configure a aesni multi-buffer session from a crypto xform chain */
 static int
-aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -563,7 +563,7 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_mb_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -593,9 +593,9 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
-		.session_get_size	= aesni_mb_pmd_session_get_size,
-		.session_configure	= aesni_mb_pmd_session_configure,
-		.session_clear		= aesni_mb_pmd_session_clear
+		.sym_session_get_size	= aesni_mb_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_mb_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_mb_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops = &aesni_mb_pmd_ops;
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 5e8a5a292..43c59ea83 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -267,14 +267,14 @@ armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-armv8_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+armv8_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct armv8_crypto_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -310,7 +310,7 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-armv8_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -340,9 +340,9 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
-		.session_get_size	= armv8_crypto_pmd_session_get_size,
-		.session_configure	= armv8_crypto_pmd_session_configure,
-		.session_clear		= armv8_crypto_pmd_session_clear
+		.sym_session_get_size	= armv8_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= armv8_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= armv8_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_armv8_crypto_pmd_ops = &armv8_crypto_pmd_ops;
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 1cb944406..dccda2152 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -755,13 +755,13 @@ ccp_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static unsigned
-ccp_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+ccp_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct ccp_session);
 }
 
 static int
-ccp_pmd_session_configure(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_configure(struct rte_cryptodev *dev,
 			  struct rte_crypto_sym_xform *xform,
 			  struct rte_cryptodev_sym_session *sess,
 			  struct rte_mempool *mempool)
@@ -795,7 +795,7 @@ ccp_pmd_session_configure(struct rte_cryptodev *dev,
 }
 
 static void
-ccp_pmd_session_clear(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		      struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -825,9 +825,9 @@ struct rte_cryptodev_ops ccp_ops = {
 		.queue_pair_release	= ccp_pmd_qp_release,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
-		.session_get_size	= ccp_pmd_session_get_size,
-		.session_configure	= ccp_pmd_session_configure,
-		.session_clear		= ccp_pmd_session_clear,
+		.sym_session_get_size	= ccp_pmd_sym_session_get_size,
+		.sym_session_configure	= ccp_pmd_sym_session_configure,
+		.sym_session_clear	= ccp_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *ccp_pmd_ops = &ccp_ops;
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 4daee5f59..b45d9163c 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1481,7 +1481,7 @@ dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned int
-dpaa2_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa2_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -2436,7 +2436,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
 }
 
 static int
-dpaa2_sec_session_configure(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -2465,7 +2465,7 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa2_sec_session_clear(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	PMD_INIT_FUNC_TRACE();
@@ -2697,9 +2697,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
-	.session_get_size     = dpaa2_sec_session_get_size,
-	.session_configure    = dpaa2_sec_session_configure,
-	.session_clear        = dpaa2_sec_session_clear,
+	.sym_session_get_size     = dpaa2_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa2_sec_sym_session_configure,
+	.sym_session_clear        = dpaa2_sec_sym_session_clear,
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 3de7df93c..78f58a8ce 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1596,7 +1596,7 @@ dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of session structure */
 static unsigned int
-dpaa_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -1811,7 +1811,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 }
 
 static int
-dpaa_sec_session_configure(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -1844,7 +1844,7 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa_sec_session_clear(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
@@ -2180,9 +2180,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
-	.session_get_size     = dpaa_sec_session_get_size,
-	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear
+	.sym_session_get_size     = dpaa_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa_sec_sym_session_configure,
+	.sym_session_clear        = dpaa_sec_sym_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 4174f1f80..dff43a269 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -238,14 +238,14 @@ kasumi_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the KASUMI session structure */
 static unsigned
-kasumi_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+kasumi_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct kasumi_session);
 }
 
 /** Configure a KASUMI session from a crypto xform chain */
 static int
-kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+kasumi_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -281,7 +281,7 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-kasumi_pmd_session_clear(struct rte_cryptodev *dev,
+kasumi_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -311,9 +311,9 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 		.queue_pair_release = kasumi_pmd_qp_release,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
-		.session_get_size   = kasumi_pmd_session_get_size,
-		.session_configure  = kasumi_pmd_session_configure,
-		.session_clear      = kasumi_pmd_session_clear
+		.sym_session_get_size   = kasumi_pmd_sym_session_get_size,
+		.sym_session_configure  = kasumi_pmd_sym_session_configure,
+		.sym_session_clear      = kasumi_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_kasumi_pmd_ops = &kasumi_pmd_ops;
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 8710ba3b7..93eee5fd4 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -613,7 +613,7 @@ mrvl_crypto_pmd_qp_count(struct rte_cryptodev *dev)
  * @returns Size of Marvell crypto session.
  */
 static unsigned
-mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
+mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
 {
 	return sizeof(struct mrvl_crypto_session);
 }
@@ -626,7 +626,7 @@ mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
  * @returns 0 upon success, negative value otherwise.
  */
 static int
-mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -673,7 +673,7 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
  * @returns 0. Always.
  */
 static void
-mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 
@@ -715,9 +715,9 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
-		.session_get_size	= mrvl_crypto_pmd_session_get_size,
-		.session_configure	= mrvl_crypto_pmd_session_configure,
-		.session_clear		= mrvl_crypto_pmd_session_clear
+		.sym_session_get_size	= mrvl_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= mrvl_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= mrvl_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops = &mrvl_crypto_pmd_ops;
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index e43fba7db..92797378a 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -249,14 +249,14 @@ null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the NULL crypto session structure */
 static unsigned
-null_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+null_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct null_crypto_session);
 }
 
 /** Configure a null crypto session from a crypto xform chain */
 static int
-null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+null_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -292,7 +292,7 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-null_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+null_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -322,9 +322,9 @@ struct rte_cryptodev_ops pmd_ops = {
 		.queue_pair_release	= null_crypto_pmd_qp_release,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
-		.session_get_size	= null_crypto_pmd_session_get_size,
-		.session_configure	= null_crypto_pmd_session_configure,
-		.session_clear		= null_crypto_pmd_session_clear
+		.sym_session_get_size	= null_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= null_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= null_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *null_crypto_pmd_ops = &pmd_ops;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 554177d20..4cd32559d 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -657,14 +657,14 @@ openssl_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-openssl_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct openssl_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -701,7 +701,7 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-openssl_pmd_session_clear(struct rte_cryptodev *dev,
+openssl_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -732,9 +732,9 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 		.queue_pair_release	= openssl_pmd_qp_release,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
-		.session_get_size	= openssl_pmd_session_get_size,
-		.session_configure	= openssl_pmd_session_configure,
-		.session_clear		= openssl_pmd_session_clear
+		.sym_session_get_size	= openssl_pmd_sym_session_get_size,
+		.sym_session_configure	= openssl_pmd_sym_session_configure,
+		.sym_session_clear	= openssl_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_openssl_pmd_ops = &openssl_pmd_ops;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 629904e2f..2546e836f 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -205,9 +205,9 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
-		.session_get_size	= qat_sym_session_get_private_size,
-		.session_configure	= qat_sym_session_configure,
-		.session_clear		= qat_sym_session_clear
+		.sym_session_get_size	= qat_sym_session_get_private_size,
+		.sym_session_configure	= qat_sym_session_configure,
+		.sym_session_clear	= qat_sym_session_clear
 };
 
 static uint16_t
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f363e3257..8387fdc47 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -447,7 +447,7 @@ scheduler_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static uint32_t
-scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+scheduler_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
 	uint8_t i = 0;
@@ -457,7 +457,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 	for (i = 0; i < sched_ctx->nb_slaves; i++) {
 		uint8_t slave_dev_id = sched_ctx->slaves[i].dev_id;
 		struct rte_cryptodev *dev = &rte_cryptodevs[slave_dev_id];
-		uint32_t priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+		uint32_t priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 		if (max_priv_sess_size < priv_sess_size)
 			max_priv_sess_size = priv_sess_size;
@@ -467,7 +467,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 }
 
 static int
-scheduler_pmd_session_configure(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev,
 	struct rte_crypto_sym_xform *xform,
 	struct rte_cryptodev_sym_session *sess,
 	struct rte_mempool *mempool)
@@ -492,7 +492,7 @@ scheduler_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-scheduler_pmd_session_clear(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
@@ -521,9 +521,9 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 		.queue_pair_release	= scheduler_pmd_qp_release,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
-		.session_get_size	= scheduler_pmd_session_get_size,
-		.session_configure	= scheduler_pmd_session_configure,
-		.session_clear		= scheduler_pmd_session_clear,
+		.sym_session_get_size	= scheduler_pmd_sym_session_get_size,
+		.sym_session_configure	= scheduler_pmd_sym_session_configure,
+		.sym_session_clear	= scheduler_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops = &scheduler_pmd_ops;
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index fe882c366..5e6ac07e0 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -240,14 +240,14 @@ snow3g_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the SNOW 3G session structure */
 static unsigned
-snow3g_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+snow3g_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct snow3g_session);
 }
 
 /** Configure a SNOW 3G session from a crypto xform chain */
 static int
-snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+snow3g_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -283,7 +283,7 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-snow3g_pmd_session_clear(struct rte_cryptodev *dev,
+snow3g_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -313,9 +313,9 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 		.queue_pair_release = snow3g_pmd_qp_release,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
-		.session_get_size   = snow3g_pmd_session_get_size,
-		.session_configure  = snow3g_pmd_session_configure,
-		.session_clear      = snow3g_pmd_session_clear
+		.sym_session_get_size   = snow3g_pmd_sym_session_get_size,
+		.sym_session_configure  = snow3g_pmd_sym_session_configure,
+		.sym_session_clear      = snow3g_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_snow3g_pmd_ops = &snow3g_pmd_ops;
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index f7021b38b..c8f4603fa 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -518,9 +518,9 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
-	.session_get_size	= virtio_crypto_sym_get_session_private_size,
-	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session
+	.sym_session_get_size		= virtio_crypto_sym_get_session_private_size,
+	.sym_session_configure		= virtio_crypto_sym_configure_session,
+	.sym_session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 79326d8f5..6dc9cefae 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -240,14 +240,14 @@ zuc_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the ZUC session structure */
 static unsigned
-zuc_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+zuc_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct zuc_session);
 }
 
 /** Configure a ZUC session from a crypto xform chain */
 static int
-zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+zuc_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -283,7 +283,7 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-zuc_pmd_session_clear(struct rte_cryptodev *dev,
+zuc_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
@@ -313,9 +313,9 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 		.queue_pair_release = zuc_pmd_qp_release,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
-		.session_get_size   = zuc_pmd_session_get_size,
-		.session_configure  = zuc_pmd_session_configure,
-		.session_clear      = zuc_pmd_session_clear
+		.sym_session_get_size   = zuc_pmd_sym_session_get_size,
+		.sym_session_configure  = zuc_pmd_sym_session_configure,
+		.sym_session_clear      = zuc_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_zuc_pmd_ops = &zuc_pmd_ops;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 8c3f324c0..495336ed6 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1064,7 +1064,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	index = dev->driver_id;
 
 	if (sess->sess_private_data[index] == NULL) {
-		ret = dev->dev_ops->session_configure(dev, xforms, sess, mp);
+		ret = dev->dev_ops->sym_session_configure(dev, xforms,
+							sess, mp);
 		if (ret < 0) {
 			CDEV_LOG_ERR(
 				"dev_id %d failed to configure session details",
@@ -1106,7 +1107,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
-	dev->dev_ops->session_clear(dev, sess);
+	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
 }
@@ -1158,10 +1159,10 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
-	if (*dev->dev_ops->session_get_size == NULL)
+	if (*dev->dev_ops->sym_session_get_size == NULL)
 		return 0;
 
-	priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+	priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 	/*
 	 * If size is less than session header size,
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 387e377f3..c6a58adae 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -326,11 +326,11 @@ struct rte_cryptodev_ops {
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
-	cryptodev_sym_get_session_private_size_t session_get_size;
+	cryptodev_sym_get_session_private_size_t sym_session_get_size;
 	/**< Return private session. */
-	cryptodev_sym_configure_session_t session_configure;
+	cryptodev_sym_configure_session_t sym_session_configure;
 	/**< Configure a Crypto session. */
-	cryptodev_sym_free_session_t session_clear;
+	cryptodev_sym_free_session_t sym_session_clear;
 	/**< Clear a Crypto sessions private data. */
 };
 
-- 
2.14.4

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

* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
  2018-06-22 17:02     ` Verma, Shally
@ 2018-06-25 16:40       ` De Lara Guarch, Pablo
  2018-06-26  5:28         ` Verma, Shally
  0 siblings, 1 reply; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-06-25 16:40 UTC (permalink / raw)
  To: Verma, Shally, Akhil Goyal, Doherty, Declan, ravi1.kumar, Jacob,
	 Jerin, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
  Cc: dev



> -----Original Message-----
> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> Sent: Friday, June 22, 2018 6:02 PM
> To: Akhil Goyal <akhil.goyal@nxp.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; ravi1.kumar@amd.com; Jacob, Jerin
> <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> tdu@semihalf.com; jianjay.zhou@huawei.com
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size
> functions
> 
> Hi Pablo
> 
> >-----Original Message-----
> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
> >Sent: 21 June 2018 18:29
> >To: Pablo de Lara <pablo.de.lara.guarch@intel.com>;
> >declan.doherty@intel.com; ravi1.kumar@amd.com; Jacob, Jerin
> ><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com;
> >fiona.trahe@intel.com; tdu@semihalf.com; jianjay.zhou@huawei.com
> >Cc: dev@dpdk.org
> >Subject: Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session
> >size functions
> >
> >External Email
> >
> >Hi Pablo,
> >
> >
> >On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> >> Removed rte_cryptodev_get_header_session_size
> >> and rte_cryptodev_get_private_session_size functions, as they have
> >> been substituted with functions specific for symmetric operations,
> >> with _sym_ word after "rte_cryptodev_".
> >>
> >> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >> ---

...

> >> +
> >> +  - ``rte_cryptodev_get_header_session_size`` is replaced with
> >> +    ``rte_cryptodev_sym_get_header_session_size``
> >> +  - ``rte_cryptodev_get_private_session_size`` is replaced with
> >> +    ``rte_cryptodev_sym_get_private_session_size``
> >> +
> >rte_cryptodev_get_private_session_size is not removed in this patch. I
> >think you missed it in your patch.

Right Akhil, thanks for spotting this. Will fix in next version.

> >
> >-Akhil
> >>
> >>   ABI Changes
> >>   -----------
> >> diff --git a/lib/librte_cryptodev/rte_cryptodev.c
> >> b/lib/librte_cryptodev/rte_cryptodev.c
> >> index a07904fb9..40e249e79 100644
> >> --- a/lib/librte_cryptodev/rte_cryptodev.c
> >> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> >> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct
> rte_cryptodev_sym_session *sess)
> >>       return 0;
> >>   }
> >>
> >> -unsigned int
> >> -rte_cryptodev_get_header_session_size(void)
> >> -{
> >> -     return rte_cryptodev_sym_get_header_session_size();
> >> -}
> >> -
> >>   unsigned int
> >>   rte_cryptodev_sym_get_header_session_size(void)
> >>   {
> 
> [Shally] I missed this before. I think this implementation either should change to
> use nb_drivers which support symmetric or else I am not seeing a need for
> separate sym specific API for header_size since it will always be same for both
> sym and asym.

The implementation is already using nb_drivers to calculate the size, right?
Anyway, I understand that the way asymmetric sessions are done, the API
will be the same, but this could change in the future and since we have already deprecated the
generic function (get_header_session_size), I think we should continue and have both _sym and _asym_ functions.

Thanks,
Pablo


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

* Re: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
  2018-06-19 13:20             ` Trahe, Fiona
@ 2018-06-25 16:42               ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-06-25 16:42 UTC (permalink / raw)
  To: Trahe, Fiona, Tomasz Duszynski
  Cc: Doherty, Declan, akhil.goyal, ravi1.kumar, jerin.jacob, Zhang,
	Roy Fan, jianjay.zhou, dev



> -----Original Message-----
> From: Trahe, Fiona
> Sent: Tuesday, June 19, 2018 2:20 PM
> To: Tomasz Duszynski <tdu@semihalf.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; jianjay.zhou@huawei.com; dev@dpdk.org; Trahe,
> Fiona <fiona.trahe@intel.com>
> Subject: RE: [PATCH 3/6] cryptodev: remove max number of sessions
> 
> Hi Tomasz, Pablo,
> 
> > -----Original Message-----
> > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > Sent: Wednesday, June 13, 2018 11:11 AM
> > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > Cc: Tomasz Duszynski <tdu@semihalf.com>; Doherty, Declan
> > <declan.doherty@intel.com>; akhil.goyal@nxp.com; ravi1.kumar@amd.com;
> > jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> > <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> > jianjay.zhou@huawei.com; dev@dpdk.org
> > Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> >
> > On Wed, Jun 13, 2018 at 08:23:36AM +0000, De Lara Guarch, Pablo wrote:
> > > Hi Tomasz,
> > >
> > > > -----Original Message-----
> > > > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > > > Sent: Wednesday, June 13, 2018 7:12 AM
> > > > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > > > Cc: Tomasz Duszynski <tdu@semihalf.com>; Doherty, Declan
> > > > <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> > > > ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy
> > > > Fan <roy.fan.zhang@intel.com>; Trahe, Fiona
> > > > <fiona.trahe@intel.com>; jianjay.zhou@huawei.com; dev@dpdk.org
> > > > Subject: Re: [PATCH 3/6] cryptodev: remove max number of sessions
> > > >
> > > > On Tue, Jun 12, 2018 at 01:53:36PM +0000, De Lara Guarch, Pablo wrote:
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> > > > > > Sent: Tuesday, June 12, 2018 12:38 PM
> > > > > > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> > > > > > Cc: Doherty, Declan <declan.doherty@intel.com>;
> > > > > > akhil.goyal@nxp.com; ravi1.kumar@amd.com;
> > > > > > jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> > > > > > <roy.fan.zhang@intel.com>; Trahe, Fiona
> > > > > > <fiona.trahe@intel.com>; tdu@semihalf.com;
> > > > > > jianjay.zhou@huawei.com; dev@dpdk.org
> > > > > > Subject: Re: [PATCH 3/6] cryptodev: remove max number of
> > > > > > sessions
> > > > > >
> > > > > > Hello Pablo,
> > > > > >
> > > > > > On Fri, Jun 08, 2018 at 11:02:31PM +0100, Pablo de Lara wrote:
> > > > > > > Sessions are not created and stored in the crypto device
> > > > > > > anymore, since now the session mempool is created at the
> application level.
> > > > > > >
> > > > > > > Therefore the limitation of the maximum number of sessions
> > > > > > > that can be created should not be dependent of the crypto device.
> > > > > > >
> > > > > > > Signed-off-by: Pablo de Lara
> > > > > > > <pablo.de.lara.guarch@intel.com>
> > > > >
> > > > > ...
> > > > >
> > > > > > > diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > > b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > > > index 1b6029a56..822b6cac7 100644
> > > > > > > --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > > > +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> > > > > > > @@ -719,7 +719,6 @@ cryptodev_mrvl_crypto_create(const char
> *name,
> > > > > > >  	internals = dev->data->dev_private;
> > > > > > >
> > > > > > >  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> > > > > > > -	internals->max_nb_sessions = init_params->max_nb_sessions;
> > > > > > >
> > > > > > >  	/*
> > > > > > >  	 * ret == -EEXIST is correct, it means DMA @@ -734,8
> > > > > > > +733,6 @@ cryptodev_mrvl_crypto_create(const char *name,
> > > > > > >  			"DMA memory has been already initialized by a
> > > > > > different driver.");
> > > > > > >  	}
> > > > > > >
> > > > > > > -	sam_params.max_num_sessions = internals->max_nb_sessions;
> > > > > >
> > > > > > This will not fly since library maintains separate list of sessions.
> > > > > > We have to initialize this number to something sane. Since we
> > > > > > cannot get it from userspace perhaps make that compile-time
> > > > > > configurable by adding separate CONFIG_?
> > > > >
> > > > > Hi Tomasz,
> > > > >
> > > > > If you need to have an actual limit, you could define it
> > > > > internally (not adding an external configuration option), but
> > > > > bear in mind that This won't prevent an application from trying to
> allocate more sessions.
> > > >
> > > > You can define arbitrary number of session on condition you have
> > > > enough memory. So no hard limit here. What bothers me is the case
> > > > where app wants to initialize more session than the library internally has.
> > > > If this happens userspace will get an error. On the other hand
> > > > requesting some arbitrary large number of session from library and
> > > > hoping app will never use so many wastes memory (which might be
> > > > valuable on resource constrained systems).
> > > >
> > > > That is why keeping the number of sessions in app and library in
> > > > sync is important.
> > > >
> > > > Do we have any option in DPDK now to workaround this?
> > >
> > > Ok I see, so actually the MUSDK library needs a maximum number of
> sessions.
> > > I'd say then we should keep this field, but we can add a special case: 0.
> > > In this case, the PMD does not have any maximum number of sessions
> > > (which would be applicable to most PMDs).
> > >
> > > So, for this PMD, this special case is not supported. If 0 is
> > > passed, either return that unlimited number of sessions is not
> > > supported, or set it to a default value (defined inside the PMD, such as 2048).
> > > If no value is passed, this number can be set to the default value too.
> > >
> > > How does this sound?
> >
> > Who is going to pass that value? App? Or the old way is retained i.e
> > PMD parameters?
> >
> > OK, my understanding is that we have 3 options:
> >
> > 1. 0 is passed which for most of the drivers translates to "you should
> >    not care about sessions number created by userspace application". In
> >    case PMD supports that it returns either success or failure.
> >
> > 2. Nothing is passed which means PMD should not care about number of
> >    sessions except mvsam which sets some default value.
> >
> > 3. Passing some arbitrary value which which sets number of sessions
> >    for PMDs that care about that (mvsam). In that case app would
> >    respect that number and not allocate more than specified? This is
> >    what DPDK has now.
> >
> > Right? Doesn't is sound like the mechanism that gets removed from DPDK
> > with some extra handling added?
> >
> > Other solution might be to remove the old API as planned and change
> > the PMD itself so that it defers library initialization until PMD is
> > started. During session configuration necessary information would be
> > saved and reused later on (i.e during PMD start).
> >
> [Fiona] I'd suggest we keep max_nb_sessions in the info struct.
> mvsam - or any other PMD which wants an internal PMD limit - should set it via
> hard-coding or a PMD-specific item in the config file.
> For all other PMDs currently which don't have a limit the config file item can be
> removed. For these, 0, indicating No Limit, should be returned in the info struct.
> But I think it's optional what an app does with this max_nb_sessions.
> It could take it into account and create a session pool of (max_nb_sessions *
> num_PMDs) and be careful not to send more than max_nb_sessions to a PMD
> with a limit.
> Or it could just ignore it, create whatever size session pool it wants and if it calls
> rte_cryptodev_sym_session_init() too many times on a PMD handle the -
> ENOMEM which I'd expect the PMD to return. Possibly route the session to a
> different device with available resources.
> Does that work for everyone?

I will send a new version of this patchset, addressing these comments.
MVSAM PMD will still be able to set max_nb_sessions to a defined value and
rest of the PMDs (except for DPAA) will set this value to 0, indicating that
they have no limit in the amount of sessions.

Thanks,
Pablo
i

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

* Re: [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag
  2018-06-18  6:29   ` Akhil Goyal
@ 2018-06-25 16:43     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-06-25 16:43 UTC (permalink / raw)
  To: Akhil Goyal, Doherty, Declan, ravi1.kumar, jerin.jacob, Zhang,
	Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
  Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
> Sent: Monday, June 18, 2018 7:30 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; akhil.goyal@nxp.com; ravi1.kumar@amd.com;
> jerin.jacob@caviumnetworks.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> Trahe, Fiona <fiona.trahe@intel.com>; tdu@semihalf.com;
> jianjay.zhou@huawei.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag
> 
> Hi Pablo,
> On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> > The current mbuf scatter gatter feature flag is too ambiguous, as it
> > is not clear if input and/or output buffers can be scatter gather
> > mbufs or not.
> >
> > Therefore, two new flags will replace this flag:
> > RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_IN and
> > RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER_OUT.
> >
> There may be a case, SG supported in input buffer and we use in-place
> processing and driver may support that but may not support SG for out buffers in
> case of OOP. How can we handle this type of case?

Agree. I will send a new version with more flags, so we can cover all scenarios.

Thanks for the feedback!
Pablo

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

* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
  2018-06-25 16:40       ` De Lara Guarch, Pablo
@ 2018-06-26  5:28         ` Verma, Shally
  2018-06-26  8:17           ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 135+ messages in thread
From: Verma, Shally @ 2018-06-26  5:28 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Akhil Goyal, Doherty, Declan, ravi1.kumar,
	Jacob,  Jerin, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
  Cc: dev



>-----Original Message-----
>From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com]
>Sent: 25 June 2018 22:10
>To: Verma, Shally <Shally.Verma@cavium.com>; Akhil Goyal <akhil.goyal@nxp.com>; Doherty, Declan <declan.doherty@intel.com>;
>ravi1.kumar@amd.com; Jacob, Jerin <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Trahe,
>Fiona <fiona.trahe@intel.com>; tdu@semihalf.com; jianjay.zhou@huawei.com
>Cc: dev@dpdk.org
>Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
>
>External Email
>
>> -----Original Message-----
>> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
>> Sent: Friday, June 22, 2018 6:02 PM
>> To: Akhil Goyal <akhil.goyal@nxp.com>; De Lara Guarch, Pablo
>> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
>> <declan.doherty@intel.com>; ravi1.kumar@amd.com; Jacob, Jerin
>> <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
>> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
>> tdu@semihalf.com; jianjay.zhou@huawei.com
>> Cc: dev@dpdk.org
>> Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size
>> functions
>>
>> Hi Pablo
>>
>> >-----Original Message-----
>> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
>> >Sent: 21 June 2018 18:29
>> >To: Pablo de Lara <pablo.de.lara.guarch@intel.com>;
>> >declan.doherty@intel.com; ravi1.kumar@amd.com; Jacob, Jerin
>> ><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com;
>> >fiona.trahe@intel.com; tdu@semihalf.com; jianjay.zhou@huawei.com
>> >Cc: dev@dpdk.org
>> >Subject: Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session
>> >size functions
>> >
>> >External Email
>> >
>> >Hi Pablo,
>> >
>> >
>> >On 6/9/2018 3:32 AM, Pablo de Lara wrote:
>> >> Removed rte_cryptodev_get_header_session_size
>> >> and rte_cryptodev_get_private_session_size functions, as they have
>> >> been substituted with functions specific for symmetric operations,
>> >> with _sym_ word after "rte_cryptodev_".
>> >>
>> >> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>> >> ---
>
>...
>
>> >> +
>> >> +  - ``rte_cryptodev_get_header_session_size`` is replaced with
>> >> +    ``rte_cryptodev_sym_get_header_session_size``
>> >> +  - ``rte_cryptodev_get_private_session_size`` is replaced with
>> >> +    ``rte_cryptodev_sym_get_private_session_size``
>> >> +
>> >rte_cryptodev_get_private_session_size is not removed in this patch. I
>> >think you missed it in your patch.
>
>Right Akhil, thanks for spotting this. Will fix in next version.
>
>> >
>> >-Akhil
>> >>
>> >>   ABI Changes
>> >>   -----------
>> >> diff --git a/lib/librte_cryptodev/rte_cryptodev.c
>> >> b/lib/librte_cryptodev/rte_cryptodev.c
>> >> index a07904fb9..40e249e79 100644
>> >> --- a/lib/librte_cryptodev/rte_cryptodev.c
>> >> +++ b/lib/librte_cryptodev/rte_cryptodev.c
>> >> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct
>> rte_cryptodev_sym_session *sess)
>> >>       return 0;
>> >>   }
>> >>
>> >> -unsigned int
>> >> -rte_cryptodev_get_header_session_size(void)
>> >> -{
>> >> -     return rte_cryptodev_sym_get_header_session_size();
>> >> -}
>> >> -
>> >>   unsigned int
>> >>   rte_cryptodev_sym_get_header_session_size(void)
>> >>   {
>>
>> [Shally] I missed this before. I think this implementation either should change to
>> use nb_drivers which support symmetric or else I am not seeing a need for
>> separate sym specific API for header_size since it will always be same for both
>> sym and asym.
>
>The implementation is already using nb_drivers to calculate the size, right?
[Shally] I meant change it to nb_sym_drivers, where nb_sym_drivers = number of drivers that have symmetric capability

>Anyway, I understand that the way asymmetric sessions are done, the API
>will be the same, but this could change in the future and since we have already deprecated the
>generic function (get_header_session_size), I think we should continue and have both _sym and _asym_ functions.
>
[Shally] Ok.
>Thanks,
>Pablo


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

* Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions
  2018-06-26  5:28         ` Verma, Shally
@ 2018-06-26  8:17           ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-06-26  8:17 UTC (permalink / raw)
  To: Verma, Shally, Akhil Goyal, Doherty, Declan, ravi1.kumar, Jacob,
	 Jerin, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
  Cc: dev



> -----Original Message-----
> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> Sent: Tuesday, June 26, 2018 6:28 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Akhil Goyal
> <akhil.goyal@nxp.com>; Doherty, Declan <declan.doherty@intel.com>;
> ravi1.kumar@amd.com; Jacob, Jerin <Jerin.JacobKollanukkaran@cavium.com>;
> Zhang, Roy Fan <roy.fan.zhang@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; tdu@semihalf.com; jianjay.zhou@huawei.com
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size
> functions
> 
> 
> 
> >-----Original Message-----
> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com]
> >Sent: 25 June 2018 22:10
> >To: Verma, Shally <Shally.Verma@cavium.com>; Akhil Goyal
> ><akhil.goyal@nxp.com>; Doherty, Declan <declan.doherty@intel.com>;
> >ravi1.kumar@amd.com; Jacob, Jerin
> ><Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
> ><roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> >tdu@semihalf.com; jianjay.zhou@huawei.com
> >Cc: dev@dpdk.org
> >Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session
> >size functions
> >
> >External Email
> >
> >> -----Original Message-----
> >> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> >> Sent: Friday, June 22, 2018 6:02 PM
> >> To: Akhil Goyal <akhil.goyal@nxp.com>; De Lara Guarch, Pablo
> >> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> >> <declan.doherty@intel.com>; ravi1.kumar@amd.com; Jacob, Jerin
> >> <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
> >> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> >> tdu@semihalf.com; jianjay.zhou@huawei.com
> >> Cc: dev@dpdk.org
> >> Subject: RE: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session
> >> size functions
> >>
> >> Hi Pablo
> >>
> >> >-----Original Message-----
> >> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
> >> >Sent: 21 June 2018 18:29
> >> >To: Pablo de Lara <pablo.de.lara.guarch@intel.com>;
> >> >declan.doherty@intel.com; ravi1.kumar@amd.com; Jacob, Jerin
> >> ><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com;
> >> >fiona.trahe@intel.com; tdu@semihalf.com; jianjay.zhou@huawei.com
> >> >Cc: dev@dpdk.org
> >> >Subject: Re: [dpdk-dev] [PATCH 5/6] cryptodev: remove old get
> >> >session size functions
> >> >
> >> >External Email
> >> >
> >> >Hi Pablo,
> >> >
> >> >
> >> >On 6/9/2018 3:32 AM, Pablo de Lara wrote:
> >> >> Removed rte_cryptodev_get_header_session_size
> >> >> and rte_cryptodev_get_private_session_size functions, as they have
> >> >> been substituted with functions specific for symmetric operations,
> >> >> with _sym_ word after "rte_cryptodev_".
> >> >>
> >> >> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >> >> ---
> >
> >...
> >
> >> >> +
> >> >> +  - ``rte_cryptodev_get_header_session_size`` is replaced with
> >> >> +    ``rte_cryptodev_sym_get_header_session_size``
> >> >> +  - ``rte_cryptodev_get_private_session_size`` is replaced with
> >> >> +    ``rte_cryptodev_sym_get_private_session_size``
> >> >> +
> >> >rte_cryptodev_get_private_session_size is not removed in this patch.
> >> >I think you missed it in your patch.
> >
> >Right Akhil, thanks for spotting this. Will fix in next version.
> >
> >> >
> >> >-Akhil
> >> >>
> >> >>   ABI Changes
> >> >>   -----------
> >> >> diff --git a/lib/librte_cryptodev/rte_cryptodev.c
> >> >> b/lib/librte_cryptodev/rte_cryptodev.c
> >> >> index a07904fb9..40e249e79 100644
> >> >> --- a/lib/librte_cryptodev/rte_cryptodev.c
> >> >> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> >> >> @@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct
> >> rte_cryptodev_sym_session *sess)
> >> >>       return 0;
> >> >>   }
> >> >>
> >> >> -unsigned int
> >> >> -rte_cryptodev_get_header_session_size(void)
> >> >> -{
> >> >> -     return rte_cryptodev_sym_get_header_session_size();
> >> >> -}
> >> >> -
> >> >>   unsigned int
> >> >>   rte_cryptodev_sym_get_header_session_size(void)
> >> >>   {
> >>
> >> [Shally] I missed this before. I think this implementation either
> >> should change to use nb_drivers which support symmetric or else I am
> >> not seeing a need for separate sym specific API for header_size since
> >> it will always be same for both sym and asym.
> >
> >The implementation is already using nb_drivers to calculate the size, right?
> [Shally] I meant change it to nb_sym_drivers, where nb_sym_drivers = number
> of drivers that have symmetric capability

Ok, I see now. Well, this will overcomplicate things, rte_cryptodev_allocate_driver
would need to be changed to two functions,
one for symmetric and another for asymmetric, causing an API breakage.
I think as long as the session creation/initialization functions check if a PMD supports
symmetric and/or asymmetric, we should be OK.

We might need some changes in the current symmetric implementation to peform those checks
and in the new asymmetric implementation.

Thanks,
Pablo

> 
> >Anyway, I understand that the way asymmetric sessions are done, the API
> >will be the same, but this could change in the future and since we have
> >already deprecated the generic function (get_header_session_size), I think we
> should continue and have both _sym and _asym_ functions.
> >
> [Shally] Ok.
> >Thanks,
> >Pablo


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

* [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
                   ` (6 preceding siblings ...)
  2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
@ 2018-06-28  0:52 ` Pablo de Lara
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
                     ` (15 more replies)
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                   ` (2 subsequent siblings)
  10 siblings, 16 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

API changes in the cryptodev library, announced
in the previous release, 18.05.

Changes in v3:
- Rephrased comments for new sgl feature flags
- Added patch checking if there a device supports
  symmetric sessions
- Extended PMD session API renaming

Changes in v2:
- Instead of removing max_nb_sessions in info structure,
  a new value `0` is allowed, to indicate that the PMD
  does not have any limitation on the number of sessions
  to be managed
- Modified crypto applications to check for new value `0`
  on max_nb_sessions
- Modified MVSAM PMD to parse max_nb_sessions,
  since that parameter is not generic to any PMD anymore
- Removed attach/detach session API, as announced
- Removed deprecated function that was not removed in
  previous patchset
- Renamed PMD symmetric session API, to allow asymmetric
  session API to be added in the future

Pablo de Lara (16):
  cryptodev: replace bus specific struct with generic dev
  cryptodev: remove max number of sessions per queue
  app/crypto-perf: limit number of sessions
  test/crypto: limit number of sessions
  examples/l2fwd-crypto: limit number of sessions
  examples/ipsec-secgw: check for max supported sessions
  crypto/mvsam: parse max number of sessions
  cryptodev: define value for unlimited sessions
  cryptodev: remove max number of sessions parameter
  doc: remove unneeded deprecation notice
  cryptodev: remove queue start/stop functions
  cryptodev: remove old get session size functions
  cryptodev: replace mbuf scatter gather flag
  cryptodev: remove attach/detach session API
  cryptodev: rename PMD symmetric session API
  cryptodev: check if symmetric sessions are supported

 app/test-crypto-perf/main.c                        |  31 +++-
 doc/guides/prog_guide/cryptodev_lib.rst            |   7 +-
 doc/guides/rel_notes/deprecation.rst               |  25 ----
 doc/guides/rel_notes/release_18_08.rst             |  30 +++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  13 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  39 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |   2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  39 ++---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   2 -
 drivers/crypto/armv8/rte_armv8_pmd.c               |  11 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  39 ++---
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |   2 -
 drivers/crypto/ccp/ccp_crypto.c                    |  28 ++--
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  37 ++---
 drivers/crypto/ccp/ccp_pmd_private.h               |   1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   |  20 +--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  52 +++----
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |   2 -
 drivers/crypto/dpaa_sec/dpaa_sec.c                 |  81 ++---------
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  11 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  39 ++---
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |   2 -
 drivers/crypto/mvsam/rte_mrvl_pmd.c                | 134 +++++++++++++++--
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c            |  49 ++-----
 drivers/crypto/null/null_crypto_pmd.c              |  13 +-
 drivers/crypto/null/null_crypto_pmd_ops.c          |  39 ++---
 drivers/crypto/null/null_crypto_pmd_private.h      |   1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  13 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  39 ++---
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |   2 -
 drivers/crypto/qat/qat_sym.c                       |   2 +-
 drivers/crypto/qat/qat_sym.h                       |   2 +-
 drivers/crypto/qat/qat_sym_pmd.c                   |  21 +--
 drivers/crypto/qat/qat_sym_pmd.h                   |   1 -
 drivers/crypto/qat/qat_sym_session.c               |   6 +-
 drivers/crypto/scheduler/scheduler_pmd.c           |  13 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c       |  46 ++----
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  11 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  39 ++---
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |   2 -
 drivers/crypto/virtio/virtio_cryptodev.c           |  22 +--
 drivers/crypto/virtio/virtio_rxtx.c                |   2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  11 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  39 ++---
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |   2 -
 examples/ipsec-secgw/ipsec-secgw.c                 |   6 +
 examples/l2fwd-crypto/main.c                       |  19 ++-
 lib/librte_cryptodev/rte_cryptodev.c               | 138 +++---------------
 lib/librte_cryptodev/rte_cryptodev.h               | 161 +++++----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.c           |  12 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  70 +--------
 lib/librte_cryptodev/rte_cryptodev_version.map     |   6 -
 test/test/test_cryptodev.c                         |  60 ++++++--
 test/test/test_cryptodev_blockcipher.c             |  21 ++-
 55 files changed, 569 insertions(+), 959 deletions(-)

-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.

This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst  | 2 +-
 doc/guides/rel_notes/deprecation.rst     | 2 --
 doc/guides/rel_notes/release_18_08.rst   | 5 ++++-
 drivers/crypto/qat/qat_sym_pmd.c         | 1 -
 drivers/crypto/virtio/virtio_cryptodev.c | 1 -
 lib/librte_cryptodev/rte_cryptodev.c     | 1 +
 lib/librte_cryptodev/rte_cryptodev.h     | 6 +++---
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
     struct rte_cryptodev_info {
         const char *driver_name;
         uint8_t driver_id;
-        struct rte_pci_device *pci_dev;
+        struct rte_device *device;
 
         uint64_t feature_flags;
 
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
   - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
     containing fields not relevant anymore since the session mempool
     is not internal in the crypto device anymore.
-  - Replacement of ``pci_dev`` field with the more generic ``rte_device``
-    structure.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..6bf53dc31 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+  has been replaced with field ``struct rte_device *device``.
+
 
 ABI Changes
 -----------
@@ -118,7 +121,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_cmdline.so.2
      librte_common_octeontx.so.1
      librte_compressdev.so.1
-     librte_cryptodev.so.4
+   + librte_cryptodev.so.5
      librte_distributor.so.1
      librte_eal.so.7
      librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 		info->capabilities = internals->qat_dev_capabilities;
 		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 	}
 }
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 
 	if (info != NULL) {
 		info->driver_id = cryptodev_virtio_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
 		info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
 
 	dev_info->driver_name = dev->device->driver->name;
+	dev_info->device = dev->device;
 }
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b7a4cf0a2..62a5566ba 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -342,9 +342,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
 
 /**  Crypto device information */
 struct rte_cryptodev_info {
-	const char *driver_name;		/**< Driver name. */
-	uint8_t driver_id;			/**< Driver identifier */
-	struct rte_pci_device *pci_dev;		/**< PCI information. */
+	const char *driver_name;	/**< Driver name. */
+	uint8_t driver_id;		/**< Driver identifier */
+	struct rte_device *device;	/**< Generic device information. */
 
 	uint64_t feature_flags;
 	/**< Feature flags exposes HW/SW features for the given device */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 02/16] cryptodev: remove max number of sessions per queue
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
                     ` (13 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The cryptodev info structure currently contains
the maximum number of sessions that can be used in a queue pair.
This is only set in DPAA_SEC PMD, and since it is calculated
based on the maximum number of sessions (which is not used
anymore), this field can be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c   | 3 ---
 lib/librte_cryptodev/rte_cryptodev.h | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 06f7e4373..73cae483b 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2215,9 +2215,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa_sec_capabilities;
 		info->sym.max_nb_sessions = internals->max_nb_sessions;
-		info->sym.max_nb_sessions_per_qp =
-			RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS /
-			RTE_DPAA_MAX_NB_SEC_QPS;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 62a5566ba..a30790b84 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -358,10 +358,6 @@ struct rte_cryptodev_info {
 	struct {
 		unsigned max_nb_sessions;
 		/**< Maximum number of sessions supported by device. */
-		unsigned int max_nb_sessions_per_qp;
-		/**< Maximum number of sessions per queue pair.
-		 * Default 0 for infinite sessions
-		 */
 	} sym;
 };
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-07-04 12:13     ` Akhil Goyal
  2018-07-04 12:15     ` Akhil Goyal
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 04/16] test/crypto: " Pablo de Lara
                     ` (12 subsequent siblings)
  15 siblings, 2 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of creating a fixed number of sessions,
calculate the necessary number based on number of devices
and queue pairs used.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/main.c | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 4ae14390b..b02d3f597 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -21,7 +21,6 @@
 #include "cperf_test_verify.h"
 #include "cperf_test_pmd_cyclecount.h"
 
-#define NUM_SESSIONS 2048
 #define SESS_MEMPOOL_CACHE_SIZE 64
 
 const char *cperf_test_type_strs[] = {
@@ -149,15 +148,41 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 			.nb_descriptors = opts->nb_descriptors
 		};
 
+		uint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions;
+		/* Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		uint32_t sessions_needed = 2 * enabled_cdev_count *
+						opts->nb_qps;
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+		if (!strcmp((const char *)opts->device_type,
+					"crypto_scheduler")) {
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count *
+				opts->nb_qps * nb_slaves;
+		}
+#endif
+		/*
+		 * A single session is required per queue pair
+		 * in each device
+		 */
+		if (dev_max_nb_sess < opts->nb_qps) {
+			RTE_LOG(ERR, USER1,
+				"Device does not support at least "
+				"%u sessions\n", opts->nb_qps);
+			return -ENOTSUP;
+		}
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
 
 			snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
 				"sess_mp_%u", socket_id);
-
 			sess_mp = rte_mempool_create(mp_name,
-						NUM_SESSIONS,
+						sessions_needed,
 						max_sess_size,
 						SESS_MEMPOOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 04/16] test/crypto: limit number of sessions
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (2 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-07-04 12:21     ` Akhil Goyal
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 05/16] examples/l2fwd-crypto: " Pablo de Lara
                     ` (11 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of using the maximum number of sessions
allowed by the PMDs (which will change to unlimited most
of the PMDs), limit the number to a small sufficient amount.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 test/test/test_cryptodev.c | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 389f79677..5c906cfae 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -39,6 +39,7 @@
 #include "test_cryptodev_hmac_test_vectors.h"
 
 #define VDEV_ARGS_SIZE 100
+#define MAX_NB_SESSIONS            4
 
 static int gbl_driver_id;
 
@@ -435,9 +436,16 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
+	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		RTE_LOG(ERR, USER1, "Device does not support "
+				"at least %u sessions\n",
+				MAX_NB_SESSIONS);
+		return TEST_FAILED;
+	}
+
 	ts_params->session_mpool = rte_mempool_create(
 				"test_sess_mp",
-				info.sym.max_nb_sessions * 2,
+				MAX_NB_SESSIONS * 2,
 				session_size,
 				0, 0, NULL, NULL, NULL,
 				NULL, SOCKET_ID_ANY,
@@ -6499,10 +6507,10 @@ test_multi_session(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *) *
-			dev_info.sym.max_nb_sessions) + 1, 0);
+			MAX_NB_SESSIONS) + 1, 0);
 
 	/* Create multiple crypto sessions*/
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 
 		sessions[i] = rte_cryptodev_sym_session_create(
 				ts_params->session_mpool);
@@ -6551,7 +6559,7 @@ test_multi_session(void)
 	TEST_ASSERT_NULL(sessions[i],
 			"Session creation succeeded unexpectedly!");
 
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 		rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
 				sessions[i]);
 		rte_cryptodev_sym_session_free(sessions[i]);
@@ -6610,7 +6618,7 @@ test_multi_session_random_usage(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *)
-					* dev_info.sym.max_nb_sessions) + 1, 0);
+					* MAX_NB_SESSIONS) + 1, 0);
 
 	for (i = 0; i < MB_SESSION_NUMBER; i++) {
 		sessions[i] = rte_cryptodev_sym_session_create(
@@ -8538,6 +8546,13 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
+		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+			RTE_LOG(ERR, USER1,
+					"Device does not support "
+					"at least %u sessions\n",
+					MAX_NB_SESSIONS);
+			return TEST_FAILED;
+		}
 		/*
 		 * Create mempool with maximum number of sessions * 2,
 		 * to include the session headers
@@ -8545,7 +8560,7 @@ test_scheduler_attach_slave_op(void)
 		if (ts_params->session_mpool == NULL) {
 			ts_params->session_mpool = rte_mempool_create(
 					"test_sess_mp",
-					info.sym.max_nb_sessions * 2,
+					MAX_NB_SESSIONS * 2,
 					session_size,
 					0, 0, NULL, NULL, NULL,
 					NULL, SOCKET_ID_ANY,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 05/16] examples/l2fwd-crypto: limit number of sessions
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (3 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 04/16] test/crypto: " Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-07-04 12:04     ` Akhil Goyal
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
                     ` (10 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Calculate the number of sessions required for the application,
knowing that there is only one session required per device.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4bca87b19..e8384b0c1 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -42,6 +42,9 @@
 #include <rte_prefetch.h>
 #include <rte_random.h>
 #include <rte_hexdump.h>
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+#include <rte_cryptodev_scheduler.h>
+#endif
 
 enum cdev_type {
 	CDEV_TYPE_ANY,
@@ -59,7 +62,6 @@ enum cdev_type {
 #define MAX_AAD_SIZE 65535
 #define MAX_PKT_BURST 32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
-#define MAX_SESSIONS 32
 #define SESSION_POOL_CACHE_SIZE 0
 
 #define MAXIMUM_IV_LENGTH	16
@@ -2010,6 +2012,19 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 		rte_cryptodev_info_get(cdev_id, &dev_info);
 
+		/* Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		uint32_t sessions_needed = 2 * enabled_cdev_count;
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+		if (!strcmp(dev_info.driver_name, "crypto_scheduler")) {
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count * nb_slaves;
+		}
+#endif
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
@@ -2022,7 +2037,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 			 * device private data
 			 */
 			sess_mp = rte_mempool_create(mp_name,
-						MAX_SESSIONS * 2,
+						sessions_needed,
 						max_sess_sz,
 						SESSION_POOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 06/16] examples/ipsec-secgw: check for max supported sessions
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (4 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 05/16] examples/l2fwd-crypto: " Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-07-04 12:30     ` Akhil Goyal
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
                     ` (9 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b280..2582dcb6e 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1440,6 +1440,12 @@ cryptodevs_init(void)
 		dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
 		dev_conf.nb_queue_pairs = qp;
 
+		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
+		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+			rte_exit(EXIT_FAILURE,
+				"Device does not support at least %u "
+				"sessions", CDEV_MP_NB_OBJS / 2);
+
 		if (!socket_ctx[dev_conf.socket_id].session_pool) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 07/16] crypto/mvsam: parse max number of sessions
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (5 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
                     ` (8 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The maximum number of sessions device argument will be removed,
as most PMDs do not have a limitation on this number.
Therefore, the MVSAM PMD needs to parse this value internally.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/mvsam/rte_mrvl_pmd.c | 132 ++++++++++++++++++++++++++++++++----
 1 file changed, 120 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 1b6029a56..a7f5389ee 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -16,8 +16,23 @@
 
 #define MRVL_MUSDK_DMA_MEMSIZE 41943040
 
+#define MRVL_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
+#define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS	2048
+
 static uint8_t cryptodev_driver_id;
 
+struct mrvl_pmd_init_params {
+	struct rte_cryptodev_pmd_init_params common;
+	uint32_t max_nb_sessions;
+};
+
+const char *mrvl_pmd_valid_params[] = {
+	RTE_CRYPTODEV_PMD_NAME_ARG,
+	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+	MRVL_PMD_MAX_NB_SESS_ARG
+};
+
 /**
  * Flag if particular crypto algorithm is supported by PMD/MUSDK.
  *
@@ -691,14 +706,15 @@ mrvl_crypto_pmd_dequeue_burst(void *queue_pair,
 static int
 cryptodev_mrvl_crypto_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_cryptodev_pmd_init_params *init_params)
+		struct mrvl_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct mrvl_crypto_private *internals;
 	struct sam_init_params	sam_params;
 	int ret;
 
-	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device,
+			&init_params->common);
 	if (dev == NULL) {
 		MRVL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -718,7 +734,7 @@ cryptodev_mrvl_crypto_create(const char *name,
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
 
-	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
+	internals->max_nb_qpairs = init_params->common.max_nb_queue_pairs;
 	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	/*
@@ -740,12 +756,99 @@ cryptodev_mrvl_crypto_create(const char *name,
 
 init_error:
 	MRVL_CRYPTO_LOG_ERR(
-		"driver %s: %s failed", init_params->name, __func__);
+		"driver %s: %s failed", init_params->common.name, __func__);
 
 	cryptodev_mrvl_crypto_uninit(vdev);
 	return -EFAULT;
 }
 
+/** Parse integer from integer argument */
+static int
+parse_integer_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	int *i = (int *) extra_args;
+
+	*i = atoi(value);
+	if (*i < 0) {
+		MRVL_CRYPTO_LOG_ERR("Argument has to be positive.\n");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+/** Parse name */
+static int
+parse_name_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	struct rte_cryptodev_pmd_init_params *params = extra_args;
+
+	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
+		MRVL_CRYPTO_LOG_ERR("Invalid name %s, should be less than "
+				"%u bytes.\n", value,
+				RTE_CRYPTODEV_NAME_MAX_LEN - 1);
+		return -EINVAL;
+	}
+
+	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
+
+	return 0;
+}
+
+static int
+mrvl_pmd_parse_input_args(struct mrvl_pmd_init_params *params,
+			 const char *input_args)
+{
+	struct rte_kvargs *kvlist = NULL;
+	int ret = 0;
+
+	if (params == NULL)
+		return -EINVAL;
+
+	if (input_args) {
+		kvlist = rte_kvargs_parse(input_args,
+					  mrvl_pmd_valid_params);
+		if (kvlist == NULL)
+			return -1;
+
+		/* Common VDEV parameters */
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+					 &parse_integer_arg,
+					 &params->common.max_nb_queue_pairs);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+					 &parse_integer_arg,
+					 &params->common.socket_id);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_NAME_ARG,
+					 &parse_name_arg,
+					 &params->common);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 MRVL_PMD_MAX_NB_SESS_ARG,
+					 &parse_integer_arg,
+					 params);
+		if (ret < 0)
+			goto free_kvlist;
+
+	}
+
+free_kvlist:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
 /**
  * Initialize the crypto device.
  *
@@ -755,7 +858,18 @@ cryptodev_mrvl_crypto_create(const char *name,
 static int
 cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 {
-	struct rte_cryptodev_pmd_init_params init_params = { };
+	struct mrvl_pmd_init_params init_params = {
+		.common = {
+			.name = "",
+			.private_data_size =
+				sizeof(struct mrvl_crypto_private),
+			.max_nb_queue_pairs =
+				sam_get_num_inst() * SAM_HW_RING_NUM,
+			.socket_id = rte_socket_id()
+		},
+		.max_nb_sessions = MRVL_PMD_DEFAULT_MAX_NB_SESSIONS
+	};
+
 	const char *name, *args;
 	int ret;
 
@@ -764,13 +878,7 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	args = rte_vdev_device_args(vdev);
 
-	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
-	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
-	init_params.max_nb_sessions =
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
-	init_params.socket_id = rte_socket_id();
-
-	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
+	ret = mrvl_pmd_parse_input_args(&init_params, args);
 	if (ret) {
 		RTE_LOG(ERR, PMD,
 			"Failed to parse initialisation arguments[%s]\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (6 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-07-04 12:40     ` Akhil Goyal
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
                     ` (7 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.

Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/main.c            | 2 +-
 doc/guides/rel_notes/release_18_08.rst | 2 ++
 examples/ipsec-secgw/ipsec-secgw.c     | 2 +-
 lib/librte_cryptodev/rte_cryptodev.h   | 5 ++++-
 test/test/test_cryptodev.c             | 6 ++++--
 5 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index b02d3f597..87aaba0ce 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -169,7 +169,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 		 * A single session is required per queue pair
 		 * in each device
 		 */
-		if (dev_max_nb_sess < opts->nb_qps) {
+		if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
 			RTE_LOG(ERR, USER1,
 				"Device does not support at least "
 				"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 6bf53dc31..2b994ee78 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
 
 * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
   has been replaced with field ``struct rte_device *device``.
+  Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+  supports an unlimited number of sessions.
 
 
 ABI Changes
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
 		dev_conf.nb_queue_pairs = qp;
 
 		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
-		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+		if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
 			rte_exit(EXIT_FAILURE,
 				"Device does not support at least %u "
 				"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index a30790b84..8c1a4ad6f 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -357,7 +357,10 @@ struct rte_cryptodev_info {
 
 	struct {
 		unsigned max_nb_sessions;
-		/**< Maximum number of sessions supported by device. */
+		/**< Maximum number of sessions supported by device.
+		 * If 0, the device does not have any limitation in
+		 * number of sessions that can be used.
+		 */
 	} sym;
 };
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5c906cfae..73aadaced 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
-	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+	if (info.sym.max_nb_sessions != 0 &&
+			info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 		RTE_LOG(ERR, USER1, "Device does not support "
 				"at least %u sessions\n",
 				MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
-		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		if (info.sym.max_nb_sessions != 0 &&
+				info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 			RTE_LOG(ERR, USER1,
 					"Device does not support "
 					"at least %u sessions\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (7 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-06-29  8:04     ` Tomasz Duszynski
  2018-07-04 12:42     ` Akhil Goyal
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 10/16] doc: remove unneeded deprecation notice Pablo de Lara
                     ` (6 subsequent siblings)
  15 siblings, 2 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Most crypto PMDs do not have a limitation
of the number of the sessions that can be handled
internally. The value that was set before was not
actually used at all, since the sessions are created
at the application level.
Therefore, this value is not parsed from the initial
crypto parameters anymore and it is set to 0,
meaning that there is no actual limit.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst            |  5 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  5 +----
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  3 ++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |  2 --
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  5 +----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  3 ++-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |  2 --
 drivers/crypto/armv8/rte_armv8_pmd.c               |  5 +----
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  3 ++-
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |  2 --
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  3 ++-
 drivers/crypto/ccp/ccp_pmd_private.h               |  1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   | 16 +---------------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |  2 --
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  5 +----
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  3 ++-
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |  2 --
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c            |  3 ++-
 drivers/crypto/null/null_crypto_pmd.c              |  5 +----
 drivers/crypto/null/null_crypto_pmd_ops.c          |  3 ++-
 drivers/crypto/null/null_crypto_pmd_private.h      |  1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  5 +----
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  3 ++-
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |  2 --
 drivers/crypto/qat/qat_sym_pmd.c                   |  6 +++---
 drivers/crypto/qat/qat_sym_pmd.h                   |  1 -
 drivers/crypto/scheduler/scheduler_pmd.c           | 13 +------------
 drivers/crypto/scheduler/scheduler_pmd_ops.c       | 14 +++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  5 +----
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  3 ++-
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |  2 --
 drivers/crypto/virtio/virtio_cryptodev.c           |  7 +++----
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  5 +----
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  3 ++-
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |  2 --
 lib/librte_cryptodev/rte_cryptodev_pmd.c           | 12 ++----------
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  4 ----
 38 files changed, 49 insertions(+), 121 deletions(-)

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index d02bb7514..d2a74a362 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
 
 .. code-block:: console
 
-   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
+   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
 
 .. Note::
 
@@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
 .. code-block:: c
 
    rte_vdev_init("crypto_aesni_mb",
-                     "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
+                     "max_nb_queue_pairs=2,socket_id=0")
 
 All virtual Crypto devices support the following initialization parameters:
 
 * ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
-* ``max_nb_sessions`` - maximum number of sessions supported by the device
 * ``socket_id`` - socket on which to allocate the device resources on.
 
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 80360dd9c..cd5b1952b 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
 	internals->vector_mode = vector_mode;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_gcm_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 6f542137c..796ccdbd8 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -143,7 +143,8 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->capabilities = aesni_gcm_pmd_capabilities;
 
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 3d60583b0..b496377dd 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -39,8 +39,6 @@ struct aesni_gcm_private {
 	/**< Vector mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct aesni_gcm_qp {
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index bb35c66ab..bb647f736 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
 
 	internals->vector_mode = vector_mode;
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_mb_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
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 01530523f..101fdc5c6 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -387,7 +387,8 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = aesni_mb_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
index a33b2f695..9520cdf9c 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
@@ -124,8 +124,6 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** AESNI Multi buffer queue pair */
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index fbb08f729..db0d8a2a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct armv8_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index c64aef09f..b654f7528 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -154,7 +154,8 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = armv8_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
index b8966e934..7feb021db 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
+++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
@@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
 struct armv8_crypto_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** ARMv8 crypto queue pair */
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 80b75ccb0..dbe545c10 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -624,7 +624,8 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
 		if (internals->auth_opt == 1)
 			dev_info->capabilities = ccp_crypto_cap_complete;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index f4498048f..79752f687 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -40,7 +40,6 @@
 /* private data structure for each CCP crypto device */
 struct ccp_private {
 	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;	/**< Max number of sessions */
 	uint8_t crypto_num_dev;		/**< Number of working crypto devices */
 	bool auth_opt;			/**< Authentication offload option */
 	struct ccp_device *last_dev;	/**< Last working crypto device */
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 2061f465e..d70640f6d 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
 #define CCP_CRYPTODEV_PARAM_NAME		("name")
 #define CCP_CRYPTODEV_PARAM_SOCKET_ID		("socket_id")
 #define CCP_CRYPTODEV_PARAM_MAX_NB_QP		("max_nb_queue_pairs")
-#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS		("max_nb_sessions")
 #define CCP_CRYPTODEV_PARAM_AUTH_OPT		("ccp_auth_opt")
 
 const char *ccp_pmd_valid_params[] = {
 	CCP_CRYPTODEV_PARAM_NAME,
 	CCP_CRYPTODEV_PARAM_SOCKET_ID,
 	CCP_CRYPTODEV_PARAM_MAX_NB_QP,
-	CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
 	CCP_CRYPTODEV_PARAM_AUTH_OPT,
 };
 
@@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-					 CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
-					 &parse_integer_arg,
-					 &params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 					 CCP_CRYPTODEV_PARAM_SOCKET_ID,
 					 &parse_integer_arg,
@@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
 	internals->auth_opt = init_params->auth_opt;
 	internals->crypto_num_dev = cryptodev_cnt;
 
@@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct ccp_private),
 			rte_socket_id(),
-			CCP_PMD_MAX_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			CCP_PMD_MAX_QUEUE_PAIRS
 		},
 		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
 	};
@@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 		init_params.def_p.socket_id);
 	RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
 		init_params.def_p.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
-		init_params.def_p.max_nb_sessions);
 	RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
 		((init_params.auth_opt == 0) ? "CCP" : "CPU"));
 
@@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"ccp_auth_opt=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 56fa969d3..bc091c560 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2626,7 +2626,8 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa2_sec_capabilities;
-		info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
@@ -2786,7 +2787,6 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
 
 	internals = cryptodev->data->dev_private;
-	internals->max_nb_sessions = RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS;
 
 	/*
 	 * For secondary processes, we don't initialise any further as primary
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
index a9d83ebce..d015be1e9 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
@@ -23,8 +23,6 @@ struct dpaa2_sec_dev_private {
 	uint16_t token; /**< Token required by DPxxx objects */
 	unsigned int max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct dpaa2_sec_qp {
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 205dc1de7..65376b211 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -555,7 +555,6 @@ cryptodev_kasumi_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -573,8 +572,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct kasumi_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index a388dbb63..e72f2ae0b 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -126,7 +126,8 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = kasumi_pmd_capabilities;
 	}
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
index a397bee65..2b12818bc 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
@@ -36,8 +36,6 @@
 struct kasumi_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** KASUMI buffer queue pair */
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..07850098b 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -471,7 +471,8 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = mrvl_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 052b6546c..478ac0b62 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -182,7 +182,6 @@ cryptodev_null_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -195,8 +194,7 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
 		"",
 		sizeof(struct null_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index f8e5f61f1..2842498af 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -121,7 +121,8 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = null_crypto_pmd_capabilities;
 	}
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 0fd133625..d7d769f3d 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -32,7 +32,6 @@
 /** private data structure for each NULL crypto device */
 struct null_crypto_private {
 	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
-	unsigned max_nb_sessions;	/**< Max number of sessions */
 };
 
 /** NULL crypto queue pair */
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 93c6d7e5d..972e2adfe 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -1686,8 +1685,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct openssl_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
 	cryptodev_openssl_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 1cb87d59a..d194e3657 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -547,7 +547,8 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = openssl_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
index bc8dc7cdc..02ea81d5c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
+++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
@@ -62,8 +62,6 @@ enum openssl_auth_mode {
 struct openssl_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** OPENSSL crypto queue pair */
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 0bc042a75..84dd5bec8 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -72,8 +72,9 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 			qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC);
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = internals->qat_dev_capabilities;
-		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 	}
 }
 
@@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	struct rte_cryptodev_pmd_init_params init_params = {
 			.name = "",
 			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
-			.private_data_size = sizeof(struct qat_sym_dev_private),
-			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
+			.private_data_size = sizeof(struct qat_sym_dev_private)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 	struct rte_cryptodev *cryptodev;
diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
index 439aeb98a..d34328544 100644
--- a/drivers/crypto/qat/qat_sym_pmd.h
+++ b/drivers/crypto/qat/qat_sym_pmd.h
@@ -14,7 +14,6 @@
 
 /**< Intel(R) QAT Symmetric Crypto PMD device name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
-#define QAT_SYM_PMD_MAX_NB_SESSIONS	2048
 
 extern uint8_t cryptodev_qat_driver_id;
 
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 25d6409f3..32a19c106 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -31,7 +31,6 @@ struct scheduler_init_params {
 #define RTE_CRYPTODEV_VDEV_MODE			("mode")
 #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
 #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
 #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
 #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
 #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
@@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MODE,
 	RTE_CRYPTODEV_VDEV_ORDERING,
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
 	RTE_CRYPTODEV_VDEV_CORELIST
@@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
-				&parse_integer_arg,
-				&params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
 				&parse_integer_arg,
 				&params->def_p.socket_id);
@@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct scheduler_ctx),
 			rte_socket_id(),
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 		},
 		.nb_slaves = 0,
 		.mode = CDEV_SCHED_MODE_NOT_SET,
@@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
 	cryptodev_scheduler_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"slave=<name>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 147dc51e9..16a8021c8 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -321,8 +321,7 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info *dev_info)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
-	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
-			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
+	uint32_t max_nb_sess = 0;
 	uint32_t i;
 
 	if (!dev_info)
@@ -338,17 +337,18 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info slave_info;
 
 		rte_cryptodev_info_get(slave_dev_id, &slave_info);
-		max_nb_sessions = slave_info.sym.max_nb_sessions <
-				max_nb_sessions ?
-				slave_info.sym.max_nb_sessions :
-				max_nb_sessions;
+		uint32_t dev_max_sess = slave_info.sym.max_nb_sessions;
+		if (dev_max_sess != 0) {
+			if (max_nb_sess == 0 ||	dev_max_sess < max_nb_sess)
+				max_nb_sess = slave_info.sym.max_nb_sessions;
+		}
 	}
 
 	dev_info->driver_id = dev->driver_id;
 	dev_info->feature_flags = dev->feature_flags;
 	dev_info->capabilities = sched_ctx->capabilities;
 	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
-	dev_info->sym.max_nb_sessions = max_nb_sessions;
+	dev_info->sym.max_nb_sessions = max_nb_sess;
 }
 
 /** Release queue pair */
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 72751e35e..26dfbbc38 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -573,8 +572,7 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct snow3g_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index f60b47598..6f8b9e2c6 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -130,7 +130,8 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = snow3g_pmd_capabilities;
 	}
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
index eea900e0a..2c6e1a948 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
@@ -36,8 +36,6 @@
 struct snow3g_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** SNOW 3G buffer queue pair */
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 482edea1a..1da4ae871 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1411,8 +1411,8 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 		info->driver_id = cryptodev_virtio_driver_id;
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
-		info->sym.max_nb_sessions =
-			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->capabilities = hw->virtio_dev_capabilities;
 	}
 }
@@ -1425,8 +1425,7 @@ crypto_virtio_pci_probe(
 	struct rte_cryptodev_pmd_init_params init_params = {
 		.name = "",
 		.socket_id = rte_socket_id(),
-		.private_data_size = sizeof(struct virtio_crypto_hw),
-		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
+		.private_data_size = sizeof(struct virtio_crypto_hw)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a805b2278..396f25975 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -479,7 +479,6 @@ cryptodev_zuc_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -497,8 +496,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct zuc_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -541,7 +539,6 @@ static struct cryptodev_driver zuc_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 8abac8989..b39e35b9f 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -130,7 +130,8 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = zuc_pmd_capabilities;
 	}
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
index b83c4a047..2bd378ad6 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
+++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
@@ -37,8 +37,6 @@
 struct zuc_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** ZUC buffer queue pair */
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index f2aac24b7..2088ac3f3 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
-				&rte_cryptodev_pmd_parse_uint_arg,
-				&params->max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
 				&rte_cryptodev_pmd_parse_uint_arg,
@@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
 			device->driver->name, name);
 
 	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
-			"socket id: %d, max queue pairs: %u, max sessions: %u",
+			"socket id: %d, max queue pairs: %u",
 			device->driver->name, name,
-			params->socket_id, params->max_nb_queue_pairs,
-			params->max_nb_sessions);
+			params->socket_id, params->max_nb_queue_pairs);
 
 	/* allocate device structure */
 	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index db8b97665..1fb7e7d5e 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -32,18 +32,15 @@ extern "C" {
 
 
 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
-#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
 
 #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
 #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
 #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
 
 
 static const char * const cryptodev_pmd_valid_params[] = {
 	RTE_CRYPTODEV_PMD_NAME_ARG,
 	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
 };
 
@@ -56,7 +53,6 @@ struct rte_cryptodev_pmd_init_params {
 	size_t private_data_size;
 	int socket_id;
 	unsigned int max_nb_queue_pairs;
-	unsigned int max_nb_sessions;
 };
 
 /** Global structure used for maintaining state of allocated crypto devices */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 10/16] doc: remove unneeded deprecation notice
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (8 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-07-04 11:29     ` Akhil Goyal
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
                     ` (5 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

In release 18.05, a deprecation notice to remove the `sym`
structure in the cryptodev info structure was sent.
However, only one of the fields inside the structure will
be removed, so the notice is not actually correct.
In any case, it needs to be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index b71080bb8..dc014da21 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -101,9 +101,6 @@ Deprecation Notices
 * cryptodev: The following changes will be made in the library
   for 18.08:
 
-  - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
-    containing fields not relevant anymore since the session mempool
-    is not internal in the crypto device anymore.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (9 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 10/16] doc: remove unneeded deprecation notice Pablo de Lara
@ 2018-06-28  0:52   ` Pablo de Lara
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
                     ` (4 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:52 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  4 ---
 doc/guides/rel_notes/release_18_08.rst         |  5 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 -----------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 16 ----------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 22 -------------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 22 -------------
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 -----------
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 28 ----------------
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 -----------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 -----------
 drivers/crypto/qat/qat_sym_pmd.c               |  2 --
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 18 -----------
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 -----------
 drivers/crypto/virtio/virtio_cryptodev.c       |  2 --
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 -----------
 lib/librte_cryptodev/rte_cryptodev.c           | 44 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 37 ----------------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 26 ---------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 21 files changed, 5 insertions(+), 367 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Functions ``rte_cryptodev_queue_pair_start()`` and
-    ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
-    and removed in 18.08, as there are no drivers doing anything useful
-    with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
   - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2b994ee78..cfb2885a1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
   Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
   supports an unlimited number of sessions.
 
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+  - ``rte_cryptodev_queue_pair_start``
+  - ``rte_cryptodev_queue_pair_stop``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 796ccdbd8..e24453a7e 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -243,22 +243,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -340,8 +324,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 
 		.queue_pair_setup	= aesni_gcm_pmd_qp_setup,
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
-		.queue_pair_start	= aesni_gcm_pmd_qp_start,
-		.queue_pair_stop	= aesni_gcm_pmd_qp_stop,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
 		.session_get_size	= aesni_gcm_pmd_session_get_size,
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 101fdc5c6..6eb37a5bf 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 
 		.queue_pair_setup	= aesni_mb_pmd_qp_setup,
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
-		.queue_pair_start	= aesni_mb_pmd_qp_start,
-		.queue_pair_stop	= aesni_mb_pmd_qp_stop,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
 		.session_get_size	= aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 
 		.queue_pair_setup	= armv8_crypto_pmd_qp_setup,
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
-		.queue_pair_start	= armv8_crypto_pmd_qp_start,
-		.queue_pair_stop	= armv8_crypto_pmd_qp_stop,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
 		.session_get_size	= armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
-		 uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
-		uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
 static uint32_t
 ccp_pmd_qp_count(struct rte_cryptodev *dev)
 {
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
 
 		.queue_pair_setup	= ccp_pmd_qp_setup,
 		.queue_pair_release	= ccp_pmd_qp_release,
-		.queue_pair_start	= ccp_pmd_qp_start,
-		.queue_pair_stop	= ccp_pmd_qp_stop,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
 		.session_get_size	= ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return retcode;
 }
 
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			   __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.stats_reset	      = dpaa2_sec_stats_reset,
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
-	.queue_pair_start     = dpaa2_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa2_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
 	.session_get_size     = dpaa2_sec_session_get_size,
 	.session_configure    = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			 __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.dev_infos_get        = dpaa_sec_dev_infos_get,
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
-	.queue_pair_start     = dpaa_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index e72f2ae0b..4174f1f80 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 
 		.queue_pair_setup   = kasumi_pmd_qp_setup,
 		.queue_pair_release = kasumi_pmd_qp_release,
-		.queue_pair_start   = kasumi_pmd_qp_start,
-		.queue_pair_stop    = kasumi_pmd_qp_stop,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
 		.session_get_size   = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 07850098b..8710ba3b7 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -596,32 +596,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs (PMD ops callback).
  *
  * @param dev Pointer to the device structure.
@@ -739,8 +713,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 
 		.queue_pair_setup	= mrvl_crypto_pmd_qp_setup,
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
-		.queue_pair_start	= mrvl_crypto_pmd_qp_start,
-		.queue_pair_stop	= mrvl_crypto_pmd_qp_stop,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
 		.session_get_size	= mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 2842498af..e43fba7db 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -240,22 +240,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -336,8 +320,6 @@ struct rte_cryptodev_ops pmd_ops = {
 
 		.queue_pair_setup	= null_crypto_pmd_qp_setup,
 		.queue_pair_release	= null_crypto_pmd_qp_release,
-		.queue_pair_start	= null_crypto_pmd_qp_start,
-		.queue_pair_stop	= null_crypto_pmd_qp_stop,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
 		.session_get_size	= null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index d194e3657..554177d20 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 
 		.queue_pair_setup	= openssl_pmd_qp_setup,
 		.queue_pair_release	= openssl_pmd_qp_release,
-		.queue_pair_start	= openssl_pmd_qp_start,
-		.queue_pair_stop	= openssl_pmd_qp_stop,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
 		.session_get_size	= openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.stats_reset		= qat_sym_stats_reset,
 		.queue_pair_setup	= qat_sym_qp_setup,
 		.queue_pair_release	= qat_sym_qp_release,
-		.queue_pair_start	= NULL,
-		.queue_pair_stop	= NULL,
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 16a8021c8..f363e3257 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 
 		.queue_pair_setup	= scheduler_pmd_qp_setup,
 		.queue_pair_release	= scheduler_pmd_qp_release,
-		.queue_pair_start	= scheduler_pmd_qp_start,
-		.queue_pair_stop	= scheduler_pmd_qp_stop,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
 		.session_get_size	= scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 6f8b9e2c6..fe882c366 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 
 		.queue_pair_setup   = snow3g_pmd_qp_setup,
 		.queue_pair_release = snow3g_pmd_qp_release,
-		.queue_pair_start   = snow3g_pmd_qp_start,
-		.queue_pair_stop    = snow3g_pmd_qp_stop,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
 		.session_get_size   = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1da4ae871..0be435c8c 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 
 	.queue_pair_setup                = virtio_crypto_qp_setup,
 	.queue_pair_release              = virtio_crypto_qp_release,
-	.queue_pair_start                = NULL,
-	.queue_pair_stop                 = NULL,
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index b39e35b9f..79326d8f5 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 
 		.queue_pair_setup   = zuc_pmd_qp_setup,
 		.queue_pair_release = zuc_pmd_qp_release,
-		.queue_pair_start   = zuc_pmd_qp_start,
-		.queue_pair_stop    = zuc_pmd_qp_stop,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
 		.session_get_size   = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
 	return 0;
 }
 
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
 int
 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 8c1a4ad6f..c94571ac1 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -574,43 +574,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
 		struct rte_mempool *session_pool);
 
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to start. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_crypto_dev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to stop. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_cryptodev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
 /**
  * Get the number of queue pairs on a specific crypto device
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1fb7e7d5e..641dd1369 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -184,28 +184,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
 typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
 				struct rte_cryptodev_info *dev_info);
 
-/**
- * Start queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
 /**
  * Setup a queue pair for a device.
  *
@@ -344,10 +322,6 @@ struct rte_cryptodev_ops {
 	/**< Set up a device queue pair. */
 	cryptodev_queue_pair_release_t queue_pair_release;
 	/**< Release a queue pair. */
-	cryptodev_queue_pair_start_t queue_pair_start;
-	/**< Start a queue pair. */
-	cryptodev_queue_pair_stop_t queue_pair_stop;
-	/**< Stop a queue pair. */
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
 	rte_cryptodev_stop;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
-	rte_cryptodev_queue_pair_start;
-	rte_cryptodev_queue_pair_stop;
 	rte_crypto_op_pool_create;
 
 	local: *;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (10 preceding siblings ...)
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-06-28  0:53   ` Pablo de Lara
  2018-07-04 11:31     ` Akhil Goyal
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
                     ` (3 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:53 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  6 ------
 doc/guides/rel_notes/release_18_08.rst         |  8 ++++++++
 lib/librte_cryptodev/rte_cryptodev.c           | 12 ------------
 lib/librte_cryptodev/rte_cryptodev.h           | 25 -------------------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 5 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
     with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
-  - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
-    It will be removed in 18.08.
-  - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
-    It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index cfb2885a1..e482d3d5f 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
 
+* cryptodev: Following functions were deprecated and are replaced by
+  other functions in 18.08:
+
+  - ``rte_cryptodev_get_header_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_header_session_size``
+  - ``rte_cryptodev_get_private_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_private_session_size``
+
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 	return 0;
 }
 
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
-	return rte_cryptodev_sym_get_header_session_size();
-}
-
 unsigned int
 rte_cryptodev_sym_get_header_session_size(void)
 {
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
 	return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
 }
 
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
-	return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index c94571ac1..fc491a83b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -906,31 +906,6 @@ int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 			struct rte_cryptodev_sym_session *sess);
 
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- *   Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param	dev_id		The device identifier.
- *
- * @return
- *   - Size of the private data, if successful
- *   - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
 /**
  * Get the size of the header session, for all registered drivers.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
 	rte_cryptodev_driver_id_get;
 	rte_cryptodev_driver_name_get;
 	rte_cryptodev_get_aead_algo_enum;
-	rte_cryptodev_get_header_session_size;
-	rte_cryptodev_get_private_session_size;
 	rte_cryptodev_sym_capability_check_aead;
 	rte_cryptodev_sym_session_init;
 	rte_cryptodev_sym_session_clear;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (11 preceding siblings ...)
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-06-28  0:53   ` Pablo de Lara
  2018-07-04 12:57     ` Akhil Goyal
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 14/16] cryptodev: remove attach/detach session API Pablo de Lara
                     ` (2 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:53 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.

Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst        |  2 --
 doc/guides/rel_notes/release_18_08.rst      |  8 +++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c    |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  6 +++-
 drivers/crypto/dpaa_sec/dpaa_sec.c          |  6 +++-
 drivers/crypto/null/null_crypto_pmd.c       |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c    |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c            |  6 +++-
 lib/librte_cryptodev/rte_cryptodev.c        | 12 ++++++--
 lib/librte_cryptodev/rte_cryptodev.h        | 46 +++++++++++++++++++----------
 test/test/test_cryptodev.c                  | 31 +++++++++++++------
 test/test/test_cryptodev_blockcipher.c      | 21 ++++++++++---
 12 files changed, 106 insertions(+), 38 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
-    so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..2a136d88c 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
   - ``rte_cryptodev_get_private_session_size`` is replaced with
     ``rte_cryptodev_sym_get_private_session_size``
 
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+  replaced with the following more explicit flags:
+  - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
+  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index cd5b1952b..03917f220 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
 
 	switch (vector_mode) {
 	case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..4daee5f59 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..8ad25f2be 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 478ac0b62..224ba7233 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -177,7 +177,7 @@ cryptodev_null_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL;
 
 	internals = dev->data->dev_private;
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 972e2adfe..94b6e2de9 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
 
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..629904e2f 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..15110661b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		return "CPU_AESNI";
 	case RTE_CRYPTODEV_FF_HW_ACCELERATED:
 		return "HW_ACCELERATED";
-	case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
-		return "MBUF_SCATTER_GATHER";
+	case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+		return "IN_PLACE_SGL";
+	case RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT:
+		return "OUT_OF_PLACE_SGL_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT:
+		return "OUT_OF_PLACE_SGL_IN_FB_OUT";
+	case RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT:
+		return "OUT_OF_PLACE_FB_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT:
+		return "OUT_OF_PLACE_FB_IN_FB_OUT";
 	case RTE_CRYPTODEV_FF_CPU_NEON:
 		return "CPU_NEON";
 	case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index fc491a83b..6dc7107bb 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -300,31 +300,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
  *
  * Keep these flags synchronised with rte_cryptodev_get_feature_name()
  */
-#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO	(1ULL << 0)
+#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO		(1ULL << 0)
 /**< Symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO	(1ULL << 1)
+#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO		(1ULL << 1)
 /**< Asymmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING	(1ULL << 2)
+#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING		(1ULL << 2)
 /**< Chaining symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_CPU_SSE		(1ULL << 3)
+#define	RTE_CRYPTODEV_FF_CPU_SSE			(1ULL << 3)
 /**< Utilises CPU SIMD SSE instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX		(1ULL << 4)
+#define	RTE_CRYPTODEV_FF_CPU_AVX			(1ULL << 4)
 /**< Utilises CPU SIMD AVX instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX2		(1ULL << 5)
+#define	RTE_CRYPTODEV_FF_CPU_AVX2			(1ULL << 5)
 /**< Utilises CPU SIMD AVX2 instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AESNI		(1ULL << 6)
+#define	RTE_CRYPTODEV_FF_CPU_AESNI			(1ULL << 6)
 /**< Utilises CPU AES-NI instructions */
-#define	RTE_CRYPTODEV_FF_HW_ACCELERATED		(1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define	RTE_CRYPTODEV_FF_CPU_AVX512		(1ULL << 8)
+#define	RTE_CRYPTODEV_FF_HW_ACCELERATED			(1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define	RTE_CRYPTODEV_FF_CPU_AVX512			(1ULL << 8)
 /**< Utilises CPU SIMD AVX512 instructions */
-#define	RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER	(1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define	RTE_CRYPTODEV_FF_CPU_NEON		(1ULL << 10)
+#define	RTE_CRYPTODEV_FF_IN_PLACE_SGL			(1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT	(1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT	(1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT	(1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT	(1ULL << 13)
+/**< Out-of-place flat buffers (FB) are supported in input and output */
+#define	RTE_CRYPTODEV_FF_CPU_NEON			(1ULL << 14)
 /**< Utilises CPU NEON instructions */
-#define	RTE_CRYPTODEV_FF_CPU_ARM_CE		(1ULL << 11)
+#define	RTE_CRYPTODEV_FF_CPU_ARM_CE			(1ULL << 15)
 /**< Utilises ARM CPU Cryptographic Extensions */
-#define	RTE_CRYPTODEV_FF_SECURITY		(1ULL << 12)
+#define	RTE_CRYPTODEV_FF_SECURITY			(1ULL << 16)
 /**< Support Security Protocol Processing */
 
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..84fcf0651 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 		return -ENOTSUP;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
-		return -ENOTSUP;
+		return 0;
 	}
 
 	plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..7a11b3af8 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
 		rte_cryptodev_info_get(dev_id, &dev_info);
-		if (!(dev_info.feature_flags &
-				RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-			printf("Device doesn't support scatter-gather. "
+		uint64_t feat_flags = dev_info.feature_flags;
+		uint64_t oop_flag = RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;
+
+		if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+			if (!(feat_flags & oop_flag)) {
+				printf("Device doesn't support out-of-place "
+					"scatter-gather in input mbuf. "
+					"Test Skipped.\n");
+				return 0;
+			}
+		} else {
+			if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+				printf("Device doesn't support in-place "
+					"scatter-gather mbufs. "
 					"Test Skipped.\n");
-			return 0;
+				return 0;
+			}
 		}
+
 		nb_segs = 3;
 	}
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 14/16] cryptodev: remove attach/detach session API
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (12 preceding siblings ...)
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-06-28  0:53   ` Pablo de Lara
  2018-07-04 11:33     ` Akhil Goyal
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:53 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

As announced in the previous release,
The API to attach/dettach a session to a queue pair
is removed, as it was only used in DPAA, and it is not
actually needed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst           |  8 ----
 doc/guides/rel_notes/release_18_08.rst         |  2 +
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 32 +--------------
 drivers/crypto/virtio/virtio_cryptodev.c       |  4 +-
 lib/librte_cryptodev/rte_cryptodev.c           | 54 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 36 -----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 30 --------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 -
 8 files changed, 4 insertions(+), 164 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 62d635b74..8bdaaaf5d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -97,11 +97,3 @@ Deprecation Notices
   - ``rte_pdump_set_socket_dir`` will be removed;
   - The parameter, ``path``, of ``rte_pdump_init`` will be removed;
   - The enum ``rte_pdump_socktype`` will be removed.
-
-* cryptodev: The following changes will be made in the library
-  for 18.08:
-
-  - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
-    ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
-    18.05 and removed in 18.08, as there are no drivers doing anything useful
-    with them.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2a136d88c..ba824c094 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -69,6 +69,8 @@ API Changes
 
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
+  - ``rte_cryptodev_queue_pair_attach_sym_session``
+  - ``rte_cryptodev_queue_pair_detach_sym_session``
 
 * cryptodev: Following functions were deprecated and are replaced by
   other functions in 18.08:
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 8ad25f2be..3de7df93c 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1734,34 +1734,6 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess)
 	return ret;
 }
 
-static int
-dpaa_sec_qp_attach_sess(struct rte_cryptodev *dev __rte_unused,
-			uint16_t qp_id __rte_unused,
-			void *ses __rte_unused)
-{
-	PMD_INIT_FUNC_TRACE();
-	return 0;
-}
-
-static int
-dpaa_sec_qp_detach_sess(struct rte_cryptodev *dev,
-			uint16_t qp_id  __rte_unused,
-			void *ses)
-{
-	dpaa_sec_session *sess = ses;
-	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
-
-	PMD_INIT_FUNC_TRACE();
-
-	if (sess->inq)
-		dpaa_sec_detach_rxq(qi, sess->inq);
-	sess->inq = NULL;
-
-	sess->qp = NULL;
-
-	return 0;
-}
-
 static int
 dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 			    struct rte_crypto_sym_xform *xform,	void *sess)
@@ -2210,9 +2182,7 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear,
-	.qp_attach_session    = dpaa_sec_qp_attach_sess,
-	.qp_detach_session    = dpaa_sec_qp_detach_sess,
+	.session_clear        = dpaa_sec_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 0be435c8c..f7021b38b 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -520,9 +520,7 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	/* Crypto related operations */
 	.session_get_size	= virtio_crypto_sym_get_session_private_size,
 	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session,
-	.qp_attach_session = NULL,
-	.qp_detach_session = NULL
+	.session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 15110661b..8c3f324c0 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1095,60 +1095,6 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 	return sess;
 }
 
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_attach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_attach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to attach qp: %d with session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_detach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_detach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to detach qp: %d from session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 		struct rte_cryptodev_sym_session *sess)
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 6dc7107bb..32a210b00 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -945,42 +945,6 @@ rte_cryptodev_sym_get_header_session_size(void);
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id);
 
-/**
- * @deprecated
- * Attach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session will be attached.
- * @param	qp_id		Queue pair to which the session will be attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
-/**
- * @deprecated
- * Detach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session is attached.
- * @param	qp_id		Queue pair to which the session is attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
 /**
  * Provide driver identifier.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 641dd1369..ec4f1ecfb 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -278,32 +278,6 @@ typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
 typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess);
 
-/**
- * Optional API for drivers to attach sessions with queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for attaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_attach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
-/**
- * Optional API for drivers to detach sessions from queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for detaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_detach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
 /** Crypto device operations function pointer table */
 struct rte_cryptodev_ops {
 	cryptodev_configure_t dev_configure;	/**< Configure device. */
@@ -331,10 +305,6 @@ struct rte_cryptodev_ops {
 	/**< Configure a Crypto session. */
 	cryptodev_sym_free_session_t session_clear;
 	/**< Clear a Crypto sessions private data. */
-	cryptodev_sym_queue_pair_attach_session_t qp_attach_session;
-	/**< Attach session to queue pair. */
-	cryptodev_sym_queue_pair_detach_session_t qp_detach_session;
-	/**< Detach session from queue pair. */
 };
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 0ab6d5195..77abd8ddc 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -50,8 +50,6 @@ DPDK_17.05 {
 
 	rte_cryptodev_get_auth_algo_enum;
 	rte_cryptodev_get_cipher_algo_enum;
-	rte_cryptodev_queue_pair_attach_sym_session;
-	rte_cryptodev_queue_pair_detach_sym_session;
 
 } DPDK_17.02;
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 15/16] cryptodev: rename PMD symmetric session API
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (13 preceding siblings ...)
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 14/16] cryptodev: remove attach/detach session API Pablo de Lara
@ 2018-06-28  0:53   ` Pablo de Lara
  2018-07-04 11:36     ` Akhil Goyal
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:53 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The PMD specific API to configure, clear and
obtain session private size is renamed, including
the word _sym_ to clarify that it is API
for symmetric sessions, so there will not be any
conflicts for asymmetric and other type of sessions
in the future.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c       |  6 +++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 ++++++++---------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     |  8 ++++----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 ++++++++---------
 drivers/crypto/armv8/rte_armv8_pmd.c           |  6 +++---
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 ++++++++---------
 drivers/crypto/ccp/ccp_crypto.c                | 28 +++++++++++++-------------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 18 ++++++++---------
 drivers/crypto/ccp/rte_ccp_pmd.c               |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 20 +++++++++---------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 20 +++++++++---------
 drivers/crypto/kasumi/rte_kasumi_pmd.c         |  6 +++---
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 ++++++++---------
 drivers/crypto/mvsam/rte_mrvl_pmd.c            |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 18 ++++++++---------
 drivers/crypto/null/null_crypto_pmd.c          |  6 +++---
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 ++++++++---------
 drivers/crypto/openssl/rte_openssl_pmd.c       |  6 +++---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 ++++++++---------
 drivers/crypto/qat/qat_sym.c                   |  2 +-
 drivers/crypto/qat/qat_sym.h                   |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c               |  6 +++---
 drivers/crypto/qat/qat_sym_session.c           |  6 +++---
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 14 ++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c         |  6 +++---
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 ++++++++---------
 drivers/crypto/virtio/virtio_cryptodev.c       | 10 ++++-----
 drivers/crypto/virtio/virtio_rxtx.c            |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c               |  6 +++---
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 ++++++++---------
 lib/librte_cryptodev/rte_cryptodev.c           | 11 +++++-----
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 10 ++++-----
 32 files changed, 184 insertions(+), 183 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 03917f220..16f6d64cc 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -127,7 +127,7 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(sym_op->session != NULL))
 			sess = (struct aesni_gcm_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					sym_op->session,
 					cryptodev_driver_id);
 	} else  {
@@ -149,8 +149,8 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(sym_op->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(sym_op->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index e24453a7e..72a63b924 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -252,14 +252,14 @@ aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned
-aesni_gcm_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_gcm_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_gcm_session);
 }
 
 /** Configure a aesni gcm session from a crypto xform chain */
 static int
-aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+aesni_gcm_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -288,7 +288,7 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -296,17 +296,17 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_gcm_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_gcm_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct aesni_gcm_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -326,9 +326,9 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
-		.session_get_size	= aesni_gcm_pmd_session_get_size,
-		.session_configure	= aesni_gcm_pmd_session_configure,
-		.session_clear		= aesni_gcm_pmd_session_clear
+		.sym_session_get_size	= aesni_gcm_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_gcm_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_gcm_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_gcm_pmd_ops = &aesni_gcm_pmd_ops;
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index bb647f736..0d6597924 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -458,7 +458,7 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct aesni_mb_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -480,8 +480,8 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
@@ -658,7 +658,7 @@ static inline struct rte_crypto_op *
 post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
 {
 	struct rte_crypto_op *op = (struct rte_crypto_op *)job->user_data;
-	struct aesni_mb_session *sess = get_session_private_data(
+	struct aesni_mb_session *sess = get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
 
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 6eb37a5bf..02f1b6a48 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -518,14 +518,14 @@ aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni multi-buffer session structure */
 static unsigned
-aesni_mb_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_mb_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_mb_session);
 }
 
 /** Configure a aesni multi-buffer session from a crypto xform chain */
 static int
-aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -555,7 +555,7 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -563,17 +563,17 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_mb_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct aesni_mb_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -593,9 +593,9 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
-		.session_get_size	= aesni_mb_pmd_session_get_size,
-		.session_configure	= aesni_mb_pmd_session_configure,
-		.session_clear		= aesni_mb_pmd_session_clear
+		.sym_session_get_size	= aesni_mb_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_mb_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_mb_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops = &aesni_mb_pmd_ops;
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index db0d8a2a9..9d15fee53 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -502,7 +502,7 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 		/* get existing session */
 		if (likely(op->sym->session != NULL)) {
 			sess = (struct armv8_crypto_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 		}
@@ -526,8 +526,8 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 5e8a5a292..ae03117ea 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -267,14 +267,14 @@ armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-armv8_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+armv8_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct armv8_crypto_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -302,7 +302,7 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -310,17 +310,17 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-armv8_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct armv8_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -340,9 +340,9 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
-		.session_get_size	= armv8_crypto_pmd_session_get_size,
-		.session_configure	= armv8_crypto_pmd_session_configure,
-		.session_clear		= armv8_crypto_pmd_session_clear
+		.sym_session_get_size	= armv8_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= armv8_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= armv8_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_armv8_crypto_pmd_ops = &armv8_crypto_pmd_ops;
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 3ce0f39f3..19ae9153d 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1566,7 +1566,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
 	void *append_ptr;
 	uint8_t *addr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 	addr = session->auth.pre_compute;
@@ -1739,7 +1739,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
 	void *append_ptr;
 	uint64_t auth_msg_bits;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -1828,7 +1828,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
 	uint32_t tail;
 	phys_addr_t src_addr, dest_addr, ctx_paddr, dest_addr_t;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -1968,7 +1968,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
 	uint32_t tail;
 	phys_addr_t src_addr, dest_addr, ctx_paddr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2036,7 +2036,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
 	phys_addr_t src_addr, dest_addr, key_addr;
 	int length, non_align_len;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 	key_addr = rte_mem_virt2phy(session->auth.key_ccp);
@@ -2188,7 +2188,7 @@ ccp_perform_aes(struct rte_crypto_op *op,
 	phys_addr_t src_addr, dest_addr, key_addr;
 	uint8_t *iv;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 	function.raw = 0;
@@ -2276,7 +2276,7 @@ ccp_perform_3des(struct rte_crypto_op *op,
 	uint8_t *iv;
 	phys_addr_t src_addr, dest_addr, key_addr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2379,7 +2379,7 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
 	phys_addr_t digest_dest_addr;
 	int length, non_align_len;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
@@ -2546,7 +2546,7 @@ ccp_crypto_cipher(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 
@@ -2584,7 +2584,7 @@ ccp_crypto_auth(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2654,7 +2654,7 @@ ccp_crypto_aead(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2711,7 +2711,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
 	b_info->head_offset = (uint32_t)(cmd_q->qbase_phys_addr + cmd_q->qidx *
 					 Q_DESC_SIZE);
 	for (i = 0; i < nb_ops; i++) {
-		session = (struct ccp_session *)get_session_private_data(
+		session = (struct ccp_session *)get_sym_session_private_data(
 						 op[i]->sym->session,
 						 ccp_cryptodev_driver_id);
 		switch (session->cmd_id) {
@@ -2787,7 +2787,7 @@ static inline void ccp_auth_dq_prepare(struct rte_crypto_op *op)
 	int offset, digest_offset;
 	uint8_t digest_le[64];
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2863,7 +2863,7 @@ ccp_prepare_ops(struct ccp_qp *qp,
 
 	for (i = 0; i < min_ops; i++) {
 		op_d[i] = b_info->op[b_info->op_idx++];
-		session = (struct ccp_session *)get_session_private_data(
+		session = (struct ccp_session *)get_sym_session_private_data(
 						 op_d[i]->sym->session,
 						ccp_cryptodev_driver_id);
 		switch (session->cmd_id) {
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 1cb944406..6984913f1 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -755,13 +755,13 @@ ccp_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static unsigned
-ccp_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+ccp_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct ccp_session);
 }
 
 static int
-ccp_pmd_session_configure(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_configure(struct rte_cryptodev *dev,
 			  struct rte_crypto_sym_xform *xform,
 			  struct rte_cryptodev_sym_session *sess,
 			  struct rte_mempool *mempool)
@@ -788,25 +788,25 @@ ccp_pmd_session_configure(struct rte_cryptodev *dev,
 		rte_mempool_put(mempool, sess_private_data);
 		return ret;
 	}
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 				 sess_private_data);
 
 	return 0;
 }
 
 static void
-ccp_pmd_session_clear(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		      struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	if (sess_priv) {
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
 		rte_mempool_put(sess_mp, sess_priv);
 		memset(sess_priv, 0, sizeof(struct ccp_session));
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 	}
 }
 
@@ -825,9 +825,9 @@ struct rte_cryptodev_ops ccp_ops = {
 		.queue_pair_release	= ccp_pmd_qp_release,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
-		.session_get_size	= ccp_pmd_session_get_size,
-		.session_configure	= ccp_pmd_session_configure,
-		.session_clear		= ccp_pmd_session_clear,
+		.sym_session_get_size	= ccp_pmd_sym_session_get_size,
+		.sym_session_configure	= ccp_pmd_sym_session_configure,
+		.sym_session_clear	= ccp_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *ccp_pmd_ops = &ccp_ops;
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index d70640f6d..92d8a9559 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -160,7 +160,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
 			return NULL;
 
 		sess = (struct ccp_session *)
-			get_session_private_data(
+			get_sym_session_private_data(
 				op->sym->session,
 				ccp_cryptodev_driver_id);
 	} else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
@@ -183,7 +183,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session,
+		set_sym_session_private_data(op->sym->session,
 					 ccp_cryptodev_driver_id,
 					 _sess_private_data);
 	}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 4daee5f59..a0df93666 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1080,7 +1080,7 @@ build_sec_fd(struct rte_crypto_op *op,
 	PMD_INIT_FUNC_TRACE();
 
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
-		sess = (dpaa2_sec_session *)get_session_private_data(
+		sess = (dpaa2_sec_session *)get_sym_session_private_data(
 				op->sym->session, cryptodev_driver_id);
 	else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
 		sess = (dpaa2_sec_session *)get_sec_session_private_data(
@@ -1481,7 +1481,7 @@ dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned int
-dpaa2_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa2_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -2436,7 +2436,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
 }
 
 static int
-dpaa2_sec_session_configure(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -2457,7 +2457,7 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -2465,12 +2465,12 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa2_sec_session_clear(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	PMD_INIT_FUNC_TRACE();
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 	dpaa2_sec_session *s = (dpaa2_sec_session *)sess_priv;
 
 	if (sess_priv) {
@@ -2479,7 +2479,7 @@ dpaa2_sec_session_clear(struct rte_cryptodev *dev,
 		rte_free(s->auth_key.data);
 		memset(sess, 0, sizeof(dpaa2_sec_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -2697,9 +2697,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
-	.session_get_size     = dpaa2_sec_session_get_size,
-	.session_configure    = dpaa2_sec_session_configure,
-	.session_clear        = dpaa2_sec_session_clear,
+	.sym_session_get_size     = dpaa2_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa2_sec_sym_session_configure,
+	.sym_session_clear        = dpaa2_sec_sym_session_clear,
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 3de7df93c..b2108a3dd 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1416,7 +1416,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
 			switch (op->sess_type) {
 			case RTE_CRYPTO_OP_WITH_SESSION:
 				ses = (dpaa_sec_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
 				break;
@@ -1596,7 +1596,7 @@ dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of session structure */
 static unsigned int
-dpaa_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -1811,7 +1811,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 }
 
 static int
-dpaa_sec_session_configure(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -1835,7 +1835,7 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 
@@ -1844,12 +1844,12 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa_sec_session_clear(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1863,7 +1863,7 @@ dpaa_sec_session_clear(struct rte_cryptodev *dev,
 		rte_free(s->cipher_key.data);
 		rte_free(s->auth_key.data);
 		memset(s, 0, sizeof(dpaa_sec_session));
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -2180,9 +2180,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
-	.session_get_size     = dpaa_sec_session_get_size,
-	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear
+	.sym_session_get_size     = dpaa_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa_sec_sym_session_configure,
+	.sym_session_clear        = dpaa_sec_sym_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 65376b211..e9363cf29 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -131,7 +131,7 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct kasumi_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -153,8 +153,8 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 4174f1f80..287f5356a 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -238,14 +238,14 @@ kasumi_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the KASUMI session structure */
 static unsigned
-kasumi_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+kasumi_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct kasumi_session);
 }
 
 /** Configure a KASUMI session from a crypto xform chain */
 static int
-kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+kasumi_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -273,7 +273,7 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -281,17 +281,17 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-kasumi_pmd_session_clear(struct rte_cryptodev *dev,
+kasumi_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct kasumi_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -311,9 +311,9 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 		.queue_pair_release = kasumi_pmd_qp_release,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
-		.session_get_size   = kasumi_pmd_session_get_size,
-		.session_configure  = kasumi_pmd_session_configure,
-		.session_clear      = kasumi_pmd_session_clear
+		.sym_session_get_size   = kasumi_pmd_sym_session_get_size,
+		.sym_session_configure  = kasumi_pmd_sym_session_configure,
+		.sym_session_clear      = kasumi_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_kasumi_pmd_ops = &kasumi_pmd_ops;
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index a7f5389ee..73eff7573 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -447,7 +447,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,
 		return -EINVAL;
 	}
 
-	sess = (struct mrvl_crypto_session *)get_session_private_data(
+	sess = (struct mrvl_crypto_session *)get_sym_session_private_data(
 			op->sym->session, cryptodev_driver_id);
 	if (unlikely(sess == NULL)) {
 		MRVL_CRYPTO_LOG_ERR("Session was not created for this device");
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 8710ba3b7..6884e07c2 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -613,7 +613,7 @@ mrvl_crypto_pmd_qp_count(struct rte_cryptodev *dev)
  * @returns Size of Marvell crypto session.
  */
 static unsigned
-mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
+mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
 {
 	return sizeof(struct mrvl_crypto_session);
 }
@@ -626,7 +626,7 @@ mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
  * @returns 0 upon success, negative value otherwise.
  */
 static int
-mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -654,7 +654,7 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id, sess_private_data);
+	set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
 
 	mrvl_sess = (struct mrvl_crypto_session *)sess_private_data;
 	if (sam_session_create(&mrvl_sess->sam_sess_params,
@@ -673,12 +673,12 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
  * @returns 0. Always.
  */
 static void
-mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
@@ -692,7 +692,7 @@ mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
 
 		memset(sess, 0, sizeof(struct mrvl_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -715,9 +715,9 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
-		.session_get_size	= mrvl_crypto_pmd_session_get_size,
-		.session_configure	= mrvl_crypto_pmd_session_configure,
-		.session_clear		= mrvl_crypto_pmd_session_clear
+		.sym_session_get_size	= mrvl_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= mrvl_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= mrvl_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops = &mrvl_crypto_pmd_ops;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 224ba7233..ea4182d20 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -78,7 +78,7 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(sym_op->session != NULL))
 			sess = (struct null_crypto_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					sym_op->session, cryptodev_driver_id);
 	} else {
 		void *_sess = NULL;
@@ -99,8 +99,8 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(sym_op->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	return sess;
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index e43fba7db..78431752b 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -249,14 +249,14 @@ null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the NULL crypto session structure */
 static unsigned
-null_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+null_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct null_crypto_session);
 }
 
 /** Configure a null crypto session from a crypto xform chain */
 static int
-null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+null_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -284,7 +284,7 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -292,17 +292,17 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-null_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+null_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct null_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -322,9 +322,9 @@ struct rte_cryptodev_ops pmd_ops = {
 		.queue_pair_release	= null_crypto_pmd_qp_release,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
-		.session_get_size	= null_crypto_pmd_session_get_size,
-		.session_configure	= null_crypto_pmd_session_configure,
-		.session_clear		= null_crypto_pmd_session_clear
+		.sym_session_get_size	= null_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= null_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= null_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *null_crypto_pmd_ops = &pmd_ops;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 94b6e2de9..1e73ef44a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -736,7 +736,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 		/* get existing session */
 		if (likely(op->sym->session != NULL))
 			sess = (struct openssl_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -759,8 +759,8 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (sess == NULL)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 554177d20..2608b63f8 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -657,14 +657,14 @@ openssl_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-openssl_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct openssl_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -692,7 +692,7 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -701,18 +701,18 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-openssl_pmd_session_clear(struct rte_cryptodev *dev,
+openssl_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		openssl_reset_session(sess_priv);
 		memset(sess_priv, 0, sizeof(struct openssl_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -732,9 +732,9 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 		.queue_pair_release	= openssl_pmd_qp_release,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
-		.session_get_size	= openssl_pmd_session_get_size,
-		.session_configure	= openssl_pmd_session_configure,
-		.session_clear		= openssl_pmd_session_clear
+		.sym_session_get_size	= openssl_pmd_sym_session_get_size,
+		.sym_session_configure	= openssl_pmd_sym_session_configure,
+		.sym_session_clear	= openssl_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_openssl_pmd_ops = &openssl_pmd_ops;
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 17d63eb1e..aa6eeb0c0 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -174,7 +174,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		return -EINVAL;
 	}
 
-	ctx = (struct qat_sym_session *)get_session_private_data(
+	ctx = (struct qat_sym_session *)get_sym_session_private_data(
 			op->sym->session, cryptodev_qat_driver_id);
 
 	if (unlikely(ctx == NULL)) {
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index d425892f4..e4e1ae89c 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -143,7 +143,7 @@ qat_sym_process_response(void **op, uint8_t *resp)
 		rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
 	} else {
 		struct qat_sym_session *sess = (struct qat_sym_session *)
-						get_session_private_data(
+						get_sym_session_private_data(
 						rx_op->sym->session,
 						cryptodev_qat_driver_id);
 
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 629904e2f..2546e836f 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -205,9 +205,9 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
-		.session_get_size	= qat_sym_session_get_private_size,
-		.session_configure	= qat_sym_session_configure,
-		.session_clear		= qat_sym_session_clear
+		.sym_session_get_size	= qat_sym_session_get_private_size,
+		.sym_session_configure	= qat_sym_session_configure,
+		.sym_session_clear	= qat_sym_session_clear
 };
 
 static uint16_t
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index dc1c20044..4d975ae07 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -112,7 +112,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 	struct qat_sym_session *s = (struct qat_sym_session *)sess_priv;
 
 	if (sess_priv) {
@@ -121,7 +121,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
 		memset(s, 0, qat_sym_session_get_private_size(dev));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -396,7 +396,7 @@ qat_sym_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index f363e3257..8387fdc47 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -447,7 +447,7 @@ scheduler_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static uint32_t
-scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+scheduler_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
 	uint8_t i = 0;
@@ -457,7 +457,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 	for (i = 0; i < sched_ctx->nb_slaves; i++) {
 		uint8_t slave_dev_id = sched_ctx->slaves[i].dev_id;
 		struct rte_cryptodev *dev = &rte_cryptodevs[slave_dev_id];
-		uint32_t priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+		uint32_t priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 		if (max_priv_sess_size < priv_sess_size)
 			max_priv_sess_size = priv_sess_size;
@@ -467,7 +467,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 }
 
 static int
-scheduler_pmd_session_configure(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev,
 	struct rte_crypto_sym_xform *xform,
 	struct rte_cryptodev_sym_session *sess,
 	struct rte_mempool *mempool)
@@ -492,7 +492,7 @@ scheduler_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-scheduler_pmd_session_clear(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
@@ -521,9 +521,9 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 		.queue_pair_release	= scheduler_pmd_qp_release,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
-		.session_get_size	= scheduler_pmd_session_get_size,
-		.session_configure	= scheduler_pmd_session_configure,
-		.session_clear		= scheduler_pmd_session_clear,
+		.sym_session_get_size	= scheduler_pmd_sym_session_get_size,
+		.sym_session_configure	= scheduler_pmd_sym_session_configure,
+		.sym_session_clear	= scheduler_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops = &scheduler_pmd_ops;
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 26dfbbc38..604514746 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -137,7 +137,7 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct snow3g_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -159,8 +159,8 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index fe882c366..6ed7e6c52 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -240,14 +240,14 @@ snow3g_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the SNOW 3G session structure */
 static unsigned
-snow3g_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+snow3g_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct snow3g_session);
 }
 
 /** Configure a SNOW 3G session from a crypto xform chain */
 static int
-snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+snow3g_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -275,7 +275,7 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -283,17 +283,17 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-snow3g_pmd_session_clear(struct rte_cryptodev *dev,
+snow3g_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct snow3g_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -313,9 +313,9 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 		.queue_pair_release = snow3g_pmd_qp_release,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
-		.session_get_size   = snow3g_pmd_session_get_size,
-		.session_configure  = snow3g_pmd_session_configure,
-		.session_clear      = snow3g_pmd_session_clear
+		.sym_session_get_size   = snow3g_pmd_sym_session_get_size,
+		.sym_session_configure  = snow3g_pmd_sym_session_configure,
+		.sym_session_clear      = snow3g_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_snow3g_pmd_ops = &snow3g_pmd_ops;
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index f7021b38b..f8759f1c5 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -518,9 +518,9 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
-	.session_get_size	= virtio_crypto_sym_get_session_private_size,
-	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session
+	.sym_session_get_size		= virtio_crypto_sym_get_session_private_size,
+	.sym_session_configure		= virtio_crypto_sym_configure_session,
+	.sym_session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
@@ -958,7 +958,7 @@ virtio_crypto_sym_clear_session(
 
 	hw = dev->data->dev_private;
 	vq = hw->cvq;
-	session = (struct virtio_crypto_session *)get_session_private_data(
+	session = (struct virtio_crypto_session *)get_sym_session_private_data(
 		sess, cryptodev_virtio_driver_id);
 	if (session == NULL) {
 		VIRTIO_CRYPTO_SESSION_LOG_ERR("Invalid session parameter");
@@ -1386,7 +1386,7 @@ virtio_crypto_sym_configure_session(
 		goto error_out;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		session_private);
 
 	return 0;
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index 450392843..76cf04585 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -205,7 +205,7 @@ virtqueue_crypto_sym_enqueue_xmit(
 		sizeof(struct virtio_crypto_inhdr);
 	struct rte_crypto_sym_op *sym_op = cop->sym;
 	struct virtio_crypto_session *session =
-		(struct virtio_crypto_session *)get_session_private_data(
+		(struct virtio_crypto_session *)get_sym_session_private_data(
 		cop->sym->session, cryptodev_virtio_driver_id);
 	struct virtio_crypto_op_data_req *op_data_req;
 	uint32_t hash_result_len = 0;
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 396f25975..eba15cff0 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -135,7 +135,7 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
-			sess = (struct zuc_session *)get_session_private_data(
+			sess = (struct zuc_session *)get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -157,8 +157,8 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 79326d8f5..07dfcc5f7 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -240,14 +240,14 @@ zuc_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the ZUC session structure */
 static unsigned
-zuc_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+zuc_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct zuc_session);
 }
 
 /** Configure a ZUC session from a crypto xform chain */
 static int
-zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+zuc_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -275,7 +275,7 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -283,17 +283,17 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-zuc_pmd_session_clear(struct rte_cryptodev *dev,
+zuc_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct zuc_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -313,9 +313,9 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 		.queue_pair_release = zuc_pmd_qp_release,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
-		.session_get_size   = zuc_pmd_session_get_size,
-		.session_configure  = zuc_pmd_session_configure,
-		.session_clear      = zuc_pmd_session_clear
+		.sym_session_get_size   = zuc_pmd_sym_session_get_size,
+		.sym_session_configure  = zuc_pmd_sym_session_configure,
+		.sym_session_clear      = zuc_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_zuc_pmd_ops = &zuc_pmd_ops;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 8c3f324c0..7af527075 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1064,7 +1064,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	index = dev->driver_id;
 
 	if (sess->sess_private_data[index] == NULL) {
-		ret = dev->dev_ops->session_configure(dev, xforms, sess, mp);
+		ret = dev->dev_ops->sym_session_configure(dev, xforms,
+							sess, mp);
 		if (ret < 0) {
 			CDEV_LOG_ERR(
 				"dev_id %d failed to configure session details",
@@ -1106,7 +1107,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
-	dev->dev_ops->session_clear(dev, sess);
+	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
 }
@@ -1123,7 +1124,7 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 
 	/* Check that all device private data has been freed */
 	for (i = 0; i < nb_drivers; i++) {
-		sess_priv = get_session_private_data(sess, i);
+		sess_priv = get_sym_session_private_data(sess, i);
 		if (sess_priv != NULL)
 			return -EBUSY;
 	}
@@ -1158,10 +1159,10 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
-	if (*dev->dev_ops->session_get_size == NULL)
+	if (*dev->dev_ops->sym_session_get_size == NULL)
 		return 0;
 
-	priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+	priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 	/*
 	 * If size is less than session header size,
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index ec4f1ecfb..ac6a1c4f7 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -299,11 +299,11 @@ struct rte_cryptodev_ops {
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
-	cryptodev_sym_get_session_private_size_t session_get_size;
+	cryptodev_sym_get_session_private_size_t sym_session_get_size;
 	/**< Return private session. */
-	cryptodev_sym_configure_session_t session_configure;
+	cryptodev_sym_configure_session_t sym_session_configure;
 	/**< Configure a Crypto session. */
-	cryptodev_sym_free_session_t session_clear;
+	cryptodev_sym_free_session_t sym_session_clear;
 	/**< Clear a Crypto sessions private data. */
 };
 
@@ -436,13 +436,13 @@ static void init_ ##driver_id(void)\
 }
 
 static inline void *
-get_session_private_data(const struct rte_cryptodev_sym_session *sess,
+get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id) {
 	return sess->sess_private_data[driver_id];
 }
 
 static inline void
-set_session_private_data(struct rte_cryptodev_sym_session *sess,
+set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id, void *private_data)
 {
 	sess->sess_private_data[driver_id] = private_data;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
                     ` (14 preceding siblings ...)
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
@ 2018-06-28  0:53   ` Pablo de Lara
  2018-06-28 13:40     ` Verma, Shally
  2018-07-04 12:27     ` Akhil Goyal
  15 siblings, 2 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-06-28  0:53 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Since asymmetric functionality will be implemented soon,
not all PMDs must support symmetric sessions.
Therefore, a check is added if a device does not implement
the symmetric functions, meaning that the device does not
support symmetric operations.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 4 ++++
 lib/librte_cryptodev/rte_cryptodev.h | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7af527075..58fb21056 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1063,6 +1063,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 
 	index = dev->driver_id;
 
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure, -ENOTSUP);
+
 	if (sess->sess_private_data[index] == NULL) {
 		ret = dev->dev_ops->sym_session_configure(dev, xforms,
 							sess, mp);
@@ -1107,6 +1109,8 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear, -ENOTSUP);
+
 	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 32a210b00..c1066d01e 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -896,7 +896,8 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess);
  * @return
  *  - On success, zero.
  *  - -EINVAL if input parameters are invalid.
- *  - -ENOTSUP if crypto device does not support the crypto transform.
+ *  - -ENOTSUP if crypto device does not support the crypto transform or
+ *    does not support symmetric operations.
  *  - -ENOMEM if the private session could not be allocated.
  */
 int
@@ -917,6 +918,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
  * @return
  *  - 0 if successful.
  *  - -EINVAL if device is invalid or session is NULL.
+ *  - -ENOTSUP if crypto device does not support symmetric operations.
  */
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
-- 
2.14.4

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

* Re: [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
@ 2018-06-28 13:40     ` Verma, Shally
  2018-06-28 14:15       ` De Lara Guarch, Pablo
  2018-07-04 12:27     ` Akhil Goyal
  1 sibling, 1 reply; 135+ messages in thread
From: Verma, Shally @ 2018-06-28 13:40 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, akhil.goyal, ravi1.kumar, Jacob,
	 Jerin, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev



>-----Original Message-----
>From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com]
>Sent: 28 June 2018 06:23
>To: declan.doherty@intel.com; akhil.goyal@nxp.com; Verma, Shally <Shally.Verma@cavium.com>; ravi1.kumar@amd.com; Jacob,
>Jerin <Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com; fiona.trahe@intel.com; tdu@semihalf.com;
>jianjay.zhou@huawei.com
>Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
>Subject: [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported
>
>External Email
>
>Since asymmetric functionality will be implemented soon,
>not all PMDs must support symmetric sessions.
>Therefore, a check is added if a device does not implement
>the symmetric functions, meaning that the device does not
>support symmetric operations.
>
>Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>---
> lib/librte_cryptodev/rte_cryptodev.c | 4 ++++
> lib/librte_cryptodev/rte_cryptodev.h | 4 +++-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
>diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
>index 7af527075..58fb21056 100644
>--- a/lib/librte_cryptodev/rte_cryptodev.c
>+++ b/lib/librte_cryptodev/rte_cryptodev.c
>@@ -1063,6 +1063,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
>
>        index = dev->driver_id;
>
>+       RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure, -ENOTSUP);
>+
>        if (sess->sess_private_data[index] == NULL) {
>                ret = dev->dev_ops->sym_session_configure(dev, xforms,
>                                                        sess, mp);
>@@ -1107,6 +1109,8 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
>        if (dev == NULL || sess == NULL)
>                return -EINVAL;
>
>+       RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear, -ENOTSUP);
>+
>        dev->dev_ops->sym_session_clear(dev, sess);
>
>        return 0;
>diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
>index 32a210b00..c1066d01e 100644
>--- a/lib/librte_cryptodev/rte_cryptodev.h
>+++ b/lib/librte_cryptodev/rte_cryptodev.h
>@@ -896,7 +896,8 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess);
>  * @return
>  *  - On success, zero.
>  *  - -EINVAL if input parameters are invalid.
>- *  - -ENOTSUP if crypto device does not support the crypto transform.
>+ *  - -ENOTSUP if crypto device does not support the crypto transform or
>+ *    does not support symmetric operations.

Acked with just one comment here Isn't it sufficient to say if device does not support symmetric?


>  *  - -ENOMEM if the private session could not be allocated.
>  */
> int
>@@ -917,6 +918,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
>  * @return
>  *  - 0 if successful.
>  *  - -EINVAL if device is invalid or session is NULL.
>+ *  - -ENOTSUP if crypto device does not support symmetric operations.
>  */
> int
> rte_cryptodev_sym_session_clear(uint8_t dev_id,
>--
>2.14.4

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

* Re: [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported
  2018-06-28 13:40     ` Verma, Shally
@ 2018-06-28 14:15       ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-06-28 14:15 UTC (permalink / raw)
  To: Verma, Shally, Doherty, Declan, akhil.goyal, ravi1.kumar, Jacob,
	 Jerin, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
  Cc: dev

Hi Shally,

> -----Original Message-----
> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> Sent: Thursday, June 28, 2018 2:40 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; akhil.goyal@nxp.com; ravi1.kumar@amd.com;
> Jacob, Jerin <Jerin.JacobKollanukkaran@cavium.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> tdu@semihalf.com; jianjay.zhou@huawei.com
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v3 16/16] cryptodev: check if symmetric sessions are
> supported
> 
> 
> 
> >-----Original Message-----
> >From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com]
> >Sent: 28 June 2018 06:23
> >To: declan.doherty@intel.com; akhil.goyal@nxp.com; Verma, Shally
> ><Shally.Verma@cavium.com>; ravi1.kumar@amd.com; Jacob, Jerin
> ><Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com;
> >fiona.trahe@intel.com; tdu@semihalf.com; jianjay.zhou@huawei.com
> >Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >Subject: [PATCH v3 16/16] cryptodev: check if symmetric sessions are
> >supported
> >
> >External Email
> >
> >Since asymmetric functionality will be implemented soon, not all PMDs
> >must support symmetric sessions.
> >Therefore, a check is added if a device does not implement the
> >symmetric functions, meaning that the device does not support symmetric
> >operations.
> >
> >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >---
> > lib/librte_cryptodev/rte_cryptodev.c | 4 ++++
> >lib/librte_cryptodev/rte_cryptodev.h | 4 +++-
> > 2 files changed, 7 insertions(+), 1 deletion(-)
> >
> >diff --git a/lib/librte_cryptodev/rte_cryptodev.c
> >b/lib/librte_cryptodev/rte_cryptodev.c
> >index 7af527075..58fb21056 100644
> >--- a/lib/librte_cryptodev/rte_cryptodev.c
> >+++ b/lib/librte_cryptodev/rte_cryptodev.c
> >@@ -1063,6 +1063,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
> >
> >        index = dev->driver_id;
> >
> >+       RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure,
> >+ -ENOTSUP);
> >+
> >        if (sess->sess_private_data[index] == NULL) {
> >                ret = dev->dev_ops->sym_session_configure(dev, xforms,
> >                                                        sess, mp); @@
> >-1107,6 +1109,8 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
> >        if (dev == NULL || sess == NULL)
> >                return -EINVAL;
> >
> >+       RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear,
> >+ -ENOTSUP);
> >+
> >        dev->dev_ops->sym_session_clear(dev, sess);
> >
> >        return 0;
> >diff --git a/lib/librte_cryptodev/rte_cryptodev.h
> >b/lib/librte_cryptodev/rte_cryptodev.h
> >index 32a210b00..c1066d01e 100644
> >--- a/lib/librte_cryptodev/rte_cryptodev.h
> >+++ b/lib/librte_cryptodev/rte_cryptodev.h
> >@@ -896,7 +896,8 @@ rte_cryptodev_sym_session_free(struct
> >rte_cryptodev_sym_session *sess);
> >  * @return
> >  *  - On success, zero.
> >  *  - -EINVAL if input parameters are invalid.
> >- *  - -ENOTSUP if crypto device does not support the crypto transform.
> >+ *  - -ENOTSUP if crypto device does not support the crypto transform or
> >+ *    does not support symmetric operations.
> 
> Acked with just one comment here Isn't it sufficient to say if device does not
> support symmetric?

No, because the device could not support a specific algorithm or other parameters,
such as key size, IV size, etc.

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

* Re: [dpdk-dev] [PATCH v2 09/15] cryptodev: remove max number of sessions parameter
  2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 09/15] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-06-29  8:02     ` Tomasz Duszynski
  0 siblings, 0 replies; 135+ messages in thread
From: Tomasz Duszynski @ 2018-06-29  8:02 UTC (permalink / raw)
  To: Pablo de Lara
  Cc: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou, dev

Hello Pablo,

On Mon, Jun 25, 2018 at 09:48:50AM +0100, Pablo de Lara wrote:
> Most crypto PMDs do not have a limitation
> of the number of the sessions that can be handled
> internally. The value that was set before was not
> actually used at all, since the sessions are created
> at the application level.
> Therefore, this value is not parsed from the initial
> crypto parameters anymore and it is set to 0,
> meaning that there is no actual limit.
>

[...]

> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> index 3f8de37b7..07850098b 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> @@ -471,7 +471,8 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = mrvl_crypto_pmd_capabilities;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;

In this case we want to set a limit, right?

>  	}
>  }
>
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index 052b6546c..478ac0b62 100644
> --- a/drivers/crypto/null/null_crypto_pmd.c
> +++ b/drivers/crypto/null/null_crypto_pmd.c
> @@ -182,7 +182,6 @@ cryptodev_null_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  }
> @@ -195,8 +194,7 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
>  		"",
>  		sizeof(struct null_crypto_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name, *args;
>  	int retval;
> @@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
> index f8e5f61f1..2842498af 100644
> --- a/drivers/crypto/null/null_crypto_pmd_ops.c
> +++ b/drivers/crypto/null/null_crypto_pmd_ops.c
> @@ -121,7 +121,8 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = null_crypto_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
> index 0fd133625..d7d769f3d 100644
> --- a/drivers/crypto/null/null_crypto_pmd_private.h
> +++ b/drivers/crypto/null/null_crypto_pmd_private.h
> @@ -32,7 +32,6 @@
>  /** private data structure for each NULL crypto device */
>  struct null_crypto_private {
>  	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
> -	unsigned max_nb_sessions;	/**< Max number of sessions */
>  };
>
>  /** NULL crypto queue pair */
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 93c6d7e5d..972e2adfe 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>
> @@ -1686,8 +1685,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct openssl_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
>  	cryptodev_openssl_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
>  		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> index 1cb87d59a..d194e3657 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> @@ -547,7 +547,8 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = openssl_pmd_capabilities;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  	}
>  }
>
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
> index bc8dc7cdc..02ea81d5c 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
> @@ -62,8 +62,6 @@ enum openssl_auth_mode {
>  struct openssl_private {
>  	unsigned int max_nb_qpairs;
>  	/**< Max number of queue pairs */
> -	unsigned int max_nb_sessions;
> -	/**< Max number of sessions */
>  };
>
>  /** OPENSSL crypto queue pair */
> diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
> index 0bc042a75..84dd5bec8 100644
> --- a/drivers/crypto/qat/qat_sym_pmd.c
> +++ b/drivers/crypto/qat/qat_sym_pmd.c
> @@ -72,8 +72,9 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
>  			qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC);
>  		info->feature_flags = dev->feature_flags;
>  		info->capabilities = internals->qat_dev_capabilities;
> -		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
>  		info->driver_id = cryptodev_qat_driver_id;
> +		/* No limit of number of sessions */
> +		info->sym.max_nb_sessions = 0;
>  	}
>  }
>
> @@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  			.name = "",
>  			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
> -			.private_data_size = sizeof(struct qat_sym_dev_private),
> -			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
> +			.private_data_size = sizeof(struct qat_sym_dev_private)
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>  	struct rte_cryptodev *cryptodev;
> diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
> index 80a198741..efa3b0775 100644
> --- a/drivers/crypto/qat/qat_sym_pmd.h
> +++ b/drivers/crypto/qat/qat_sym_pmd.h
> @@ -13,7 +13,6 @@
>
>  /**< Intel(R) QAT Symmetric Crypto PMD device name */
>  #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
> -#define QAT_SYM_PMD_MAX_NB_SESSIONS	2048
>
>  extern uint8_t cryptodev_qat_driver_id;
>
> diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
> index 25d6409f3..32a19c106 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd.c
> @@ -31,7 +31,6 @@ struct scheduler_init_params {
>  #define RTE_CRYPTODEV_VDEV_MODE			("mode")
>  #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
>  #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
> -#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
>  #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
>  #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
>  #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
> @@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
>  	RTE_CRYPTODEV_VDEV_MODE,
>  	RTE_CRYPTODEV_VDEV_ORDERING,
>  	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
> -	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
>  	RTE_CRYPTODEV_VDEV_SOCKET_ID,
>  	RTE_CRYPTODEV_VDEV_COREMASK,
>  	RTE_CRYPTODEV_VDEV_CORELIST
> @@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
>  		if (ret < 0)
>  			goto free_kvlist;
>
> -		ret = rte_kvargs_process(kvlist,
> -				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
> -				&parse_integer_arg,
> -				&params->def_p.max_nb_sessions);
> -		if (ret < 0)
> -			goto free_kvlist;
> -
>  		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
>  				&parse_integer_arg,
>  				&params->def_p.socket_id);
> @@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
>  			"",
>  			sizeof(struct scheduler_ctx),
>  			rte_socket_id(),
> -			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  		},
>  		.nb_slaves = 0,
>  		.mode = CDEV_SCHED_MODE_NOT_SET,
> @@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
>  	cryptodev_scheduler_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int> "
>  	"slave=<name>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
> diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> index 147dc51e9..16a8021c8 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> @@ -321,8 +321,7 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
>  		struct rte_cryptodev_info *dev_info)
>  {
>  	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
> -	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
> -			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
> +	uint32_t max_nb_sess = 0;
>  	uint32_t i;
>
>  	if (!dev_info)
> @@ -338,17 +337,18 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
>  		struct rte_cryptodev_info slave_info;
>
>  		rte_cryptodev_info_get(slave_dev_id, &slave_info);
> -		max_nb_sessions = slave_info.sym.max_nb_sessions <
> -				max_nb_sessions ?
> -				slave_info.sym.max_nb_sessions :
> -				max_nb_sessions;
> +		uint32_t dev_max_sess = slave_info.sym.max_nb_sessions;
> +		if (dev_max_sess != 0) {
> +			if (max_nb_sess == 0 ||	dev_max_sess < max_nb_sess)
> +				max_nb_sess = slave_info.sym.max_nb_sessions;
> +		}
>  	}
>
>  	dev_info->driver_id = dev->driver_id;
>  	dev_info->feature_flags = dev->feature_flags;
>  	dev_info->capabilities = sched_ctx->capabilities;
>  	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
> -	dev_info->sym.max_nb_sessions = max_nb_sessions;
> +	dev_info->sym.max_nb_sessions = max_nb_sess;
>  }
>
>  /** Release queue pair */
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> index 72751e35e..26dfbbc38 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> @@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  init_error:
> @@ -573,8 +572,7 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct snow3g_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
>  		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> index f60b47598..6f8b9e2c6 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> @@ -130,7 +130,8 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = snow3g_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> index eea900e0a..2c6e1a948 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> @@ -36,8 +36,6 @@
>  struct snow3g_private {
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  /** SNOW 3G buffer queue pair */
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
> index 482edea1a..1da4ae871 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -1411,8 +1411,8 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
>  		info->driver_id = cryptodev_virtio_driver_id;
>  		info->feature_flags = dev->feature_flags;
>  		info->max_nb_queue_pairs = hw->max_dataqueues;
> -		info->sym.max_nb_sessions =
> -			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
> +		/* No limit of number of sessions */
> +		info->sym.max_nb_sessions = 0;
>  		info->capabilities = hw->virtio_dev_capabilities;
>  	}
>  }
> @@ -1425,8 +1425,7 @@ crypto_virtio_pci_probe(
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  		.name = "",
>  		.socket_id = rte_socket_id(),
> -		.private_data_size = sizeof(struct virtio_crypto_hw),
> -		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
> +		.private_data_size = sizeof(struct virtio_crypto_hw)
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
> index a805b2278..396f25975 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd.c
> @@ -479,7 +479,6 @@ cryptodev_zuc_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  init_error:
> @@ -497,8 +496,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct zuc_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -541,7 +539,6 @@ static struct cryptodev_driver zuc_crypto_drv;
>  RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> index 8abac8989..b39e35b9f 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> @@ -130,7 +130,8 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = zuc_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
> index b83c4a047..2bd378ad6 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
> @@ -37,8 +37,6 @@
>  struct zuc_private {
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  /** ZUC buffer queue pair */
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> index f2aac24b7..2088ac3f3 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> @@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
>  		if (ret < 0)
>  			goto free_kvlist;
>
> -		ret = rte_kvargs_process(kvlist,
> -				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
> -				&rte_cryptodev_pmd_parse_uint_arg,
> -				&params->max_nb_sessions);
> -		if (ret < 0)
> -			goto free_kvlist;
> -
>  		ret = rte_kvargs_process(kvlist,
>  				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
>  				&rte_cryptodev_pmd_parse_uint_arg,
> @@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
>  			device->driver->name, name);
>
>  	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
> -			"socket id: %d, max queue pairs: %u, max sessions: %u",
> +			"socket id: %d, max queue pairs: %u",
>  			device->driver->name, name,
> -			params->socket_id, params->max_nb_queue_pairs,
> -			params->max_nb_sessions);
> +			params->socket_id, params->max_nb_queue_pairs);
>
>  	/* allocate device structure */
>  	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> index 69d776934..0739ce065 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> @@ -59,18 +59,15 @@ extern "C" {
>
>
>  #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
> -#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
>
>  #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
>  #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
> -#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
>  #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
>
>
>  static const char * const cryptodev_pmd_valid_params[] = {
>  	RTE_CRYPTODEV_PMD_NAME_ARG,
>  	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
> -	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
>  	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
>  };
>
> @@ -83,7 +80,6 @@ struct rte_cryptodev_pmd_init_params {
>  	size_t private_data_size;
>  	int socket_id;
>  	unsigned int max_nb_queue_pairs;
> -	unsigned int max_nb_sessions;
>  };
>
>  /** Global structure used for maintaining state of allocated crypto devices */
> --
> 2.14.4
>

--
- Tomasz Duszyński

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

* Re: [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-06-29  8:04     ` Tomasz Duszynski
  2018-07-02 10:58       ` De Lara Guarch, Pablo
  2018-07-04 12:42     ` Akhil Goyal
  1 sibling, 1 reply; 135+ messages in thread
From: Tomasz Duszynski @ 2018-06-29  8:04 UTC (permalink / raw)
  To: Pablo de Lara
  Cc: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou, dev

Hello Pablo,

On Thu, Jun 28, 2018 at 01:52:57AM +0100, Pablo de Lara wrote:
> Most crypto PMDs do not have a limitation
> of the number of the sessions that can be handled
> internally. The value that was set before was not
> actually used at all, since the sessions are created
> at the application level.
> Therefore, this value is not parsed from the initial
> crypto parameters anymore and it is set to 0,
> meaning that there is no actual limit.
>

[...]

> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> index 3f8de37b7..07850098b 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> @@ -471,7 +471,8 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = mrvl_crypto_pmd_capabilities;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;

In this case we want to set a limit, right?

>  	}
>  }
>
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index 052b6546c..478ac0b62 100644
> --- a/drivers/crypto/null/null_crypto_pmd.c
> +++ b/drivers/crypto/null/null_crypto_pmd.c
> @@ -182,7 +182,6 @@ cryptodev_null_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  }
> @@ -195,8 +194,7 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
>  		"",
>  		sizeof(struct null_crypto_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name, *args;
>  	int retval;
> @@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
> index f8e5f61f1..2842498af 100644
> --- a/drivers/crypto/null/null_crypto_pmd_ops.c
> +++ b/drivers/crypto/null/null_crypto_pmd_ops.c
> @@ -121,7 +121,8 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = null_crypto_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
> index 0fd133625..d7d769f3d 100644
> --- a/drivers/crypto/null/null_crypto_pmd_private.h
> +++ b/drivers/crypto/null/null_crypto_pmd_private.h
> @@ -32,7 +32,6 @@
>  /** private data structure for each NULL crypto device */
>  struct null_crypto_private {
>  	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
> -	unsigned max_nb_sessions;	/**< Max number of sessions */
>  };
>
>  /** NULL crypto queue pair */
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 93c6d7e5d..972e2adfe 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>
> @@ -1686,8 +1685,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct openssl_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
>  	cryptodev_openssl_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
>  		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> index 1cb87d59a..d194e3657 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
> @@ -547,7 +547,8 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = openssl_pmd_capabilities;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  	}
>  }
>
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
> index bc8dc7cdc..02ea81d5c 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
> +++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
> @@ -62,8 +62,6 @@ enum openssl_auth_mode {
>  struct openssl_private {
>  	unsigned int max_nb_qpairs;
>  	/**< Max number of queue pairs */
> -	unsigned int max_nb_sessions;
> -	/**< Max number of sessions */
>  };
>
>  /** OPENSSL crypto queue pair */
> diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
> index 0bc042a75..84dd5bec8 100644
> --- a/drivers/crypto/qat/qat_sym_pmd.c
> +++ b/drivers/crypto/qat/qat_sym_pmd.c
> @@ -72,8 +72,9 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
>  			qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC);
>  		info->feature_flags = dev->feature_flags;
>  		info->capabilities = internals->qat_dev_capabilities;
> -		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
>  		info->driver_id = cryptodev_qat_driver_id;
> +		/* No limit of number of sessions */
> +		info->sym.max_nb_sessions = 0;
>  	}
>  }
>
> @@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  			.name = "",
>  			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
> -			.private_data_size = sizeof(struct qat_sym_dev_private),
> -			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
> +			.private_data_size = sizeof(struct qat_sym_dev_private)
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>  	struct rte_cryptodev *cryptodev;
> diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
> index 439aeb98a..d34328544 100644
> --- a/drivers/crypto/qat/qat_sym_pmd.h
> +++ b/drivers/crypto/qat/qat_sym_pmd.h
> @@ -14,7 +14,6 @@
>
>  /**< Intel(R) QAT Symmetric Crypto PMD device name */
>  #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
> -#define QAT_SYM_PMD_MAX_NB_SESSIONS	2048
>
>  extern uint8_t cryptodev_qat_driver_id;
>
> diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
> index 25d6409f3..32a19c106 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd.c
> @@ -31,7 +31,6 @@ struct scheduler_init_params {
>  #define RTE_CRYPTODEV_VDEV_MODE			("mode")
>  #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
>  #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
> -#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
>  #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
>  #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
>  #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
> @@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
>  	RTE_CRYPTODEV_VDEV_MODE,
>  	RTE_CRYPTODEV_VDEV_ORDERING,
>  	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
> -	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
>  	RTE_CRYPTODEV_VDEV_SOCKET_ID,
>  	RTE_CRYPTODEV_VDEV_COREMASK,
>  	RTE_CRYPTODEV_VDEV_CORELIST
> @@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
>  		if (ret < 0)
>  			goto free_kvlist;
>
> -		ret = rte_kvargs_process(kvlist,
> -				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
> -				&parse_integer_arg,
> -				&params->def_p.max_nb_sessions);
> -		if (ret < 0)
> -			goto free_kvlist;
> -
>  		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
>  				&parse_integer_arg,
>  				&params->def_p.socket_id);
> @@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
>  			"",
>  			sizeof(struct scheduler_ctx),
>  			rte_socket_id(),
> -			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  		},
>  		.nb_slaves = 0,
>  		.mode = CDEV_SCHED_MODE_NOT_SET,
> @@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
>  	cryptodev_scheduler_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int> "
>  	"slave=<name>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
> diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> index 147dc51e9..16a8021c8 100644
> --- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
> +++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
> @@ -321,8 +321,7 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
>  		struct rte_cryptodev_info *dev_info)
>  {
>  	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
> -	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
> -			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
> +	uint32_t max_nb_sess = 0;
>  	uint32_t i;
>
>  	if (!dev_info)
> @@ -338,17 +337,18 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
>  		struct rte_cryptodev_info slave_info;
>
>  		rte_cryptodev_info_get(slave_dev_id, &slave_info);
> -		max_nb_sessions = slave_info.sym.max_nb_sessions <
> -				max_nb_sessions ?
> -				slave_info.sym.max_nb_sessions :
> -				max_nb_sessions;
> +		uint32_t dev_max_sess = slave_info.sym.max_nb_sessions;
> +		if (dev_max_sess != 0) {
> +			if (max_nb_sess == 0 ||	dev_max_sess < max_nb_sess)
> +				max_nb_sess = slave_info.sym.max_nb_sessions;
> +		}
>  	}
>
>  	dev_info->driver_id = dev->driver_id;
>  	dev_info->feature_flags = dev->feature_flags;
>  	dev_info->capabilities = sched_ctx->capabilities;
>  	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
> -	dev_info->sym.max_nb_sessions = max_nb_sessions;
> +	dev_info->sym.max_nb_sessions = max_nb_sess;
>  }
>
>  /** Release queue pair */
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> index 72751e35e..26dfbbc38 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> @@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  init_error:
> @@ -573,8 +572,7 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct snow3g_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
>  RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
>  		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> index f60b47598..6f8b9e2c6 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
> @@ -130,7 +130,8 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = snow3g_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> index eea900e0a..2c6e1a948 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
> @@ -36,8 +36,6 @@
>  struct snow3g_private {
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  /** SNOW 3G buffer queue pair */
> diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
> index 482edea1a..1da4ae871 100644
> --- a/drivers/crypto/virtio/virtio_cryptodev.c
> +++ b/drivers/crypto/virtio/virtio_cryptodev.c
> @@ -1411,8 +1411,8 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
>  		info->driver_id = cryptodev_virtio_driver_id;
>  		info->feature_flags = dev->feature_flags;
>  		info->max_nb_queue_pairs = hw->max_dataqueues;
> -		info->sym.max_nb_sessions =
> -			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
> +		/* No limit of number of sessions */
> +		info->sym.max_nb_sessions = 0;
>  		info->capabilities = hw->virtio_dev_capabilities;
>  	}
>  }
> @@ -1425,8 +1425,7 @@ crypto_virtio_pci_probe(
>  	struct rte_cryptodev_pmd_init_params init_params = {
>  		.name = "",
>  		.socket_id = rte_socket_id(),
> -		.private_data_size = sizeof(struct virtio_crypto_hw),
> -		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
> +		.private_data_size = sizeof(struct virtio_crypto_hw)
>  	};
>  	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
>
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
> index a805b2278..396f25975 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd.c
> @@ -479,7 +479,6 @@ cryptodev_zuc_create(const char *name,
>  	internals = dev->data->dev_private;
>
>  	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
> -	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	return 0;
>  init_error:
> @@ -497,8 +496,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
>  		"",
>  		sizeof(struct zuc_private),
>  		rte_socket_id(),
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
> +		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
>  	};
>  	const char *name;
>  	const char *input_args;
> @@ -541,7 +539,6 @@ static struct cryptodev_driver zuc_crypto_drv;
>  RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
>  RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
>  	"max_nb_queue_pairs=<int> "
> -	"max_nb_sessions=<int> "
>  	"socket_id=<int>");
>  RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
>  		cryptodev_driver_id);
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> index 8abac8989..b39e35b9f 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
> @@ -130,7 +130,8 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
>  	if (dev_info != NULL) {
>  		dev_info->driver_id = dev->driver_id;
>  		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
> -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> +		/* No limit of number of sessions */
> +		dev_info->sym.max_nb_sessions = 0;
>  		dev_info->feature_flags = dev->feature_flags;
>  		dev_info->capabilities = zuc_pmd_capabilities;
>  	}
> diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
> index b83c4a047..2bd378ad6 100644
> --- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
> +++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
> @@ -37,8 +37,6 @@
>  struct zuc_private {
>  	unsigned max_nb_queue_pairs;
>  	/**< Max number of queue pairs supported by device */
> -	unsigned max_nb_sessions;
> -	/**< Max number of sessions supported by device */
>  };
>
>  /** ZUC buffer queue pair */
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> index f2aac24b7..2088ac3f3 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
> @@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
>  		if (ret < 0)
>  			goto free_kvlist;
>
> -		ret = rte_kvargs_process(kvlist,
> -				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
> -				&rte_cryptodev_pmd_parse_uint_arg,
> -				&params->max_nb_sessions);
> -		if (ret < 0)
> -			goto free_kvlist;
> -
>  		ret = rte_kvargs_process(kvlist,
>  				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
>  				&rte_cryptodev_pmd_parse_uint_arg,
> @@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
>  			device->driver->name, name);
>
>  	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
> -			"socket id: %d, max queue pairs: %u, max sessions: %u",
> +			"socket id: %d, max queue pairs: %u",
>  			device->driver->name, name,
> -			params->socket_id, params->max_nb_queue_pairs,
> -			params->max_nb_sessions);
> +			params->socket_id, params->max_nb_queue_pairs);
>
>  	/* allocate device structure */
>  	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
> diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> index db8b97665..1fb7e7d5e 100644
> --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
> +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
> @@ -32,18 +32,15 @@ extern "C" {
>
>
>  #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
> -#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
>
>  #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
>  #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
> -#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
>  #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
>
>
>  static const char * const cryptodev_pmd_valid_params[] = {
>  	RTE_CRYPTODEV_PMD_NAME_ARG,
>  	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
> -	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
>  	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
>  };
>
> @@ -56,7 +53,6 @@ struct rte_cryptodev_pmd_init_params {
>  	size_t private_data_size;
>  	int socket_id;
>  	unsigned int max_nb_queue_pairs;
> -	unsigned int max_nb_sessions;
>  };
>
>  /** Global structure used for maintaining state of allocated crypto devices */
> --
> 2.14.4
>

--
- Tomasz Duszyński

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

* Re: [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter
  2018-06-29  8:04     ` Tomasz Duszynski
@ 2018-07-02 10:58       ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-07-02 10:58 UTC (permalink / raw)
  To: Tomasz Duszynski
  Cc: Doherty, Declan, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, Zhang, Roy Fan, Trahe, Fiona, jianjay.zhou, dev

Hi 

> -----Original Message-----
> From: Tomasz Duszynski [mailto:tdu@semihalf.com]
> Sent: Friday, June 29, 2018 9:04 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> shally.verma@caviumnetworks.com; ravi1.kumar@amd.com;
> jerin.jacob@caviumnetworks.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> Trahe, Fiona <fiona.trahe@intel.com>; tdu@semihalf.com;
> jianjay.zhou@huawei.com; dev@dpdk.org
> Subject: Re: [PATCH v3 09/16] cryptodev: remove max number of sessions
> parameter
> 
> Hello Pablo,
> 
> On Thu, Jun 28, 2018 at 01:52:57AM +0100, Pablo de Lara wrote:
> > Most crypto PMDs do not have a limitation of the number of the
> > sessions that can be handled internally. The value that was set before
> > was not actually used at all, since the sessions are created at the
> > application level.
> > Therefore, this value is not parsed from the initial crypto parameters
> > anymore and it is set to 0, meaning that there is no actual limit.
> >
> 
> [...]
> 
> > diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> > b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> > index 3f8de37b7..07850098b 100644
> > --- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> > +++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
> > @@ -471,7 +471,8 @@ mrvl_crypto_pmd_info_get(struct rte_cryptodev *dev,
> >  		dev_info->feature_flags = dev->feature_flags;
> >  		dev_info->capabilities = mrvl_crypto_pmd_capabilities;
> >  		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
> > -		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
> > +		/* No limit of number of sessions */
> > +		dev_info->sym.max_nb_sessions = 0;
> 
> In this case we want to set a limit, right?
> 

Hi Tomasz,

Yes, you are right, I made a mistake here. Thanks for spotting it :)

Will send another version with this fixed.

Pablo

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

* [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
                   ` (7 preceding siblings ...)
  2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
@ 2018-07-04  8:51 ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
                     ` (15 more replies)
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
  10 siblings, 16 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

API changes in the cryptodev library, announced in the previous release, 18.05.

Changes in v4:
- Fixed MVSAM max number of sessions (Tomasz Duszynksi)
- Changed OUT_OF_PLACE to OOP in feature flags (Akhil Goyal)
- Added missing feature flags in aesni_gcm and openssl PMDs (Akhil
  Goyal)
- Removed unneeded config parameters (related to max number of sessions)
  (Akhil Goyal)
- Restructured code in crypto-perf and l2fwd-crypto to calculate number
  of sessions needed (Akhil Goyal) 

Changes in v3:
- Rephrased comments for new sgl feature flags
- Added patch checking if there a device supports
  symmetric sessions
- Extended PMD session API renaming

Changes in v2:
- Instead of removing max_nb_sessions in info structure,
  a new value `0` is allowed, to indicate that the PMD
  does not have any limitation on the number of sessions
  to be managed
- Modified crypto applications to check for new value `0`
  on max_nb_sessions
- Modified MVSAM PMD to parse max_nb_sessions,
  since that parameter is not generic to any PMD anymore
- Removed attach/detach session API, as announced
- Removed deprecated function that was not removed in
  previous patchset
- Renamed PMD symmetric session API, to allow asymmetric
  session API to be added in the future


Pablo de Lara (16):
  cryptodev: replace bus specific struct with generic dev
  cryptodev: remove max number of sessions per queue
  app/crypto-perf: limit number of sessions
  test/crypto: limit number of sessions
  examples/l2fwd-crypto: limit number of sessions
  examples/ipsec-secgw: check for max supported sessions
  crypto/mvsam: parse max number of sessions
  cryptodev: define value for unlimited sessions
  cryptodev: remove max number of sessions parameter
  doc: remove unneeded deprecation notice
  cryptodev: remove queue start/stop functions
  cryptodev: remove old get session size functions
  cryptodev: replace mbuf scatter gather flag
  cryptodev: remove attach/detach session API
  cryptodev: rename PMD symmetric session API
  cryptodev: check if symmetric sessions are supported

 app/test-crypto-perf/main.c                        |  34 ++++-
 config/common_base                                 |   7 -
 config/rte_config.h                                |   7 -
 doc/guides/cryptodevs/dpaa2_sec.rst                |   5 -
 doc/guides/cryptodevs/dpaa_sec.rst                 |   5 -
 doc/guides/prog_guide/cryptodev_lib.rst            |   7 +-
 doc/guides/rel_notes/deprecation.rst               |  25 ----
 doc/guides/rel_notes/release_18_08.rst             |  30 +++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  13 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  39 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |   2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  39 ++---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   2 -
 drivers/crypto/armv8/rte_armv8_pmd.c               |  11 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  39 ++---
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |   2 -
 drivers/crypto/ccp/ccp_crypto.c                    |  28 ++--
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  37 ++---
 drivers/crypto/ccp/ccp_pmd_private.h               |   1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   |  20 +--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  52 +++----
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |   2 -
 drivers/crypto/dpaa_sec/dpaa_sec.c                 |  81 ++---------
 drivers/crypto/dpaa_sec/dpaa_sec.h                 |   1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  11 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  39 ++---
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |   2 -
 drivers/crypto/mvsam/rte_mrvl_pmd.c                | 134 +++++++++++++++--
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c            |  46 ++----
 drivers/crypto/null/null_crypto_pmd.c              |  13 +-
 drivers/crypto/null/null_crypto_pmd_ops.c          |  39 ++---
 drivers/crypto/null/null_crypto_pmd_private.h      |   1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  13 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  39 ++---
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |   2 -
 drivers/crypto/qat/qat_sym.c                       |   2 +-
 drivers/crypto/qat/qat_sym.h                       |   2 +-
 drivers/crypto/qat/qat_sym_pmd.c                   |  21 +--
 drivers/crypto/qat/qat_sym_pmd.h                   |   1 -
 drivers/crypto/qat/qat_sym_session.c               |   6 +-
 drivers/crypto/scheduler/scheduler_pmd.c           |  13 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c       |  46 ++----
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  11 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  39 ++---
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |   2 -
 drivers/crypto/virtio/virtio_cryptodev.c           |  22 +--
 drivers/crypto/virtio/virtio_rxtx.c                |   2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  11 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  39 ++---
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |   2 -
 examples/ipsec-secgw/ipsec-secgw.c                 |   6 +
 examples/l2fwd-crypto/main.c                       |  22 ++-
 lib/librte_cryptodev/rte_cryptodev.c               | 138 +++---------------
 lib/librte_cryptodev/rte_cryptodev.h               | 161 +++++----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.c           |  12 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  70 +--------
 lib/librte_cryptodev/rte_cryptodev_version.map     |   6 -
 test/test/test_cryptodev.c                         |  60 ++++++--
 test/test/test_cryptodev_blockcipher.c             |  21 ++-
 60 files changed, 574 insertions(+), 982 deletions(-)

-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.

This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst  | 2 +-
 doc/guides/rel_notes/deprecation.rst     | 2 --
 doc/guides/rel_notes/release_18_08.rst   | 5 ++++-
 drivers/crypto/qat/qat_sym_pmd.c         | 1 -
 drivers/crypto/virtio/virtio_cryptodev.c | 1 -
 lib/librte_cryptodev/rte_cryptodev.c     | 1 +
 lib/librte_cryptodev/rte_cryptodev.h     | 6 +++---
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
     struct rte_cryptodev_info {
         const char *driver_name;
         uint8_t driver_id;
-        struct rte_pci_device *pci_dev;
+        struct rte_device *device;
 
         uint64_t feature_flags;
 
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
   - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
     containing fields not relevant anymore since the session mempool
     is not internal in the crypto device anymore.
-  - Replacement of ``pci_dev`` field with the more generic ``rte_device``
-    structure.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..6bf53dc31 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+  has been replaced with field ``struct rte_device *device``.
+
 
 ABI Changes
 -----------
@@ -118,7 +121,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_cmdline.so.2
      librte_common_octeontx.so.1
      librte_compressdev.so.1
-     librte_cryptodev.so.4
+   + librte_cryptodev.so.5
      librte_distributor.so.1
      librte_eal.so.7
      librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 		info->capabilities = internals->qat_dev_capabilities;
 		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 	}
 }
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 
 	if (info != NULL) {
 		info->driver_id = cryptodev_virtio_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
 		info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
 
 	dev_info->driver_name = dev->device->driver->name;
+	dev_info->device = dev->device;
 }
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index ccc0f73fd..6b5f32bda 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -334,9 +334,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
 
 /**  Crypto device information */
 struct rte_cryptodev_info {
-	const char *driver_name;		/**< Driver name. */
-	uint8_t driver_id;			/**< Driver identifier */
-	struct rte_pci_device *pci_dev;		/**< PCI information. */
+	const char *driver_name;	/**< Driver name. */
+	uint8_t driver_id;		/**< Driver identifier */
+	struct rte_device *device;	/**< Generic device information. */
 
 	uint64_t feature_flags;
 	/**< Feature flags exposes HW/SW features for the given device */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 02/16] cryptodev: remove max number of sessions per queue
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
                     ` (13 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The cryptodev info structure currently contains
the maximum number of sessions that can be used in a queue pair.
This is only set in DPAA_SEC PMD, and since it is calculated
based on the maximum number of sessions (which is not used
anymore), this field can be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c   | 3 ---
 lib/librte_cryptodev/rte_cryptodev.h | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 06f7e4373..73cae483b 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2215,9 +2215,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa_sec_capabilities;
 		info->sym.max_nb_sessions = internals->max_nb_sessions;
-		info->sym.max_nb_sessions_per_qp =
-			RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS /
-			RTE_DPAA_MAX_NB_SEC_QPS;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 6b5f32bda..114c9fd6e 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -350,10 +350,6 @@ struct rte_cryptodev_info {
 	struct {
 		unsigned max_nb_sessions;
 		/**< Maximum number of sessions supported by device. */
-		unsigned int max_nb_sessions_per_qp;
-		/**< Maximum number of sessions per queue pair.
-		 * Default 0 for infinite sessions
-		 */
 	} sym;
 };
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 03/16] app/crypto-perf: limit number of sessions
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 04/16] test/crypto: " Pablo de Lara
                     ` (12 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of creating a fixed number of sessions,
calculate the necessary number based on number of devices
and queue pairs used.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 4ae14390b..74e2165a4 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -21,7 +21,6 @@
 #include "cperf_test_verify.h"
 #include "cperf_test_pmd_cyclecount.h"
 
-#define NUM_SESSIONS 2048
 #define SESS_MEMPOOL_CACHE_SIZE 64
 
 const char *cperf_test_type_strs[] = {
@@ -67,6 +66,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 			struct rte_mempool *session_pool_socket[])
 {
 	uint8_t enabled_cdev_count = 0, nb_lcores, cdev_id;
+	uint32_t sessions_needed = 0;
 	unsigned int i, j;
 	int ret;
 
@@ -149,15 +149,43 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 			.nb_descriptors = opts->nb_descriptors
 		};
 
+		uint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions;
+		/*
+		 * Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		if (!strcmp((const char *)opts->device_type,
+					"crypto_scheduler")) {
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count *
+				opts->nb_qps * nb_slaves;
+#endif
+		} else
+			sessions_needed = 2 * enabled_cdev_count *
+						opts->nb_qps;
+
+		/*
+		 * A single session is required per queue pair
+		 * in each device
+		 */
+		if (dev_max_nb_sess < opts->nb_qps) {
+			RTE_LOG(ERR, USER1,
+				"Device does not support at least "
+				"%u sessions\n", opts->nb_qps);
+			return -ENOTSUP;
+		}
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
 
 			snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
 				"sess_mp_%u", socket_id);
-
 			sess_mp = rte_mempool_create(mp_name,
-						NUM_SESSIONS,
+						sessions_needed,
 						max_sess_size,
 						SESS_MEMPOOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 04/16] test/crypto: limit number of sessions
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (2 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 05/16] examples/l2fwd-crypto: " Pablo de Lara
                     ` (11 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of using the maximum number of sessions
allowed by the PMDs (which will change to unlimited most
of the PMDs), limit the number to a small sufficient amount.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 test/test/test_cryptodev.c | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 389f79677..5c906cfae 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -39,6 +39,7 @@
 #include "test_cryptodev_hmac_test_vectors.h"
 
 #define VDEV_ARGS_SIZE 100
+#define MAX_NB_SESSIONS            4
 
 static int gbl_driver_id;
 
@@ -435,9 +436,16 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
+	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		RTE_LOG(ERR, USER1, "Device does not support "
+				"at least %u sessions\n",
+				MAX_NB_SESSIONS);
+		return TEST_FAILED;
+	}
+
 	ts_params->session_mpool = rte_mempool_create(
 				"test_sess_mp",
-				info.sym.max_nb_sessions * 2,
+				MAX_NB_SESSIONS * 2,
 				session_size,
 				0, 0, NULL, NULL, NULL,
 				NULL, SOCKET_ID_ANY,
@@ -6499,10 +6507,10 @@ test_multi_session(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *) *
-			dev_info.sym.max_nb_sessions) + 1, 0);
+			MAX_NB_SESSIONS) + 1, 0);
 
 	/* Create multiple crypto sessions*/
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 
 		sessions[i] = rte_cryptodev_sym_session_create(
 				ts_params->session_mpool);
@@ -6551,7 +6559,7 @@ test_multi_session(void)
 	TEST_ASSERT_NULL(sessions[i],
 			"Session creation succeeded unexpectedly!");
 
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 		rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
 				sessions[i]);
 		rte_cryptodev_sym_session_free(sessions[i]);
@@ -6610,7 +6618,7 @@ test_multi_session_random_usage(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *)
-					* dev_info.sym.max_nb_sessions) + 1, 0);
+					* MAX_NB_SESSIONS) + 1, 0);
 
 	for (i = 0; i < MB_SESSION_NUMBER; i++) {
 		sessions[i] = rte_cryptodev_sym_session_create(
@@ -8538,6 +8546,13 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
+		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+			RTE_LOG(ERR, USER1,
+					"Device does not support "
+					"at least %u sessions\n",
+					MAX_NB_SESSIONS);
+			return TEST_FAILED;
+		}
 		/*
 		 * Create mempool with maximum number of sessions * 2,
 		 * to include the session headers
@@ -8545,7 +8560,7 @@ test_scheduler_attach_slave_op(void)
 		if (ts_params->session_mpool == NULL) {
 			ts_params->session_mpool = rte_mempool_create(
 					"test_sess_mp",
-					info.sym.max_nb_sessions * 2,
+					MAX_NB_SESSIONS * 2,
 					session_size,
 					0, 0, NULL, NULL, NULL,
 					NULL, SOCKET_ID_ANY,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 05/16] examples/l2fwd-crypto: limit number of sessions
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (3 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 04/16] test/crypto: " Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
                     ` (10 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Calculate the number of sessions required for the application,
knowing that there is only one session required per device.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/l2fwd-crypto/main.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4bca87b19..db364cf5d 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -42,6 +42,9 @@
 #include <rte_prefetch.h>
 #include <rte_random.h>
 #include <rte_hexdump.h>
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+#include <rte_cryptodev_scheduler.h>
+#endif
 
 enum cdev_type {
 	CDEV_TYPE_ANY,
@@ -59,7 +62,6 @@ enum cdev_type {
 #define MAX_AAD_SIZE 65535
 #define MAX_PKT_BURST 32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
-#define MAX_SESSIONS 32
 #define SESSION_POOL_CACHE_SIZE 0
 
 #define MAXIMUM_IV_LENGTH	16
@@ -1973,6 +1975,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 	unsigned int cdev_id, cdev_count, enabled_cdev_count = 0;
 	const struct rte_cryptodev_capabilities *cap;
 	unsigned int sess_sz, max_sess_sz = 0;
+	uint32_t sessions_needed = 0;
 	int retval;
 
 	cdev_count = rte_cryptodev_count();
@@ -2010,6 +2013,21 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 		rte_cryptodev_info_get(cdev_id, &dev_info);
 
+		/*
+		 * Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		if (!strcmp(dev_info.driver_name, "crypto_scheduler")) {
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count * nb_slaves;
+#endif
+		} else
+			sessions_needed = 2 * enabled_cdev_count;
+
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
@@ -2022,7 +2040,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 			 * device private data
 			 */
 			sess_mp = rte_mempool_create(mp_name,
-						MAX_SESSIONS * 2,
+						sessions_needed,
 						max_sess_sz,
 						SESSION_POOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 06/16] examples/ipsec-secgw: check for max supported sessions
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (4 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 05/16] examples/l2fwd-crypto: " Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
                     ` (9 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b280..2582dcb6e 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1440,6 +1440,12 @@ cryptodevs_init(void)
 		dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
 		dev_conf.nb_queue_pairs = qp;
 
+		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
+		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+			rte_exit(EXIT_FAILURE,
+				"Device does not support at least %u "
+				"sessions", CDEV_MP_NB_OBJS / 2);
+
 		if (!socket_ctx[dev_conf.socket_id].session_pool) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 07/16] crypto/mvsam: parse max number of sessions
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (5 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
                     ` (8 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The maximum number of sessions device argument will be removed,
as most PMDs do not have a limitation on this number.
Therefore, the MVSAM PMD needs to parse this value internally.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/mvsam/rte_mrvl_pmd.c | 132 ++++++++++++++++++++++++++++++++----
 1 file changed, 120 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 1b6029a56..a7f5389ee 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -16,8 +16,23 @@
 
 #define MRVL_MUSDK_DMA_MEMSIZE 41943040
 
+#define MRVL_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
+#define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS	2048
+
 static uint8_t cryptodev_driver_id;
 
+struct mrvl_pmd_init_params {
+	struct rte_cryptodev_pmd_init_params common;
+	uint32_t max_nb_sessions;
+};
+
+const char *mrvl_pmd_valid_params[] = {
+	RTE_CRYPTODEV_PMD_NAME_ARG,
+	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+	MRVL_PMD_MAX_NB_SESS_ARG
+};
+
 /**
  * Flag if particular crypto algorithm is supported by PMD/MUSDK.
  *
@@ -691,14 +706,15 @@ mrvl_crypto_pmd_dequeue_burst(void *queue_pair,
 static int
 cryptodev_mrvl_crypto_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_cryptodev_pmd_init_params *init_params)
+		struct mrvl_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct mrvl_crypto_private *internals;
 	struct sam_init_params	sam_params;
 	int ret;
 
-	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device,
+			&init_params->common);
 	if (dev == NULL) {
 		MRVL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -718,7 +734,7 @@ cryptodev_mrvl_crypto_create(const char *name,
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
 
-	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
+	internals->max_nb_qpairs = init_params->common.max_nb_queue_pairs;
 	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	/*
@@ -740,12 +756,99 @@ cryptodev_mrvl_crypto_create(const char *name,
 
 init_error:
 	MRVL_CRYPTO_LOG_ERR(
-		"driver %s: %s failed", init_params->name, __func__);
+		"driver %s: %s failed", init_params->common.name, __func__);
 
 	cryptodev_mrvl_crypto_uninit(vdev);
 	return -EFAULT;
 }
 
+/** Parse integer from integer argument */
+static int
+parse_integer_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	int *i = (int *) extra_args;
+
+	*i = atoi(value);
+	if (*i < 0) {
+		MRVL_CRYPTO_LOG_ERR("Argument has to be positive.\n");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+/** Parse name */
+static int
+parse_name_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	struct rte_cryptodev_pmd_init_params *params = extra_args;
+
+	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
+		MRVL_CRYPTO_LOG_ERR("Invalid name %s, should be less than "
+				"%u bytes.\n", value,
+				RTE_CRYPTODEV_NAME_MAX_LEN - 1);
+		return -EINVAL;
+	}
+
+	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
+
+	return 0;
+}
+
+static int
+mrvl_pmd_parse_input_args(struct mrvl_pmd_init_params *params,
+			 const char *input_args)
+{
+	struct rte_kvargs *kvlist = NULL;
+	int ret = 0;
+
+	if (params == NULL)
+		return -EINVAL;
+
+	if (input_args) {
+		kvlist = rte_kvargs_parse(input_args,
+					  mrvl_pmd_valid_params);
+		if (kvlist == NULL)
+			return -1;
+
+		/* Common VDEV parameters */
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+					 &parse_integer_arg,
+					 &params->common.max_nb_queue_pairs);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+					 &parse_integer_arg,
+					 &params->common.socket_id);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_NAME_ARG,
+					 &parse_name_arg,
+					 &params->common);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 MRVL_PMD_MAX_NB_SESS_ARG,
+					 &parse_integer_arg,
+					 params);
+		if (ret < 0)
+			goto free_kvlist;
+
+	}
+
+free_kvlist:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
 /**
  * Initialize the crypto device.
  *
@@ -755,7 +858,18 @@ cryptodev_mrvl_crypto_create(const char *name,
 static int
 cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 {
-	struct rte_cryptodev_pmd_init_params init_params = { };
+	struct mrvl_pmd_init_params init_params = {
+		.common = {
+			.name = "",
+			.private_data_size =
+				sizeof(struct mrvl_crypto_private),
+			.max_nb_queue_pairs =
+				sam_get_num_inst() * SAM_HW_RING_NUM,
+			.socket_id = rte_socket_id()
+		},
+		.max_nb_sessions = MRVL_PMD_DEFAULT_MAX_NB_SESSIONS
+	};
+
 	const char *name, *args;
 	int ret;
 
@@ -764,13 +878,7 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	args = rte_vdev_device_args(vdev);
 
-	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
-	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
-	init_params.max_nb_sessions =
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
-	init_params.socket_id = rte_socket_id();
-
-	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
+	ret = mrvl_pmd_parse_input_args(&init_params, args);
 	if (ret) {
 		RTE_LOG(ERR, PMD,
 			"Failed to parse initialisation arguments[%s]\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (6 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
                     ` (7 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.

Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c            | 2 +-
 doc/guides/rel_notes/release_18_08.rst | 2 ++
 examples/ipsec-secgw/ipsec-secgw.c     | 2 +-
 lib/librte_cryptodev/rte_cryptodev.h   | 5 ++++-
 test/test/test_cryptodev.c             | 6 ++++--
 5 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 74e2165a4..2181d0193 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -172,7 +172,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 		 * A single session is required per queue pair
 		 * in each device
 		 */
-		if (dev_max_nb_sess < opts->nb_qps) {
+		if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
 			RTE_LOG(ERR, USER1,
 				"Device does not support at least "
 				"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 6bf53dc31..2b994ee78 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
 
 * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
   has been replaced with field ``struct rte_device *device``.
+  Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+  supports an unlimited number of sessions.
 
 
 ABI Changes
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
 		dev_conf.nb_queue_pairs = qp;
 
 		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
-		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+		if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
 			rte_exit(EXIT_FAILURE,
 				"Device does not support at least %u "
 				"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 114c9fd6e..7989eb876 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -349,7 +349,10 @@ struct rte_cryptodev_info {
 
 	struct {
 		unsigned max_nb_sessions;
-		/**< Maximum number of sessions supported by device. */
+		/**< Maximum number of sessions supported by device.
+		 * If 0, the device does not have any limitation in
+		 * number of sessions that can be used.
+		 */
 	} sym;
 };
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5c906cfae..73aadaced 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
-	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+	if (info.sym.max_nb_sessions != 0 &&
+			info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 		RTE_LOG(ERR, USER1, "Device does not support "
 				"at least %u sessions\n",
 				MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
-		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		if (info.sym.max_nb_sessions != 0 &&
+				info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 			RTE_LOG(ERR, USER1,
 					"Device does not support "
 					"at least %u sessions\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 09/16] cryptodev: remove max number of sessions parameter
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (7 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 10/16] doc: remove unneeded deprecation notice Pablo de Lara
                     ` (6 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Most crypto PMDs do not have a limitation
of the number of the sessions that can be handled
internally. The value that was set before was not
actually used at all, since the sessions are created
at the application level.
Therefore, this value is not parsed from the initial
crypto parameters anymore and it is set to 0,
meaning that there is no actual limit.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 config/common_base                                 |  7 -------
 config/rte_config.h                                |  7 -------
 doc/guides/cryptodevs/dpaa2_sec.rst                |  5 -----
 doc/guides/cryptodevs/dpaa_sec.rst                 |  5 -----
 doc/guides/prog_guide/cryptodev_lib.rst            |  5 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  5 +----
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  3 ++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |  2 --
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  5 +----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  3 ++-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |  2 --
 drivers/crypto/armv8/rte_armv8_pmd.c               |  5 +----
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  3 ++-
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |  2 --
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  3 ++-
 drivers/crypto/ccp/ccp_pmd_private.h               |  1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   | 16 +---------------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |  2 --
 drivers/crypto/dpaa_sec/dpaa_sec.h                 |  1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  5 +----
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  3 ++-
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |  2 --
 drivers/crypto/null/null_crypto_pmd.c              |  5 +----
 drivers/crypto/null/null_crypto_pmd_ops.c          |  3 ++-
 drivers/crypto/null/null_crypto_pmd_private.h      |  1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  5 +----
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  3 ++-
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |  2 --
 drivers/crypto/qat/qat_sym_pmd.c                   |  6 +++---
 drivers/crypto/qat/qat_sym_pmd.h                   |  1 -
 drivers/crypto/scheduler/scheduler_pmd.c           | 13 +------------
 drivers/crypto/scheduler/scheduler_pmd_ops.c       | 14 +++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  5 +----
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  3 ++-
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |  2 --
 drivers/crypto/virtio/virtio_cryptodev.c           |  7 +++----
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  5 +----
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  3 ++-
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |  2 --
 lib/librte_cryptodev/rte_cryptodev_pmd.c           | 12 ++----------
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  4 ----
 42 files changed, 48 insertions(+), 144 deletions(-)

diff --git a/config/common_base b/config/common_base
index 4236e295b..e84307c66 100644
--- a/config/common_base
+++ b/config/common_base
@@ -472,14 +472,12 @@ CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
 # Compile NXP DPAA2 crypto sec driver for CAAM HW
 #
 CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n
-CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048
 
 #
 # NXP DPAA caam - crypto driver
 #
 CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n
 CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4
-CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048
 
 #
 # Compile PMD for QuickAssist based devices
@@ -498,11 +496,6 @@ CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO=y
 # Number of maximum virtio crypto devices
 #
 CONFIG_RTE_MAX_VIRTIO_CRYPTO=32
-#
-# Number of sessions to create in the session memory pool
-# on a single virtio crypto device.
-#
-CONFIG_RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS=1024
 
 #
 # Compile PMD for AESNI backed device
diff --git a/config/rte_config.h b/config/rte_config.h
index 0ba0ead7e..8a3432aca 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -90,15 +90,8 @@
 #define RTE_PMD_QAT_MAX_PCI_DEVICES 48
 
 /* virtio crypto defines */
-#define RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS 1024
 #define RTE_MAX_VIRTIO_CRYPTO 32
 
-/* DPAA2_SEC */
-#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
-
-/* DPAA_SEC */
-#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
-
 /* DPAA SEC max cryptodev devices*/
 #define RTE_LIBRTE_DPAA_MAX_CRYPTODEV	4
 
diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst
index 3ea24c8aa..990befeb7 100644
--- a/doc/guides/cryptodevs/dpaa2_sec.rst
+++ b/doc/guides/cryptodevs/dpaa2_sec.rst
@@ -200,11 +200,6 @@ Please note that enabling debugging options may affect system performance.
   By default it is only enabled in defconfig_arm64-dpaa2-* config.
   Toggle compilation of the ``librte_pmd_dpaa2_sec`` driver.
 
-* ``CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS``
-  By default it is set as 2048 in defconfig_arm64-dpaa2-* config.
-  It indicates Number of sessions to create in the session memory pool
-  on a single DPAA2 SEC device.
-
 Installations
 -------------
 To compile the DPAA2_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
index c14d6d7b1..c5097a84f 100644
--- a/doc/guides/cryptodevs/dpaa_sec.rst
+++ b/doc/guides/cryptodevs/dpaa_sec.rst
@@ -145,11 +145,6 @@ Please note that enabling debugging options may affect system performance.
   By default it is only enabled in defconfig_arm64-dpaa-* config.
   Toggle compilation of the ``librte_pmd_dpaa_sec`` driver.
 
-* ``CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS``
-  By default it is set as 2048 in defconfig_arm64-dpaa-* config.
-  It indicates Number of sessions to create in the session memory pool
-  on a single DPAA SEC device.
-
 Installations
 -------------
 To compile the DPAA_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index d02bb7514..d2a74a362 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
 
 .. code-block:: console
 
-   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
+   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
 
 .. Note::
 
@@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
 .. code-block:: c
 
    rte_vdev_init("crypto_aesni_mb",
-                     "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
+                     "max_nb_queue_pairs=2,socket_id=0")
 
 All virtual Crypto devices support the following initialization parameters:
 
 * ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
-* ``max_nb_sessions`` - maximum number of sessions supported by the device
 * ``socket_id`` - socket on which to allocate the device resources on.
 
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index d196826f0..88307e0e7 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
 	internals->vector_mode = vector_mode;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_gcm_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index eacbdc09a..1f4edc0f2 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -143,7 +143,8 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->capabilities = aesni_gcm_pmd_capabilities;
 
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 2b9c251c0..0bcd4fa09 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -26,8 +26,6 @@ struct aesni_gcm_private {
 	/**< Vector mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct aesni_gcm_qp {
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 9ae2b54f4..17ac43f0f 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
 
 	internals->vector_mode = vector_mode;
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_mb_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
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 6a96d5077..6cd4134af 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -387,7 +387,8 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = aesni_mb_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
index bad2a8743..91fd7409e 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
@@ -113,8 +113,6 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** AESNI Multi buffer queue pair */
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index fbb08f729..db0d8a2a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct armv8_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index c64aef09f..b654f7528 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -154,7 +154,8 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = armv8_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
index b8966e934..7feb021db 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
+++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
@@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
 struct armv8_crypto_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** ARMv8 crypto queue pair */
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 80b75ccb0..dbe545c10 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -624,7 +624,8 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
 		if (internals->auth_opt == 1)
 			dev_info->capabilities = ccp_crypto_cap_complete;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index f4498048f..79752f687 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -40,7 +40,6 @@
 /* private data structure for each CCP crypto device */
 struct ccp_private {
 	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;	/**< Max number of sessions */
 	uint8_t crypto_num_dev;		/**< Number of working crypto devices */
 	bool auth_opt;			/**< Authentication offload option */
 	struct ccp_device *last_dev;	/**< Last working crypto device */
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 2061f465e..d70640f6d 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
 #define CCP_CRYPTODEV_PARAM_NAME		("name")
 #define CCP_CRYPTODEV_PARAM_SOCKET_ID		("socket_id")
 #define CCP_CRYPTODEV_PARAM_MAX_NB_QP		("max_nb_queue_pairs")
-#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS		("max_nb_sessions")
 #define CCP_CRYPTODEV_PARAM_AUTH_OPT		("ccp_auth_opt")
 
 const char *ccp_pmd_valid_params[] = {
 	CCP_CRYPTODEV_PARAM_NAME,
 	CCP_CRYPTODEV_PARAM_SOCKET_ID,
 	CCP_CRYPTODEV_PARAM_MAX_NB_QP,
-	CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
 	CCP_CRYPTODEV_PARAM_AUTH_OPT,
 };
 
@@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-					 CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
-					 &parse_integer_arg,
-					 &params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 					 CCP_CRYPTODEV_PARAM_SOCKET_ID,
 					 &parse_integer_arg,
@@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
 	internals->auth_opt = init_params->auth_opt;
 	internals->crypto_num_dev = cryptodev_cnt;
 
@@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct ccp_private),
 			rte_socket_id(),
-			CCP_PMD_MAX_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			CCP_PMD_MAX_QUEUE_PAIRS
 		},
 		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
 	};
@@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 		init_params.def_p.socket_id);
 	RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
 		init_params.def_p.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
-		init_params.def_p.max_nb_sessions);
 	RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
 		((init_params.auth_opt == 0) ? "CCP" : "CPU"));
 
@@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"ccp_auth_opt=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 56fa969d3..bc091c560 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2626,7 +2626,8 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa2_sec_capabilities;
-		info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
@@ -2786,7 +2787,6 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
 
 	internals = cryptodev->data->dev_private;
-	internals->max_nb_sessions = RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS;
 
 	/*
 	 * For secondary processes, we don't initialise any further as primary
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
index a9d83ebce..d015be1e9 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
@@ -23,8 +23,6 @@ struct dpaa2_sec_dev_private {
 	uint16_t token; /**< Token required by DPxxx objects */
 	unsigned int max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct dpaa2_sec_qp {
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
index e15e373fd..ac6c00a60 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
@@ -26,6 +26,7 @@
 #define CTX_POOL_NUM_BUFS	32000
 #define CTX_POOL_BUF_SIZE	sizeof(struct dpaa_sec_op_ctx)
 #define CTX_POOL_CACHE_SIZE	512
+#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
 
 #define DIR_ENC                 1
 #define DIR_DEC                 0
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 0e783ed9b..9eb43b2eb 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -559,7 +559,6 @@ cryptodev_kasumi_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -577,8 +576,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct kasumi_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -621,7 +619,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index d087eabe4..5593238f2 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -126,7 +126,8 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = kasumi_pmd_capabilities;
 	}
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
index 102334e0a..488777ca8 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
@@ -24,8 +24,6 @@ int kasumi_logtype_driver;
 struct kasumi_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** KASUMI buffer queue pair */
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 8699f1219..07276833b 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -181,7 +181,6 @@ cryptodev_null_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -194,8 +193,7 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
 		"",
 		sizeof(struct null_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 9a78e91d1..55778a255 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -121,7 +121,8 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = null_crypto_pmd_capabilities;
 	}
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 190b88dc7..d5905afd8 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -19,7 +19,6 @@ int null_logtype_driver;
 /** private data structure for each NULL crypto device */
 struct null_crypto_private {
 	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
-	unsigned max_nb_sessions;	/**< Max number of sessions */
 };
 
 /** NULL crypto queue pair */
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index bfdfcdd9a..1ccab4ab5 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -1686,8 +1685,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct openssl_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
 	cryptodev_openssl_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 488afcf7d..a1a2d9900 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -547,7 +547,8 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = openssl_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
index 051fb203d..29fcb761a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
+++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
@@ -49,8 +49,6 @@ enum openssl_auth_mode {
 struct openssl_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** OPENSSL crypto queue pair */
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 0bc042a75..84dd5bec8 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -72,8 +72,9 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 			qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC);
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = internals->qat_dev_capabilities;
-		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 	}
 }
 
@@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	struct rte_cryptodev_pmd_init_params init_params = {
 			.name = "",
 			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
-			.private_data_size = sizeof(struct qat_sym_dev_private),
-			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
+			.private_data_size = sizeof(struct qat_sym_dev_private)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 	struct rte_cryptodev *cryptodev;
diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
index 439aeb98a..d34328544 100644
--- a/drivers/crypto/qat/qat_sym_pmd.h
+++ b/drivers/crypto/qat/qat_sym_pmd.h
@@ -14,7 +14,6 @@
 
 /**< Intel(R) QAT Symmetric Crypto PMD device name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
-#define QAT_SYM_PMD_MAX_NB_SESSIONS	2048
 
 extern uint8_t cryptodev_qat_driver_id;
 
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 5489e9ed0..6c5c01d63 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -31,7 +31,6 @@ struct scheduler_init_params {
 #define RTE_CRYPTODEV_VDEV_MODE			("mode")
 #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
 #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
 #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
 #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
 #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
@@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MODE,
 	RTE_CRYPTODEV_VDEV_ORDERING,
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
 	RTE_CRYPTODEV_VDEV_CORELIST
@@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
-				&parse_integer_arg,
-				&params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
 				&parse_integer_arg,
 				&params->def_p.socket_id);
@@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct scheduler_ctx),
 			rte_socket_id(),
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 		},
 		.nb_slaves = 0,
 		.mode = CDEV_SCHED_MODE_NOT_SET,
@@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
 	cryptodev_scheduler_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"slave=<name>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 874205849..802585f4c 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -321,8 +321,7 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info *dev_info)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
-	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
-			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
+	uint32_t max_nb_sess = 0;
 	uint32_t i;
 
 	if (!dev_info)
@@ -338,17 +337,18 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info slave_info;
 
 		rte_cryptodev_info_get(slave_dev_id, &slave_info);
-		max_nb_sessions = slave_info.sym.max_nb_sessions <
-				max_nb_sessions ?
-				slave_info.sym.max_nb_sessions :
-				max_nb_sessions;
+		uint32_t dev_max_sess = slave_info.sym.max_nb_sessions;
+		if (dev_max_sess != 0) {
+			if (max_nb_sess == 0 ||	dev_max_sess < max_nb_sess)
+				max_nb_sess = slave_info.sym.max_nb_sessions;
+		}
 	}
 
 	dev_info->driver_id = dev->driver_id;
 	dev_info->feature_flags = dev->feature_flags;
 	dev_info->capabilities = sched_ctx->capabilities;
 	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
-	dev_info->sym.max_nb_sessions = max_nb_sessions;
+	dev_info->sym.max_nb_sessions = max_nb_sess;
 }
 
 /** Release queue pair */
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 72751e35e..26dfbbc38 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -573,8 +572,7 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct snow3g_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index f60b47598..6f8b9e2c6 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -130,7 +130,8 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = snow3g_pmd_capabilities;
 	}
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
index eea900e0a..2c6e1a948 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
@@ -36,8 +36,6 @@
 struct snow3g_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** SNOW 3G buffer queue pair */
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 482edea1a..1da4ae871 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1411,8 +1411,8 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 		info->driver_id = cryptodev_virtio_driver_id;
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
-		info->sym.max_nb_sessions =
-			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->capabilities = hw->virtio_dev_capabilities;
 	}
 }
@@ -1425,8 +1425,7 @@ crypto_virtio_pci_probe(
 	struct rte_cryptodev_pmd_init_params init_params = {
 		.name = "",
 		.socket_id = rte_socket_id(),
-		.private_data_size = sizeof(struct virtio_crypto_hw),
-		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
+		.private_data_size = sizeof(struct virtio_crypto_hw)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 119d393e4..8de5c27db 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -478,7 +478,6 @@ cryptodev_zuc_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -496,8 +495,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct zuc_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -540,7 +538,6 @@ static struct cryptodev_driver zuc_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 87c44ceb9..e151750fb 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -130,7 +130,8 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = zuc_pmd_capabilities;
 	}
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
index 69cc32e54..5e5906ddb 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
+++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
@@ -24,8 +24,6 @@ int zuc_logtype_driver;
 struct zuc_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** ZUC buffer queue pair */
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index f2aac24b7..2088ac3f3 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
-				&rte_cryptodev_pmd_parse_uint_arg,
-				&params->max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
 				&rte_cryptodev_pmd_parse_uint_arg,
@@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
 			device->driver->name, name);
 
 	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
-			"socket id: %d, max queue pairs: %u, max sessions: %u",
+			"socket id: %d, max queue pairs: %u",
 			device->driver->name, name,
-			params->socket_id, params->max_nb_queue_pairs,
-			params->max_nb_sessions);
+			params->socket_id, params->max_nb_queue_pairs);
 
 	/* allocate device structure */
 	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index db8b97665..1fb7e7d5e 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -32,18 +32,15 @@ extern "C" {
 
 
 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
-#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
 
 #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
 #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
 #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
 
 
 static const char * const cryptodev_pmd_valid_params[] = {
 	RTE_CRYPTODEV_PMD_NAME_ARG,
 	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
 };
 
@@ -56,7 +53,6 @@ struct rte_cryptodev_pmd_init_params {
 	size_t private_data_size;
 	int socket_id;
 	unsigned int max_nb_queue_pairs;
-	unsigned int max_nb_sessions;
 };
 
 /** Global structure used for maintaining state of allocated crypto devices */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 10/16] doc: remove unneeded deprecation notice
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (8 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
                     ` (5 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

In release 18.05, a deprecation notice to remove the `sym`
structure in the cryptodev info structure was sent.
However, only one of the fields inside the structure will
be removed, so the notice is not actually correct.
In any case, it needs to be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index b71080bb8..dc014da21 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -101,9 +101,6 @@ Deprecation Notices
 * cryptodev: The following changes will be made in the library
   for 18.08:
 
-  - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
-    containing fields not relevant anymore since the session mempool
-    is not internal in the crypto device anymore.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (9 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 10/16] doc: remove unneeded deprecation notice Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions Pablo de Lara
                     ` (4 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  4 ---
 doc/guides/rel_notes/release_18_08.rst         |  5 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 -----------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 16 ----------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 22 -------------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 22 -------------
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 -----------
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 28 ----------------
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 -----------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 -----------
 drivers/crypto/qat/qat_sym_pmd.c               |  2 --
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 18 -----------
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 -----------
 drivers/crypto/virtio/virtio_cryptodev.c       |  2 --
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 -----------
 lib/librte_cryptodev/rte_cryptodev.c           | 44 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 37 ----------------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 26 ---------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 21 files changed, 5 insertions(+), 367 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Functions ``rte_cryptodev_queue_pair_start()`` and
-    ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
-    and removed in 18.08, as there are no drivers doing anything useful
-    with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
   - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2b994ee78..cfb2885a1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
   Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
   supports an unlimited number of sessions.
 
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+  - ``rte_cryptodev_queue_pair_start``
+  - ``rte_cryptodev_queue_pair_stop``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 1f4edc0f2..489d2e08f 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -242,22 +242,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -339,8 +323,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 
 		.queue_pair_setup	= aesni_gcm_pmd_qp_setup,
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
-		.queue_pair_start	= aesni_gcm_pmd_qp_start,
-		.queue_pair_stop	= aesni_gcm_pmd_qp_stop,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
 		.session_get_size	= aesni_gcm_pmd_session_get_size,
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 6cd4134af..b806c4d52 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 
 		.queue_pair_setup	= aesni_mb_pmd_qp_setup,
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
-		.queue_pair_start	= aesni_mb_pmd_qp_start,
-		.queue_pair_stop	= aesni_mb_pmd_qp_stop,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
 		.session_get_size	= aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 
 		.queue_pair_setup	= armv8_crypto_pmd_qp_setup,
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
-		.queue_pair_start	= armv8_crypto_pmd_qp_start,
-		.queue_pair_stop	= armv8_crypto_pmd_qp_stop,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
 		.session_get_size	= armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
-		 uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
-		uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
 static uint32_t
 ccp_pmd_qp_count(struct rte_cryptodev *dev)
 {
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
 
 		.queue_pair_setup	= ccp_pmd_qp_setup,
 		.queue_pair_release	= ccp_pmd_qp_release,
-		.queue_pair_start	= ccp_pmd_qp_start,
-		.queue_pair_stop	= ccp_pmd_qp_stop,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
 		.session_get_size	= ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return retcode;
 }
 
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			   __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.stats_reset	      = dpaa2_sec_stats_reset,
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
-	.queue_pair_start     = dpaa2_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa2_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
 	.session_get_size     = dpaa2_sec_session_get_size,
 	.session_configure    = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			 __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.dev_infos_get        = dpaa_sec_dev_infos_get,
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
-	.queue_pair_start     = dpaa_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 5593238f2..c7556d478 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 
 		.queue_pair_setup   = kasumi_pmd_qp_setup,
 		.queue_pair_release = kasumi_pmd_qp_release,
-		.queue_pair_start   = kasumi_pmd_qp_start,
-		.queue_pair_stop    = kasumi_pmd_qp_stop,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
 		.session_get_size   = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..f83a6115f 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -595,32 +595,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs (PMD ops callback).
  *
  * @param dev Pointer to the device structure.
@@ -738,8 +712,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 
 		.queue_pair_setup	= mrvl_crypto_pmd_qp_setup,
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
-		.queue_pair_start	= mrvl_crypto_pmd_qp_start,
-		.queue_pair_stop	= mrvl_crypto_pmd_qp_stop,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
 		.session_get_size	= mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 55778a255..66bd62bd3 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -241,22 +241,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -337,8 +321,6 @@ struct rte_cryptodev_ops pmd_ops = {
 
 		.queue_pair_setup	= null_crypto_pmd_qp_setup,
 		.queue_pair_release	= null_crypto_pmd_qp_release,
-		.queue_pair_start	= null_crypto_pmd_qp_start,
-		.queue_pair_stop	= null_crypto_pmd_qp_stop,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
 		.session_get_size	= null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index a1a2d9900..20d4e26de 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 
 		.queue_pair_setup	= openssl_pmd_qp_setup,
 		.queue_pair_release	= openssl_pmd_qp_release,
-		.queue_pair_start	= openssl_pmd_qp_start,
-		.queue_pair_stop	= openssl_pmd_qp_stop,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
 		.session_get_size	= openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.stats_reset		= qat_sym_stats_reset,
 		.queue_pair_setup	= qat_sym_qp_setup,
 		.queue_pair_release	= qat_sym_qp_release,
-		.queue_pair_start	= NULL,
-		.queue_pair_stop	= NULL,
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 802585f4c..9b2f99eb2 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 
 		.queue_pair_setup	= scheduler_pmd_qp_setup,
 		.queue_pair_release	= scheduler_pmd_qp_release,
-		.queue_pair_start	= scheduler_pmd_qp_start,
-		.queue_pair_stop	= scheduler_pmd_qp_stop,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
 		.session_get_size	= scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 6f8b9e2c6..fe882c366 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 
 		.queue_pair_setup   = snow3g_pmd_qp_setup,
 		.queue_pair_release = snow3g_pmd_qp_release,
-		.queue_pair_start   = snow3g_pmd_qp_start,
-		.queue_pair_stop    = snow3g_pmd_qp_stop,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
 		.session_get_size   = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1da4ae871..0be435c8c 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 
 	.queue_pair_setup                = virtio_crypto_qp_setup,
 	.queue_pair_release              = virtio_crypto_qp_release,
-	.queue_pair_start                = NULL,
-	.queue_pair_stop                 = NULL,
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index e151750fb..1d72a0757 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -328,8 +312,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 
 		.queue_pair_setup   = zuc_pmd_qp_setup,
 		.queue_pair_release = zuc_pmd_qp_release,
-		.queue_pair_start   = zuc_pmd_qp_start,
-		.queue_pair_stop    = zuc_pmd_qp_stop,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
 		.session_get_size   = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
 	return 0;
 }
 
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
 int
 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 7989eb876..b5d208917 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -566,43 +566,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
 		struct rte_mempool *session_pool);
 
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to start. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_crypto_dev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to stop. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_cryptodev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
 /**
  * Get the number of queue pairs on a specific crypto device
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1fb7e7d5e..641dd1369 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -184,28 +184,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
 typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
 				struct rte_cryptodev_info *dev_info);
 
-/**
- * Start queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
 /**
  * Setup a queue pair for a device.
  *
@@ -344,10 +322,6 @@ struct rte_cryptodev_ops {
 	/**< Set up a device queue pair. */
 	cryptodev_queue_pair_release_t queue_pair_release;
 	/**< Release a queue pair. */
-	cryptodev_queue_pair_start_t queue_pair_start;
-	/**< Start a queue pair. */
-	cryptodev_queue_pair_stop_t queue_pair_stop;
-	/**< Stop a queue pair. */
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
 	rte_cryptodev_stop;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
-	rte_cryptodev_queue_pair_start;
-	rte_cryptodev_queue_pair_stop;
 	rte_crypto_op_pool_create;
 
 	local: *;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (10 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
                     ` (3 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  6 ------
 doc/guides/rel_notes/release_18_08.rst         |  8 ++++++++
 lib/librte_cryptodev/rte_cryptodev.c           | 12 ------------
 lib/librte_cryptodev/rte_cryptodev.h           | 25 -------------------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 5 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
     with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
-  - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
-    It will be removed in 18.08.
-  - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
-    It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index cfb2885a1..e482d3d5f 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
 
+* cryptodev: Following functions were deprecated and are replaced by
+  other functions in 18.08:
+
+  - ``rte_cryptodev_get_header_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_header_session_size``
+  - ``rte_cryptodev_get_private_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_private_session_size``
+
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 	return 0;
 }
 
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
-	return rte_cryptodev_sym_get_header_session_size();
-}
-
 unsigned int
 rte_cryptodev_sym_get_header_session_size(void)
 {
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
 	return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
 }
 
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
-	return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b5d208917..cc219c722 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -898,31 +898,6 @@ int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 			struct rte_cryptodev_sym_session *sess);
 
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- *   Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param	dev_id		The device identifier.
- *
- * @return
- *   - Size of the private data, if successful
- *   - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
 /**
  * Get the size of the header session, for all registered drivers.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
 	rte_cryptodev_driver_id_get;
 	rte_cryptodev_driver_name_get;
 	rte_cryptodev_get_aead_algo_enum;
-	rte_cryptodev_get_header_session_size;
-	rte_cryptodev_get_private_session_size;
 	rte_cryptodev_sym_capability_check_aead;
 	rte_cryptodev_sym_session_init;
 	rte_cryptodev_sym_session_clear;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (11 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 14/16] cryptodev: remove attach/detach session API Pablo de Lara
                     ` (2 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.

Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/rel_notes/deprecation.rst        |  2 --
 doc/guides/rel_notes/release_18_08.rst      |  8 +++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c    |  2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  6 +++-
 drivers/crypto/dpaa_sec/dpaa_sec.c          |  6 +++-
 drivers/crypto/null/null_crypto_pmd.c       |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c    |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c            |  6 +++-
 lib/librte_cryptodev/rte_cryptodev.c        | 12 ++++++--
 lib/librte_cryptodev/rte_cryptodev.h        | 46 +++++++++++++++++++----------
 test/test/test_cryptodev.c                  | 31 +++++++++++++------
 test/test/test_cryptodev_blockcipher.c      | 21 ++++++++++---
 12 files changed, 106 insertions(+), 38 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
-    so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..9cf3ea3df 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
   - ``rte_cryptodev_get_private_session_size`` is replaced with
     ``rte_cryptodev_sym_get_private_session_size``
 
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+  replaced with the following more explicit flags:
+  - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+  - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 88307e0e7..937173094 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
 
 	switch (vector_mode) {
 	case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..1dd8dab83 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..49ff7584e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 07276833b..3d7caf1f1 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -176,7 +176,7 @@ cryptodev_null_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL;
 
 	internals = dev->data->dev_private;
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 1ccab4ab5..b4686a7da 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
 
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..33ac831fe 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..608db36c7 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		return "CPU_AESNI";
 	case RTE_CRYPTODEV_FF_HW_ACCELERATED:
 		return "HW_ACCELERATED";
-	case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
-		return "MBUF_SCATTER_GATHER";
+	case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+		return "IN_PLACE_SGL";
+	case RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT:
+		return "OOP_SGL_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT:
+		return "OOP_SGL_IN_FB_OUT";
+	case RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT:
+		return "OOP_FB_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT:
+		return "OOP_FB_IN_FB_OUT";
 	case RTE_CRYPTODEV_FF_CPU_NEON:
 		return "CPU_NEON";
 	case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index cc219c722..7942527e8 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -292,31 +292,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
  *
  * Keep these flags synchronised with rte_cryptodev_get_feature_name()
  */
-#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO	(1ULL << 0)
+#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO		(1ULL << 0)
 /**< Symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO	(1ULL << 1)
+#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO		(1ULL << 1)
 /**< Asymmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING	(1ULL << 2)
+#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING		(1ULL << 2)
 /**< Chaining symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_CPU_SSE		(1ULL << 3)
+#define	RTE_CRYPTODEV_FF_CPU_SSE			(1ULL << 3)
 /**< Utilises CPU SIMD SSE instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX		(1ULL << 4)
+#define	RTE_CRYPTODEV_FF_CPU_AVX			(1ULL << 4)
 /**< Utilises CPU SIMD AVX instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX2		(1ULL << 5)
+#define	RTE_CRYPTODEV_FF_CPU_AVX2			(1ULL << 5)
 /**< Utilises CPU SIMD AVX2 instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AESNI		(1ULL << 6)
+#define	RTE_CRYPTODEV_FF_CPU_AESNI			(1ULL << 6)
 /**< Utilises CPU AES-NI instructions */
-#define	RTE_CRYPTODEV_FF_HW_ACCELERATED		(1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define	RTE_CRYPTODEV_FF_CPU_AVX512		(1ULL << 8)
+#define	RTE_CRYPTODEV_FF_HW_ACCELERATED			(1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define	RTE_CRYPTODEV_FF_CPU_AVX512			(1ULL << 8)
 /**< Utilises CPU SIMD AVX512 instructions */
-#define	RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER	(1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define	RTE_CRYPTODEV_FF_CPU_NEON		(1ULL << 10)
+#define	RTE_CRYPTODEV_FF_IN_PLACE_SGL			(1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT		(1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT		(1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT		(1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT		(1ULL << 13)
+/**< Out-of-place flat buffers (FB) are supported in input and output */
+#define	RTE_CRYPTODEV_FF_CPU_NEON			(1ULL << 14)
 /**< Utilises CPU NEON instructions */
-#define	RTE_CRYPTODEV_FF_CPU_ARM_CE		(1ULL << 11)
+#define	RTE_CRYPTODEV_FF_CPU_ARM_CE			(1ULL << 15)
 /**< Utilises ARM CPU Cryptographic Extensions */
-#define	RTE_CRYPTODEV_FF_SECURITY		(1ULL << 12)
+#define	RTE_CRYPTODEV_FF_SECURITY			(1ULL << 16)
 /**< Support Security Protocol Processing */
 
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..e23eecb66 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 		return -ENOTSUP;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
-		return -ENOTSUP;
+		return 0;
 	}
 
 	plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..712771605 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
 		rte_cryptodev_info_get(dev_id, &dev_info);
-		if (!(dev_info.feature_flags &
-				RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-			printf("Device doesn't support scatter-gather. "
+		uint64_t feat_flags = dev_info.feature_flags;
+		uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
+
+		if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+			if (!(feat_flags & oop_flag)) {
+				printf("Device doesn't support out-of-place "
+					"scatter-gather in input mbuf. "
+					"Test Skipped.\n");
+				return 0;
+			}
+		} else {
+			if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+				printf("Device doesn't support in-place "
+					"scatter-gather mbufs. "
 					"Test Skipped.\n");
-			return 0;
+				return 0;
+			}
 		}
+
 		nb_segs = 3;
 	}
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 14/16] cryptodev: remove attach/detach session API
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (12 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

As announced in the previous release,
The API to attach/dettach a session to a queue pair
is removed, as it was only used in DPAA, and it is not
actually needed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  8 ----
 doc/guides/rel_notes/release_18_08.rst         |  2 +
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 32 +--------------
 drivers/crypto/virtio/virtio_cryptodev.c       |  4 +-
 lib/librte_cryptodev/rte_cryptodev.c           | 54 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 36 -----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 30 --------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 -
 8 files changed, 4 insertions(+), 164 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 62d635b74..8bdaaaf5d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -97,11 +97,3 @@ Deprecation Notices
   - ``rte_pdump_set_socket_dir`` will be removed;
   - The parameter, ``path``, of ``rte_pdump_init`` will be removed;
   - The enum ``rte_pdump_socktype`` will be removed.
-
-* cryptodev: The following changes will be made in the library
-  for 18.08:
-
-  - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
-    ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
-    18.05 and removed in 18.08, as there are no drivers doing anything useful
-    with them.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 9cf3ea3df..ef03f4ef6 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -69,6 +69,8 @@ API Changes
 
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
+  - ``rte_cryptodev_queue_pair_attach_sym_session``
+  - ``rte_cryptodev_queue_pair_detach_sym_session``
 
 * cryptodev: Following functions were deprecated and are replaced by
   other functions in 18.08:
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 49ff7584e..f540bb4ad 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1734,34 +1734,6 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess)
 	return ret;
 }
 
-static int
-dpaa_sec_qp_attach_sess(struct rte_cryptodev *dev __rte_unused,
-			uint16_t qp_id __rte_unused,
-			void *ses __rte_unused)
-{
-	PMD_INIT_FUNC_TRACE();
-	return 0;
-}
-
-static int
-dpaa_sec_qp_detach_sess(struct rte_cryptodev *dev,
-			uint16_t qp_id  __rte_unused,
-			void *ses)
-{
-	dpaa_sec_session *sess = ses;
-	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
-
-	PMD_INIT_FUNC_TRACE();
-
-	if (sess->inq)
-		dpaa_sec_detach_rxq(qi, sess->inq);
-	sess->inq = NULL;
-
-	sess->qp = NULL;
-
-	return 0;
-}
-
 static int
 dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 			    struct rte_crypto_sym_xform *xform,	void *sess)
@@ -2210,9 +2182,7 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear,
-	.qp_attach_session    = dpaa_sec_qp_attach_sess,
-	.qp_detach_session    = dpaa_sec_qp_detach_sess,
+	.session_clear        = dpaa_sec_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 0be435c8c..f7021b38b 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -520,9 +520,7 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	/* Crypto related operations */
 	.session_get_size	= virtio_crypto_sym_get_session_private_size,
 	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session,
-	.qp_attach_session = NULL,
-	.qp_detach_session = NULL
+	.session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 608db36c7..8f990b9ab 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1095,60 +1095,6 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 	return sess;
 }
 
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_attach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_attach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to attach qp: %d with session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_detach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_detach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to detach qp: %d from session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 		struct rte_cryptodev_sym_session *sess)
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 7942527e8..2049a745d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -937,42 +937,6 @@ rte_cryptodev_sym_get_header_session_size(void);
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id);
 
-/**
- * @deprecated
- * Attach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session will be attached.
- * @param	qp_id		Queue pair to which the session will be attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
-/**
- * @deprecated
- * Detach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session is attached.
- * @param	qp_id		Queue pair to which the session is attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
 /**
  * Provide driver identifier.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 641dd1369..ec4f1ecfb 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -278,32 +278,6 @@ typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
 typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess);
 
-/**
- * Optional API for drivers to attach sessions with queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for attaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_attach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
-/**
- * Optional API for drivers to detach sessions from queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for detaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_detach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
 /** Crypto device operations function pointer table */
 struct rte_cryptodev_ops {
 	cryptodev_configure_t dev_configure;	/**< Configure device. */
@@ -331,10 +305,6 @@ struct rte_cryptodev_ops {
 	/**< Configure a Crypto session. */
 	cryptodev_sym_free_session_t session_clear;
 	/**< Clear a Crypto sessions private data. */
-	cryptodev_sym_queue_pair_attach_session_t qp_attach_session;
-	/**< Attach session to queue pair. */
-	cryptodev_sym_queue_pair_detach_session_t qp_detach_session;
-	/**< Detach session from queue pair. */
 };
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 0ab6d5195..77abd8ddc 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -50,8 +50,6 @@ DPDK_17.05 {
 
 	rte_cryptodev_get_auth_algo_enum;
 	rte_cryptodev_get_cipher_algo_enum;
-	rte_cryptodev_queue_pair_attach_sym_session;
-	rte_cryptodev_queue_pair_detach_sym_session;
 
 } DPDK_17.02;
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 15/16] cryptodev: rename PMD symmetric session API
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (13 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 14/16] cryptodev: remove attach/detach session API Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The PMD specific API to configure, clear and
obtain session private size is renamed, including
the word _sym_ to clarify that it is API
for symmetric sessions, so there will not be any
conflicts for asymmetric and other type of sessions
in the future.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c       |  6 +++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 ++++++++---------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     |  8 ++++----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 ++++++++---------
 drivers/crypto/armv8/rte_armv8_pmd.c           |  6 +++---
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 ++++++++---------
 drivers/crypto/ccp/ccp_crypto.c                | 28 +++++++++++++-------------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 18 ++++++++---------
 drivers/crypto/ccp/rte_ccp_pmd.c               |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 20 +++++++++---------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 20 +++++++++---------
 drivers/crypto/kasumi/rte_kasumi_pmd.c         |  6 +++---
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 ++++++++---------
 drivers/crypto/mvsam/rte_mrvl_pmd.c            |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 18 ++++++++---------
 drivers/crypto/null/null_crypto_pmd.c          |  6 +++---
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 ++++++++---------
 drivers/crypto/openssl/rte_openssl_pmd.c       |  6 +++---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 ++++++++---------
 drivers/crypto/qat/qat_sym.c                   |  2 +-
 drivers/crypto/qat/qat_sym.h                   |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c               |  6 +++---
 drivers/crypto/qat/qat_sym_session.c           |  6 +++---
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 14 ++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c         |  6 +++---
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 ++++++++---------
 drivers/crypto/virtio/virtio_cryptodev.c       | 10 ++++-----
 drivers/crypto/virtio/virtio_rxtx.c            |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c               |  6 +++---
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 ++++++++---------
 lib/librte_cryptodev/rte_cryptodev.c           | 11 +++++-----
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 10 ++++-----
 32 files changed, 184 insertions(+), 183 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 937173094..7315897f2 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -127,7 +127,7 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(sym_op->session != NULL))
 			sess = (struct aesni_gcm_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					sym_op->session,
 					cryptodev_driver_id);
 	} else  {
@@ -149,8 +149,8 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(sym_op->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(sym_op->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 489d2e08f..b6b4dd028 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -251,14 +251,14 @@ aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned
-aesni_gcm_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_gcm_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_gcm_session);
 }
 
 /** Configure a aesni gcm session from a crypto xform chain */
 static int
-aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+aesni_gcm_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -287,7 +287,7 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -295,17 +295,17 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_gcm_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_gcm_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct aesni_gcm_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -325,9 +325,9 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
-		.session_get_size	= aesni_gcm_pmd_session_get_size,
-		.session_configure	= aesni_gcm_pmd_session_configure,
-		.session_clear		= aesni_gcm_pmd_session_clear
+		.sym_session_get_size	= aesni_gcm_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_gcm_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_gcm_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_gcm_pmd_ops = &aesni_gcm_pmd_ops;
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 17ac43f0f..85b37cda5 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -458,7 +458,7 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct aesni_mb_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -480,8 +480,8 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
@@ -658,7 +658,7 @@ static inline struct rte_crypto_op *
 post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
 {
 	struct rte_crypto_op *op = (struct rte_crypto_op *)job->user_data;
-	struct aesni_mb_session *sess = get_session_private_data(
+	struct aesni_mb_session *sess = get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
 
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 b806c4d52..fa3e96316 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -518,14 +518,14 @@ aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni multi-buffer session structure */
 static unsigned
-aesni_mb_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_mb_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_mb_session);
 }
 
 /** Configure a aesni multi-buffer session from a crypto xform chain */
 static int
-aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -555,7 +555,7 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -563,17 +563,17 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_mb_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct aesni_mb_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -593,9 +593,9 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
-		.session_get_size	= aesni_mb_pmd_session_get_size,
-		.session_configure	= aesni_mb_pmd_session_configure,
-		.session_clear		= aesni_mb_pmd_session_clear
+		.sym_session_get_size	= aesni_mb_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_mb_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_mb_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops = &aesni_mb_pmd_ops;
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index db0d8a2a9..9d15fee53 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -502,7 +502,7 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 		/* get existing session */
 		if (likely(op->sym->session != NULL)) {
 			sess = (struct armv8_crypto_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 		}
@@ -526,8 +526,8 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 5e8a5a292..ae03117ea 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -267,14 +267,14 @@ armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-armv8_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+armv8_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct armv8_crypto_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -302,7 +302,7 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -310,17 +310,17 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-armv8_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct armv8_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -340,9 +340,9 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
-		.session_get_size	= armv8_crypto_pmd_session_get_size,
-		.session_configure	= armv8_crypto_pmd_session_configure,
-		.session_clear		= armv8_crypto_pmd_session_clear
+		.sym_session_get_size	= armv8_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= armv8_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= armv8_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_armv8_crypto_pmd_ops = &armv8_crypto_pmd_ops;
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 3ce0f39f3..19ae9153d 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1566,7 +1566,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
 	void *append_ptr;
 	uint8_t *addr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 	addr = session->auth.pre_compute;
@@ -1739,7 +1739,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
 	void *append_ptr;
 	uint64_t auth_msg_bits;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -1828,7 +1828,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
 	uint32_t tail;
 	phys_addr_t src_addr, dest_addr, ctx_paddr, dest_addr_t;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -1968,7 +1968,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
 	uint32_t tail;
 	phys_addr_t src_addr, dest_addr, ctx_paddr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2036,7 +2036,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
 	phys_addr_t src_addr, dest_addr, key_addr;
 	int length, non_align_len;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 	key_addr = rte_mem_virt2phy(session->auth.key_ccp);
@@ -2188,7 +2188,7 @@ ccp_perform_aes(struct rte_crypto_op *op,
 	phys_addr_t src_addr, dest_addr, key_addr;
 	uint8_t *iv;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 	function.raw = 0;
@@ -2276,7 +2276,7 @@ ccp_perform_3des(struct rte_crypto_op *op,
 	uint8_t *iv;
 	phys_addr_t src_addr, dest_addr, key_addr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2379,7 +2379,7 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
 	phys_addr_t digest_dest_addr;
 	int length, non_align_len;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
@@ -2546,7 +2546,7 @@ ccp_crypto_cipher(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 
@@ -2584,7 +2584,7 @@ ccp_crypto_auth(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2654,7 +2654,7 @@ ccp_crypto_aead(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2711,7 +2711,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
 	b_info->head_offset = (uint32_t)(cmd_q->qbase_phys_addr + cmd_q->qidx *
 					 Q_DESC_SIZE);
 	for (i = 0; i < nb_ops; i++) {
-		session = (struct ccp_session *)get_session_private_data(
+		session = (struct ccp_session *)get_sym_session_private_data(
 						 op[i]->sym->session,
 						 ccp_cryptodev_driver_id);
 		switch (session->cmd_id) {
@@ -2787,7 +2787,7 @@ static inline void ccp_auth_dq_prepare(struct rte_crypto_op *op)
 	int offset, digest_offset;
 	uint8_t digest_le[64];
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2863,7 +2863,7 @@ ccp_prepare_ops(struct ccp_qp *qp,
 
 	for (i = 0; i < min_ops; i++) {
 		op_d[i] = b_info->op[b_info->op_idx++];
-		session = (struct ccp_session *)get_session_private_data(
+		session = (struct ccp_session *)get_sym_session_private_data(
 						 op_d[i]->sym->session,
 						ccp_cryptodev_driver_id);
 		switch (session->cmd_id) {
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 1cb944406..6984913f1 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -755,13 +755,13 @@ ccp_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static unsigned
-ccp_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+ccp_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct ccp_session);
 }
 
 static int
-ccp_pmd_session_configure(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_configure(struct rte_cryptodev *dev,
 			  struct rte_crypto_sym_xform *xform,
 			  struct rte_cryptodev_sym_session *sess,
 			  struct rte_mempool *mempool)
@@ -788,25 +788,25 @@ ccp_pmd_session_configure(struct rte_cryptodev *dev,
 		rte_mempool_put(mempool, sess_private_data);
 		return ret;
 	}
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 				 sess_private_data);
 
 	return 0;
 }
 
 static void
-ccp_pmd_session_clear(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		      struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	if (sess_priv) {
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
 		rte_mempool_put(sess_mp, sess_priv);
 		memset(sess_priv, 0, sizeof(struct ccp_session));
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 	}
 }
 
@@ -825,9 +825,9 @@ struct rte_cryptodev_ops ccp_ops = {
 		.queue_pair_release	= ccp_pmd_qp_release,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
-		.session_get_size	= ccp_pmd_session_get_size,
-		.session_configure	= ccp_pmd_session_configure,
-		.session_clear		= ccp_pmd_session_clear,
+		.sym_session_get_size	= ccp_pmd_sym_session_get_size,
+		.sym_session_configure	= ccp_pmd_sym_session_configure,
+		.sym_session_clear	= ccp_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *ccp_pmd_ops = &ccp_ops;
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index d70640f6d..92d8a9559 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -160,7 +160,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
 			return NULL;
 
 		sess = (struct ccp_session *)
-			get_session_private_data(
+			get_sym_session_private_data(
 				op->sym->session,
 				ccp_cryptodev_driver_id);
 	} else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
@@ -183,7 +183,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session,
+		set_sym_session_private_data(op->sym->session,
 					 ccp_cryptodev_driver_id,
 					 _sess_private_data);
 	}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1dd8dab83..9ecaeee91 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1080,7 +1080,7 @@ build_sec_fd(struct rte_crypto_op *op,
 	PMD_INIT_FUNC_TRACE();
 
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
-		sess = (dpaa2_sec_session *)get_session_private_data(
+		sess = (dpaa2_sec_session *)get_sym_session_private_data(
 				op->sym->session, cryptodev_driver_id);
 	else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
 		sess = (dpaa2_sec_session *)get_sec_session_private_data(
@@ -1481,7 +1481,7 @@ dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned int
-dpaa2_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa2_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -2436,7 +2436,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
 }
 
 static int
-dpaa2_sec_session_configure(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -2457,7 +2457,7 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -2465,12 +2465,12 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa2_sec_session_clear(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	PMD_INIT_FUNC_TRACE();
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 	dpaa2_sec_session *s = (dpaa2_sec_session *)sess_priv;
 
 	if (sess_priv) {
@@ -2479,7 +2479,7 @@ dpaa2_sec_session_clear(struct rte_cryptodev *dev,
 		rte_free(s->auth_key.data);
 		memset(sess, 0, sizeof(dpaa2_sec_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -2697,9 +2697,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
-	.session_get_size     = dpaa2_sec_session_get_size,
-	.session_configure    = dpaa2_sec_session_configure,
-	.session_clear        = dpaa2_sec_session_clear,
+	.sym_session_get_size     = dpaa2_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa2_sec_sym_session_configure,
+	.sym_session_clear        = dpaa2_sec_sym_session_clear,
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index f540bb4ad..1a1e8fa94 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1416,7 +1416,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
 			switch (op->sess_type) {
 			case RTE_CRYPTO_OP_WITH_SESSION:
 				ses = (dpaa_sec_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
 				break;
@@ -1596,7 +1596,7 @@ dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of session structure */
 static unsigned int
-dpaa_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -1811,7 +1811,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 }
 
 static int
-dpaa_sec_session_configure(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -1835,7 +1835,7 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 
@@ -1844,12 +1844,12 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa_sec_session_clear(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1863,7 +1863,7 @@ dpaa_sec_session_clear(struct rte_cryptodev *dev,
 		rte_free(s->cipher_key.data);
 		rte_free(s->auth_key.data);
 		memset(s, 0, sizeof(dpaa_sec_session));
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -2180,9 +2180,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
-	.session_get_size     = dpaa_sec_session_get_size,
-	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear
+	.sym_session_get_size     = dpaa_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa_sec_sym_session_configure,
+	.sym_session_clear        = dpaa_sec_sym_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 9eb43b2eb..5c9d54b1f 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -135,7 +135,7 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct kasumi_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -157,8 +157,8 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index c7556d478..9e4bf1b52 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -238,14 +238,14 @@ kasumi_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the KASUMI session structure */
 static unsigned
-kasumi_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+kasumi_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct kasumi_session);
 }
 
 /** Configure a KASUMI session from a crypto xform chain */
 static int
-kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+kasumi_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -273,7 +273,7 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -281,17 +281,17 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-kasumi_pmd_session_clear(struct rte_cryptodev *dev,
+kasumi_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct kasumi_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -311,9 +311,9 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 		.queue_pair_release = kasumi_pmd_qp_release,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
-		.session_get_size   = kasumi_pmd_session_get_size,
-		.session_configure  = kasumi_pmd_session_configure,
-		.session_clear      = kasumi_pmd_session_clear
+		.sym_session_get_size   = kasumi_pmd_sym_session_get_size,
+		.sym_session_configure  = kasumi_pmd_sym_session_configure,
+		.sym_session_clear      = kasumi_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_kasumi_pmd_ops = &kasumi_pmd_ops;
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index a7f5389ee..73eff7573 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -447,7 +447,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,
 		return -EINVAL;
 	}
 
-	sess = (struct mrvl_crypto_session *)get_session_private_data(
+	sess = (struct mrvl_crypto_session *)get_sym_session_private_data(
 			op->sym->session, cryptodev_driver_id);
 	if (unlikely(sess == NULL)) {
 		MRVL_CRYPTO_LOG_ERR("Session was not created for this device");
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index f83a6115f..c045562ca 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -612,7 +612,7 @@ mrvl_crypto_pmd_qp_count(struct rte_cryptodev *dev)
  * @returns Size of Marvell crypto session.
  */
 static unsigned
-mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
+mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
 {
 	return sizeof(struct mrvl_crypto_session);
 }
@@ -625,7 +625,7 @@ mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
  * @returns 0 upon success, negative value otherwise.
  */
 static int
-mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -653,7 +653,7 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id, sess_private_data);
+	set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
 
 	mrvl_sess = (struct mrvl_crypto_session *)sess_private_data;
 	if (sam_session_create(&mrvl_sess->sam_sess_params,
@@ -672,12 +672,12 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
  * @returns 0. Always.
  */
 static void
-mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
@@ -691,7 +691,7 @@ mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
 
 		memset(sess, 0, sizeof(struct mrvl_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -714,9 +714,9 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
-		.session_get_size	= mrvl_crypto_pmd_session_get_size,
-		.session_configure	= mrvl_crypto_pmd_session_configure,
-		.session_clear		= mrvl_crypto_pmd_session_clear
+		.sym_session_get_size	= mrvl_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= mrvl_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= mrvl_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops = &mrvl_crypto_pmd_ops;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 3d7caf1f1..fca8e3598 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -78,7 +78,7 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(sym_op->session != NULL))
 			sess = (struct null_crypto_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					sym_op->session, cryptodev_driver_id);
 	} else {
 		void *_sess = NULL;
@@ -99,8 +99,8 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(sym_op->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	return sess;
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 66bd62bd3..bb2b6e144 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -250,14 +250,14 @@ null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the NULL crypto session structure */
 static unsigned
-null_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+null_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct null_crypto_session);
 }
 
 /** Configure a null crypto session from a crypto xform chain */
 static int
-null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+null_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -285,7 +285,7 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -293,17 +293,17 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-null_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+null_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct null_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -323,9 +323,9 @@ struct rte_cryptodev_ops pmd_ops = {
 		.queue_pair_release	= null_crypto_pmd_qp_release,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
-		.session_get_size	= null_crypto_pmd_session_get_size,
-		.session_configure	= null_crypto_pmd_session_configure,
-		.session_clear		= null_crypto_pmd_session_clear
+		.sym_session_get_size	= null_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= null_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= null_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *null_crypto_pmd_ops = &pmd_ops;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index b4686a7da..f6e4f9598 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -736,7 +736,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 		/* get existing session */
 		if (likely(op->sym->session != NULL))
 			sess = (struct openssl_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -759,8 +759,8 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (sess == NULL)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 20d4e26de..533568556 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -657,14 +657,14 @@ openssl_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-openssl_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct openssl_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -692,7 +692,7 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -701,18 +701,18 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-openssl_pmd_session_clear(struct rte_cryptodev *dev,
+openssl_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		openssl_reset_session(sess_priv);
 		memset(sess_priv, 0, sizeof(struct openssl_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -732,9 +732,9 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 		.queue_pair_release	= openssl_pmd_qp_release,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
-		.session_get_size	= openssl_pmd_session_get_size,
-		.session_configure	= openssl_pmd_session_configure,
-		.session_clear		= openssl_pmd_session_clear
+		.sym_session_get_size	= openssl_pmd_sym_session_get_size,
+		.sym_session_configure	= openssl_pmd_sym_session_configure,
+		.sym_session_clear	= openssl_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_openssl_pmd_ops = &openssl_pmd_ops;
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 17d63eb1e..aa6eeb0c0 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -174,7 +174,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		return -EINVAL;
 	}
 
-	ctx = (struct qat_sym_session *)get_session_private_data(
+	ctx = (struct qat_sym_session *)get_sym_session_private_data(
 			op->sym->session, cryptodev_qat_driver_id);
 
 	if (unlikely(ctx == NULL)) {
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index d425892f4..e4e1ae89c 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -143,7 +143,7 @@ qat_sym_process_response(void **op, uint8_t *resp)
 		rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
 	} else {
 		struct qat_sym_session *sess = (struct qat_sym_session *)
-						get_session_private_data(
+						get_sym_session_private_data(
 						rx_op->sym->session,
 						cryptodev_qat_driver_id);
 
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 33ac831fe..ec62e42ac 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -205,9 +205,9 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
-		.session_get_size	= qat_sym_session_get_private_size,
-		.session_configure	= qat_sym_session_configure,
-		.session_clear		= qat_sym_session_clear
+		.sym_session_get_size	= qat_sym_session_get_private_size,
+		.sym_session_configure	= qat_sym_session_configure,
+		.sym_session_clear	= qat_sym_session_clear
 };
 
 static uint16_t
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index dc1c20044..4d975ae07 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -112,7 +112,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 	struct qat_sym_session *s = (struct qat_sym_session *)sess_priv;
 
 	if (sess_priv) {
@@ -121,7 +121,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
 		memset(s, 0, qat_sym_session_get_private_size(dev));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -396,7 +396,7 @@ qat_sym_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 9b2f99eb2..a74216ad7 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -447,7 +447,7 @@ scheduler_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static uint32_t
-scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+scheduler_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
 	uint8_t i = 0;
@@ -457,7 +457,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 	for (i = 0; i < sched_ctx->nb_slaves; i++) {
 		uint8_t slave_dev_id = sched_ctx->slaves[i].dev_id;
 		struct rte_cryptodev *dev = &rte_cryptodevs[slave_dev_id];
-		uint32_t priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+		uint32_t priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 		if (max_priv_sess_size < priv_sess_size)
 			max_priv_sess_size = priv_sess_size;
@@ -467,7 +467,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 }
 
 static int
-scheduler_pmd_session_configure(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev,
 	struct rte_crypto_sym_xform *xform,
 	struct rte_cryptodev_sym_session *sess,
 	struct rte_mempool *mempool)
@@ -492,7 +492,7 @@ scheduler_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-scheduler_pmd_session_clear(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
@@ -521,9 +521,9 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 		.queue_pair_release	= scheduler_pmd_qp_release,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
-		.session_get_size	= scheduler_pmd_session_get_size,
-		.session_configure	= scheduler_pmd_session_configure,
-		.session_clear		= scheduler_pmd_session_clear,
+		.sym_session_get_size	= scheduler_pmd_sym_session_get_size,
+		.sym_session_configure	= scheduler_pmd_sym_session_configure,
+		.sym_session_clear	= scheduler_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops = &scheduler_pmd_ops;
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 26dfbbc38..604514746 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -137,7 +137,7 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct snow3g_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -159,8 +159,8 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index fe882c366..6ed7e6c52 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -240,14 +240,14 @@ snow3g_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the SNOW 3G session structure */
 static unsigned
-snow3g_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+snow3g_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct snow3g_session);
 }
 
 /** Configure a SNOW 3G session from a crypto xform chain */
 static int
-snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+snow3g_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -275,7 +275,7 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -283,17 +283,17 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-snow3g_pmd_session_clear(struct rte_cryptodev *dev,
+snow3g_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct snow3g_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -313,9 +313,9 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 		.queue_pair_release = snow3g_pmd_qp_release,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
-		.session_get_size   = snow3g_pmd_session_get_size,
-		.session_configure  = snow3g_pmd_session_configure,
-		.session_clear      = snow3g_pmd_session_clear
+		.sym_session_get_size   = snow3g_pmd_sym_session_get_size,
+		.sym_session_configure  = snow3g_pmd_sym_session_configure,
+		.sym_session_clear      = snow3g_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_snow3g_pmd_ops = &snow3g_pmd_ops;
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index f7021b38b..f8759f1c5 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -518,9 +518,9 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
-	.session_get_size	= virtio_crypto_sym_get_session_private_size,
-	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session
+	.sym_session_get_size		= virtio_crypto_sym_get_session_private_size,
+	.sym_session_configure		= virtio_crypto_sym_configure_session,
+	.sym_session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
@@ -958,7 +958,7 @@ virtio_crypto_sym_clear_session(
 
 	hw = dev->data->dev_private;
 	vq = hw->cvq;
-	session = (struct virtio_crypto_session *)get_session_private_data(
+	session = (struct virtio_crypto_session *)get_sym_session_private_data(
 		sess, cryptodev_virtio_driver_id);
 	if (session == NULL) {
 		VIRTIO_CRYPTO_SESSION_LOG_ERR("Invalid session parameter");
@@ -1386,7 +1386,7 @@ virtio_crypto_sym_configure_session(
 		goto error_out;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		session_private);
 
 	return 0;
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index 450392843..76cf04585 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -205,7 +205,7 @@ virtqueue_crypto_sym_enqueue_xmit(
 		sizeof(struct virtio_crypto_inhdr);
 	struct rte_crypto_sym_op *sym_op = cop->sym;
 	struct virtio_crypto_session *session =
-		(struct virtio_crypto_session *)get_session_private_data(
+		(struct virtio_crypto_session *)get_sym_session_private_data(
 		cop->sym->session, cryptodev_virtio_driver_id);
 	struct virtio_crypto_op_data_req *op_data_req;
 	uint32_t hash_result_len = 0;
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 8de5c27db..74cf49856 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -134,7 +134,7 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
-			sess = (struct zuc_session *)get_session_private_data(
+			sess = (struct zuc_session *)get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -156,8 +156,8 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 1d72a0757..6da396542 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -240,14 +240,14 @@ zuc_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the ZUC session structure */
 static unsigned
-zuc_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+zuc_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct zuc_session);
 }
 
 /** Configure a ZUC session from a crypto xform chain */
 static int
-zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+zuc_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -276,7 +276,7 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -284,17 +284,17 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-zuc_pmd_session_clear(struct rte_cryptodev *dev,
+zuc_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct zuc_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -314,9 +314,9 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 		.queue_pair_release = zuc_pmd_qp_release,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
-		.session_get_size   = zuc_pmd_session_get_size,
-		.session_configure  = zuc_pmd_session_configure,
-		.session_clear      = zuc_pmd_session_clear
+		.sym_session_get_size   = zuc_pmd_sym_session_get_size,
+		.sym_session_configure  = zuc_pmd_sym_session_configure,
+		.sym_session_clear      = zuc_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_zuc_pmd_ops = &zuc_pmd_ops;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 8f990b9ab..3860b0b23 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1064,7 +1064,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	index = dev->driver_id;
 
 	if (sess->sess_private_data[index] == NULL) {
-		ret = dev->dev_ops->session_configure(dev, xforms, sess, mp);
+		ret = dev->dev_ops->sym_session_configure(dev, xforms,
+							sess, mp);
 		if (ret < 0) {
 			CDEV_LOG_ERR(
 				"dev_id %d failed to configure session details",
@@ -1106,7 +1107,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
-	dev->dev_ops->session_clear(dev, sess);
+	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
 }
@@ -1123,7 +1124,7 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 
 	/* Check that all device private data has been freed */
 	for (i = 0; i < nb_drivers; i++) {
-		sess_priv = get_session_private_data(sess, i);
+		sess_priv = get_sym_session_private_data(sess, i);
 		if (sess_priv != NULL)
 			return -EBUSY;
 	}
@@ -1158,10 +1159,10 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
-	if (*dev->dev_ops->session_get_size == NULL)
+	if (*dev->dev_ops->sym_session_get_size == NULL)
 		return 0;
 
-	priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+	priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 	/*
 	 * If size is less than session header size,
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index ec4f1ecfb..ac6a1c4f7 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -299,11 +299,11 @@ struct rte_cryptodev_ops {
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
-	cryptodev_sym_get_session_private_size_t session_get_size;
+	cryptodev_sym_get_session_private_size_t sym_session_get_size;
 	/**< Return private session. */
-	cryptodev_sym_configure_session_t session_configure;
+	cryptodev_sym_configure_session_t sym_session_configure;
 	/**< Configure a Crypto session. */
-	cryptodev_sym_free_session_t session_clear;
+	cryptodev_sym_free_session_t sym_session_clear;
 	/**< Clear a Crypto sessions private data. */
 };
 
@@ -436,13 +436,13 @@ static void init_ ##driver_id(void)\
 }
 
 static inline void *
-get_session_private_data(const struct rte_cryptodev_sym_session *sess,
+get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id) {
 	return sess->sess_private_data[driver_id];
 }
 
 static inline void
-set_session_private_data(struct rte_cryptodev_sym_session *sess,
+set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id, void *private_data)
 {
 	sess->sess_private_data[driver_id] = private_data;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v4 16/16] cryptodev: check if symmetric sessions are supported
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
                     ` (14 preceding siblings ...)
  2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
@ 2018-07-04  8:51   ` Pablo de Lara
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-04  8:51 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Since asymmetric functionality will be implemented soon,
not all PMDs must support symmetric sessions.
Therefore, a check is added if a device does not implement
the symmetric functions, meaning that the device does not
support symmetric operations.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 4 ++++
 lib/librte_cryptodev/rte_cryptodev.h | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 3860b0b23..26d43fd3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1063,6 +1063,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 
 	index = dev->driver_id;
 
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure, -ENOTSUP);
+
 	if (sess->sess_private_data[index] == NULL) {
 		ret = dev->dev_ops->sym_session_configure(dev, xforms,
 							sess, mp);
@@ -1107,6 +1109,8 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear, -ENOTSUP);
+
 	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 2049a745d..27dc7a297 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -888,7 +888,8 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess);
  * @return
  *  - On success, zero.
  *  - -EINVAL if input parameters are invalid.
- *  - -ENOTSUP if crypto device does not support the crypto transform.
+ *  - -ENOTSUP if crypto device does not support the crypto transform or
+ *    does not support symmetric operations.
  *  - -ENOMEM if the private session could not be allocated.
  */
 int
@@ -909,6 +910,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
  * @return
  *  - 0 if successful.
  *  - -EINVAL if device is invalid or session is NULL.
+ *  - -ENOTSUP if crypto device does not support symmetric operations.
  */
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
-- 
2.14.4

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

* Re: [dpdk-dev] [PATCH v3 10/16] doc: remove unneeded deprecation notice
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 10/16] doc: remove unneeded deprecation notice Pablo de Lara
@ 2018-07-04 11:29     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 11:29 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-07-04 11:31     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 11:31 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev


On 6/28/2018 6:23 AM, Pablo de Lara wrote:

> Removed rte_cryptodev_get_header_session_size
> and rte_cryptodev_get_private_session_size functions,
> as they have been substituted with functions
> specific for symmetric operations, with _sym_ word
> after "rte_cryptodev_".
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 14/16] cryptodev: remove attach/detach session API
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 14/16] cryptodev: remove attach/detach session API Pablo de Lara
@ 2018-07-04 11:33     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 11:33 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev


On 6/28/2018 6:23 AM, Pablo de Lara wrote:

> As announced in the previous release,
> The API to attach/dettach a session to a queue pair
> is removed, as it was only used in DPAA, and it is not
> actually needed.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 15/16] cryptodev: rename PMD symmetric session API
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
@ 2018-07-04 11:36     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 11:36 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev



On 6/28/2018 6:23 AM, Pablo de Lara wrote:
> The PMD specific API to configure, clear and
> obtain session private size is renamed, including
> the word _sym_ to clarify that it is API
> for symmetric sessions, so there will not be any
> conflicts for asymmetric and other type of sessions
> in the future.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 05/16] examples/l2fwd-crypto: limit number of sessions
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 05/16] examples/l2fwd-crypto: " Pablo de Lara
@ 2018-07-04 12:04     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:04 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev


On 6/28/2018 6:22 AM, Pablo de Lara wrote:

> Calculate the number of sessions required for the application,
> knowing that there is only one session required per device.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>   examples/l2fwd-crypto/main.c | 19 +++++++++++++++++--
>   1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
> index 4bca87b19..e8384b0c1 100644
> --- a/examples/l2fwd-crypto/main.c
> +++ b/examples/l2fwd-crypto/main.c
> @@ -42,6 +42,9 @@
>   #include <rte_prefetch.h>
>   #include <rte_random.h>
>   #include <rte_hexdump.h>
> +#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
> +#include <rte_cryptodev_scheduler.h>
> +#endif
>   
>   enum cdev_type {
>   	CDEV_TYPE_ANY,
> @@ -59,7 +62,6 @@ enum cdev_type {
>   #define MAX_AAD_SIZE 65535
>   #define MAX_PKT_BURST 32
>   #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
> -#define MAX_SESSIONS 32
>   #define SESSION_POOL_CACHE_SIZE 0
>   
>   #define MAXIMUM_IV_LENGTH	16
> @@ -2010,6 +2012,19 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
>   
>   		rte_cryptodev_info_get(cdev_id, &dev_info);
>   
> +		/* Two sessions objects are required for each session
> +		 * (one for the header, one for the private data)
> +		 */
> +		uint32_t sessions_needed = 2 * enabled_cdev_count;

Should we do this in #else of

RTE_LIBRTE_PMD_CRYPTO_SCHEDULER ?

Otherwise, Acked.

> +#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
> +		if (!strcmp(dev_info.driver_name, "crypto_scheduler")) {
> +			uint32_t nb_slaves =
> +				rte_cryptodev_scheduler_slaves_get(cdev_id,
> +								NULL);
> +
> +			sessions_needed = 2 * enabled_cdev_count * nb_slaves;
> +		}
> +#endif
>   		if (session_pool_socket[socket_id] == NULL) {
>   			char mp_name[RTE_MEMPOOL_NAMESIZE];
>   			struct rte_mempool *sess_mp;
> @@ -2022,7 +2037,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
>   			 * device private data
>   			 */
>   			sess_mp = rte_mempool_create(mp_name,
> -						MAX_SESSIONS * 2,
> +						sessions_needed,
>   						max_sess_sz,
>   						SESSION_POOL_CACHE_SIZE,
>   						0, NULL, NULL, NULL,
>

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

* Re: [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
@ 2018-07-04 12:13     ` Akhil Goyal
  2018-07-04 12:15     ` Akhil Goyal
  1 sibling, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:13 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev



On 6/28/2018 6:22 AM, Pablo de Lara wrote:
> Instead of creating a fixed number of sessions,
> calculate the necessary number based on number of devices
> and queue pairs used.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
  2018-07-04 12:13     ` Akhil Goyal
@ 2018-07-04 12:15     ` Akhil Goyal
  1 sibling, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:15 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev



On 6/28/2018 6:22 AM, Pablo de Lara wrote:
> Instead of creating a fixed number of sessions,
> calculate the necessary number based on number of devices
> and queue pairs used.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>   app/test-crypto-perf/main.c | 31 ++++++++++++++++++++++++++++---
>   1 file changed, 28 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
> index 4ae14390b..b02d3f597 100644
> --- a/app/test-crypto-perf/main.c
> +++ b/app/test-crypto-perf/main.c
> @@ -21,7 +21,6 @@
>   #include "cperf_test_verify.h"
>   #include "cperf_test_pmd_cyclecount.h"
>   
> -#define NUM_SESSIONS 2048
>   #define SESS_MEMPOOL_CACHE_SIZE 64
>   
>   const char *cperf_test_type_strs[] = {
> @@ -149,15 +148,41 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
>   			.nb_descriptors = opts->nb_descriptors
>   		};
>   
> +		uint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions;
> +		/* Two sessions objects are required for each session
> +		 * (one for the header, one for the private data)
> +		 */
> +		uint32_t sessions_needed = 2 * enabled_cdev_count *
> +						opts->nb_qps;
> +#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
> +		if (!strcmp((const char *)opts->device_type,
> +					"crypto_scheduler")) {
> +			uint32_t nb_slaves =
> +				rte_cryptodev_scheduler_slaves_get(cdev_id,
> +								NULL);
> +
> +			sessions_needed = 2 * enabled_cdev_count *
> +				opts->nb_qps * nb_slaves;
> +		}
> +#endif

One minor. Can we have #else?

> +		/*
> +		 * A single session is required per queue pair
> +		 * in each device
> +		 */
> +		if (dev_max_nb_sess < opts->nb_qps) {
> +			RTE_LOG(ERR, USER1,
> +				"Device does not support at least "
> +				"%u sessions\n", opts->nb_qps);
> +			return -ENOTSUP;
> +		}
>   		if (session_pool_socket[socket_id] == NULL) {
>   			char mp_name[RTE_MEMPOOL_NAMESIZE];
>   			struct rte_mempool *sess_mp;
>   
>   			snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
>   				"sess_mp_%u", socket_id);
> -
>   			sess_mp = rte_mempool_create(mp_name,
> -						NUM_SESSIONS,
> +						sessions_needed,
>   						max_sess_size,
>   						SESS_MEMPOOL_CACHE_SIZE,
>   						0, NULL, NULL, NULL,

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

* Re: [dpdk-dev] [PATCH v3 04/16] test/crypto: limit number of sessions
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 04/16] test/crypto: " Pablo de Lara
@ 2018-07-04 12:21     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:21 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev



On 6/28/2018 6:22 AM, Pablo de Lara wrote:
> Instead of using the maximum number of sessions
> allowed by the PMDs (which will change to unlimited most
> of the PMDs), limit the number to a small sufficient amount.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
  2018-06-28 13:40     ` Verma, Shally
@ 2018-07-04 12:27     ` Akhil Goyal
  1 sibling, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:27 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev



On 6/28/2018 6:23 AM, Pablo de Lara wrote:
> Since asymmetric functionality will be implemented soon,
> not all PMDs must support symmetric sessions.
> Therefore, a check is added if a device does not implement
> the symmetric functions, meaning that the device does not
> support symmetric operations.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 06/16] examples/ipsec-secgw: check for max supported sessions
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
@ 2018-07-04 12:30     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:30 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev



On 6/28/2018 6:22 AM, Pablo de Lara wrote:
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>   examples/ipsec-secgw/ipsec-secgw.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
> index a5da8b280..2582dcb6e 100644
> --- a/examples/ipsec-secgw/ipsec-secgw.c
> +++ b/examples/ipsec-secgw/ipsec-secgw.c
> @@ -1440,6 +1440,12 @@ cryptodevs_init(void)
>   		dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
>   		dev_conf.nb_queue_pairs = qp;
>   
> +		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
> +		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
> +			rte_exit(EXIT_FAILURE,
> +				"Device does not support at least %u "
> +				"sessions", CDEV_MP_NB_OBJS / 2);
> +
>   		if (!socket_ctx[dev_conf.socket_id].session_pool) {
>   			char mp_name[RTE_MEMPOOL_NAMESIZE];
>   			struct rte_mempool *sess_mp;
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-07-04 12:40     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:40 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

On 6/28/2018 6:22 AM, Pablo de Lara wrote:

> Currently, the info structure contains the maximum number
> of sessions that a device can manage.
> This field was useful when the session mempool was created inside
> each device, but now it is created at the application level.
>
> Most PMDs do not have a limitation on the sessions managed,
> but a few do, therefore this field must remain in the structure.
> However, a new value, 0, can be used to indicate that
> a device does not have an actual maximum of sessions.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter
  2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
  2018-06-29  8:04     ` Tomasz Duszynski
@ 2018-07-04 12:42     ` Akhil Goyal
  1 sibling, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:42 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

Hi Pablo,

On 6/28/2018 6:22 AM, Pablo de Lara wrote:

> Most crypto PMDs do not have a limitation
> of the number of the sessions that can be handled
> internally. The value that was set before was not
> actually used at all, since the sessions are created
> at the application level.
> Therefore, this value is not parsed from the initial
> crypto parameters anymore and it is set to 0,
> meaning that there is no actual limit.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>   doc/guides/prog_guide/cryptodev_lib.rst            |  5 ++---
>   drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  5 +----
>   drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  3 ++-
>   drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |  2 --
>   drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  5 +----
>   drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  3 ++-
>   drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |  2 --
>   drivers/crypto/armv8/rte_armv8_pmd.c               |  5 +----
>   drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  3 ++-
>   drivers/crypto/armv8/rte_armv8_pmd_private.h       |  2 --
>   drivers/crypto/ccp/ccp_pmd_ops.c                   |  3 ++-
>   drivers/crypto/ccp/ccp_pmd_private.h               |  1 -
>   drivers/crypto/ccp/rte_ccp_pmd.c                   | 16 +---------------
>   drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  4 ++--
>   drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |  2 --
>   drivers/crypto/kasumi/rte_kasumi_pmd.c             |  5 +----
>   drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  3 ++-
>   drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |  2 --
>   drivers/crypto/mvsam/rte_mrvl_pmd_ops.c            |  3 ++-
>   drivers/crypto/null/null_crypto_pmd.c              |  5 +----
>   drivers/crypto/null/null_crypto_pmd_ops.c          |  3 ++-
>   drivers/crypto/null/null_crypto_pmd_private.h      |  1 -
>   drivers/crypto/openssl/rte_openssl_pmd.c           |  5 +----
>   drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  3 ++-
>   drivers/crypto/openssl/rte_openssl_pmd_private.h   |  2 --
>   drivers/crypto/qat/qat_sym_pmd.c                   |  6 +++---
>   drivers/crypto/qat/qat_sym_pmd.h                   |  1 -
>   drivers/crypto/scheduler/scheduler_pmd.c           | 13 +------------
>   drivers/crypto/scheduler/scheduler_pmd_ops.c       | 14 +++++++-------
>   drivers/crypto/snow3g/rte_snow3g_pmd.c             |  5 +----
>   drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  3 ++-
>   drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |  2 --
>   drivers/crypto/virtio/virtio_cryptodev.c           |  7 +++----
>   drivers/crypto/zuc/rte_zuc_pmd.c                   |  5 +----
>   drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  3 ++-
>   drivers/crypto/zuc/rte_zuc_pmd_private.h           |  2 --
>   lib/librte_cryptodev/rte_cryptodev_pmd.c           | 12 ++----------
>   lib/librte_cryptodev/rte_cryptodev_pmd.h           |  4 ----
>   38 files changed, 49 insertions(+), 121 deletions(-)

Relevant Defines in config should also be removed.

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

* Re: [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag
  2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-07-04 12:57     ` Akhil Goyal
  2018-07-04 15:53       ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 135+ messages in thread
From: Akhil Goyal @ 2018-07-04 12:57 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

Hi Pablo,

On 6/28/2018 6:23 AM, Pablo de Lara wrote:

> The current mbuf scatter gatter feature flag is
> too ambiguous, as it is not clear if input and/or output
> buffers can be scatter gather mbufs or not, plus
> if in-place and/or out-of-place is supported.
>
> Therefore, five new flags will replace this flag:
> - RTE_CRYPTODEV_FF_IN_PLACE_SGL
> - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
> - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
> - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
> - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT

It is better to have OOP instead of OUT_OF_PLACE and IP for INPLACE?

I guess RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT is supported in most
of the drivers which support OOP,  I can see some of them are missing.

>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>   doc/guides/rel_notes/deprecation.rst        |  2 --
>   doc/guides/rel_notes/release_18_08.rst      |  8 +++++
>   drivers/crypto/aesni_gcm/aesni_gcm_pmd.c    |  2 +-
>   drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  6 +++-
>   drivers/crypto/dpaa_sec/dpaa_sec.c          |  6 +++-
>   drivers/crypto/null/null_crypto_pmd.c       |  2 +-
>   drivers/crypto/openssl/rte_openssl_pmd.c    |  2 +-
>   drivers/crypto/qat/qat_sym_pmd.c            |  6 +++-
>   lib/librte_cryptodev/rte_cryptodev.c        | 12 ++++++--
>   lib/librte_cryptodev/rte_cryptodev.h        | 46 +++++++++++++++++++----------
>   test/test/test_cryptodev.c                  | 31 +++++++++++++------
>   test/test/test_cryptodev_blockcipher.c      | 21 ++++++++++---
>   12 files changed, 106 insertions(+), 38 deletions(-)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 9a73b1d8e..62d635b74 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -105,5 +105,3 @@ Deprecation Notices
>       ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
>       18.05 and removed in 18.08, as there are no drivers doing anything useful
>       with them.
> -  - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
> -    so some will be replaced by more explicit flags.
> diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
> index e482d3d5f..2a136d88c 100644
> --- a/doc/guides/rel_notes/release_18_08.rst
> +++ b/doc/guides/rel_notes/release_18_08.rst
> @@ -78,6 +78,14 @@ API Changes
>     - ``rte_cryptodev_get_private_session_size`` is replaced with
>       ``rte_cryptodev_sym_get_private_session_size``
>   
> +* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
> +  replaced with the following more explicit flags:
> +  - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
> +  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT``
> +  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT``
> +  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT``
> +  - ``RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT``
> +
>   
>   ABI Changes
>   -----------
> diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> index cd5b1952b..03917f220 100644
> --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
> @@ -492,7 +492,7 @@ aesni_gcm_create(const char *name,
>   	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
>   			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
>   			RTE_CRYPTODEV_FF_CPU_AESNI |
> -			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;

RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT ??

>   
>   	switch (vector_mode) {
>   	case RTE_AESNI_GCM_SSE:
> diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> index 1b1c30d85..4daee5f59 100644
> --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
> @@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
>   			RTE_CRYPTODEV_FF_HW_ACCELERATED |
>   			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
>   			RTE_CRYPTODEV_FF_SECURITY |
> -			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> +			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
>   
>   	internals = cryptodev->data->dev_private;
>   
> diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
> index b96552c57..8ad25f2be 100644
> --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
> +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
> @@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
>   			RTE_CRYPTODEV_FF_HW_ACCELERATED |
>   			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
>   			RTE_CRYPTODEV_FF_SECURITY |
> -			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> +			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT |
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT |
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT |
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT;
>   
>   	internals = cryptodev->data->dev_private;
>   	internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index 478ac0b62..224ba7233 100644
> --- a/drivers/crypto/null/null_crypto_pmd.c
> +++ b/drivers/crypto/null/null_crypto_pmd.c
> @@ -177,7 +177,7 @@ cryptodev_null_create(const char *name,
>   
>   	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
>   			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
> -			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> +			RTE_CRYPTODEV_FF_IN_PLACE_SGL;
>   
>   	internals = dev->data->dev_private;
>   
> diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
> index 972e2adfe..94b6e2de9 100644
> --- a/drivers/crypto/openssl/rte_openssl_pmd.c
> +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
> @@ -1660,7 +1660,7 @@ cryptodev_openssl_create(const char *name,
>   	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
>   			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
>   			RTE_CRYPTODEV_FF_CPU_AESNI |
> -			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
> +			RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT;

RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT is supported here.

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

* Re: [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag
  2018-07-04 12:57     ` Akhil Goyal
@ 2018-07-04 15:53       ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-07-04 15:53 UTC (permalink / raw)
  To: Akhil Goyal, Doherty, Declan, shally.verma, ravi1.kumar,
	jerin.jacob, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
  Cc: dev

Hi Akhil,

> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> Sent: Wednesday, July 4, 2018 1:57 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; shally.verma@caviumnetworks.com;
> ravi1.kumar@amd.com; jerin.jacob@caviumnetworks.com; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>;
> tdu@semihalf.com; jianjay.zhou@huawei.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter
> gather flag
> 
> Hi Pablo,
> 
> On 6/28/2018 6:23 AM, Pablo de Lara wrote:
> 
> > The current mbuf scatter gatter feature flag is too ambiguous, as it
> > is not clear if input and/or output buffers can be scatter gather
> > mbufs or not, plus if in-place and/or out-of-place is supported.
> >
> > Therefore, five new flags will replace this flag:
> > - RTE_CRYPTODEV_FF_IN_PLACE_SGL
> > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_SGL_OUT
> > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_SGL_IN_FB_OUT
> > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_SGL_OUT
> > - RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT
> 
> It is better to have OOP instead of OUT_OF_PLACE and IP for INPLACE?
> 
> I guess RTE_CRYPTODEV_FF_OUT_OF_PLACE_FB_IN_FB_OUT is supported in
> most of the drivers which support OOP,  I can see some of them are missing.

Thanks for the comments. I will replace OUT_OF_PLACE with OOP,
but I would prefer leaving IN_PLACE, instead of IP, as IP would be confusing
(Internet Protocol comes to mind immediately).

Thanks,
Pablo

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

* [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
                   ` (8 preceding siblings ...)
  2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
@ 2018-07-05  2:07 ` Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
                     ` (15 more replies)
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
  10 siblings, 16 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

API changes in the cryptodev library, announced in the previous release, 18.05.

Changes in v5:
- Modified .ini files with new SGL/OOP flags 
- Modified overview cryptodev documentation, removing the clarification
  note on scatter-gather limitations and including the meaning
  of the new feature flags

Changes in v4:
- Fixed MVSAM max number of sessions (Tomasz Duszynksi)
- Changed OUT_OF_PLACE to OOP in feature flags (Akhil Goyal)
- Added missing feature flags in aesni_gcm and openssl PMDs (Akhil
  Goyal)
- Removed unneeded config parameters (related to max number of sessions)
  (Akhil Goyal)
- Restructured code in crypto-perf and l2fwd-crypto to calculate number
  of sessions needed (Akhil Goyal) 

Changes in v3:
- Rephrased comments for new sgl feature flags
- Added patch checking if there a device supports
  symmetric sessions
- Extended PMD session API renaming

Changes in v2:
- Instead of removing max_nb_sessions in info structure,
  a new value `0` is allowed, to indicate that the PMD
  does not have any limitation on the number of sessions
  to be managed
- Modified crypto applications to check for new value `0`
  on max_nb_sessions
- Modified MVSAM PMD to parse max_nb_sessions,
  since that parameter is not generic to any PMD anymore
- Removed attach/detach session API, as announced
- Removed deprecated function that was not removed in
  previous patchset
- Renamed PMD symmetric session API, to allow asymmetric
  session API to be added in the future

Pablo de Lara (16):
  cryptodev: replace bus specific struct with generic dev
  cryptodev: remove max number of sessions per queue
  app/crypto-perf: limit number of sessions
  test/crypto: limit number of sessions
  examples/l2fwd-crypto: limit number of sessions
  examples/ipsec-secgw: check for max supported sessions
  crypto/mvsam: parse max number of sessions
  cryptodev: define value for unlimited sessions
  cryptodev: remove max number of sessions parameter
  doc: remove unneeded deprecation notice
  cryptodev: remove queue start/stop functions
  cryptodev: remove old get session size functions
  cryptodev: replace mbuf scatter gather flag
  cryptodev: remove attach/detach session API
  cryptodev: rename PMD symmetric session API
  cryptodev: check if symmetric sessions are supported

 app/test-crypto-perf/main.c                        |  34 ++++-
 config/common_base                                 |   7 -
 config/rte_config.h                                |   7 -
 doc/guides/cryptodevs/dpaa2_sec.rst                |   5 -
 doc/guides/cryptodevs/dpaa_sec.rst                 |   5 -
 doc/guides/cryptodevs/features/aesni_gcm.ini       |   3 +-
 doc/guides/cryptodevs/features/default.ini         |   6 +-
 doc/guides/cryptodevs/features/dpaa2_sec.ini       |   6 +-
 doc/guides/cryptodevs/features/dpaa_sec.ini        |   6 +-
 doc/guides/cryptodevs/features/null.ini            |   2 +-
 doc/guides/cryptodevs/features/openssl.ini         |   3 +-
 doc/guides/cryptodevs/features/qat.ini             |   6 +-
 doc/guides/cryptodevs/overview.rst                 |  32 +++-
 doc/guides/prog_guide/cryptodev_lib.rst            |   7 +-
 doc/guides/rel_notes/deprecation.rst               |  25 ----
 doc/guides/rel_notes/release_18_08.rst             |  30 +++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  14 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  39 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |   2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  39 ++---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   2 -
 drivers/crypto/armv8/rte_armv8_pmd.c               |  11 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  39 ++---
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |   2 -
 drivers/crypto/ccp/ccp_crypto.c                    |  28 ++--
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  37 ++---
 drivers/crypto/ccp/ccp_pmd_private.h               |   1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   |  20 +--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  52 +++----
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |   2 -
 drivers/crypto/dpaa_sec/dpaa_sec.c                 |  81 ++---------
 drivers/crypto/dpaa_sec/dpaa_sec.h                 |   1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  11 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  39 ++---
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |   2 -
 drivers/crypto/mvsam/rte_mrvl_pmd.c                | 134 +++++++++++++++--
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c            |  46 ++----
 drivers/crypto/null/null_crypto_pmd.c              |  13 +-
 drivers/crypto/null/null_crypto_pmd_ops.c          |  39 ++---
 drivers/crypto/null/null_crypto_pmd_private.h      |   1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  14 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  39 ++---
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |   2 -
 drivers/crypto/qat/qat_sym.c                       |   2 +-
 drivers/crypto/qat/qat_sym.h                       |   2 +-
 drivers/crypto/qat/qat_sym_pmd.c                   |  21 +--
 drivers/crypto/qat/qat_sym_pmd.h                   |   1 -
 drivers/crypto/qat/qat_sym_session.c               |   6 +-
 drivers/crypto/scheduler/scheduler_pmd.c           |  13 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c       |  46 ++----
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  11 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  39 ++---
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |   2 -
 drivers/crypto/virtio/virtio_cryptodev.c           |  22 +--
 drivers/crypto/virtio/virtio_rxtx.c                |   2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  11 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  39 ++---
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |   2 -
 examples/ipsec-secgw/ipsec-secgw.c                 |   6 +
 examples/l2fwd-crypto/main.c                       |  22 ++-
 lib/librte_cryptodev/rte_cryptodev.c               | 138 +++---------------
 lib/librte_cryptodev/rte_cryptodev.h               | 161 +++++----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.c           |  12 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  70 +--------
 lib/librte_cryptodev/rte_cryptodev_version.map     |   6 -
 test/test/test_cryptodev.c                         |  60 ++++++--
 test/test/test_cryptodev_blockcipher.c             |  21 ++-
 68 files changed, 625 insertions(+), 997 deletions(-)

-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.

This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst  | 2 +-
 doc/guides/rel_notes/deprecation.rst     | 2 --
 doc/guides/rel_notes/release_18_08.rst   | 5 ++++-
 drivers/crypto/qat/qat_sym_pmd.c         | 1 -
 drivers/crypto/virtio/virtio_cryptodev.c | 1 -
 lib/librte_cryptodev/rte_cryptodev.c     | 1 +
 lib/librte_cryptodev/rte_cryptodev.h     | 6 +++---
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
     struct rte_cryptodev_info {
         const char *driver_name;
         uint8_t driver_id;
-        struct rte_pci_device *pci_dev;
+        struct rte_device *device;
 
         uint64_t feature_flags;
 
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
   - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
     containing fields not relevant anymore since the session mempool
     is not internal in the crypto device anymore.
-  - Replacement of ``pci_dev`` field with the more generic ``rte_device``
-    structure.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index bc0124295..6bf53dc31 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+  has been replaced with field ``struct rte_device *device``.
+
 
 ABI Changes
 -----------
@@ -118,7 +121,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_cmdline.so.2
      librte_common_octeontx.so.1
      librte_compressdev.so.1
-     librte_cryptodev.so.4
+   + librte_cryptodev.so.5
      librte_distributor.so.1
      librte_eal.so.7
      librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 		info->capabilities = internals->qat_dev_capabilities;
 		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 	}
 }
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..482edea1a 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1409,7 +1409,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 
 	if (info != NULL) {
 		info->driver_id = cryptodev_virtio_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
 		info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
 
 	dev_info->driver_name = dev->device->driver->name;
+	dev_info->device = dev->device;
 }
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index ccc0f73fd..6b5f32bda 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -334,9 +334,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
 
 /**  Crypto device information */
 struct rte_cryptodev_info {
-	const char *driver_name;		/**< Driver name. */
-	uint8_t driver_id;			/**< Driver identifier */
-	struct rte_pci_device *pci_dev;		/**< PCI information. */
+	const char *driver_name;	/**< Driver name. */
+	uint8_t driver_id;		/**< Driver identifier */
+	struct rte_device *device;	/**< Generic device information. */
 
 	uint64_t feature_flags;
 	/**< Feature flags exposes HW/SW features for the given device */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 02/16] cryptodev: remove max number of sessions per queue
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
                     ` (13 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The cryptodev info structure currently contains
the maximum number of sessions that can be used in a queue pair.
This is only set in DPAA_SEC PMD, and since it is calculated
based on the maximum number of sessions (which is not used
anymore), this field can be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c   | 3 ---
 lib/librte_cryptodev/rte_cryptodev.h | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 06f7e4373..73cae483b 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2215,9 +2215,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa_sec_capabilities;
 		info->sym.max_nb_sessions = internals->max_nb_sessions;
-		info->sym.max_nb_sessions_per_qp =
-			RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS /
-			RTE_DPAA_MAX_NB_SEC_QPS;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 6b5f32bda..114c9fd6e 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -350,10 +350,6 @@ struct rte_cryptodev_info {
 	struct {
 		unsigned max_nb_sessions;
 		/**< Maximum number of sessions supported by device. */
-		unsigned int max_nb_sessions_per_qp;
-		/**< Maximum number of sessions per queue pair.
-		 * Default 0 for infinite sessions
-		 */
 	} sym;
 };
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 03/16] app/crypto-perf: limit number of sessions
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 04/16] test/crypto: " Pablo de Lara
                     ` (12 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of creating a fixed number of sessions,
calculate the necessary number based on number of devices
and queue pairs used.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 4ae14390b..74e2165a4 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -21,7 +21,6 @@
 #include "cperf_test_verify.h"
 #include "cperf_test_pmd_cyclecount.h"
 
-#define NUM_SESSIONS 2048
 #define SESS_MEMPOOL_CACHE_SIZE 64
 
 const char *cperf_test_type_strs[] = {
@@ -67,6 +66,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 			struct rte_mempool *session_pool_socket[])
 {
 	uint8_t enabled_cdev_count = 0, nb_lcores, cdev_id;
+	uint32_t sessions_needed = 0;
 	unsigned int i, j;
 	int ret;
 
@@ -149,15 +149,43 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 			.nb_descriptors = opts->nb_descriptors
 		};
 
+		uint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions;
+		/*
+		 * Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		if (!strcmp((const char *)opts->device_type,
+					"crypto_scheduler")) {
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count *
+				opts->nb_qps * nb_slaves;
+#endif
+		} else
+			sessions_needed = 2 * enabled_cdev_count *
+						opts->nb_qps;
+
+		/*
+		 * A single session is required per queue pair
+		 * in each device
+		 */
+		if (dev_max_nb_sess < opts->nb_qps) {
+			RTE_LOG(ERR, USER1,
+				"Device does not support at least "
+				"%u sessions\n", opts->nb_qps);
+			return -ENOTSUP;
+		}
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
 
 			snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
 				"sess_mp_%u", socket_id);
-
 			sess_mp = rte_mempool_create(mp_name,
-						NUM_SESSIONS,
+						sessions_needed,
 						max_sess_size,
 						SESS_MEMPOOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 04/16] test/crypto: limit number of sessions
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (2 preceding siblings ...)
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05 11:27     ` Verma, Shally
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 05/16] examples/l2fwd-crypto: " Pablo de Lara
                     ` (11 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of using the maximum number of sessions
allowed by the PMDs (which will change to unlimited most
of the PMDs), limit the number to a small sufficient amount.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 test/test/test_cryptodev.c | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 389f79677..5c906cfae 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -39,6 +39,7 @@
 #include "test_cryptodev_hmac_test_vectors.h"
 
 #define VDEV_ARGS_SIZE 100
+#define MAX_NB_SESSIONS            4
 
 static int gbl_driver_id;
 
@@ -435,9 +436,16 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
+	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		RTE_LOG(ERR, USER1, "Device does not support "
+				"at least %u sessions\n",
+				MAX_NB_SESSIONS);
+		return TEST_FAILED;
+	}
+
 	ts_params->session_mpool = rte_mempool_create(
 				"test_sess_mp",
-				info.sym.max_nb_sessions * 2,
+				MAX_NB_SESSIONS * 2,
 				session_size,
 				0, 0, NULL, NULL, NULL,
 				NULL, SOCKET_ID_ANY,
@@ -6499,10 +6507,10 @@ test_multi_session(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *) *
-			dev_info.sym.max_nb_sessions) + 1, 0);
+			MAX_NB_SESSIONS) + 1, 0);
 
 	/* Create multiple crypto sessions*/
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 
 		sessions[i] = rte_cryptodev_sym_session_create(
 				ts_params->session_mpool);
@@ -6551,7 +6559,7 @@ test_multi_session(void)
 	TEST_ASSERT_NULL(sessions[i],
 			"Session creation succeeded unexpectedly!");
 
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 		rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
 				sessions[i]);
 		rte_cryptodev_sym_session_free(sessions[i]);
@@ -6610,7 +6618,7 @@ test_multi_session_random_usage(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *)
-					* dev_info.sym.max_nb_sessions) + 1, 0);
+					* MAX_NB_SESSIONS) + 1, 0);
 
 	for (i = 0; i < MB_SESSION_NUMBER; i++) {
 		sessions[i] = rte_cryptodev_sym_session_create(
@@ -8538,6 +8546,13 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
+		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+			RTE_LOG(ERR, USER1,
+					"Device does not support "
+					"at least %u sessions\n",
+					MAX_NB_SESSIONS);
+			return TEST_FAILED;
+		}
 		/*
 		 * Create mempool with maximum number of sessions * 2,
 		 * to include the session headers
@@ -8545,7 +8560,7 @@ test_scheduler_attach_slave_op(void)
 		if (ts_params->session_mpool == NULL) {
 			ts_params->session_mpool = rte_mempool_create(
 					"test_sess_mp",
-					info.sym.max_nb_sessions * 2,
+					MAX_NB_SESSIONS * 2,
 					session_size,
 					0, 0, NULL, NULL, NULL,
 					NULL, SOCKET_ID_ANY,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 05/16] examples/l2fwd-crypto: limit number of sessions
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (3 preceding siblings ...)
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 04/16] test/crypto: " Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
                     ` (10 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Calculate the number of sessions required for the application,
knowing that there is only one session required per device.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/l2fwd-crypto/main.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4bca87b19..db364cf5d 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -42,6 +42,9 @@
 #include <rte_prefetch.h>
 #include <rte_random.h>
 #include <rte_hexdump.h>
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+#include <rte_cryptodev_scheduler.h>
+#endif
 
 enum cdev_type {
 	CDEV_TYPE_ANY,
@@ -59,7 +62,6 @@ enum cdev_type {
 #define MAX_AAD_SIZE 65535
 #define MAX_PKT_BURST 32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
-#define MAX_SESSIONS 32
 #define SESSION_POOL_CACHE_SIZE 0
 
 #define MAXIMUM_IV_LENGTH	16
@@ -1973,6 +1975,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 	unsigned int cdev_id, cdev_count, enabled_cdev_count = 0;
 	const struct rte_cryptodev_capabilities *cap;
 	unsigned int sess_sz, max_sess_sz = 0;
+	uint32_t sessions_needed = 0;
 	int retval;
 
 	cdev_count = rte_cryptodev_count();
@@ -2010,6 +2013,21 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 		rte_cryptodev_info_get(cdev_id, &dev_info);
 
+		/*
+		 * Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		if (!strcmp(dev_info.driver_name, "crypto_scheduler")) {
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count * nb_slaves;
+#endif
+		} else
+			sessions_needed = 2 * enabled_cdev_count;
+
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
@@ -2022,7 +2040,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 			 * device private data
 			 */
 			sess_mp = rte_mempool_create(mp_name,
-						MAX_SESSIONS * 2,
+						sessions_needed,
 						max_sess_sz,
 						SESSION_POOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 06/16] examples/ipsec-secgw: check for max supported sessions
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (4 preceding siblings ...)
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 05/16] examples/l2fwd-crypto: " Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
                     ` (9 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b280..2582dcb6e 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1440,6 +1440,12 @@ cryptodevs_init(void)
 		dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
 		dev_conf.nb_queue_pairs = qp;
 
+		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
+		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+			rte_exit(EXIT_FAILURE,
+				"Device does not support at least %u "
+				"sessions", CDEV_MP_NB_OBJS / 2);
+
 		if (!socket_ctx[dev_conf.socket_id].session_pool) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 07/16] crypto/mvsam: parse max number of sessions
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (5 preceding siblings ...)
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
                     ` (8 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The maximum number of sessions device argument will be removed,
as most PMDs do not have a limitation on this number.
Therefore, the MVSAM PMD needs to parse this value internally.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/mvsam/rte_mrvl_pmd.c | 132 ++++++++++++++++++++++++++++++++----
 1 file changed, 120 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 1b6029a56..a7f5389ee 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -16,8 +16,23 @@
 
 #define MRVL_MUSDK_DMA_MEMSIZE 41943040
 
+#define MRVL_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
+#define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS	2048
+
 static uint8_t cryptodev_driver_id;
 
+struct mrvl_pmd_init_params {
+	struct rte_cryptodev_pmd_init_params common;
+	uint32_t max_nb_sessions;
+};
+
+const char *mrvl_pmd_valid_params[] = {
+	RTE_CRYPTODEV_PMD_NAME_ARG,
+	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+	MRVL_PMD_MAX_NB_SESS_ARG
+};
+
 /**
  * Flag if particular crypto algorithm is supported by PMD/MUSDK.
  *
@@ -691,14 +706,15 @@ mrvl_crypto_pmd_dequeue_burst(void *queue_pair,
 static int
 cryptodev_mrvl_crypto_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_cryptodev_pmd_init_params *init_params)
+		struct mrvl_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct mrvl_crypto_private *internals;
 	struct sam_init_params	sam_params;
 	int ret;
 
-	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device,
+			&init_params->common);
 	if (dev == NULL) {
 		MRVL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -718,7 +734,7 @@ cryptodev_mrvl_crypto_create(const char *name,
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
 
-	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
+	internals->max_nb_qpairs = init_params->common.max_nb_queue_pairs;
 	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	/*
@@ -740,12 +756,99 @@ cryptodev_mrvl_crypto_create(const char *name,
 
 init_error:
 	MRVL_CRYPTO_LOG_ERR(
-		"driver %s: %s failed", init_params->name, __func__);
+		"driver %s: %s failed", init_params->common.name, __func__);
 
 	cryptodev_mrvl_crypto_uninit(vdev);
 	return -EFAULT;
 }
 
+/** Parse integer from integer argument */
+static int
+parse_integer_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	int *i = (int *) extra_args;
+
+	*i = atoi(value);
+	if (*i < 0) {
+		MRVL_CRYPTO_LOG_ERR("Argument has to be positive.\n");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+/** Parse name */
+static int
+parse_name_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	struct rte_cryptodev_pmd_init_params *params = extra_args;
+
+	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
+		MRVL_CRYPTO_LOG_ERR("Invalid name %s, should be less than "
+				"%u bytes.\n", value,
+				RTE_CRYPTODEV_NAME_MAX_LEN - 1);
+		return -EINVAL;
+	}
+
+	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
+
+	return 0;
+}
+
+static int
+mrvl_pmd_parse_input_args(struct mrvl_pmd_init_params *params,
+			 const char *input_args)
+{
+	struct rte_kvargs *kvlist = NULL;
+	int ret = 0;
+
+	if (params == NULL)
+		return -EINVAL;
+
+	if (input_args) {
+		kvlist = rte_kvargs_parse(input_args,
+					  mrvl_pmd_valid_params);
+		if (kvlist == NULL)
+			return -1;
+
+		/* Common VDEV parameters */
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+					 &parse_integer_arg,
+					 &params->common.max_nb_queue_pairs);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+					 &parse_integer_arg,
+					 &params->common.socket_id);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_NAME_ARG,
+					 &parse_name_arg,
+					 &params->common);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 MRVL_PMD_MAX_NB_SESS_ARG,
+					 &parse_integer_arg,
+					 params);
+		if (ret < 0)
+			goto free_kvlist;
+
+	}
+
+free_kvlist:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
 /**
  * Initialize the crypto device.
  *
@@ -755,7 +858,18 @@ cryptodev_mrvl_crypto_create(const char *name,
 static int
 cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 {
-	struct rte_cryptodev_pmd_init_params init_params = { };
+	struct mrvl_pmd_init_params init_params = {
+		.common = {
+			.name = "",
+			.private_data_size =
+				sizeof(struct mrvl_crypto_private),
+			.max_nb_queue_pairs =
+				sam_get_num_inst() * SAM_HW_RING_NUM,
+			.socket_id = rte_socket_id()
+		},
+		.max_nb_sessions = MRVL_PMD_DEFAULT_MAX_NB_SESSIONS
+	};
+
 	const char *name, *args;
 	int ret;
 
@@ -764,13 +878,7 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	args = rte_vdev_device_args(vdev);
 
-	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
-	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
-	init_params.max_nb_sessions =
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
-	init_params.socket_id = rte_socket_id();
-
-	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
+	ret = mrvl_pmd_parse_input_args(&init_params, args);
 	if (ret) {
 		RTE_LOG(ERR, PMD,
 			"Failed to parse initialisation arguments[%s]\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (6 preceding siblings ...)
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
                     ` (7 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.

Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c            | 2 +-
 doc/guides/rel_notes/release_18_08.rst | 2 ++
 examples/ipsec-secgw/ipsec-secgw.c     | 2 +-
 lib/librte_cryptodev/rte_cryptodev.h   | 5 ++++-
 test/test/test_cryptodev.c             | 6 ++++--
 5 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 74e2165a4..2181d0193 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -172,7 +172,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 		 * A single session is required per queue pair
 		 * in each device
 		 */
-		if (dev_max_nb_sess < opts->nb_qps) {
+		if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
 			RTE_LOG(ERR, USER1,
 				"Device does not support at least "
 				"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 6bf53dc31..2b994ee78 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
 
 * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
   has been replaced with field ``struct rte_device *device``.
+  Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+  supports an unlimited number of sessions.
 
 
 ABI Changes
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
 		dev_conf.nb_queue_pairs = qp;
 
 		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
-		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+		if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
 			rte_exit(EXIT_FAILURE,
 				"Device does not support at least %u "
 				"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 114c9fd6e..7989eb876 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -349,7 +349,10 @@ struct rte_cryptodev_info {
 
 	struct {
 		unsigned max_nb_sessions;
-		/**< Maximum number of sessions supported by device. */
+		/**< Maximum number of sessions supported by device.
+		 * If 0, the device does not have any limitation in
+		 * number of sessions that can be used.
+		 */
 	} sym;
 };
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 5c906cfae..73aadaced 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
-	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+	if (info.sym.max_nb_sessions != 0 &&
+			info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 		RTE_LOG(ERR, USER1, "Device does not support "
 				"at least %u sessions\n",
 				MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
-		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		if (info.sym.max_nb_sessions != 0 &&
+				info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 			RTE_LOG(ERR, USER1,
 					"Device does not support "
 					"at least %u sessions\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 09/16] cryptodev: remove max number of sessions parameter
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (7 preceding siblings ...)
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-09 10:53     ` De Lara Guarch, Pablo
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 10/16] doc: remove unneeded deprecation notice Pablo de Lara
                     ` (6 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Most crypto PMDs do not have a limitation
of the number of the sessions that can be handled
internally. The value that was set before was not
actually used at all, since the sessions are created
at the application level.
Therefore, this value is not parsed from the initial
crypto parameters anymore and it is set to 0,
meaning that there is no actual limit.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 config/common_base                                 |  7 -------
 config/rte_config.h                                |  7 -------
 doc/guides/cryptodevs/dpaa2_sec.rst                |  5 -----
 doc/guides/cryptodevs/dpaa_sec.rst                 |  5 -----
 doc/guides/prog_guide/cryptodev_lib.rst            |  5 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  5 +----
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  3 ++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |  2 --
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  5 +----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  3 ++-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |  2 --
 drivers/crypto/armv8/rte_armv8_pmd.c               |  5 +----
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  3 ++-
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |  2 --
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  3 ++-
 drivers/crypto/ccp/ccp_pmd_private.h               |  1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   | 16 +---------------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |  2 --
 drivers/crypto/dpaa_sec/dpaa_sec.h                 |  1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  5 +----
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  3 ++-
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |  2 --
 drivers/crypto/null/null_crypto_pmd.c              |  5 +----
 drivers/crypto/null/null_crypto_pmd_ops.c          |  3 ++-
 drivers/crypto/null/null_crypto_pmd_private.h      |  1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  5 +----
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  3 ++-
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |  2 --
 drivers/crypto/qat/qat_sym_pmd.c                   |  6 +++---
 drivers/crypto/qat/qat_sym_pmd.h                   |  1 -
 drivers/crypto/scheduler/scheduler_pmd.c           | 13 +------------
 drivers/crypto/scheduler/scheduler_pmd_ops.c       | 14 +++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  5 +----
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  3 ++-
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |  2 --
 drivers/crypto/virtio/virtio_cryptodev.c           |  7 +++----
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  5 +----
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  3 ++-
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |  2 --
 lib/librte_cryptodev/rte_cryptodev_pmd.c           | 12 ++----------
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  4 ----
 42 files changed, 48 insertions(+), 144 deletions(-)

diff --git a/config/common_base b/config/common_base
index 4236e295b..e84307c66 100644
--- a/config/common_base
+++ b/config/common_base
@@ -472,14 +472,12 @@ CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
 # Compile NXP DPAA2 crypto sec driver for CAAM HW
 #
 CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n
-CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048
 
 #
 # NXP DPAA caam - crypto driver
 #
 CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n
 CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4
-CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048
 
 #
 # Compile PMD for QuickAssist based devices
@@ -498,11 +496,6 @@ CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO=y
 # Number of maximum virtio crypto devices
 #
 CONFIG_RTE_MAX_VIRTIO_CRYPTO=32
-#
-# Number of sessions to create in the session memory pool
-# on a single virtio crypto device.
-#
-CONFIG_RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS=1024
 
 #
 # Compile PMD for AESNI backed device
diff --git a/config/rte_config.h b/config/rte_config.h
index 0ba0ead7e..8a3432aca 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -90,15 +90,8 @@
 #define RTE_PMD_QAT_MAX_PCI_DEVICES 48
 
 /* virtio crypto defines */
-#define RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS 1024
 #define RTE_MAX_VIRTIO_CRYPTO 32
 
-/* DPAA2_SEC */
-#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
-
-/* DPAA_SEC */
-#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
-
 /* DPAA SEC max cryptodev devices*/
 #define RTE_LIBRTE_DPAA_MAX_CRYPTODEV	4
 
diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst
index 3ea24c8aa..990befeb7 100644
--- a/doc/guides/cryptodevs/dpaa2_sec.rst
+++ b/doc/guides/cryptodevs/dpaa2_sec.rst
@@ -200,11 +200,6 @@ Please note that enabling debugging options may affect system performance.
   By default it is only enabled in defconfig_arm64-dpaa2-* config.
   Toggle compilation of the ``librte_pmd_dpaa2_sec`` driver.
 
-* ``CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS``
-  By default it is set as 2048 in defconfig_arm64-dpaa2-* config.
-  It indicates Number of sessions to create in the session memory pool
-  on a single DPAA2 SEC device.
-
 Installations
 -------------
 To compile the DPAA2_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
index c14d6d7b1..c5097a84f 100644
--- a/doc/guides/cryptodevs/dpaa_sec.rst
+++ b/doc/guides/cryptodevs/dpaa_sec.rst
@@ -145,11 +145,6 @@ Please note that enabling debugging options may affect system performance.
   By default it is only enabled in defconfig_arm64-dpaa-* config.
   Toggle compilation of the ``librte_pmd_dpaa_sec`` driver.
 
-* ``CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS``
-  By default it is set as 2048 in defconfig_arm64-dpaa-* config.
-  It indicates Number of sessions to create in the session memory pool
-  on a single DPAA SEC device.
-
 Installations
 -------------
 To compile the DPAA_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index d02bb7514..d2a74a362 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
 
 .. code-block:: console
 
-   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
+   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
 
 .. Note::
 
@@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
 .. code-block:: c
 
    rte_vdev_init("crypto_aesni_mb",
-                     "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
+                     "max_nb_queue_pairs=2,socket_id=0")
 
 All virtual Crypto devices support the following initialization parameters:
 
 * ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
-* ``max_nb_sessions`` - maximum number of sessions supported by the device
 * ``socket_id`` - socket on which to allocate the device resources on.
 
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index d196826f0..88307e0e7 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
 	internals->vector_mode = vector_mode;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_gcm_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index eacbdc09a..1f4edc0f2 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -143,7 +143,8 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->capabilities = aesni_gcm_pmd_capabilities;
 
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 2b9c251c0..0bcd4fa09 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -26,8 +26,6 @@ struct aesni_gcm_private {
 	/**< Vector mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct aesni_gcm_qp {
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 9ae2b54f4..17ac43f0f 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
 
 	internals->vector_mode = vector_mode;
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_mb_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
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 6a96d5077..6cd4134af 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -387,7 +387,8 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = aesni_mb_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
index bad2a8743..91fd7409e 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
@@ -113,8 +113,6 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** AESNI Multi buffer queue pair */
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index fbb08f729..db0d8a2a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct armv8_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index c64aef09f..b654f7528 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -154,7 +154,8 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = armv8_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
index b8966e934..7feb021db 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
+++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
@@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
 struct armv8_crypto_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** ARMv8 crypto queue pair */
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 80b75ccb0..dbe545c10 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -624,7 +624,8 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
 		if (internals->auth_opt == 1)
 			dev_info->capabilities = ccp_crypto_cap_complete;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index f4498048f..79752f687 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -40,7 +40,6 @@
 /* private data structure for each CCP crypto device */
 struct ccp_private {
 	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;	/**< Max number of sessions */
 	uint8_t crypto_num_dev;		/**< Number of working crypto devices */
 	bool auth_opt;			/**< Authentication offload option */
 	struct ccp_device *last_dev;	/**< Last working crypto device */
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 2061f465e..d70640f6d 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
 #define CCP_CRYPTODEV_PARAM_NAME		("name")
 #define CCP_CRYPTODEV_PARAM_SOCKET_ID		("socket_id")
 #define CCP_CRYPTODEV_PARAM_MAX_NB_QP		("max_nb_queue_pairs")
-#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS		("max_nb_sessions")
 #define CCP_CRYPTODEV_PARAM_AUTH_OPT		("ccp_auth_opt")
 
 const char *ccp_pmd_valid_params[] = {
 	CCP_CRYPTODEV_PARAM_NAME,
 	CCP_CRYPTODEV_PARAM_SOCKET_ID,
 	CCP_CRYPTODEV_PARAM_MAX_NB_QP,
-	CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
 	CCP_CRYPTODEV_PARAM_AUTH_OPT,
 };
 
@@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-					 CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
-					 &parse_integer_arg,
-					 &params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 					 CCP_CRYPTODEV_PARAM_SOCKET_ID,
 					 &parse_integer_arg,
@@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
 	internals->auth_opt = init_params->auth_opt;
 	internals->crypto_num_dev = cryptodev_cnt;
 
@@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct ccp_private),
 			rte_socket_id(),
-			CCP_PMD_MAX_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			CCP_PMD_MAX_QUEUE_PAIRS
 		},
 		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
 	};
@@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 		init_params.def_p.socket_id);
 	RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
 		init_params.def_p.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
-		init_params.def_p.max_nb_sessions);
 	RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
 		((init_params.auth_opt == 0) ? "CCP" : "CPU"));
 
@@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"ccp_auth_opt=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 56fa969d3..bc091c560 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2626,7 +2626,8 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa2_sec_capabilities;
-		info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
@@ -2786,7 +2787,6 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
 
 	internals = cryptodev->data->dev_private;
-	internals->max_nb_sessions = RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS;
 
 	/*
 	 * For secondary processes, we don't initialise any further as primary
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
index a9d83ebce..d015be1e9 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
@@ -23,8 +23,6 @@ struct dpaa2_sec_dev_private {
 	uint16_t token; /**< Token required by DPxxx objects */
 	unsigned int max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct dpaa2_sec_qp {
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
index e15e373fd..ac6c00a60 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
@@ -26,6 +26,7 @@
 #define CTX_POOL_NUM_BUFS	32000
 #define CTX_POOL_BUF_SIZE	sizeof(struct dpaa_sec_op_ctx)
 #define CTX_POOL_CACHE_SIZE	512
+#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
 
 #define DIR_ENC                 1
 #define DIR_DEC                 0
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 0e783ed9b..9eb43b2eb 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -559,7 +559,6 @@ cryptodev_kasumi_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -577,8 +576,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct kasumi_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -621,7 +619,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index d087eabe4..5593238f2 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -126,7 +126,8 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = kasumi_pmd_capabilities;
 	}
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
index 102334e0a..488777ca8 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
@@ -24,8 +24,6 @@ int kasumi_logtype_driver;
 struct kasumi_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** KASUMI buffer queue pair */
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 8699f1219..07276833b 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -181,7 +181,6 @@ cryptodev_null_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -194,8 +193,7 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
 		"",
 		sizeof(struct null_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 9a78e91d1..55778a255 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -121,7 +121,8 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = null_crypto_pmd_capabilities;
 	}
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 190b88dc7..d5905afd8 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -19,7 +19,6 @@ int null_logtype_driver;
 /** private data structure for each NULL crypto device */
 struct null_crypto_private {
 	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
-	unsigned max_nb_sessions;	/**< Max number of sessions */
 };
 
 /** NULL crypto queue pair */
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index bfdfcdd9a..1ccab4ab5 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -1686,8 +1685,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct openssl_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
 	cryptodev_openssl_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 488afcf7d..a1a2d9900 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -547,7 +547,8 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = openssl_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
index 051fb203d..29fcb761a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
+++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
@@ -49,8 +49,6 @@ enum openssl_auth_mode {
 struct openssl_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** OPENSSL crypto queue pair */
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 0bc042a75..84dd5bec8 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -72,8 +72,9 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 			qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC);
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = internals->qat_dev_capabilities;
-		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 	}
 }
 
@@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	struct rte_cryptodev_pmd_init_params init_params = {
 			.name = "",
 			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
-			.private_data_size = sizeof(struct qat_sym_dev_private),
-			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
+			.private_data_size = sizeof(struct qat_sym_dev_private)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 	struct rte_cryptodev *cryptodev;
diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
index 439aeb98a..d34328544 100644
--- a/drivers/crypto/qat/qat_sym_pmd.h
+++ b/drivers/crypto/qat/qat_sym_pmd.h
@@ -14,7 +14,6 @@
 
 /**< Intel(R) QAT Symmetric Crypto PMD device name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
-#define QAT_SYM_PMD_MAX_NB_SESSIONS	2048
 
 extern uint8_t cryptodev_qat_driver_id;
 
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 5489e9ed0..6c5c01d63 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -31,7 +31,6 @@ struct scheduler_init_params {
 #define RTE_CRYPTODEV_VDEV_MODE			("mode")
 #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
 #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
 #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
 #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
 #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
@@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MODE,
 	RTE_CRYPTODEV_VDEV_ORDERING,
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
 	RTE_CRYPTODEV_VDEV_CORELIST
@@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
-				&parse_integer_arg,
-				&params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
 				&parse_integer_arg,
 				&params->def_p.socket_id);
@@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct scheduler_ctx),
 			rte_socket_id(),
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 		},
 		.nb_slaves = 0,
 		.mode = CDEV_SCHED_MODE_NOT_SET,
@@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
 	cryptodev_scheduler_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"slave=<name>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 874205849..802585f4c 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -321,8 +321,7 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info *dev_info)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
-	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
-			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
+	uint32_t max_nb_sess = 0;
 	uint32_t i;
 
 	if (!dev_info)
@@ -338,17 +337,18 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info slave_info;
 
 		rte_cryptodev_info_get(slave_dev_id, &slave_info);
-		max_nb_sessions = slave_info.sym.max_nb_sessions <
-				max_nb_sessions ?
-				slave_info.sym.max_nb_sessions :
-				max_nb_sessions;
+		uint32_t dev_max_sess = slave_info.sym.max_nb_sessions;
+		if (dev_max_sess != 0) {
+			if (max_nb_sess == 0 ||	dev_max_sess < max_nb_sess)
+				max_nb_sess = slave_info.sym.max_nb_sessions;
+		}
 	}
 
 	dev_info->driver_id = dev->driver_id;
 	dev_info->feature_flags = dev->feature_flags;
 	dev_info->capabilities = sched_ctx->capabilities;
 	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
-	dev_info->sym.max_nb_sessions = max_nb_sessions;
+	dev_info->sym.max_nb_sessions = max_nb_sess;
 }
 
 /** Release queue pair */
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 72751e35e..26dfbbc38 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -573,8 +572,7 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct snow3g_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index f60b47598..6f8b9e2c6 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -130,7 +130,8 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = snow3g_pmd_capabilities;
 	}
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
index eea900e0a..2c6e1a948 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
@@ -36,8 +36,6 @@
 struct snow3g_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** SNOW 3G buffer queue pair */
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 482edea1a..1da4ae871 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1411,8 +1411,8 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 		info->driver_id = cryptodev_virtio_driver_id;
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
-		info->sym.max_nb_sessions =
-			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->capabilities = hw->virtio_dev_capabilities;
 	}
 }
@@ -1425,8 +1425,7 @@ crypto_virtio_pci_probe(
 	struct rte_cryptodev_pmd_init_params init_params = {
 		.name = "",
 		.socket_id = rte_socket_id(),
-		.private_data_size = sizeof(struct virtio_crypto_hw),
-		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
+		.private_data_size = sizeof(struct virtio_crypto_hw)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 119d393e4..8de5c27db 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -478,7 +478,6 @@ cryptodev_zuc_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -496,8 +495,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct zuc_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -540,7 +538,6 @@ static struct cryptodev_driver zuc_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 87c44ceb9..e151750fb 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -130,7 +130,8 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = zuc_pmd_capabilities;
 	}
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
index 69cc32e54..5e5906ddb 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
+++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
@@ -24,8 +24,6 @@ int zuc_logtype_driver;
 struct zuc_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** ZUC buffer queue pair */
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index f2aac24b7..2088ac3f3 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
-				&rte_cryptodev_pmd_parse_uint_arg,
-				&params->max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
 				&rte_cryptodev_pmd_parse_uint_arg,
@@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
 			device->driver->name, name);
 
 	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
-			"socket id: %d, max queue pairs: %u, max sessions: %u",
+			"socket id: %d, max queue pairs: %u",
 			device->driver->name, name,
-			params->socket_id, params->max_nb_queue_pairs,
-			params->max_nb_sessions);
+			params->socket_id, params->max_nb_queue_pairs);
 
 	/* allocate device structure */
 	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index db8b97665..1fb7e7d5e 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -32,18 +32,15 @@ extern "C" {
 
 
 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
-#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
 
 #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
 #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
 #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
 
 
 static const char * const cryptodev_pmd_valid_params[] = {
 	RTE_CRYPTODEV_PMD_NAME_ARG,
 	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
 };
 
@@ -56,7 +53,6 @@ struct rte_cryptodev_pmd_init_params {
 	size_t private_data_size;
 	int socket_id;
 	unsigned int max_nb_queue_pairs;
-	unsigned int max_nb_sessions;
 };
 
 /** Global structure used for maintaining state of allocated crypto devices */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 10/16] doc: remove unneeded deprecation notice
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (8 preceding siblings ...)
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-07-05  2:07   ` Pablo de Lara
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
                     ` (5 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:07 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

In release 18.05, a deprecation notice to remove the `sym`
structure in the cryptodev info structure was sent.
However, only one of the fields inside the structure will
be removed, so the notice is not actually correct.
In any case, it needs to be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index b71080bb8..dc014da21 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -101,9 +101,6 @@ Deprecation Notices
 * cryptodev: The following changes will be made in the library
   for 18.08:
 
-  - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
-    containing fields not relevant anymore since the session mempool
-    is not internal in the crypto device anymore.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (9 preceding siblings ...)
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 10/16] doc: remove unneeded deprecation notice Pablo de Lara
@ 2018-07-05  2:08   ` Pablo de Lara
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions Pablo de Lara
                     ` (4 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:08 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  4 ---
 doc/guides/rel_notes/release_18_08.rst         |  5 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 -----------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 16 ----------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 22 -------------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 22 -------------
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 -----------
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 28 ----------------
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 -----------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 -----------
 drivers/crypto/qat/qat_sym_pmd.c               |  2 --
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 18 -----------
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 -----------
 drivers/crypto/virtio/virtio_cryptodev.c       |  2 --
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 -----------
 lib/librte_cryptodev/rte_cryptodev.c           | 44 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 37 ----------------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 26 ---------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 21 files changed, 5 insertions(+), 367 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Functions ``rte_cryptodev_queue_pair_start()`` and
-    ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
-    and removed in 18.08, as there are no drivers doing anything useful
-    with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
   - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 2b994ee78..cfb2885a1 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
   Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
   supports an unlimited number of sessions.
 
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+  - ``rte_cryptodev_queue_pair_start``
+  - ``rte_cryptodev_queue_pair_stop``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 1f4edc0f2..489d2e08f 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -242,22 +242,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -339,8 +323,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 
 		.queue_pair_setup	= aesni_gcm_pmd_qp_setup,
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
-		.queue_pair_start	= aesni_gcm_pmd_qp_start,
-		.queue_pair_stop	= aesni_gcm_pmd_qp_stop,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
 		.session_get_size	= aesni_gcm_pmd_session_get_size,
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 6cd4134af..b806c4d52 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 
 		.queue_pair_setup	= aesni_mb_pmd_qp_setup,
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
-		.queue_pair_start	= aesni_mb_pmd_qp_start,
-		.queue_pair_stop	= aesni_mb_pmd_qp_stop,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
 		.session_get_size	= aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 
 		.queue_pair_setup	= armv8_crypto_pmd_qp_setup,
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
-		.queue_pair_start	= armv8_crypto_pmd_qp_start,
-		.queue_pair_stop	= armv8_crypto_pmd_qp_stop,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
 		.session_get_size	= armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
-		 uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
-		uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
 static uint32_t
 ccp_pmd_qp_count(struct rte_cryptodev *dev)
 {
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
 
 		.queue_pair_setup	= ccp_pmd_qp_setup,
 		.queue_pair_release	= ccp_pmd_qp_release,
-		.queue_pair_start	= ccp_pmd_qp_start,
-		.queue_pair_stop	= ccp_pmd_qp_stop,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
 		.session_get_size	= ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return retcode;
 }
 
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			   __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.stats_reset	      = dpaa2_sec_stats_reset,
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
-	.queue_pair_start     = dpaa2_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa2_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
 	.session_get_size     = dpaa2_sec_session_get_size,
 	.session_configure    = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			 __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.dev_infos_get        = dpaa_sec_dev_infos_get,
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
-	.queue_pair_start     = dpaa_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 5593238f2..c7556d478 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 
 		.queue_pair_setup   = kasumi_pmd_qp_setup,
 		.queue_pair_release = kasumi_pmd_qp_release,
-		.queue_pair_start   = kasumi_pmd_qp_start,
-		.queue_pair_stop    = kasumi_pmd_qp_stop,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
 		.session_get_size   = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..f83a6115f 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -595,32 +595,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs (PMD ops callback).
  *
  * @param dev Pointer to the device structure.
@@ -738,8 +712,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 
 		.queue_pair_setup	= mrvl_crypto_pmd_qp_setup,
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
-		.queue_pair_start	= mrvl_crypto_pmd_qp_start,
-		.queue_pair_stop	= mrvl_crypto_pmd_qp_stop,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
 		.session_get_size	= mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 55778a255..66bd62bd3 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -241,22 +241,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -337,8 +321,6 @@ struct rte_cryptodev_ops pmd_ops = {
 
 		.queue_pair_setup	= null_crypto_pmd_qp_setup,
 		.queue_pair_release	= null_crypto_pmd_qp_release,
-		.queue_pair_start	= null_crypto_pmd_qp_start,
-		.queue_pair_stop	= null_crypto_pmd_qp_stop,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
 		.session_get_size	= null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index a1a2d9900..20d4e26de 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 
 		.queue_pair_setup	= openssl_pmd_qp_setup,
 		.queue_pair_release	= openssl_pmd_qp_release,
-		.queue_pair_start	= openssl_pmd_qp_start,
-		.queue_pair_stop	= openssl_pmd_qp_stop,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
 		.session_get_size	= openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.stats_reset		= qat_sym_stats_reset,
 		.queue_pair_setup	= qat_sym_qp_setup,
 		.queue_pair_release	= qat_sym_qp_release,
-		.queue_pair_start	= NULL,
-		.queue_pair_stop	= NULL,
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 802585f4c..9b2f99eb2 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 
 		.queue_pair_setup	= scheduler_pmd_qp_setup,
 		.queue_pair_release	= scheduler_pmd_qp_release,
-		.queue_pair_start	= scheduler_pmd_qp_start,
-		.queue_pair_stop	= scheduler_pmd_qp_stop,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
 		.session_get_size	= scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 6f8b9e2c6..fe882c366 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 
 		.queue_pair_setup   = snow3g_pmd_qp_setup,
 		.queue_pair_release = snow3g_pmd_qp_release,
-		.queue_pair_start   = snow3g_pmd_qp_start,
-		.queue_pair_stop    = snow3g_pmd_qp_stop,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
 		.session_get_size   = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 1da4ae871..0be435c8c 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 
 	.queue_pair_setup                = virtio_crypto_qp_setup,
 	.queue_pair_release              = virtio_crypto_qp_release,
-	.queue_pair_start                = NULL,
-	.queue_pair_stop                 = NULL,
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index e151750fb..1d72a0757 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -328,8 +312,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 
 		.queue_pair_setup   = zuc_pmd_qp_setup,
 		.queue_pair_release = zuc_pmd_qp_release,
-		.queue_pair_start   = zuc_pmd_qp_start,
-		.queue_pair_stop    = zuc_pmd_qp_stop,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
 		.session_get_size   = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
 	return 0;
 }
 
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
 int
 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 7989eb876..b5d208917 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -566,43 +566,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
 		struct rte_mempool *session_pool);
 
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to start. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_crypto_dev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to stop. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_cryptodev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
 /**
  * Get the number of queue pairs on a specific crypto device
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1fb7e7d5e..641dd1369 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -184,28 +184,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
 typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
 				struct rte_cryptodev_info *dev_info);
 
-/**
- * Start queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
 /**
  * Setup a queue pair for a device.
  *
@@ -344,10 +322,6 @@ struct rte_cryptodev_ops {
 	/**< Set up a device queue pair. */
 	cryptodev_queue_pair_release_t queue_pair_release;
 	/**< Release a queue pair. */
-	cryptodev_queue_pair_start_t queue_pair_start;
-	/**< Start a queue pair. */
-	cryptodev_queue_pair_stop_t queue_pair_stop;
-	/**< Stop a queue pair. */
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
 	rte_cryptodev_stop;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
-	rte_cryptodev_queue_pair_start;
-	rte_cryptodev_queue_pair_stop;
 	rte_crypto_op_pool_create;
 
 	local: *;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (10 preceding siblings ...)
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-07-05  2:08   ` Pablo de Lara
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
                     ` (3 subsequent siblings)
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:08 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  6 ------
 doc/guides/rel_notes/release_18_08.rst         |  8 ++++++++
 lib/librte_cryptodev/rte_cryptodev.c           | 12 ------------
 lib/librte_cryptodev/rte_cryptodev.h           | 25 -------------------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 5 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
     with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
-  - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
-    It will be removed in 18.08.
-  - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
-    It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index cfb2885a1..e482d3d5f 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
 
+* cryptodev: Following functions were deprecated and are replaced by
+  other functions in 18.08:
+
+  - ``rte_cryptodev_get_header_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_header_session_size``
+  - ``rte_cryptodev_get_private_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_private_session_size``
+
 
 ABI Changes
 -----------
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 	return 0;
 }
 
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
-	return rte_cryptodev_sym_get_header_session_size();
-}
-
 unsigned int
 rte_cryptodev_sym_get_header_session_size(void)
 {
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
 	return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
 }
 
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
-	return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b5d208917..cc219c722 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -898,31 +898,6 @@ int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 			struct rte_cryptodev_sym_session *sess);
 
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- *   Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param	dev_id		The device identifier.
- *
- * @return
- *   - Size of the private data, if successful
- *   - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
 /**
  * Get the size of the header session, for all registered drivers.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
 	rte_cryptodev_driver_id_get;
 	rte_cryptodev_driver_name_get;
 	rte_cryptodev_get_aead_algo_enum;
-	rte_cryptodev_get_header_session_size;
-	rte_cryptodev_get_private_session_size;
 	rte_cryptodev_sym_capability_check_aead;
 	rte_cryptodev_sym_session_init;
 	rte_cryptodev_sym_session_clear;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (11 preceding siblings ...)
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-07-05  2:08   ` Pablo de Lara
  2018-07-05 11:35     ` Akhil Goyal
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 14/16] cryptodev: remove attach/detach session API Pablo de Lara
                     ` (2 subsequent siblings)
  15 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:08 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.

Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/cryptodevs/features/aesni_gcm.ini |  3 +-
 doc/guides/cryptodevs/features/default.ini   |  6 +++-
 doc/guides/cryptodevs/features/dpaa2_sec.ini |  6 +++-
 doc/guides/cryptodevs/features/dpaa_sec.ini  |  6 +++-
 doc/guides/cryptodevs/features/null.ini      |  2 +-
 doc/guides/cryptodevs/features/openssl.ini   |  3 +-
 doc/guides/cryptodevs/features/qat.ini       |  6 +++-
 doc/guides/cryptodevs/overview.rst           | 32 ++++++++++++++-----
 doc/guides/rel_notes/deprecation.rst         |  2 --
 doc/guides/rel_notes/release_18_08.rst       |  8 +++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c     |  3 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c  |  6 +++-
 drivers/crypto/dpaa_sec/dpaa_sec.c           |  6 +++-
 drivers/crypto/null/null_crypto_pmd.c        |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c     |  3 +-
 drivers/crypto/qat/qat_sym_pmd.c             |  6 +++-
 lib/librte_cryptodev/rte_cryptodev.c         | 12 ++++++--
 lib/librte_cryptodev/rte_cryptodev.h         | 46 +++++++++++++++++++---------
 test/test/test_cryptodev.c                   | 31 +++++++++++++------
 test/test/test_cryptodev_blockcipher.c       | 21 ++++++++++---
 20 files changed, 157 insertions(+), 53 deletions(-)

diff --git a/doc/guides/cryptodevs/features/aesni_gcm.ini b/doc/guides/cryptodevs/features/aesni_gcm.ini
index 920b6b6ac..65811e2fe 100644
--- a/doc/guides/cryptodevs/features/aesni_gcm.ini
+++ b/doc/guides/cryptodevs/features/aesni_gcm.ini
@@ -10,7 +10,8 @@ CPU AESNI              = Y
 CPU SSE                = Y
 CPU AVX                = Y
 CPU AVX2               = Y
-Mbuf scatter gather    = Y
+OOP SGL In FB  Out     = Y
+OOP FB  In FB  Out     = Y
 ;
 ; Supported crypto algorithms of the 'aesni_gcm' crypto driver.
 ;
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 42783887a..82efe3e31 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -18,7 +18,11 @@ CPU AVX512             =
 CPU AESNI              =
 CPU NEON               =
 CPU ARM CE             =
-Mbuf scatter gather    =
+In Place SGL           =
+OOP SGL In SGL Out     =
+OOP SGL In FB  Out     =
+OOP FB  In SGL Out     =
+OOP FB  In FB  Out     =
 
 ;
 ; Supported crypto algorithms of a default crypto driver.
diff --git a/doc/guides/cryptodevs/features/dpaa2_sec.ini b/doc/guides/cryptodevs/features/dpaa2_sec.ini
index 68c9960d8..5f23fde51 100644
--- a/doc/guides/cryptodevs/features/dpaa2_sec.ini
+++ b/doc/guides/cryptodevs/features/dpaa2_sec.ini
@@ -8,7 +8,11 @@ Symmetric crypto       = Y
 Sym operation chaining = Y
 HW Accelerated         = Y
 Protocol offload       = Y
-Mbuf scatter gather    = Y
+In Place SGL           = Y
+OOP SGL In SGL Out     = Y
+OOP SGL In FB  Out     = Y
+OOP FB  In SGL Out     = Y
+OOP FB  In FB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'dpaa2_sec' crypto driver.
diff --git a/doc/guides/cryptodevs/features/dpaa_sec.ini b/doc/guides/cryptodevs/features/dpaa_sec.ini
index 260fae728..521faeab6 100644
--- a/doc/guides/cryptodevs/features/dpaa_sec.ini
+++ b/doc/guides/cryptodevs/features/dpaa_sec.ini
@@ -8,7 +8,11 @@ Symmetric crypto       = Y
 Sym operation chaining = Y
 HW Accelerated         = Y
 Protocol offload       = Y
-Mbuf scatter gather    = Y
+In Place SGL           = Y
+OOP SGL In SGL Out     = Y
+OOP SGL In FB  Out     = Y
+OOP FB  In SGL Out     = Y
+OOP FB  In FB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'dpaa_sec' crypto driver.
diff --git a/doc/guides/cryptodevs/features/null.ini b/doc/guides/cryptodevs/features/null.ini
index a9e172da8..ecf5779ac 100644
--- a/doc/guides/cryptodevs/features/null.ini
+++ b/doc/guides/cryptodevs/features/null.ini
@@ -6,7 +6,7 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
-Mbuf scatter gather    = Y
+In Place SGL           = Y
 
 ;
 ; Supported crypto algorithms of the 'null' crypto driver.
diff --git a/doc/guides/cryptodevs/features/openssl.ini b/doc/guides/cryptodevs/features/openssl.ini
index 691565865..5f03166b9 100644
--- a/doc/guides/cryptodevs/features/openssl.ini
+++ b/doc/guides/cryptodevs/features/openssl.ini
@@ -6,7 +6,8 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
-Mbuf scatter gather    = Y
+OOP SGL In FB  Out     = Y
+OOP FB  In FB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'openssl' crypto driver.
diff --git a/doc/guides/cryptodevs/features/qat.ini b/doc/guides/cryptodevs/features/qat.ini
index 51ed5967f..ccfc042c6 100644
--- a/doc/guides/cryptodevs/features/qat.ini
+++ b/doc/guides/cryptodevs/features/qat.ini
@@ -7,7 +7,11 @@
 Symmetric crypto       = Y
 Sym operation chaining = Y
 HW Accelerated         = Y
-Mbuf scatter gather    = Y
+In Place SGL           = Y
+OOP SGL In SGL Out     = Y
+OOP SGL In FB  Out     = Y
+OOP FB  In SGL Out     = Y
+OOP FB  In FB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'qat' crypto driver.
diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst
index 493cd5f55..cc9c0f5a6 100644
--- a/doc/guides/cryptodevs/overview.rst
+++ b/doc/guides/cryptodevs/overview.rst
@@ -11,14 +11,30 @@ Supported Feature Flags
 
 .. include:: overview_feature_table.txt
 
-Note, the mbuf scatter gather feature (aka chained mbufs, scatter-gather-lists
-or SGLs) indicate all following combinations are supported unless otherwise called
-out in the Limitations section of each PMD.
-
-* In place operation, input buffer as multiple segments, same buffer used for output
-* Out of place operation, input buffer as single segment and output as multiple segments
-* Out of place operation, input buffer as multiple segments and output as single segment
-* Out of place operation, input buffer as multiple segments and output as multiple segments
+.. Note::
+
+   - "In Place SGL" feature flag stands for "In place Scatter-gather list",
+     which means that an input mbuf can consist of multiple segments,
+     being the operation in-place (input = output).
+
+   - "OOP SGL In SGL Out" feature flag stands for
+     "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
+     which means that the input and output mbufs can consist of multiple segments.
+
+   - "OOP SGL In FB Out" feature flag stands for
+     "Out-of-place Scatter-gather list Input, Flat Buffers Output",
+     which means that the input mbuf can consist of multiple segments combined
+     with a single segment mbuf in the output.
+
+   - "OOP FB In SGL Out" feature flag stands for
+     "Out-of-place Flat Buffers Input, Scatter-gather list Output",
+     which means that the output mbuf can consist of multiple segments combined
+     with a single segment mbuf in the input.
+
+   - "OOP FB In FB Out" feature flag stands for
+     "Out-of-place Flat Buffers Input, Scatter-gather list Output",
+     which means that Out-of-place operation is supported,
+     with single segment input and output mbufs.
 
 
 Supported Cipher Algorithms
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
-    so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index e482d3d5f..9cf3ea3df 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
   - ``rte_cryptodev_get_private_session_size`` is replaced with
     ``rte_cryptodev_sym_get_private_session_size``
 
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+  replaced with the following more explicit flags:
+  - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+  - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT``
+
 
 ABI Changes
 -----------
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 88307e0e7..ce740e97a 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,8 @@ aesni_gcm_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
 
 	switch (vector_mode) {
 	case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..1dd8dab83 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..49ff7584e 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 07276833b..3d7caf1f1 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -176,7 +176,7 @@ cryptodev_null_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL;
 
 	internals = dev->data->dev_private;
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 1ccab4ab5..865f8a75e 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,8 @@ cryptodev_openssl_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
 
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..33ac831fe 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..608db36c7 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		return "CPU_AESNI";
 	case RTE_CRYPTODEV_FF_HW_ACCELERATED:
 		return "HW_ACCELERATED";
-	case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
-		return "MBUF_SCATTER_GATHER";
+	case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+		return "IN_PLACE_SGL";
+	case RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT:
+		return "OOP_SGL_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT:
+		return "OOP_SGL_IN_FB_OUT";
+	case RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT:
+		return "OOP_FB_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT:
+		return "OOP_FB_IN_FB_OUT";
 	case RTE_CRYPTODEV_FF_CPU_NEON:
 		return "CPU_NEON";
 	case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index cc219c722..7942527e8 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -292,31 +292,47 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
  *
  * Keep these flags synchronised with rte_cryptodev_get_feature_name()
  */
-#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO	(1ULL << 0)
+#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO		(1ULL << 0)
 /**< Symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO	(1ULL << 1)
+#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO		(1ULL << 1)
 /**< Asymmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING	(1ULL << 2)
+#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING		(1ULL << 2)
 /**< Chaining symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_CPU_SSE		(1ULL << 3)
+#define	RTE_CRYPTODEV_FF_CPU_SSE			(1ULL << 3)
 /**< Utilises CPU SIMD SSE instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX		(1ULL << 4)
+#define	RTE_CRYPTODEV_FF_CPU_AVX			(1ULL << 4)
 /**< Utilises CPU SIMD AVX instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX2		(1ULL << 5)
+#define	RTE_CRYPTODEV_FF_CPU_AVX2			(1ULL << 5)
 /**< Utilises CPU SIMD AVX2 instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AESNI		(1ULL << 6)
+#define	RTE_CRYPTODEV_FF_CPU_AESNI			(1ULL << 6)
 /**< Utilises CPU AES-NI instructions */
-#define	RTE_CRYPTODEV_FF_HW_ACCELERATED		(1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define	RTE_CRYPTODEV_FF_CPU_AVX512		(1ULL << 8)
+#define	RTE_CRYPTODEV_FF_HW_ACCELERATED			(1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define	RTE_CRYPTODEV_FF_CPU_AVX512			(1ULL << 8)
 /**< Utilises CPU SIMD AVX512 instructions */
-#define	RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER	(1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define	RTE_CRYPTODEV_FF_CPU_NEON		(1ULL << 10)
+#define	RTE_CRYPTODEV_FF_IN_PLACE_SGL			(1ULL << 9)
+/**< In-place Scatter-gather (SGL) mbufs are supported */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT		(1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) mbufs are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT		(1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in input, combined with flat buffers (FB) in output
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT		(1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) mbufs are supported
+ * in output, combined with flat buffers (FB) in input
+ */
+#define RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT		(1ULL << 13)
+/**< Out-of-place flat buffers (FB) are supported in input and output */
+#define	RTE_CRYPTODEV_FF_CPU_NEON			(1ULL << 14)
 /**< Utilises CPU NEON instructions */
-#define	RTE_CRYPTODEV_FF_CPU_ARM_CE		(1ULL << 11)
+#define	RTE_CRYPTODEV_FF_CPU_ARM_CE			(1ULL << 15)
 /**< Utilises ARM CPU Cryptographic Extensions */
-#define	RTE_CRYPTODEV_FF_SECURITY		(1ULL << 12)
+#define	RTE_CRYPTODEV_FF_SECURITY			(1ULL << 16)
 /**< Support Security Protocol Processing */
 
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 73aadaced..e23eecb66 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 		return -ENOTSUP;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
-		return -ENOTSUP;
+		return 0;
 	}
 
 	plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..712771605 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
 		rte_cryptodev_info_get(dev_id, &dev_info);
-		if (!(dev_info.feature_flags &
-				RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-			printf("Device doesn't support scatter-gather. "
+		uint64_t feat_flags = dev_info.feature_flags;
+		uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT;
+
+		if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+			if (!(feat_flags & oop_flag)) {
+				printf("Device doesn't support out-of-place "
+					"scatter-gather in input mbuf. "
+					"Test Skipped.\n");
+				return 0;
+			}
+		} else {
+			if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+				printf("Device doesn't support in-place "
+					"scatter-gather mbufs. "
 					"Test Skipped.\n");
-			return 0;
+				return 0;
+			}
 		}
+
 		nb_segs = 3;
 	}
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 14/16] cryptodev: remove attach/detach session API
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (12 preceding siblings ...)
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-07-05  2:08   ` Pablo de Lara
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:08 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

As announced in the previous release,
The API to attach/dettach a session to a queue pair
is removed, as it was only used in DPAA, and it is not
actually needed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  8 ----
 doc/guides/rel_notes/release_18_08.rst         |  2 +
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 32 +--------------
 drivers/crypto/virtio/virtio_cryptodev.c       |  4 +-
 lib/librte_cryptodev/rte_cryptodev.c           | 54 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 36 -----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 30 --------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 -
 8 files changed, 4 insertions(+), 164 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 62d635b74..8bdaaaf5d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -97,11 +97,3 @@ Deprecation Notices
   - ``rte_pdump_set_socket_dir`` will be removed;
   - The parameter, ``path``, of ``rte_pdump_init`` will be removed;
   - The enum ``rte_pdump_socktype`` will be removed.
-
-* cryptodev: The following changes will be made in the library
-  for 18.08:
-
-  - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
-    ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
-    18.05 and removed in 18.08, as there are no drivers doing anything useful
-    with them.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 9cf3ea3df..ef03f4ef6 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -69,6 +69,8 @@ API Changes
 
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
+  - ``rte_cryptodev_queue_pair_attach_sym_session``
+  - ``rte_cryptodev_queue_pair_detach_sym_session``
 
 * cryptodev: Following functions were deprecated and are replaced by
   other functions in 18.08:
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 49ff7584e..f540bb4ad 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1734,34 +1734,6 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess)
 	return ret;
 }
 
-static int
-dpaa_sec_qp_attach_sess(struct rte_cryptodev *dev __rte_unused,
-			uint16_t qp_id __rte_unused,
-			void *ses __rte_unused)
-{
-	PMD_INIT_FUNC_TRACE();
-	return 0;
-}
-
-static int
-dpaa_sec_qp_detach_sess(struct rte_cryptodev *dev,
-			uint16_t qp_id  __rte_unused,
-			void *ses)
-{
-	dpaa_sec_session *sess = ses;
-	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
-
-	PMD_INIT_FUNC_TRACE();
-
-	if (sess->inq)
-		dpaa_sec_detach_rxq(qi, sess->inq);
-	sess->inq = NULL;
-
-	sess->qp = NULL;
-
-	return 0;
-}
-
 static int
 dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 			    struct rte_crypto_sym_xform *xform,	void *sess)
@@ -2210,9 +2182,7 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear,
-	.qp_attach_session    = dpaa_sec_qp_attach_sess,
-	.qp_detach_session    = dpaa_sec_qp_detach_sess,
+	.session_clear        = dpaa_sec_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 0be435c8c..f7021b38b 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -520,9 +520,7 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	/* Crypto related operations */
 	.session_get_size	= virtio_crypto_sym_get_session_private_size,
 	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session,
-	.qp_attach_session = NULL,
-	.qp_detach_session = NULL
+	.session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 608db36c7..8f990b9ab 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1095,60 +1095,6 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 	return sess;
 }
 
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_attach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_attach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to attach qp: %d with session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_detach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_detach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to detach qp: %d from session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 		struct rte_cryptodev_sym_session *sess)
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 7942527e8..2049a745d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -937,42 +937,6 @@ rte_cryptodev_sym_get_header_session_size(void);
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id);
 
-/**
- * @deprecated
- * Attach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session will be attached.
- * @param	qp_id		Queue pair to which the session will be attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
-/**
- * @deprecated
- * Detach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session is attached.
- * @param	qp_id		Queue pair to which the session is attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
 /**
  * Provide driver identifier.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 641dd1369..ec4f1ecfb 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -278,32 +278,6 @@ typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
 typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess);
 
-/**
- * Optional API for drivers to attach sessions with queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for attaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_attach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
-/**
- * Optional API for drivers to detach sessions from queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for detaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_detach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
 /** Crypto device operations function pointer table */
 struct rte_cryptodev_ops {
 	cryptodev_configure_t dev_configure;	/**< Configure device. */
@@ -331,10 +305,6 @@ struct rte_cryptodev_ops {
 	/**< Configure a Crypto session. */
 	cryptodev_sym_free_session_t session_clear;
 	/**< Clear a Crypto sessions private data. */
-	cryptodev_sym_queue_pair_attach_session_t qp_attach_session;
-	/**< Attach session to queue pair. */
-	cryptodev_sym_queue_pair_detach_session_t qp_detach_session;
-	/**< Detach session from queue pair. */
 };
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 0ab6d5195..77abd8ddc 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -50,8 +50,6 @@ DPDK_17.05 {
 
 	rte_cryptodev_get_auth_algo_enum;
 	rte_cryptodev_get_cipher_algo_enum;
-	rte_cryptodev_queue_pair_attach_sym_session;
-	rte_cryptodev_queue_pair_detach_sym_session;
 
 } DPDK_17.02;
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 15/16] cryptodev: rename PMD symmetric session API
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (13 preceding siblings ...)
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 14/16] cryptodev: remove attach/detach session API Pablo de Lara
@ 2018-07-05  2:08   ` Pablo de Lara
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:08 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The PMD specific API to configure, clear and
obtain session private size is renamed, including
the word _sym_ to clarify that it is API
for symmetric sessions, so there will not be any
conflicts for asymmetric and other type of sessions
in the future.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c       |  6 +++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 ++++++++---------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     |  8 ++++----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 ++++++++---------
 drivers/crypto/armv8/rte_armv8_pmd.c           |  6 +++---
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 ++++++++---------
 drivers/crypto/ccp/ccp_crypto.c                | 28 +++++++++++++-------------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 18 ++++++++---------
 drivers/crypto/ccp/rte_ccp_pmd.c               |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 20 +++++++++---------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 20 +++++++++---------
 drivers/crypto/kasumi/rte_kasumi_pmd.c         |  6 +++---
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 ++++++++---------
 drivers/crypto/mvsam/rte_mrvl_pmd.c            |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 18 ++++++++---------
 drivers/crypto/null/null_crypto_pmd.c          |  6 +++---
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 ++++++++---------
 drivers/crypto/openssl/rte_openssl_pmd.c       |  6 +++---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 ++++++++---------
 drivers/crypto/qat/qat_sym.c                   |  2 +-
 drivers/crypto/qat/qat_sym.h                   |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c               |  6 +++---
 drivers/crypto/qat/qat_sym_session.c           |  6 +++---
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 14 ++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c         |  6 +++---
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 ++++++++---------
 drivers/crypto/virtio/virtio_cryptodev.c       | 10 ++++-----
 drivers/crypto/virtio/virtio_rxtx.c            |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c               |  6 +++---
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 ++++++++---------
 lib/librte_cryptodev/rte_cryptodev.c           | 11 +++++-----
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 10 ++++-----
 32 files changed, 184 insertions(+), 183 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index ce740e97a..9df3740bf 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -127,7 +127,7 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(sym_op->session != NULL))
 			sess = (struct aesni_gcm_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					sym_op->session,
 					cryptodev_driver_id);
 	} else  {
@@ -149,8 +149,8 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(sym_op->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(sym_op->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 489d2e08f..b6b4dd028 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -251,14 +251,14 @@ aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned
-aesni_gcm_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_gcm_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_gcm_session);
 }
 
 /** Configure a aesni gcm session from a crypto xform chain */
 static int
-aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+aesni_gcm_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -287,7 +287,7 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -295,17 +295,17 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_gcm_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_gcm_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct aesni_gcm_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -325,9 +325,9 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
-		.session_get_size	= aesni_gcm_pmd_session_get_size,
-		.session_configure	= aesni_gcm_pmd_session_configure,
-		.session_clear		= aesni_gcm_pmd_session_clear
+		.sym_session_get_size	= aesni_gcm_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_gcm_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_gcm_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_gcm_pmd_ops = &aesni_gcm_pmd_ops;
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 17ac43f0f..85b37cda5 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -458,7 +458,7 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct aesni_mb_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -480,8 +480,8 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
@@ -658,7 +658,7 @@ static inline struct rte_crypto_op *
 post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
 {
 	struct rte_crypto_op *op = (struct rte_crypto_op *)job->user_data;
-	struct aesni_mb_session *sess = get_session_private_data(
+	struct aesni_mb_session *sess = get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
 
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 b806c4d52..fa3e96316 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -518,14 +518,14 @@ aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni multi-buffer session structure */
 static unsigned
-aesni_mb_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_mb_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_mb_session);
 }
 
 /** Configure a aesni multi-buffer session from a crypto xform chain */
 static int
-aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -555,7 +555,7 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -563,17 +563,17 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_mb_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct aesni_mb_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -593,9 +593,9 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
-		.session_get_size	= aesni_mb_pmd_session_get_size,
-		.session_configure	= aesni_mb_pmd_session_configure,
-		.session_clear		= aesni_mb_pmd_session_clear
+		.sym_session_get_size	= aesni_mb_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_mb_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_mb_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops = &aesni_mb_pmd_ops;
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index db0d8a2a9..9d15fee53 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -502,7 +502,7 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 		/* get existing session */
 		if (likely(op->sym->session != NULL)) {
 			sess = (struct armv8_crypto_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 		}
@@ -526,8 +526,8 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 5e8a5a292..ae03117ea 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -267,14 +267,14 @@ armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-armv8_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+armv8_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct armv8_crypto_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -302,7 +302,7 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -310,17 +310,17 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-armv8_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct armv8_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -340,9 +340,9 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
-		.session_get_size	= armv8_crypto_pmd_session_get_size,
-		.session_configure	= armv8_crypto_pmd_session_configure,
-		.session_clear		= armv8_crypto_pmd_session_clear
+		.sym_session_get_size	= armv8_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= armv8_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= armv8_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_armv8_crypto_pmd_ops = &armv8_crypto_pmd_ops;
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 3ce0f39f3..19ae9153d 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1566,7 +1566,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
 	void *append_ptr;
 	uint8_t *addr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 	addr = session->auth.pre_compute;
@@ -1739,7 +1739,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
 	void *append_ptr;
 	uint64_t auth_msg_bits;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -1828,7 +1828,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
 	uint32_t tail;
 	phys_addr_t src_addr, dest_addr, ctx_paddr, dest_addr_t;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -1968,7 +1968,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
 	uint32_t tail;
 	phys_addr_t src_addr, dest_addr, ctx_paddr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2036,7 +2036,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
 	phys_addr_t src_addr, dest_addr, key_addr;
 	int length, non_align_len;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 	key_addr = rte_mem_virt2phy(session->auth.key_ccp);
@@ -2188,7 +2188,7 @@ ccp_perform_aes(struct rte_crypto_op *op,
 	phys_addr_t src_addr, dest_addr, key_addr;
 	uint8_t *iv;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 	function.raw = 0;
@@ -2276,7 +2276,7 @@ ccp_perform_3des(struct rte_crypto_op *op,
 	uint8_t *iv;
 	phys_addr_t src_addr, dest_addr, key_addr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2379,7 +2379,7 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
 	phys_addr_t digest_dest_addr;
 	int length, non_align_len;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
@@ -2546,7 +2546,7 @@ ccp_crypto_cipher(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 
@@ -2584,7 +2584,7 @@ ccp_crypto_auth(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2654,7 +2654,7 @@ ccp_crypto_aead(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2711,7 +2711,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
 	b_info->head_offset = (uint32_t)(cmd_q->qbase_phys_addr + cmd_q->qidx *
 					 Q_DESC_SIZE);
 	for (i = 0; i < nb_ops; i++) {
-		session = (struct ccp_session *)get_session_private_data(
+		session = (struct ccp_session *)get_sym_session_private_data(
 						 op[i]->sym->session,
 						 ccp_cryptodev_driver_id);
 		switch (session->cmd_id) {
@@ -2787,7 +2787,7 @@ static inline void ccp_auth_dq_prepare(struct rte_crypto_op *op)
 	int offset, digest_offset;
 	uint8_t digest_le[64];
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2863,7 +2863,7 @@ ccp_prepare_ops(struct ccp_qp *qp,
 
 	for (i = 0; i < min_ops; i++) {
 		op_d[i] = b_info->op[b_info->op_idx++];
-		session = (struct ccp_session *)get_session_private_data(
+		session = (struct ccp_session *)get_sym_session_private_data(
 						 op_d[i]->sym->session,
 						ccp_cryptodev_driver_id);
 		switch (session->cmd_id) {
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 1cb944406..6984913f1 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -755,13 +755,13 @@ ccp_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static unsigned
-ccp_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+ccp_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct ccp_session);
 }
 
 static int
-ccp_pmd_session_configure(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_configure(struct rte_cryptodev *dev,
 			  struct rte_crypto_sym_xform *xform,
 			  struct rte_cryptodev_sym_session *sess,
 			  struct rte_mempool *mempool)
@@ -788,25 +788,25 @@ ccp_pmd_session_configure(struct rte_cryptodev *dev,
 		rte_mempool_put(mempool, sess_private_data);
 		return ret;
 	}
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 				 sess_private_data);
 
 	return 0;
 }
 
 static void
-ccp_pmd_session_clear(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		      struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	if (sess_priv) {
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
 		rte_mempool_put(sess_mp, sess_priv);
 		memset(sess_priv, 0, sizeof(struct ccp_session));
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 	}
 }
 
@@ -825,9 +825,9 @@ struct rte_cryptodev_ops ccp_ops = {
 		.queue_pair_release	= ccp_pmd_qp_release,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
-		.session_get_size	= ccp_pmd_session_get_size,
-		.session_configure	= ccp_pmd_session_configure,
-		.session_clear		= ccp_pmd_session_clear,
+		.sym_session_get_size	= ccp_pmd_sym_session_get_size,
+		.sym_session_configure	= ccp_pmd_sym_session_configure,
+		.sym_session_clear	= ccp_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *ccp_pmd_ops = &ccp_ops;
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index d70640f6d..92d8a9559 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -160,7 +160,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
 			return NULL;
 
 		sess = (struct ccp_session *)
-			get_session_private_data(
+			get_sym_session_private_data(
 				op->sym->session,
 				ccp_cryptodev_driver_id);
 	} else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
@@ -183,7 +183,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session,
+		set_sym_session_private_data(op->sym->session,
 					 ccp_cryptodev_driver_id,
 					 _sess_private_data);
 	}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1dd8dab83..9ecaeee91 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1080,7 +1080,7 @@ build_sec_fd(struct rte_crypto_op *op,
 	PMD_INIT_FUNC_TRACE();
 
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
-		sess = (dpaa2_sec_session *)get_session_private_data(
+		sess = (dpaa2_sec_session *)get_sym_session_private_data(
 				op->sym->session, cryptodev_driver_id);
 	else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
 		sess = (dpaa2_sec_session *)get_sec_session_private_data(
@@ -1481,7 +1481,7 @@ dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned int
-dpaa2_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa2_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -2436,7 +2436,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
 }
 
 static int
-dpaa2_sec_session_configure(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -2457,7 +2457,7 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -2465,12 +2465,12 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa2_sec_session_clear(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	PMD_INIT_FUNC_TRACE();
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 	dpaa2_sec_session *s = (dpaa2_sec_session *)sess_priv;
 
 	if (sess_priv) {
@@ -2479,7 +2479,7 @@ dpaa2_sec_session_clear(struct rte_cryptodev *dev,
 		rte_free(s->auth_key.data);
 		memset(sess, 0, sizeof(dpaa2_sec_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -2697,9 +2697,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
-	.session_get_size     = dpaa2_sec_session_get_size,
-	.session_configure    = dpaa2_sec_session_configure,
-	.session_clear        = dpaa2_sec_session_clear,
+	.sym_session_get_size     = dpaa2_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa2_sec_sym_session_configure,
+	.sym_session_clear        = dpaa2_sec_sym_session_clear,
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index f540bb4ad..1a1e8fa94 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1416,7 +1416,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
 			switch (op->sess_type) {
 			case RTE_CRYPTO_OP_WITH_SESSION:
 				ses = (dpaa_sec_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
 				break;
@@ -1596,7 +1596,7 @@ dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of session structure */
 static unsigned int
-dpaa_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -1811,7 +1811,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 }
 
 static int
-dpaa_sec_session_configure(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -1835,7 +1835,7 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 
@@ -1844,12 +1844,12 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa_sec_session_clear(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1863,7 +1863,7 @@ dpaa_sec_session_clear(struct rte_cryptodev *dev,
 		rte_free(s->cipher_key.data);
 		rte_free(s->auth_key.data);
 		memset(s, 0, sizeof(dpaa_sec_session));
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -2180,9 +2180,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
-	.session_get_size     = dpaa_sec_session_get_size,
-	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear
+	.sym_session_get_size     = dpaa_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa_sec_sym_session_configure,
+	.sym_session_clear        = dpaa_sec_sym_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 9eb43b2eb..5c9d54b1f 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -135,7 +135,7 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct kasumi_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -157,8 +157,8 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index c7556d478..9e4bf1b52 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -238,14 +238,14 @@ kasumi_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the KASUMI session structure */
 static unsigned
-kasumi_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+kasumi_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct kasumi_session);
 }
 
 /** Configure a KASUMI session from a crypto xform chain */
 static int
-kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+kasumi_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -273,7 +273,7 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -281,17 +281,17 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-kasumi_pmd_session_clear(struct rte_cryptodev *dev,
+kasumi_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct kasumi_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -311,9 +311,9 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 		.queue_pair_release = kasumi_pmd_qp_release,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
-		.session_get_size   = kasumi_pmd_session_get_size,
-		.session_configure  = kasumi_pmd_session_configure,
-		.session_clear      = kasumi_pmd_session_clear
+		.sym_session_get_size   = kasumi_pmd_sym_session_get_size,
+		.sym_session_configure  = kasumi_pmd_sym_session_configure,
+		.sym_session_clear      = kasumi_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_kasumi_pmd_ops = &kasumi_pmd_ops;
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index a7f5389ee..73eff7573 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -447,7 +447,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,
 		return -EINVAL;
 	}
 
-	sess = (struct mrvl_crypto_session *)get_session_private_data(
+	sess = (struct mrvl_crypto_session *)get_sym_session_private_data(
 			op->sym->session, cryptodev_driver_id);
 	if (unlikely(sess == NULL)) {
 		MRVL_CRYPTO_LOG_ERR("Session was not created for this device");
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index f83a6115f..c045562ca 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -612,7 +612,7 @@ mrvl_crypto_pmd_qp_count(struct rte_cryptodev *dev)
  * @returns Size of Marvell crypto session.
  */
 static unsigned
-mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
+mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
 {
 	return sizeof(struct mrvl_crypto_session);
 }
@@ -625,7 +625,7 @@ mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
  * @returns 0 upon success, negative value otherwise.
  */
 static int
-mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -653,7 +653,7 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id, sess_private_data);
+	set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
 
 	mrvl_sess = (struct mrvl_crypto_session *)sess_private_data;
 	if (sam_session_create(&mrvl_sess->sam_sess_params,
@@ -672,12 +672,12 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
  * @returns 0. Always.
  */
 static void
-mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
@@ -691,7 +691,7 @@ mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
 
 		memset(sess, 0, sizeof(struct mrvl_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -714,9 +714,9 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
-		.session_get_size	= mrvl_crypto_pmd_session_get_size,
-		.session_configure	= mrvl_crypto_pmd_session_configure,
-		.session_clear		= mrvl_crypto_pmd_session_clear
+		.sym_session_get_size	= mrvl_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= mrvl_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= mrvl_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops = &mrvl_crypto_pmd_ops;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 3d7caf1f1..fca8e3598 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -78,7 +78,7 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(sym_op->session != NULL))
 			sess = (struct null_crypto_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					sym_op->session, cryptodev_driver_id);
 	} else {
 		void *_sess = NULL;
@@ -99,8 +99,8 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(sym_op->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	return sess;
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 66bd62bd3..bb2b6e144 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -250,14 +250,14 @@ null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the NULL crypto session structure */
 static unsigned
-null_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+null_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct null_crypto_session);
 }
 
 /** Configure a null crypto session from a crypto xform chain */
 static int
-null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+null_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -285,7 +285,7 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -293,17 +293,17 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-null_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+null_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct null_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -323,9 +323,9 @@ struct rte_cryptodev_ops pmd_ops = {
 		.queue_pair_release	= null_crypto_pmd_qp_release,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
-		.session_get_size	= null_crypto_pmd_session_get_size,
-		.session_configure	= null_crypto_pmd_session_configure,
-		.session_clear		= null_crypto_pmd_session_clear
+		.sym_session_get_size	= null_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= null_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= null_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *null_crypto_pmd_ops = &pmd_ops;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 865f8a75e..5809ee70c 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -736,7 +736,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 		/* get existing session */
 		if (likely(op->sym->session != NULL))
 			sess = (struct openssl_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -759,8 +759,8 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (sess == NULL)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 20d4e26de..533568556 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -657,14 +657,14 @@ openssl_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-openssl_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct openssl_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -692,7 +692,7 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -701,18 +701,18 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-openssl_pmd_session_clear(struct rte_cryptodev *dev,
+openssl_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		openssl_reset_session(sess_priv);
 		memset(sess_priv, 0, sizeof(struct openssl_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -732,9 +732,9 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 		.queue_pair_release	= openssl_pmd_qp_release,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
-		.session_get_size	= openssl_pmd_session_get_size,
-		.session_configure	= openssl_pmd_session_configure,
-		.session_clear		= openssl_pmd_session_clear
+		.sym_session_get_size	= openssl_pmd_sym_session_get_size,
+		.sym_session_configure	= openssl_pmd_sym_session_configure,
+		.sym_session_clear	= openssl_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_openssl_pmd_ops = &openssl_pmd_ops;
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 17d63eb1e..aa6eeb0c0 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -174,7 +174,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		return -EINVAL;
 	}
 
-	ctx = (struct qat_sym_session *)get_session_private_data(
+	ctx = (struct qat_sym_session *)get_sym_session_private_data(
 			op->sym->session, cryptodev_qat_driver_id);
 
 	if (unlikely(ctx == NULL)) {
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index d425892f4..e4e1ae89c 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -143,7 +143,7 @@ qat_sym_process_response(void **op, uint8_t *resp)
 		rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
 	} else {
 		struct qat_sym_session *sess = (struct qat_sym_session *)
-						get_session_private_data(
+						get_sym_session_private_data(
 						rx_op->sym->session,
 						cryptodev_qat_driver_id);
 
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 33ac831fe..ec62e42ac 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -205,9 +205,9 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
-		.session_get_size	= qat_sym_session_get_private_size,
-		.session_configure	= qat_sym_session_configure,
-		.session_clear		= qat_sym_session_clear
+		.sym_session_get_size	= qat_sym_session_get_private_size,
+		.sym_session_configure	= qat_sym_session_configure,
+		.sym_session_clear	= qat_sym_session_clear
 };
 
 static uint16_t
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index dc1c20044..4d975ae07 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -112,7 +112,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 	struct qat_sym_session *s = (struct qat_sym_session *)sess_priv;
 
 	if (sess_priv) {
@@ -121,7 +121,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
 		memset(s, 0, qat_sym_session_get_private_size(dev));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -396,7 +396,7 @@ qat_sym_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 9b2f99eb2..a74216ad7 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -447,7 +447,7 @@ scheduler_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static uint32_t
-scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+scheduler_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
 	uint8_t i = 0;
@@ -457,7 +457,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 	for (i = 0; i < sched_ctx->nb_slaves; i++) {
 		uint8_t slave_dev_id = sched_ctx->slaves[i].dev_id;
 		struct rte_cryptodev *dev = &rte_cryptodevs[slave_dev_id];
-		uint32_t priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+		uint32_t priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 		if (max_priv_sess_size < priv_sess_size)
 			max_priv_sess_size = priv_sess_size;
@@ -467,7 +467,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 }
 
 static int
-scheduler_pmd_session_configure(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev,
 	struct rte_crypto_sym_xform *xform,
 	struct rte_cryptodev_sym_session *sess,
 	struct rte_mempool *mempool)
@@ -492,7 +492,7 @@ scheduler_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-scheduler_pmd_session_clear(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
@@ -521,9 +521,9 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 		.queue_pair_release	= scheduler_pmd_qp_release,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
-		.session_get_size	= scheduler_pmd_session_get_size,
-		.session_configure	= scheduler_pmd_session_configure,
-		.session_clear		= scheduler_pmd_session_clear,
+		.sym_session_get_size	= scheduler_pmd_sym_session_get_size,
+		.sym_session_configure	= scheduler_pmd_sym_session_configure,
+		.sym_session_clear	= scheduler_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops = &scheduler_pmd_ops;
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 26dfbbc38..604514746 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -137,7 +137,7 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct snow3g_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -159,8 +159,8 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index fe882c366..6ed7e6c52 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -240,14 +240,14 @@ snow3g_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the SNOW 3G session structure */
 static unsigned
-snow3g_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+snow3g_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct snow3g_session);
 }
 
 /** Configure a SNOW 3G session from a crypto xform chain */
 static int
-snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+snow3g_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -275,7 +275,7 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -283,17 +283,17 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-snow3g_pmd_session_clear(struct rte_cryptodev *dev,
+snow3g_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct snow3g_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -313,9 +313,9 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 		.queue_pair_release = snow3g_pmd_qp_release,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
-		.session_get_size   = snow3g_pmd_session_get_size,
-		.session_configure  = snow3g_pmd_session_configure,
-		.session_clear      = snow3g_pmd_session_clear
+		.sym_session_get_size   = snow3g_pmd_sym_session_get_size,
+		.sym_session_configure  = snow3g_pmd_sym_session_configure,
+		.sym_session_clear      = snow3g_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_snow3g_pmd_ops = &snow3g_pmd_ops;
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index f7021b38b..f8759f1c5 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -518,9 +518,9 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
-	.session_get_size	= virtio_crypto_sym_get_session_private_size,
-	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session
+	.sym_session_get_size		= virtio_crypto_sym_get_session_private_size,
+	.sym_session_configure		= virtio_crypto_sym_configure_session,
+	.sym_session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
@@ -958,7 +958,7 @@ virtio_crypto_sym_clear_session(
 
 	hw = dev->data->dev_private;
 	vq = hw->cvq;
-	session = (struct virtio_crypto_session *)get_session_private_data(
+	session = (struct virtio_crypto_session *)get_sym_session_private_data(
 		sess, cryptodev_virtio_driver_id);
 	if (session == NULL) {
 		VIRTIO_CRYPTO_SESSION_LOG_ERR("Invalid session parameter");
@@ -1386,7 +1386,7 @@ virtio_crypto_sym_configure_session(
 		goto error_out;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		session_private);
 
 	return 0;
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index 450392843..76cf04585 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -205,7 +205,7 @@ virtqueue_crypto_sym_enqueue_xmit(
 		sizeof(struct virtio_crypto_inhdr);
 	struct rte_crypto_sym_op *sym_op = cop->sym;
 	struct virtio_crypto_session *session =
-		(struct virtio_crypto_session *)get_session_private_data(
+		(struct virtio_crypto_session *)get_sym_session_private_data(
 		cop->sym->session, cryptodev_virtio_driver_id);
 	struct virtio_crypto_op_data_req *op_data_req;
 	uint32_t hash_result_len = 0;
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 8de5c27db..74cf49856 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -134,7 +134,7 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
-			sess = (struct zuc_session *)get_session_private_data(
+			sess = (struct zuc_session *)get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -156,8 +156,8 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 1d72a0757..6da396542 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -240,14 +240,14 @@ zuc_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the ZUC session structure */
 static unsigned
-zuc_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+zuc_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct zuc_session);
 }
 
 /** Configure a ZUC session from a crypto xform chain */
 static int
-zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+zuc_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -276,7 +276,7 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -284,17 +284,17 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-zuc_pmd_session_clear(struct rte_cryptodev *dev,
+zuc_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct zuc_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -314,9 +314,9 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 		.queue_pair_release = zuc_pmd_qp_release,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
-		.session_get_size   = zuc_pmd_session_get_size,
-		.session_configure  = zuc_pmd_session_configure,
-		.session_clear      = zuc_pmd_session_clear
+		.sym_session_get_size   = zuc_pmd_sym_session_get_size,
+		.sym_session_configure  = zuc_pmd_sym_session_configure,
+		.sym_session_clear      = zuc_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_zuc_pmd_ops = &zuc_pmd_ops;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 8f990b9ab..3860b0b23 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1064,7 +1064,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	index = dev->driver_id;
 
 	if (sess->sess_private_data[index] == NULL) {
-		ret = dev->dev_ops->session_configure(dev, xforms, sess, mp);
+		ret = dev->dev_ops->sym_session_configure(dev, xforms,
+							sess, mp);
 		if (ret < 0) {
 			CDEV_LOG_ERR(
 				"dev_id %d failed to configure session details",
@@ -1106,7 +1107,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
-	dev->dev_ops->session_clear(dev, sess);
+	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
 }
@@ -1123,7 +1124,7 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 
 	/* Check that all device private data has been freed */
 	for (i = 0; i < nb_drivers; i++) {
-		sess_priv = get_session_private_data(sess, i);
+		sess_priv = get_sym_session_private_data(sess, i);
 		if (sess_priv != NULL)
 			return -EBUSY;
 	}
@@ -1158,10 +1159,10 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
-	if (*dev->dev_ops->session_get_size == NULL)
+	if (*dev->dev_ops->sym_session_get_size == NULL)
 		return 0;
 
-	priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+	priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 	/*
 	 * If size is less than session header size,
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index ec4f1ecfb..ac6a1c4f7 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -299,11 +299,11 @@ struct rte_cryptodev_ops {
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
-	cryptodev_sym_get_session_private_size_t session_get_size;
+	cryptodev_sym_get_session_private_size_t sym_session_get_size;
 	/**< Return private session. */
-	cryptodev_sym_configure_session_t session_configure;
+	cryptodev_sym_configure_session_t sym_session_configure;
 	/**< Configure a Crypto session. */
-	cryptodev_sym_free_session_t session_clear;
+	cryptodev_sym_free_session_t sym_session_clear;
 	/**< Clear a Crypto sessions private data. */
 };
 
@@ -436,13 +436,13 @@ static void init_ ##driver_id(void)\
 }
 
 static inline void *
-get_session_private_data(const struct rte_cryptodev_sym_session *sess,
+get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id) {
 	return sess->sess_private_data[driver_id];
 }
 
 static inline void
-set_session_private_data(struct rte_cryptodev_sym_session *sess,
+set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id, void *private_data)
 {
 	sess->sess_private_data[driver_id] = private_data;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v5 16/16] cryptodev: check if symmetric sessions are supported
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
                     ` (14 preceding siblings ...)
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
@ 2018-07-05  2:08   ` Pablo de Lara
  15 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-05  2:08 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Since asymmetric functionality will be implemented soon,
not all PMDs must support symmetric sessions.
Therefore, a check is added if a device does not implement
the symmetric functions, meaning that the device does not
support symmetric operations.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 4 ++++
 lib/librte_cryptodev/rte_cryptodev.h | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 3860b0b23..26d43fd3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1063,6 +1063,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 
 	index = dev->driver_id;
 
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure, -ENOTSUP);
+
 	if (sess->sess_private_data[index] == NULL) {
 		ret = dev->dev_ops->sym_session_configure(dev, xforms,
 							sess, mp);
@@ -1107,6 +1109,8 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear, -ENOTSUP);
+
 	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 2049a745d..27dc7a297 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -888,7 +888,8 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess);
  * @return
  *  - On success, zero.
  *  - -EINVAL if input parameters are invalid.
- *  - -ENOTSUP if crypto device does not support the crypto transform.
+ *  - -ENOTSUP if crypto device does not support the crypto transform or
+ *    does not support symmetric operations.
  *  - -ENOMEM if the private session could not be allocated.
  */
 int
@@ -909,6 +910,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
  * @return
  *  - 0 if successful.
  *  - -EINVAL if device is invalid or session is NULL.
+ *  - -ENOTSUP if crypto device does not support symmetric operations.
  */
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
-- 
2.14.4

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

* Re: [dpdk-dev] [PATCH v5 04/16] test/crypto: limit number of sessions
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 04/16] test/crypto: " Pablo de Lara
@ 2018-07-05 11:27     ` Verma, Shally
  2018-07-05 11:30       ` Akhil Goyal
  0 siblings, 1 reply; 135+ messages in thread
From: Verma, Shally @ 2018-07-05 11:27 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, akhil.goyal, ravi1.kumar, Jacob,
	 Jerin, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev



>-----Original Message-----
>From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com]
>Sent: 05 July 2018 07:38
>To: declan.doherty@intel.com; akhil.goyal@nxp.com; Verma, Shally <Shally.Verma@cavium.com>; ravi1.kumar@amd.com; Jacob,
>Jerin <Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com; fiona.trahe@intel.com; tdu@semihalf.com;
>jianjay.zhou@huawei.com
>Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
>Subject: [PATCH v5 04/16] test/crypto: limit number of sessions
>
>External Email
>
>Instead of using the maximum number of sessions
>allowed by the PMDs (which will change to unlimited most
>of the PMDs), limit the number to a small sufficient amount.
>
>Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
>---
> test/test/test_cryptodev.c | 27 +++++++++++++++++++++------
> 1 file changed, 21 insertions(+), 6 deletions(-)
>
>diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
>index 389f79677..5c906cfae 100644
>--- a/test/test/test_cryptodev.c
>+++ b/test/test/test_cryptodev.c
>@@ -39,6 +39,7 @@
> #include "test_cryptodev_hmac_test_vectors.h"
>
> #define VDEV_ARGS_SIZE 100
>+#define MAX_NB_SESSIONS            4
>
> static int gbl_driver_id;
>
>@@ -435,9 +436,16 @@ testsuite_setup(void)
>         * Create mempool with maximum number of sessions * 2,
>         * to include the session headers
>         */
>+       if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
>+               RTE_LOG(ERR, USER1, "Device does not support "
>+                               "at least %u sessions\n",
>+                               MAX_NB_SESSIONS);
>+               return TEST_FAILED;
>+       }
>+
If info.sym.max_nb_sessions = 0, won't it fail from here? 

Thanks
Shally
>        ts_params->session_mpool = rte_mempool_create(
>                                "test_sess_mp",
>-                               info.sym.max_nb_sessions * 2,
>+                               MAX_NB_SESSIONS * 2,
>                                session_size,
>                                0, 0, NULL, NULL, NULL,
>                                NULL, SOCKET_ID_ANY,
>@@ -6499,10 +6507,10 @@ test_multi_session(void)
>
>        sessions = rte_malloc(NULL,
>                        (sizeof(struct rte_cryptodev_sym_session *) *
>-                       dev_info.sym.max_nb_sessions) + 1, 0);
>+                       MAX_NB_SESSIONS) + 1, 0);
>
>        /* Create multiple crypto sessions*/
>-       for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
>+       for (i = 0; i < MAX_NB_SESSIONS; i++) {
>
>                sessions[i] = rte_cryptodev_sym_session_create(
>                                ts_params->session_mpool);
>@@ -6551,7 +6559,7 @@ test_multi_session(void)
>        TEST_ASSERT_NULL(sessions[i],
>                        "Session creation succeeded unexpectedly!");
>
>-       for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
>+       for (i = 0; i < MAX_NB_SESSIONS; i++) {
>                rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
>                                sessions[i]);
>                rte_cryptodev_sym_session_free(sessions[i]);
>@@ -6610,7 +6618,7 @@ test_multi_session_random_usage(void)
>
>        sessions = rte_malloc(NULL,
>                        (sizeof(struct rte_cryptodev_sym_session *)
>-                                       * dev_info.sym.max_nb_sessions) + 1, 0);
>+                                       * MAX_NB_SESSIONS) + 1, 0);
>
>        for (i = 0; i < MB_SESSION_NUMBER; i++) {
>                sessions[i] = rte_cryptodev_sym_session_create(
>@@ -8538,6 +8546,13 @@ test_scheduler_attach_slave_op(void)
>                unsigned int session_size =
>                        rte_cryptodev_sym_get_private_session_size(i);
>
>+               if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
>+                       RTE_LOG(ERR, USER1,
>+                                       "Device does not support "
>+                                       "at least %u sessions\n",
>+                                       MAX_NB_SESSIONS);
>+                       return TEST_FAILED;
>+               }
>                /*
>                 * Create mempool with maximum number of sessions * 2,
>                 * to include the session headers
>@@ -8545,7 +8560,7 @@ test_scheduler_attach_slave_op(void)
>                if (ts_params->session_mpool == NULL) {
>                        ts_params->session_mpool = rte_mempool_create(
>                                        "test_sess_mp",
>-                                       info.sym.max_nb_sessions * 2,
>+                                       MAX_NB_SESSIONS * 2,
>                                        session_size,
>                                        0, 0, NULL, NULL, NULL,
>                                        NULL, SOCKET_ID_ANY,
>--
>2.14.4

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

* Re: [dpdk-dev] [PATCH v5 04/16] test/crypto: limit number of sessions
  2018-07-05 11:27     ` Verma, Shally
@ 2018-07-05 11:30       ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-05 11:30 UTC (permalink / raw)
  To: Verma, Shally, Pablo de Lara, declan.doherty, ravi1.kumar, Jacob,
	Jerin, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

Hi Shally,

On 7/5/2018 4:57 PM, Verma, Shally wrote:

>
>> -----Original Message-----
>> From: Pablo de Lara [mailto:pablo.de.lara.guarch@intel.com]
>> Sent: 05 July 2018 07:38
>> To: declan.doherty@intel.com; akhil.goyal@nxp.com; Verma, Shally <Shally.Verma@cavium.com>; ravi1.kumar@amd.com; Jacob,
>> Jerin <Jerin.JacobKollanukkaran@cavium.com>; roy.fan.zhang@intel.com; fiona.trahe@intel.com; tdu@semihalf.com;
>> jianjay.zhou@huawei.com
>> Cc: dev@dpdk.org; Pablo de Lara <pablo.de.lara.guarch@intel.com>
>> Subject: [PATCH v5 04/16] test/crypto: limit number of sessions
>>
>> External Email
>>
>> Instead of using the maximum number of sessions
>> allowed by the PMDs (which will change to unlimited most
>> of the PMDs), limit the number to a small sufficient amount.
>>
>> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
>> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
>> ---
>> test/test/test_cryptodev.c | 27 +++++++++++++++++++++------
>> 1 file changed, 21 insertions(+), 6 deletions(-)
>>
>> diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
>> index 389f79677..5c906cfae 100644
>> --- a/test/test/test_cryptodev.c
>> +++ b/test/test/test_cryptodev.c
>> @@ -39,6 +39,7 @@
>> #include "test_cryptodev_hmac_test_vectors.h"
>>
>> #define VDEV_ARGS_SIZE 100
>> +#define MAX_NB_SESSIONS            4
>>
>> static int gbl_driver_id;
>>
>> @@ -435,9 +436,16 @@ testsuite_setup(void)
>>          * Create mempool with maximum number of sessions * 2,
>>          * to include the session headers
>>          */
>> +       if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
>> +               RTE_LOG(ERR, USER1, "Device does not support "
>> +                               "at least %u sessions\n",
>> +                               MAX_NB_SESSIONS);
>> +               return TEST_FAILED;
>> +       }
>> +
> If info.sym.max_nb_sessions = 0, won't it fail from here?

It is added in 8/16 of this series. Till this patch 0 is not a valid value.

> Thanks
> Shally
>

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

* Re: [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag
  2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-07-05 11:35     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-05 11:35 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev


On 7/5/2018 7:38 AM, Pablo de Lara wrote:

> The current mbuf scatter gatter feature flag is
> too ambiguous, as it is not clear if input and/or output
> buffers can be scatter gather mbufs or not, plus
> if in-place and/or out-of-place is supported.
>
> Therefore, five new flags will replace this flag:
> - RTE_CRYPTODEV_FF_IN_PLACE_SGL
> - RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT
> - RTE_CRYPTODEV_FF_OOP_SGL_IN_FB_OUT
> - RTE_CRYPTODEV_FF_OOP_FB_IN_SGL_OUT
> - RTE_CRYPTODEV_FF_OOP_FB_IN_FB_OUT
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v5 09/16] cryptodev: remove max number of sessions parameter
  2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-07-09 10:53     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-07-09 10:53 UTC (permalink / raw)
  To: Doherty, Declan, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
  Cc: dev

Hi Akhil,

> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Thursday, July 5, 2018 3:08 AM
> To: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> shally.verma@caviumnetworks.com; ravi1.kumar@amd.com;
> jerin.jacob@caviumnetworks.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> Trahe, Fiona <fiona.trahe@intel.com>; tdu@semihalf.com;
> jianjay.zhou@huawei.com
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v5 09/16] cryptodev: remove max number of sessions
> parameter
> 
> Most crypto PMDs do not have a limitation of the number of the sessions that
> can be handled internally. The value that was set before was not actually used at
> all, since the sessions are created at the application level.
> Therefore, this value is not parsed from the initial crypto parameters anymore
> and it is set to 0, meaning that there is no actual limit.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Is this patch ok to you? It's the only one (apart from the MVSAM patch) that needs an ack.

Thanks,
Pablo

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

* [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes
  2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
                   ` (9 preceding siblings ...)
  2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
@ 2018-07-10  0:36 ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
                     ` (16 more replies)
  10 siblings, 17 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

API changes in the cryptodev library, announced in the previous release, 18.05.

Changes in v6:
- Modified SGL feature flags, to use Linear Buffers (LB), instead of
  Flat Buffers (FB)
- Rebased patchset

Changes in v5:
- Modified .ini files with new SGL/OOP flags 
- Modified overview cryptodev documentation, removing the clarification
  note on scatter-gather limitations and including the meaning
  of the new feature flags

Changes in v4:
- Fixed MVSAM max number of sessions (Tomasz Duszynksi)
- Changed OUT_OF_PLACE to OOP in feature flags (Akhil Goyal)
- Added missing feature flags in aesni_gcm and openssl PMDs (Akhil
  Goyal)
- Removed unneeded config parameters (related to max number of sessions)
  (Akhil Goyal)
- Restructured code in crypto-perf and l2fwd-crypto to calculate number
  of sessions needed (Akhil Goyal) 

Changes in v3:
- Rephrased comments for new sgl feature flags
- Added patch checking if there a device supports
  symmetric sessions
- Extended PMD session API renaming

Changes in v2:
- Instead of removing max_nb_sessions in info structure,
  a new value `0` is allowed, to indicate that the PMD
  does not have any limitation on the number of sessions
  to be managed
- Modified crypto applications to check for new value `0`
  on max_nb_sessions
- Modified MVSAM PMD to parse max_nb_sessions,
  since that parameter is not generic to any PMD anymore
- Removed attach/detach session API, as announced
- Removed deprecated function that was not removed in
  previous patchset
- Renamed PMD symmetric session API, to allow asymmetric
  session API to be added in the future


Pablo de Lara (16):
  cryptodev: replace bus specific struct with generic dev
  cryptodev: remove max number of sessions per queue
  app/crypto-perf: limit number of sessions
  test/crypto: limit number of sessions
  examples/l2fwd-crypto: limit number of sessions
  examples/ipsec-secgw: check for max supported sessions
  crypto/mvsam: parse max number of sessions
  cryptodev: define value for unlimited sessions
  cryptodev: remove max number of sessions parameter
  doc: remove unneeded deprecation notice
  cryptodev: remove queue start/stop functions
  cryptodev: remove old get session size functions
  cryptodev: replace mbuf scatter gather flag
  cryptodev: remove attach/detach session API
  cryptodev: rename PMD symmetric session API
  cryptodev: check if symmetric sessions are supported

 app/test-crypto-perf/main.c                        |  34 ++++-
 config/common_base                                 |   7 -
 config/rte_config.h                                |   7 -
 doc/guides/cryptodevs/dpaa2_sec.rst                |   5 -
 doc/guides/cryptodevs/dpaa_sec.rst                 |   5 -
 doc/guides/cryptodevs/features/aesni_gcm.ini       |   3 +-
 doc/guides/cryptodevs/features/default.ini         |   6 +-
 doc/guides/cryptodevs/features/dpaa2_sec.ini       |   6 +-
 doc/guides/cryptodevs/features/dpaa_sec.ini        |   6 +-
 doc/guides/cryptodevs/features/null.ini            |   2 +-
 doc/guides/cryptodevs/features/openssl.ini         |   3 +-
 doc/guides/cryptodevs/features/qat.ini             |   6 +-
 doc/guides/cryptodevs/overview.rst                 |  33 ++++-
 doc/guides/prog_guide/cryptodev_lib.rst            |   7 +-
 doc/guides/rel_notes/deprecation.rst               |  25 ----
 doc/guides/rel_notes/release_18_08.rst             |  30 +++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  14 +-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  39 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |   2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  13 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  39 ++---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |   2 -
 drivers/crypto/armv8/rte_armv8_pmd.c               |  11 +-
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  39 ++---
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |   2 -
 drivers/crypto/ccp/ccp_crypto.c                    |  28 ++--
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  37 ++---
 drivers/crypto/ccp/ccp_pmd_private.h               |   1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   |  20 +--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  52 +++----
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |   2 -
 drivers/crypto/dpaa_sec/dpaa_sec.c                 |  81 ++--------
 drivers/crypto/dpaa_sec/dpaa_sec.h                 |   1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  11 +-
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  39 ++---
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |   2 -
 drivers/crypto/mvsam/rte_mrvl_pmd.c                | 134 +++++++++++++++--
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c            |  46 ++----
 drivers/crypto/null/null_crypto_pmd.c              |  13 +-
 drivers/crypto/null/null_crypto_pmd_ops.c          |  39 ++---
 drivers/crypto/null/null_crypto_pmd_private.h      |   1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  14 +-
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  39 ++---
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |   2 -
 drivers/crypto/qat/qat_sym.c                       |   2 +-
 drivers/crypto/qat/qat_sym.h                       |   2 +-
 drivers/crypto/qat/qat_sym_pmd.c                   |  21 +--
 drivers/crypto/qat/qat_sym_pmd.h                   |   1 -
 drivers/crypto/qat/qat_sym_session.c               |   6 +-
 drivers/crypto/scheduler/scheduler_pmd.c           |  13 +-
 drivers/crypto/scheduler/scheduler_pmd_ops.c       |  46 ++----
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  11 +-
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  39 ++---
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |   2 -
 drivers/crypto/virtio/virtio_cryptodev.c           |  22 +--
 drivers/crypto/virtio/virtio_rxtx.c                |   2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  11 +-
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  39 ++---
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |   2 -
 examples/ipsec-secgw/ipsec-secgw.c                 |   6 +
 examples/l2fwd-crypto/main.c                       |  22 ++-
 lib/librte_cryptodev/rte_cryptodev.c               | 138 +++--------------
 lib/librte_cryptodev/rte_cryptodev.h               | 164 ++++++---------------
 lib/librte_cryptodev/rte_cryptodev_pmd.c           |  12 +-
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  70 +--------
 lib/librte_cryptodev/rte_cryptodev_version.map     |   6 -
 test/test/test_cryptodev.c                         |  60 ++++++--
 test/test/test_cryptodev_blockcipher.c             |  21 ++-
 68 files changed, 629 insertions(+), 997 deletions(-)

-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 01/16] cryptodev: replace bus specific struct with generic dev
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
                     ` (15 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Structure rte_cryptodev_info has currently PCI device
information ("struct rte_pci_device") in it.

This information is not generic to all devices,
so this gets replaced with the generic "rte_device" structure,
compatible with all crypto devices.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/prog_guide/cryptodev_lib.rst  | 2 +-
 doc/guides/rel_notes/deprecation.rst     | 2 --
 doc/guides/rel_notes/release_18_08.rst   | 5 ++++-
 drivers/crypto/qat/qat_sym_pmd.c         | 1 -
 drivers/crypto/virtio/virtio_cryptodev.c | 1 -
 lib/librte_cryptodev/rte_cryptodev.c     | 1 +
 lib/librte_cryptodev/rte_cryptodev.h     | 6 +++---
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index 30f0bcf7a..d02bb7514 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -269,7 +269,7 @@ relevant information for the device.
     struct rte_cryptodev_info {
         const char *driver_name;
         uint8_t driver_id;
-        struct rte_pci_device *pci_dev;
+        struct rte_device *device;
 
         uint64_t feature_flags;
 
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1ce692eac..b71080bb8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -104,8 +104,6 @@ Deprecation Notices
   - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
     containing fields not relevant anymore since the session mempool
     is not internal in the crypto device anymore.
-  - Replacement of ``pci_dev`` field with the more generic ``rte_device``
-    structure.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 3487e3fb9..b5de4dd93 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -60,6 +60,9 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =========================================================
 
+* cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
+  has been replaced with field ``struct rte_device *device``.
+
 * compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
   replaced with the following more explicit flags:
   - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
@@ -124,7 +127,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_cmdline.so.2
      librte_common_octeontx.so.1
      librte_compressdev.so.1
-     librte_cryptodev.so.4
+   + librte_cryptodev.so.5
      librte_distributor.so.1
      librte_eal.so.7
      librte_ethdev.so.9
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 115639089..0bc042a75 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -74,7 +74,6 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 		info->capabilities = internals->qat_dev_capabilities;
 		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 	}
 }
 
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index f9c890bb3..4f170cfec 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1415,7 +1415,6 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 
 	if (info != NULL) {
 		info->driver_id = cryptodev_virtio_driver_id;
-		info->pci_dev = RTE_DEV_TO_PCI(dev->device);
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
 		info->sym.max_nb_sessions =
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 7e5821246..457ac5670 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -966,6 +966,7 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	(*dev->dev_ops->dev_infos_get)(dev, dev_info);
 
 	dev_info->driver_name = dev->device->driver->name;
+	dev_info->device = dev->device;
 }
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index ccc0f73fd..6b5f32bda 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -334,9 +334,9 @@ rte_cryptodev_get_feature_name(uint64_t flag);
 
 /**  Crypto device information */
 struct rte_cryptodev_info {
-	const char *driver_name;		/**< Driver name. */
-	uint8_t driver_id;			/**< Driver identifier */
-	struct rte_pci_device *pci_dev;		/**< PCI information. */
+	const char *driver_name;	/**< Driver name. */
+	uint8_t driver_id;		/**< Driver identifier */
+	struct rte_device *device;	/**< Generic device information. */
 
 	uint64_t feature_flags;
 	/**< Feature flags exposes HW/SW features for the given device */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 02/16] cryptodev: remove max number of sessions per queue
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
                     ` (14 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The cryptodev info structure currently contains
the maximum number of sessions that can be used in a queue pair.
This is only set in DPAA_SEC PMD, and since it is calculated
based on the maximum number of sessions (which is not used
anymore), this field can be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c   | 3 ---
 lib/librte_cryptodev/rte_cryptodev.h | 4 ----
 2 files changed, 7 deletions(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 06f7e4373..73cae483b 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2215,9 +2215,6 @@ dpaa_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa_sec_capabilities;
 		info->sym.max_nb_sessions = internals->max_nb_sessions;
-		info->sym.max_nb_sessions_per_qp =
-			RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS /
-			RTE_DPAA_MAX_NB_SEC_QPS;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 6b5f32bda..114c9fd6e 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -350,10 +350,6 @@ struct rte_cryptodev_info {
 	struct {
 		unsigned max_nb_sessions;
 		/**< Maximum number of sessions supported by device. */
-		unsigned int max_nb_sessions_per_qp;
-		/**< Maximum number of sessions per queue pair.
-		 * Default 0 for infinite sessions
-		 */
 	} sym;
 };
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 03/16] app/crypto-perf: limit number of sessions
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 04/16] test/crypto: " Pablo de Lara
                     ` (13 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of creating a fixed number of sessions,
calculate the necessary number based on number of devices
and queue pairs used.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 4ae14390b..74e2165a4 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -21,7 +21,6 @@
 #include "cperf_test_verify.h"
 #include "cperf_test_pmd_cyclecount.h"
 
-#define NUM_SESSIONS 2048
 #define SESS_MEMPOOL_CACHE_SIZE 64
 
 const char *cperf_test_type_strs[] = {
@@ -67,6 +66,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 			struct rte_mempool *session_pool_socket[])
 {
 	uint8_t enabled_cdev_count = 0, nb_lcores, cdev_id;
+	uint32_t sessions_needed = 0;
 	unsigned int i, j;
 	int ret;
 
@@ -149,15 +149,43 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 			.nb_descriptors = opts->nb_descriptors
 		};
 
+		uint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions;
+		/*
+		 * Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		if (!strcmp((const char *)opts->device_type,
+					"crypto_scheduler")) {
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count *
+				opts->nb_qps * nb_slaves;
+#endif
+		} else
+			sessions_needed = 2 * enabled_cdev_count *
+						opts->nb_qps;
+
+		/*
+		 * A single session is required per queue pair
+		 * in each device
+		 */
+		if (dev_max_nb_sess < opts->nb_qps) {
+			RTE_LOG(ERR, USER1,
+				"Device does not support at least "
+				"%u sessions\n", opts->nb_qps);
+			return -ENOTSUP;
+		}
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
 
 			snprintf(mp_name, RTE_MEMPOOL_NAMESIZE,
 				"sess_mp_%u", socket_id);
-
 			sess_mp = rte_mempool_create(mp_name,
-						NUM_SESSIONS,
+						sessions_needed,
 						max_sess_size,
 						SESS_MEMPOOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 04/16] test/crypto: limit number of sessions
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (2 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 05/16] examples/l2fwd-crypto: " Pablo de Lara
                     ` (12 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Instead of using the maximum number of sessions
allowed by the PMDs (which will change to unlimited most
of the PMDs), limit the number to a small sufficient amount.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 test/test/test_cryptodev.c | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index e252feeaa..0887c05af 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -39,6 +39,7 @@
 #include "test_cryptodev_hmac_test_vectors.h"
 
 #define VDEV_ARGS_SIZE 100
+#define MAX_NB_SESSIONS            4
 
 static int gbl_driver_id;
 
@@ -435,9 +436,16 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
+	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		RTE_LOG(ERR, USER1, "Device does not support "
+				"at least %u sessions\n",
+				MAX_NB_SESSIONS);
+		return TEST_FAILED;
+	}
+
 	ts_params->session_mpool = rte_mempool_create(
 				"test_sess_mp",
-				info.sym.max_nb_sessions * 2,
+				MAX_NB_SESSIONS * 2,
 				session_size,
 				0, 0, NULL, NULL, NULL,
 				NULL, SOCKET_ID_ANY,
@@ -6499,10 +6507,10 @@ test_multi_session(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *) *
-			dev_info.sym.max_nb_sessions) + 1, 0);
+			MAX_NB_SESSIONS) + 1, 0);
 
 	/* Create multiple crypto sessions*/
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 
 		sessions[i] = rte_cryptodev_sym_session_create(
 				ts_params->session_mpool);
@@ -6551,7 +6559,7 @@ test_multi_session(void)
 	TEST_ASSERT_NULL(sessions[i],
 			"Session creation succeeded unexpectedly!");
 
-	for (i = 0; i < dev_info.sym.max_nb_sessions; i++) {
+	for (i = 0; i < MAX_NB_SESSIONS; i++) {
 		rte_cryptodev_sym_session_clear(ts_params->valid_devs[0],
 				sessions[i]);
 		rte_cryptodev_sym_session_free(sessions[i]);
@@ -6610,7 +6618,7 @@ test_multi_session_random_usage(void)
 
 	sessions = rte_malloc(NULL,
 			(sizeof(struct rte_cryptodev_sym_session *)
-					* dev_info.sym.max_nb_sessions) + 1, 0);
+					* MAX_NB_SESSIONS) + 1, 0);
 
 	for (i = 0; i < MB_SESSION_NUMBER; i++) {
 		sessions[i] = rte_cryptodev_sym_session_create(
@@ -8538,6 +8546,13 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
+		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+			RTE_LOG(ERR, USER1,
+					"Device does not support "
+					"at least %u sessions\n",
+					MAX_NB_SESSIONS);
+			return TEST_FAILED;
+		}
 		/*
 		 * Create mempool with maximum number of sessions * 2,
 		 * to include the session headers
@@ -8545,7 +8560,7 @@ test_scheduler_attach_slave_op(void)
 		if (ts_params->session_mpool == NULL) {
 			ts_params->session_mpool = rte_mempool_create(
 					"test_sess_mp",
-					info.sym.max_nb_sessions * 2,
+					MAX_NB_SESSIONS * 2,
 					session_size,
 					0, 0, NULL, NULL, NULL,
 					NULL, SOCKET_ID_ANY,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 05/16] examples/l2fwd-crypto: limit number of sessions
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (3 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 04/16] test/crypto: " Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
                     ` (11 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Calculate the number of sessions required for the application,
knowing that there is only one session required per device.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/l2fwd-crypto/main.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 4bca87b19..db364cf5d 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -42,6 +42,9 @@
 #include <rte_prefetch.h>
 #include <rte_random.h>
 #include <rte_hexdump.h>
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+#include <rte_cryptodev_scheduler.h>
+#endif
 
 enum cdev_type {
 	CDEV_TYPE_ANY,
@@ -59,7 +62,6 @@ enum cdev_type {
 #define MAX_AAD_SIZE 65535
 #define MAX_PKT_BURST 32
 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
-#define MAX_SESSIONS 32
 #define SESSION_POOL_CACHE_SIZE 0
 
 #define MAXIMUM_IV_LENGTH	16
@@ -1973,6 +1975,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 	unsigned int cdev_id, cdev_count, enabled_cdev_count = 0;
 	const struct rte_cryptodev_capabilities *cap;
 	unsigned int sess_sz, max_sess_sz = 0;
+	uint32_t sessions_needed = 0;
 	int retval;
 
 	cdev_count = rte_cryptodev_count();
@@ -2010,6 +2013,21 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 		rte_cryptodev_info_get(cdev_id, &dev_info);
 
+		/*
+		 * Two sessions objects are required for each session
+		 * (one for the header, one for the private data)
+		 */
+		if (!strcmp(dev_info.driver_name, "crypto_scheduler")) {
+#ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
+			uint32_t nb_slaves =
+				rte_cryptodev_scheduler_slaves_get(cdev_id,
+								NULL);
+
+			sessions_needed = 2 * enabled_cdev_count * nb_slaves;
+#endif
+		} else
+			sessions_needed = 2 * enabled_cdev_count;
+
 		if (session_pool_socket[socket_id] == NULL) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
@@ -2022,7 +2040,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 			 * device private data
 			 */
 			sess_mp = rte_mempool_create(mp_name,
-						MAX_SESSIONS * 2,
+						sessions_needed,
 						max_sess_sz,
 						SESSION_POOL_CACHE_SIZE,
 						0, NULL, NULL, NULL,
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 06/16] examples/ipsec-secgw: check for max supported sessions
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (4 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 05/16] examples/l2fwd-crypto: " Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
                     ` (10 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b280..2582dcb6e 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1440,6 +1440,12 @@ cryptodevs_init(void)
 		dev_conf.socket_id = rte_cryptodev_socket_id(cdev_id);
 		dev_conf.nb_queue_pairs = qp;
 
+		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
+		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+			rte_exit(EXIT_FAILURE,
+				"Device does not support at least %u "
+				"sessions", CDEV_MP_NB_OBJS / 2);
+
 		if (!socket_ctx[dev_conf.socket_id].session_pool) {
 			char mp_name[RTE_MEMPOOL_NAMESIZE];
 			struct rte_mempool *sess_mp;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (5 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10 10:42     ` Tomasz Duszynski
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
                     ` (9 subsequent siblings)
  16 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The maximum number of sessions device argument will be removed,
as most PMDs do not have a limitation on this number.
Therefore, the MVSAM PMD needs to parse this value internally.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/mvsam/rte_mrvl_pmd.c | 132 ++++++++++++++++++++++++++++++++----
 1 file changed, 120 insertions(+), 12 deletions(-)

diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index 1b6029a56..a7f5389ee 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -16,8 +16,23 @@
 
 #define MRVL_MUSDK_DMA_MEMSIZE 41943040
 
+#define MRVL_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
+#define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS	2048
+
 static uint8_t cryptodev_driver_id;
 
+struct mrvl_pmd_init_params {
+	struct rte_cryptodev_pmd_init_params common;
+	uint32_t max_nb_sessions;
+};
+
+const char *mrvl_pmd_valid_params[] = {
+	RTE_CRYPTODEV_PMD_NAME_ARG,
+	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+	MRVL_PMD_MAX_NB_SESS_ARG
+};
+
 /**
  * Flag if particular crypto algorithm is supported by PMD/MUSDK.
  *
@@ -691,14 +706,15 @@ mrvl_crypto_pmd_dequeue_burst(void *queue_pair,
 static int
 cryptodev_mrvl_crypto_create(const char *name,
 		struct rte_vdev_device *vdev,
-		struct rte_cryptodev_pmd_init_params *init_params)
+		struct mrvl_pmd_init_params *init_params)
 {
 	struct rte_cryptodev *dev;
 	struct mrvl_crypto_private *internals;
 	struct sam_init_params	sam_params;
 	int ret;
 
-	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
+	dev = rte_cryptodev_pmd_create(name, &vdev->device,
+			&init_params->common);
 	if (dev == NULL) {
 		MRVL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
 		goto init_error;
@@ -718,7 +734,7 @@ cryptodev_mrvl_crypto_create(const char *name,
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
 
-	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
+	internals->max_nb_qpairs = init_params->common.max_nb_queue_pairs;
 	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	/*
@@ -740,12 +756,99 @@ cryptodev_mrvl_crypto_create(const char *name,
 
 init_error:
 	MRVL_CRYPTO_LOG_ERR(
-		"driver %s: %s failed", init_params->name, __func__);
+		"driver %s: %s failed", init_params->common.name, __func__);
 
 	cryptodev_mrvl_crypto_uninit(vdev);
 	return -EFAULT;
 }
 
+/** Parse integer from integer argument */
+static int
+parse_integer_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	int *i = (int *) extra_args;
+
+	*i = atoi(value);
+	if (*i < 0) {
+		MRVL_CRYPTO_LOG_ERR("Argument has to be positive.\n");
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+/** Parse name */
+static int
+parse_name_arg(const char *key __rte_unused,
+		const char *value, void *extra_args)
+{
+	struct rte_cryptodev_pmd_init_params *params = extra_args;
+
+	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
+		MRVL_CRYPTO_LOG_ERR("Invalid name %s, should be less than "
+				"%u bytes.\n", value,
+				RTE_CRYPTODEV_NAME_MAX_LEN - 1);
+		return -EINVAL;
+	}
+
+	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
+
+	return 0;
+}
+
+static int
+mrvl_pmd_parse_input_args(struct mrvl_pmd_init_params *params,
+			 const char *input_args)
+{
+	struct rte_kvargs *kvlist = NULL;
+	int ret = 0;
+
+	if (params == NULL)
+		return -EINVAL;
+
+	if (input_args) {
+		kvlist = rte_kvargs_parse(input_args,
+					  mrvl_pmd_valid_params);
+		if (kvlist == NULL)
+			return -1;
+
+		/* Common VDEV parameters */
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
+					 &parse_integer_arg,
+					 &params->common.max_nb_queue_pairs);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+					 &parse_integer_arg,
+					 &params->common.socket_id);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 RTE_CRYPTODEV_PMD_NAME_ARG,
+					 &parse_name_arg,
+					 &params->common);
+		if (ret < 0)
+			goto free_kvlist;
+
+		ret = rte_kvargs_process(kvlist,
+					 MRVL_PMD_MAX_NB_SESS_ARG,
+					 &parse_integer_arg,
+					 params);
+		if (ret < 0)
+			goto free_kvlist;
+
+	}
+
+free_kvlist:
+	rte_kvargs_free(kvlist);
+	return ret;
+}
+
 /**
  * Initialize the crypto device.
  *
@@ -755,7 +858,18 @@ cryptodev_mrvl_crypto_create(const char *name,
 static int
 cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 {
-	struct rte_cryptodev_pmd_init_params init_params = { };
+	struct mrvl_pmd_init_params init_params = {
+		.common = {
+			.name = "",
+			.private_data_size =
+				sizeof(struct mrvl_crypto_private),
+			.max_nb_queue_pairs =
+				sam_get_num_inst() * SAM_HW_RING_NUM,
+			.socket_id = rte_socket_id()
+		},
+		.max_nb_sessions = MRVL_PMD_DEFAULT_MAX_NB_SESSIONS
+	};
+
 	const char *name, *args;
 	int ret;
 
@@ -764,13 +878,7 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
 		return -EINVAL;
 	args = rte_vdev_device_args(vdev);
 
-	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
-	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
-	init_params.max_nb_sessions =
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
-	init_params.socket_id = rte_socket_id();
-
-	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
+	ret = mrvl_pmd_parse_input_args(&init_params, args);
 	if (ret) {
 		RTE_LOG(ERR, PMD,
 			"Failed to parse initialisation arguments[%s]\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 08/16] cryptodev: define value for unlimited sessions
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (6 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
                     ` (8 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Currently, the info structure contains the maximum number
of sessions that a device can manage.
This field was useful when the session mempool was created inside
each device, but now it is created at the application level.

Most PMDs do not have a limitation on the sessions managed,
but a few do, therefore this field must remain in the structure.
However, a new value, 0, can be used to indicate that
a device does not have an actual maximum of sessions.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c            | 2 +-
 doc/guides/rel_notes/release_18_08.rst | 2 ++
 examples/ipsec-secgw/ipsec-secgw.c     | 2 +-
 lib/librte_cryptodev/rte_cryptodev.h   | 5 ++++-
 test/test/test_cryptodev.c             | 6 ++++--
 5 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 74e2165a4..2181d0193 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -172,7 +172,7 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
 		 * A single session is required per queue pair
 		 * in each device
 		 */
-		if (dev_max_nb_sess < opts->nb_qps) {
+		if (dev_max_nb_sess != 0 && dev_max_nb_sess < opts->nb_qps) {
 			RTE_LOG(ERR, USER1,
 				"Device does not support at least "
 				"%u sessions\n", opts->nb_qps);
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index b5de4dd93..84c2636a6 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -62,6 +62,8 @@ API Changes
 
 * cryptodev: In struct ``struct rte_cryptodev_info``, field ``rte_pci_device *pci_dev``
   has been replaced with field ``struct rte_device *device``.
+  Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
+  supports an unlimited number of sessions.
 
 * compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
   replaced with the following more explicit flags:
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 2582dcb6e..dacf323c9 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1441,7 +1441,7 @@ cryptodevs_init(void)
 		dev_conf.nb_queue_pairs = qp;
 
 		uint32_t dev_max_sess = cdev_info.sym.max_nb_sessions;
-		if (dev_max_sess < (CDEV_MP_NB_OBJS / 2))
+		if (dev_max_sess != 0 && dev_max_sess < (CDEV_MP_NB_OBJS / 2))
 			rte_exit(EXIT_FAILURE,
 				"Device does not support at least %u "
 				"sessions", CDEV_MP_NB_OBJS / 2);
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 114c9fd6e..7989eb876 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -349,7 +349,10 @@ struct rte_cryptodev_info {
 
 	struct {
 		unsigned max_nb_sessions;
-		/**< Maximum number of sessions supported by device. */
+		/**< Maximum number of sessions supported by device.
+		 * If 0, the device does not have any limitation in
+		 * number of sessions that can be used.
+		 */
 	} sym;
 };
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 0887c05af..877dc1658 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -436,7 +436,8 @@ testsuite_setup(void)
 	 * Create mempool with maximum number of sessions * 2,
 	 * to include the session headers
 	 */
-	if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+	if (info.sym.max_nb_sessions != 0 &&
+			info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 		RTE_LOG(ERR, USER1, "Device does not support "
 				"at least %u sessions\n",
 				MAX_NB_SESSIONS);
@@ -8546,7 +8547,8 @@ test_scheduler_attach_slave_op(void)
 		unsigned int session_size =
 			rte_cryptodev_sym_get_private_session_size(i);
 
-		if (info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
+		if (info.sym.max_nb_sessions != 0 &&
+				info.sym.max_nb_sessions < MAX_NB_SESSIONS) {
 			RTE_LOG(ERR, USER1,
 					"Device does not support "
 					"at least %u sessions\n",
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 09/16] cryptodev: remove max number of sessions parameter
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (7 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  8:46     ` Akhil Goyal
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 10/16] doc: remove unneeded deprecation notice Pablo de Lara
                     ` (7 subsequent siblings)
  16 siblings, 1 reply; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Most crypto PMDs do not have a limitation
of the number of the sessions that can be handled
internally. The value that was set before was not
actually used at all, since the sessions are created
at the application level.
Therefore, this value is not parsed from the initial
crypto parameters anymore and it is set to 0,
meaning that there is no actual limit.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 config/common_base                                 |  7 -------
 config/rte_config.h                                |  7 -------
 doc/guides/cryptodevs/dpaa2_sec.rst                |  5 -----
 doc/guides/cryptodevs/dpaa_sec.rst                 |  5 -----
 doc/guides/prog_guide/cryptodev_lib.rst            |  5 ++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c           |  5 +----
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c       |  3 ++-
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h   |  2 --
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c         |  5 +----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c     |  3 ++-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h |  2 --
 drivers/crypto/armv8/rte_armv8_pmd.c               |  5 +----
 drivers/crypto/armv8/rte_armv8_pmd_ops.c           |  3 ++-
 drivers/crypto/armv8/rte_armv8_pmd_private.h       |  2 --
 drivers/crypto/ccp/ccp_pmd_ops.c                   |  3 ++-
 drivers/crypto/ccp/ccp_pmd_private.h               |  1 -
 drivers/crypto/ccp/rte_ccp_pmd.c                   | 16 +---------------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c        |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h          |  2 --
 drivers/crypto/dpaa_sec/dpaa_sec.h                 |  1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c             |  5 +----
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c         |  3 ++-
 drivers/crypto/kasumi/rte_kasumi_pmd_private.h     |  2 --
 drivers/crypto/null/null_crypto_pmd.c              |  5 +----
 drivers/crypto/null/null_crypto_pmd_ops.c          |  3 ++-
 drivers/crypto/null/null_crypto_pmd_private.h      |  1 -
 drivers/crypto/openssl/rte_openssl_pmd.c           |  5 +----
 drivers/crypto/openssl/rte_openssl_pmd_ops.c       |  3 ++-
 drivers/crypto/openssl/rte_openssl_pmd_private.h   |  2 --
 drivers/crypto/qat/qat_sym_pmd.c                   |  6 +++---
 drivers/crypto/qat/qat_sym_pmd.h                   |  1 -
 drivers/crypto/scheduler/scheduler_pmd.c           | 13 +------------
 drivers/crypto/scheduler/scheduler_pmd_ops.c       | 14 +++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c             |  5 +----
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c         |  3 ++-
 drivers/crypto/snow3g/rte_snow3g_pmd_private.h     |  2 --
 drivers/crypto/virtio/virtio_cryptodev.c           |  7 +++----
 drivers/crypto/zuc/rte_zuc_pmd.c                   |  5 +----
 drivers/crypto/zuc/rte_zuc_pmd_ops.c               |  3 ++-
 drivers/crypto/zuc/rte_zuc_pmd_private.h           |  2 --
 lib/librte_cryptodev/rte_cryptodev_pmd.c           | 12 ++----------
 lib/librte_cryptodev/rte_cryptodev_pmd.h           |  4 ----
 42 files changed, 48 insertions(+), 144 deletions(-)

diff --git a/config/common_base b/config/common_base
index 4236e295b..e84307c66 100644
--- a/config/common_base
+++ b/config/common_base
@@ -472,14 +472,12 @@ CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
 # Compile NXP DPAA2 crypto sec driver for CAAM HW
 #
 CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n
-CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS=2048
 
 #
 # NXP DPAA caam - crypto driver
 #
 CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n
 CONFIG_RTE_LIBRTE_DPAA_MAX_CRYPTODEV=4
-CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS=2048
 
 #
 # Compile PMD for QuickAssist based devices
@@ -498,11 +496,6 @@ CONFIG_RTE_LIBRTE_PMD_VIRTIO_CRYPTO=y
 # Number of maximum virtio crypto devices
 #
 CONFIG_RTE_MAX_VIRTIO_CRYPTO=32
-#
-# Number of sessions to create in the session memory pool
-# on a single virtio crypto device.
-#
-CONFIG_RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS=1024
 
 #
 # Compile PMD for AESNI backed device
diff --git a/config/rte_config.h b/config/rte_config.h
index 0ba0ead7e..8a3432aca 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -90,15 +90,8 @@
 #define RTE_PMD_QAT_MAX_PCI_DEVICES 48
 
 /* virtio crypto defines */
-#define RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS 1024
 #define RTE_MAX_VIRTIO_CRYPTO 32
 
-/* DPAA2_SEC */
-#define RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS 2048
-
-/* DPAA_SEC */
-#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
-
 /* DPAA SEC max cryptodev devices*/
 #define RTE_LIBRTE_DPAA_MAX_CRYPTODEV	4
 
diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst
index 86d0a8ddb..9191704e8 100644
--- a/doc/guides/cryptodevs/dpaa2_sec.rst
+++ b/doc/guides/cryptodevs/dpaa2_sec.rst
@@ -199,11 +199,6 @@ Please note that enabling debugging options may affect system performance.
   By default it is only enabled in defconfig_arm64-dpaa2-* config.
   Toggle compilation of the ``librte_pmd_dpaa2_sec`` driver.
 
-* ``CONFIG_RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS``
-  By default it is set as 2048 in defconfig_arm64-dpaa2-* config.
-  It indicates Number of sessions to create in the session memory pool
-  on a single DPAA2 SEC device.
-
 Installations
 -------------
 To compile the DPAA2_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
index a6283c7e6..dd683894f 100644
--- a/doc/guides/cryptodevs/dpaa_sec.rst
+++ b/doc/guides/cryptodevs/dpaa_sec.rst
@@ -144,11 +144,6 @@ Please note that enabling debugging options may affect system performance.
   By default it is only enabled in defconfig_arm64-dpaa-* config.
   Toggle compilation of the ``librte_pmd_dpaa_sec`` driver.
 
-* ``CONFIG_RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS``
-  By default it is set as 2048 in defconfig_arm64-dpaa-* config.
-  It indicates Number of sessions to create in the session memory pool
-  on a single DPAA SEC device.
-
 Installations
 -------------
 To compile the DPAA_SEC PMD for Linux arm64 gcc target, run the
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index d02bb7514..d2a74a362 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -41,7 +41,7 @@ From the command line using the --vdev EAL option
 
 .. code-block:: console
 
-   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0'
+   --vdev  'crypto_aesni_mb0,max_nb_queue_pairs=2,socket_id=0'
 
 .. Note::
 
@@ -57,12 +57,11 @@ Our using the rte_vdev_init API within the application code.
 .. code-block:: c
 
    rte_vdev_init("crypto_aesni_mb",
-                     "max_nb_queue_pairs=2,max_nb_sessions=1024,socket_id=0")
+                     "max_nb_queue_pairs=2,socket_id=0")
 
 All virtual Crypto devices support the following initialization parameters:
 
 * ``max_nb_queue_pairs`` - maximum number of queue pairs supported by the device.
-* ``max_nb_sessions`` - maximum number of sessions supported by the device
 * ``socket_id`` - socket on which to allocate the device resources on.
 
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index d196826f0..88307e0e7 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -513,7 +513,6 @@ aesni_gcm_create(const char *name,
 	internals->vector_mode = vector_mode;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -525,8 +524,7 @@ aesni_gcm_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_gcm_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -568,7 +566,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_GCM_PMD, cryptodev_aesni_gcm_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index eacbdc09a..1f4edc0f2 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -143,7 +143,8 @@ aesni_gcm_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->capabilities = aesni_gcm_pmd_capabilities;
 
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
index 2b9c251c0..0bcd4fa09 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
@@ -26,8 +26,6 @@ struct aesni_gcm_private {
 	/**< Vector mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct aesni_gcm_qp {
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 9ae2b54f4..17ac43f0f 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -885,7 +885,6 @@ cryptodev_aesni_mb_create(const char *name,
 
 	internals->vector_mode = vector_mode;
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -897,8 +896,7 @@ cryptodev_aesni_mb_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct aesni_mb_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -947,7 +945,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv,
 		cryptodev_aesni_mb_pmd_drv.driver,
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 6a96d5077..6cd4134af 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -387,7 +387,8 @@ aesni_mb_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = aesni_mb_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
index bad2a8743..91fd7409e 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
@@ -113,8 +113,6 @@ struct aesni_mb_private {
 	/**< CPU vector instruction set mode */
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** AESNI Multi buffer queue pair */
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index fbb08f729..db0d8a2a9 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -779,7 +779,6 @@ cryptodev_armv8_crypto_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -800,8 +799,7 @@ cryptodev_armv8_crypto_init(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct armv8_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -848,7 +846,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(armv8_crypto_drv, armv8_crypto_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index c64aef09f..b654f7528 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -154,7 +154,8 @@ armv8_crypto_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = armv8_crypto_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_private.h b/drivers/crypto/armv8/rte_armv8_pmd_private.h
index b8966e934..7feb021db 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_private.h
+++ b/drivers/crypto/armv8/rte_armv8_pmd_private.h
@@ -106,8 +106,6 @@ typedef void (*crypto_key_sched_t)(uint8_t *, const uint8_t *);
 struct armv8_crypto_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** ARMv8 crypto queue pair */
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 80b75ccb0..dbe545c10 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -624,7 +624,8 @@ ccp_pmd_info_get(struct rte_cryptodev *dev,
 		if (internals->auth_opt == 1)
 			dev_info->capabilities = ccp_crypto_cap_complete;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h
index f4498048f..79752f687 100644
--- a/drivers/crypto/ccp/ccp_pmd_private.h
+++ b/drivers/crypto/ccp/ccp_pmd_private.h
@@ -40,7 +40,6 @@
 /* private data structure for each CCP crypto device */
 struct ccp_private {
 	unsigned int max_nb_qpairs;	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;	/**< Max number of sessions */
 	uint8_t crypto_num_dev;		/**< Number of working crypto devices */
 	bool auth_opt;			/**< Authentication offload option */
 	struct ccp_device *last_dev;	/**< Last working crypto device */
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index 2061f465e..d70640f6d 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -30,14 +30,12 @@ struct ccp_pmd_init_params {
 #define CCP_CRYPTODEV_PARAM_NAME		("name")
 #define CCP_CRYPTODEV_PARAM_SOCKET_ID		("socket_id")
 #define CCP_CRYPTODEV_PARAM_MAX_NB_QP		("max_nb_queue_pairs")
-#define CCP_CRYPTODEV_PARAM_MAX_NB_SESS		("max_nb_sessions")
 #define CCP_CRYPTODEV_PARAM_AUTH_OPT		("ccp_auth_opt")
 
 const char *ccp_pmd_valid_params[] = {
 	CCP_CRYPTODEV_PARAM_NAME,
 	CCP_CRYPTODEV_PARAM_SOCKET_ID,
 	CCP_CRYPTODEV_PARAM_MAX_NB_QP,
-	CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
 	CCP_CRYPTODEV_PARAM_AUTH_OPT,
 };
 
@@ -124,13 +122,6 @@ ccp_pmd_parse_input_args(struct ccp_pmd_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-					 CCP_CRYPTODEV_PARAM_MAX_NB_SESS,
-					 &parse_integer_arg,
-					 &params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 					 CCP_CRYPTODEV_PARAM_SOCKET_ID,
 					 &parse_integer_arg,
@@ -334,7 +325,6 @@ cryptodev_ccp_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->def_p.max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->def_p.max_nb_sessions;
 	internals->auth_opt = init_params->auth_opt;
 	internals->crypto_num_dev = cryptodev_cnt;
 
@@ -359,8 +349,7 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct ccp_private),
 			rte_socket_id(),
-			CCP_PMD_MAX_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			CCP_PMD_MAX_QUEUE_PAIRS
 		},
 		.auth_opt = CCP_PMD_AUTH_OPT_CCP,
 	};
@@ -382,8 +371,6 @@ cryptodev_ccp_probe(struct rte_vdev_device *vdev)
 		init_params.def_p.socket_id);
 	RTE_LOG(INFO, PMD, "Max number of queue pairs = %d\n",
 		init_params.def_p.max_nb_queue_pairs);
-	RTE_LOG(INFO, PMD, "Max number of sessions = %d\n",
-		init_params.def_p.max_nb_sessions);
 	RTE_LOG(INFO, PMD, "Authentication offload to %s\n",
 		((init_params.auth_opt == 0) ? "CCP" : "CPU"));
 
@@ -404,7 +391,6 @@ static struct cryptodev_driver ccp_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_CCP_PMD, cryptodev_ccp_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_CCP_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"ccp_auth_opt=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(ccp_crypto_drv, cryptodev_ccp_pmd_drv.driver,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 56fa969d3..bc091c560 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2626,7 +2626,8 @@ dpaa2_sec_dev_infos_get(struct rte_cryptodev *dev,
 		info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = dpaa2_sec_capabilities;
-		info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->driver_id = cryptodev_driver_id;
 	}
 }
@@ -2786,7 +2787,6 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
 
 	internals = cryptodev->data->dev_private;
-	internals->max_nb_sessions = RTE_DPAA2_SEC_PMD_MAX_NB_SESSIONS;
 
 	/*
 	 * For secondary processes, we don't initialise any further as primary
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
index a9d83ebce..d015be1e9 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
@@ -23,8 +23,6 @@ struct dpaa2_sec_dev_private {
 	uint16_t token; /**< Token required by DPxxx objects */
 	unsigned int max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 struct dpaa2_sec_qp {
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h
index e15e373fd..ac6c00a60 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.h
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.h
@@ -26,6 +26,7 @@
 #define CTX_POOL_NUM_BUFS	32000
 #define CTX_POOL_BUF_SIZE	sizeof(struct dpaa_sec_op_ctx)
 #define CTX_POOL_CACHE_SIZE	512
+#define RTE_DPAA_SEC_PMD_MAX_NB_SESSIONS 2048
 
 #define DIR_ENC                 1
 #define DIR_DEC                 0
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 0e783ed9b..9eb43b2eb 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -559,7 +559,6 @@ cryptodev_kasumi_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -577,8 +576,7 @@ cryptodev_kasumi_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct kasumi_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -621,7 +619,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv,
 		cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index d087eabe4..5593238f2 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -126,7 +126,8 @@ kasumi_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = kasumi_pmd_capabilities;
 	}
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
index 102334e0a..488777ca8 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_private.h
@@ -24,8 +24,6 @@ int kasumi_logtype_driver;
 struct kasumi_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** KASUMI buffer queue pair */
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 8699f1219..07276833b 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -181,7 +181,6 @@ cryptodev_null_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 }
@@ -194,8 +193,7 @@ cryptodev_null_probe(struct rte_vdev_device *dev)
 		"",
 		sizeof(struct null_crypto_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name, *args;
 	int retval;
@@ -245,7 +243,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 9a78e91d1..55778a255 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -121,7 +121,8 @@ null_crypto_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = null_crypto_pmd_capabilities;
 	}
diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h
index 190b88dc7..d5905afd8 100644
--- a/drivers/crypto/null/null_crypto_pmd_private.h
+++ b/drivers/crypto/null/null_crypto_pmd_private.h
@@ -19,7 +19,6 @@ int null_logtype_driver;
 /** private data structure for each NULL crypto device */
 struct null_crypto_private {
 	unsigned max_nb_qpairs;		/**< Max number of queue pairs */
-	unsigned max_nb_sessions;	/**< Max number of sessions */
 };
 
 /** NULL crypto queue pair */
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index bfdfcdd9a..1ccab4ab5 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1666,7 +1666,6 @@ cryptodev_openssl_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 
@@ -1686,8 +1685,7 @@ cryptodev_openssl_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct openssl_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -1731,7 +1729,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_OPENSSL_PMD,
 	cryptodev_openssl_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv,
 		cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 488afcf7d..a1a2d9900 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -547,7 +547,8 @@ openssl_pmd_info_get(struct rte_cryptodev *dev,
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = openssl_pmd_capabilities;
 		dev_info->max_nb_queue_pairs = internals->max_nb_qpairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 	}
 }
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h
index 051fb203d..29fcb761a 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h
+++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h
@@ -49,8 +49,6 @@ enum openssl_auth_mode {
 struct openssl_private {
 	unsigned int max_nb_qpairs;
 	/**< Max number of queue pairs */
-	unsigned int max_nb_sessions;
-	/**< Max number of sessions */
 };
 
 /** OPENSSL crypto queue pair */
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 0bc042a75..84dd5bec8 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -72,8 +72,9 @@ static void qat_sym_dev_info_get(struct rte_cryptodev *dev,
 			qat_qps_per_service(sym_hw_qps, QAT_SERVICE_SYMMETRIC);
 		info->feature_flags = dev->feature_flags;
 		info->capabilities = internals->qat_dev_capabilities;
-		info->sym.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS;
 		info->driver_id = cryptodev_qat_driver_id;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 	}
 }
 
@@ -243,8 +244,7 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	struct rte_cryptodev_pmd_init_params init_params = {
 			.name = "",
 			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
-			.private_data_size = sizeof(struct qat_sym_dev_private),
-			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
+			.private_data_size = sizeof(struct qat_sym_dev_private)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 	struct rte_cryptodev *cryptodev;
diff --git a/drivers/crypto/qat/qat_sym_pmd.h b/drivers/crypto/qat/qat_sym_pmd.h
index 439aeb98a..d34328544 100644
--- a/drivers/crypto/qat/qat_sym_pmd.h
+++ b/drivers/crypto/qat/qat_sym_pmd.h
@@ -14,7 +14,6 @@
 
 /**< Intel(R) QAT Symmetric Crypto PMD device name */
 #define CRYPTODEV_NAME_QAT_SYM_PMD	crypto_qat
-#define QAT_SYM_PMD_MAX_NB_SESSIONS	2048
 
 extern uint8_t cryptodev_qat_driver_id;
 
diff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c
index 5489e9ed0..6c5c01d63 100644
--- a/drivers/crypto/scheduler/scheduler_pmd.c
+++ b/drivers/crypto/scheduler/scheduler_pmd.c
@@ -31,7 +31,6 @@ struct scheduler_init_params {
 #define RTE_CRYPTODEV_VDEV_MODE			("mode")
 #define RTE_CRYPTODEV_VDEV_ORDERING		("ordering")
 #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG	("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG	("max_nb_sessions")
 #define RTE_CRYPTODEV_VDEV_SOCKET_ID		("socket_id")
 #define RTE_CRYPTODEV_VDEV_COREMASK		("coremask")
 #define RTE_CRYPTODEV_VDEV_CORELIST		("corelist")
@@ -42,7 +41,6 @@ const char *scheduler_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_MODE,
 	RTE_CRYPTODEV_VDEV_ORDERING,
 	RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_VDEV_SOCKET_ID,
 	RTE_CRYPTODEV_VDEV_COREMASK,
 	RTE_CRYPTODEV_VDEV_CORELIST
@@ -406,13 +404,6 @@ scheduler_parse_init_params(struct scheduler_init_params *params,
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_VDEV_MAX_NB_SESS_ARG,
-				&parse_integer_arg,
-				&params->def_p.max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_SOCKET_ID,
 				&parse_integer_arg,
 				&params->def_p.socket_id);
@@ -466,8 +457,7 @@ cryptodev_scheduler_probe(struct rte_vdev_device *vdev)
 			"",
 			sizeof(struct scheduler_ctx),
 			rte_socket_id(),
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+			RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 		},
 		.nb_slaves = 0,
 		.mode = CDEV_SCHED_MODE_NOT_SET,
@@ -500,7 +490,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SCHEDULER_PMD,
 	cryptodev_scheduler_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SCHEDULER_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int> "
 	"slave=<name>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(scheduler_crypto_drv,
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 874205849..802585f4c 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -321,8 +321,7 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info *dev_info)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
-	uint32_t max_nb_sessions = sched_ctx->nb_slaves ?
-			UINT32_MAX : RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
+	uint32_t max_nb_sess = 0;
 	uint32_t i;
 
 	if (!dev_info)
@@ -338,17 +337,18 @@ scheduler_pmd_info_get(struct rte_cryptodev *dev,
 		struct rte_cryptodev_info slave_info;
 
 		rte_cryptodev_info_get(slave_dev_id, &slave_info);
-		max_nb_sessions = slave_info.sym.max_nb_sessions <
-				max_nb_sessions ?
-				slave_info.sym.max_nb_sessions :
-				max_nb_sessions;
+		uint32_t dev_max_sess = slave_info.sym.max_nb_sessions;
+		if (dev_max_sess != 0) {
+			if (max_nb_sess == 0 ||	dev_max_sess < max_nb_sess)
+				max_nb_sess = slave_info.sym.max_nb_sessions;
+		}
 	}
 
 	dev_info->driver_id = dev->driver_id;
 	dev_info->feature_flags = dev->feature_flags;
 	dev_info->capabilities = sched_ctx->capabilities;
 	dev_info->max_nb_queue_pairs = sched_ctx->max_nb_queue_pairs;
-	dev_info->sym.max_nb_sessions = max_nb_sessions;
+	dev_info->sym.max_nb_sessions = max_nb_sess;
 }
 
 /** Release queue pair */
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index c13f33fb9..7db5d4064 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -555,7 +555,6 @@ cryptodev_snow3g_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -573,8 +572,7 @@ cryptodev_snow3g_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct snow3g_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -617,7 +615,6 @@ RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv,
 		cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 8add0396f..e5c7a863a 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -130,7 +130,8 @@ snow3g_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = snow3g_pmd_capabilities;
 	}
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
index f0cc60d3b..b7807b621 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_private.h
@@ -24,8 +24,6 @@ int snow3g_logtype_driver;
 struct snow3g_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** SNOW 3G buffer queue pair */
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 4f170cfec..e51c102c3 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1417,8 +1417,8 @@ virtio_crypto_dev_info_get(struct rte_cryptodev *dev,
 		info->driver_id = cryptodev_virtio_driver_id;
 		info->feature_flags = dev->feature_flags;
 		info->max_nb_queue_pairs = hw->max_dataqueues;
-		info->sym.max_nb_sessions =
-			RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS;
+		/* No limit of number of sessions */
+		info->sym.max_nb_sessions = 0;
 		info->capabilities = hw->virtio_dev_capabilities;
 	}
 }
@@ -1431,8 +1431,7 @@ crypto_virtio_pci_probe(
 	struct rte_cryptodev_pmd_init_params init_params = {
 		.name = "",
 		.socket_id = rte_socket_id(),
-		.private_data_size = sizeof(struct virtio_crypto_hw),
-		.max_nb_sessions = RTE_VIRTIO_CRYPTO_PMD_MAX_NB_SESSIONS
+		.private_data_size = sizeof(struct virtio_crypto_hw)
 	};
 	char name[RTE_CRYPTODEV_NAME_MAX_LEN];
 
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 119d393e4..8de5c27db 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -478,7 +478,6 @@ cryptodev_zuc_create(const char *name,
 	internals = dev->data->dev_private;
 
 	internals->max_nb_queue_pairs = init_params->max_nb_queue_pairs;
-	internals->max_nb_sessions = init_params->max_nb_sessions;
 
 	return 0;
 init_error:
@@ -496,8 +495,7 @@ cryptodev_zuc_probe(struct rte_vdev_device *vdev)
 		"",
 		sizeof(struct zuc_private),
 		rte_socket_id(),
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS,
-		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS
+		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS
 	};
 	const char *name;
 	const char *input_args;
@@ -540,7 +538,6 @@ static struct cryptodev_driver zuc_crypto_drv;
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD,
 	"max_nb_queue_pairs=<int> "
-	"max_nb_sessions=<int> "
 	"socket_id=<int>");
 RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver,
 		cryptodev_driver_id);
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 87c44ceb9..e151750fb 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -130,7 +130,8 @@ zuc_pmd_info_get(struct rte_cryptodev *dev,
 	if (dev_info != NULL) {
 		dev_info->driver_id = dev->driver_id;
 		dev_info->max_nb_queue_pairs = internals->max_nb_queue_pairs;
-		dev_info->sym.max_nb_sessions = internals->max_nb_sessions;
+		/* No limit of number of sessions */
+		dev_info->sym.max_nb_sessions = 0;
 		dev_info->feature_flags = dev->feature_flags;
 		dev_info->capabilities = zuc_pmd_capabilities;
 	}
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_private.h b/drivers/crypto/zuc/rte_zuc_pmd_private.h
index 69cc32e54..5e5906ddb 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_private.h
+++ b/drivers/crypto/zuc/rte_zuc_pmd_private.h
@@ -24,8 +24,6 @@ int zuc_logtype_driver;
 struct zuc_private {
 	unsigned max_nb_queue_pairs;
 	/**< Max number of queue pairs supported by device */
-	unsigned max_nb_sessions;
-	/**< Max number of sessions supported by device */
 };
 
 /** ZUC buffer queue pair */
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.c b/lib/librte_cryptodev/rte_cryptodev_pmd.c
index f2aac24b7..2088ac3f3 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.c
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.c
@@ -65,13 +65,6 @@ rte_cryptodev_pmd_parse_input_args(
 		if (ret < 0)
 			goto free_kvlist;
 
-		ret = rte_kvargs_process(kvlist,
-				RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
-				&rte_cryptodev_pmd_parse_uint_arg,
-				&params->max_nb_sessions);
-		if (ret < 0)
-			goto free_kvlist;
-
 		ret = rte_kvargs_process(kvlist,
 				RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
 				&rte_cryptodev_pmd_parse_uint_arg,
@@ -109,10 +102,9 @@ rte_cryptodev_pmd_create(const char *name,
 			device->driver->name, name);
 
 	CDEV_LOG_INFO("[%s] - Initialisation parameters - name: %s,"
-			"socket id: %d, max queue pairs: %u, max sessions: %u",
+			"socket id: %d, max queue pairs: %u",
 			device->driver->name, name,
-			params->socket_id, params->max_nb_queue_pairs,
-			params->max_nb_sessions);
+			params->socket_id, params->max_nb_queue_pairs);
 
 	/* allocate device structure */
 	cryptodev = rte_cryptodev_pmd_allocate(name, params->socket_id);
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index db8b97665..1fb7e7d5e 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -32,18 +32,15 @@ extern "C" {
 
 
 #define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS	8
-#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS	2048
 
 #define RTE_CRYPTODEV_PMD_NAME_ARG			("name")
 #define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG			("max_nb_queue_pairs")
-#define RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
 #define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG			("socket_id")
 
 
 static const char * const cryptodev_pmd_valid_params[] = {
 	RTE_CRYPTODEV_PMD_NAME_ARG,
 	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_PMD_MAX_NB_SESS_ARG,
 	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
 };
 
@@ -56,7 +53,6 @@ struct rte_cryptodev_pmd_init_params {
 	size_t private_data_size;
 	int socket_id;
 	unsigned int max_nb_queue_pairs;
-	unsigned int max_nb_sessions;
 };
 
 /** Global structure used for maintaining state of allocated crypto devices */
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 10/16] doc: remove unneeded deprecation notice
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (8 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
                     ` (6 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

In release 18.05, a deprecation notice to remove the `sym`
structure in the cryptodev info structure was sent.
However, only one of the fields inside the structure will
be removed, so the notice is not actually correct.
In any case, it needs to be removed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index b71080bb8..dc014da21 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -101,9 +101,6 @@ Deprecation Notices
 * cryptodev: The following changes will be made in the library
   for 18.08:
 
-  - Removal of ``sym`` structure in ``rte_cryptodev_info`` structure,
-    containing fields not relevant anymore since the session mempool
-    is not internal in the crypto device anymore.
   - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 11/16] cryptodev: remove queue start/stop functions
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (9 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 10/16] doc: remove unneeded deprecation notice Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 12/16] cryptodev: remove old get session size functions Pablo de Lara
                     ` (5 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed cryptodev queue start/stop functions,
as they were marked deprecated in 18.05, since they
were not implemented by any driver.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  4 ---
 doc/guides/rel_notes/release_18_08.rst         |  5 +++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 -----------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 -----------
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 -----------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 16 ----------
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 22 -------------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 22 -------------
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 -----------
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 28 ----------------
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 -----------
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 -----------
 drivers/crypto/qat/qat_sym_pmd.c               |  2 --
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 18 -----------
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 -----------
 drivers/crypto/virtio/virtio_cryptodev.c       |  2 --
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 -----------
 lib/librte_cryptodev/rte_cryptodev.c           | 44 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 37 ----------------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 26 ---------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 21 files changed, 5 insertions(+), 367 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dc014da21..91592534e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,10 +105,6 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Functions ``rte_cryptodev_queue_pair_start()`` and
-    ``rte_cryptodev_queue_pair_stop()`` will be deprecated from 18.05
-    and removed in 18.08, as there are no drivers doing anything useful
-    with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
   - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 84c2636a6..0718f7a0a 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -65,6 +65,11 @@ API Changes
   Value 0 is accepted in ``sym.max_nb_sessions``, meaning that a device
   supports an unlimited number of sessions.
 
+* cryptodev: Following functions were deprecated and are removed in 18.08:
+
+  - ``rte_cryptodev_queue_pair_start``
+  - ``rte_cryptodev_queue_pair_stop``
+
 * compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
   replaced with the following more explicit flags:
   - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 1f4edc0f2..489d2e08f 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -242,22 +242,6 @@ aesni_gcm_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_gcm_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_gcm_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
@@ -339,8 +323,6 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 
 		.queue_pair_setup	= aesni_gcm_pmd_qp_setup,
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
-		.queue_pair_start	= aesni_gcm_pmd_qp_start,
-		.queue_pair_stop	= aesni_gcm_pmd_qp_stop,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
 		.session_get_size	= aesni_gcm_pmd_session_get_size,
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 6cd4134af..b806c4d52 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -509,22 +509,6 @@ aesni_mb_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-aesni_mb_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-aesni_mb_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
@@ -607,8 +591,6 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 
 		.queue_pair_setup	= aesni_mb_pmd_qp_setup,
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
-		.queue_pair_start	= aesni_mb_pmd_qp_start,
-		.queue_pair_stop	= aesni_mb_pmd_qp_stop,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
 		.session_get_size	= aesni_mb_pmd_session_get_size,
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index b654f7528..5e8a5a292 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -258,22 +258,6 @@ armv8_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-armv8_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-armv8_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -354,8 +338,6 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 
 		.queue_pair_setup	= armv8_crypto_pmd_qp_setup,
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
-		.queue_pair_start	= armv8_crypto_pmd_qp_start,
-		.queue_pair_stop	= armv8_crypto_pmd_qp_stop,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
 		.session_get_size	= armv8_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index dbe545c10..1cb944406 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -748,20 +748,6 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-static int
-ccp_pmd_qp_start(struct rte_cryptodev *dev __rte_unused,
-		 uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
-static int
-ccp_pmd_qp_stop(struct rte_cryptodev *dev __rte_unused,
-		uint16_t queue_pair_id __rte_unused)
-{
-	return -ENOTSUP;
-}
-
 static uint32_t
 ccp_pmd_qp_count(struct rte_cryptodev *dev)
 {
@@ -837,8 +823,6 @@ struct rte_cryptodev_ops ccp_ops = {
 
 		.queue_pair_setup	= ccp_pmd_qp_setup,
 		.queue_pair_release	= ccp_pmd_qp_release,
-		.queue_pair_start	= ccp_pmd_qp_start,
-		.queue_pair_stop	= ccp_pmd_qp_stop,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
 		.session_get_size	= ccp_pmd_session_get_size,
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index bc091c560..1b1c30d85 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1470,26 +1470,6 @@ dpaa2_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return retcode;
 }
 
-/** Start queue pair */
-static int
-dpaa2_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			   __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa2_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2716,8 +2696,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.stats_reset	      = dpaa2_sec_stats_reset,
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
-	.queue_pair_start     = dpaa2_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa2_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
 	.session_get_size     = dpaa2_sec_session_get_size,
 	.session_configure    = dpaa2_sec_session_configure,
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 73cae483b..b96552c57 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1585,26 +1585,6 @@ dpaa_sec_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-dpaa_sec_queue_pair_start(__rte_unused struct rte_cryptodev *dev,
-			  __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
-/** Stop queue pair */
-static int
-dpaa_sec_queue_pair_stop(__rte_unused struct rte_cryptodev *dev,
-			 __rte_unused uint16_t queue_pair_id)
-{
-	PMD_INIT_FUNC_TRACE();
-
-	return 0;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
@@ -2227,8 +2207,6 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.dev_infos_get        = dpaa_sec_dev_infos_get,
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
-	.queue_pair_start     = dpaa_sec_queue_pair_start,
-	.queue_pair_stop      = dpaa_sec_queue_pair_stop,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index 5593238f2..c7556d478 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -229,22 +229,6 @@ kasumi_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-kasumi_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-kasumi_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 kasumi_pmd_qp_count(struct rte_cryptodev *dev)
@@ -325,8 +309,6 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 
 		.queue_pair_setup   = kasumi_pmd_qp_setup,
 		.queue_pair_release = kasumi_pmd_qp_release,
-		.queue_pair_start   = kasumi_pmd_qp_start,
-		.queue_pair_stop    = kasumi_pmd_qp_stop,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
 		.session_get_size   = kasumi_pmd_session_get_size,
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index 3f8de37b7..f83a6115f 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -595,32 +595,6 @@ mrvl_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair (PMD ops callback) - not supported.
- *
- * @param dev Pointer to the device structure.
- * @param qp_id ID of the Queue Pair.
- * @returns -ENOTSUP. Always.
- */
-static int
-mrvl_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs (PMD ops callback).
  *
  * @param dev Pointer to the device structure.
@@ -738,8 +712,6 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 
 		.queue_pair_setup	= mrvl_crypto_pmd_qp_setup,
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
-		.queue_pair_start	= mrvl_crypto_pmd_qp_start,
-		.queue_pair_stop	= mrvl_crypto_pmd_qp_stop,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
 		.session_get_size	= mrvl_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 55778a255..66bd62bd3 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -241,22 +241,6 @@ null_crypto_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-null_crypto_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-null_crypto_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
@@ -337,8 +321,6 @@ struct rte_cryptodev_ops pmd_ops = {
 
 		.queue_pair_setup	= null_crypto_pmd_qp_setup,
 		.queue_pair_release	= null_crypto_pmd_qp_release,
-		.queue_pair_start	= null_crypto_pmd_qp_start,
-		.queue_pair_stop	= null_crypto_pmd_qp_stop,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
 		.session_get_size	= null_crypto_pmd_session_get_size,
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index a1a2d9900..20d4e26de 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -648,22 +648,6 @@ openssl_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-openssl_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-openssl_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 openssl_pmd_qp_count(struct rte_cryptodev *dev)
@@ -746,8 +730,6 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 
 		.queue_pair_setup	= openssl_pmd_qp_setup,
 		.queue_pair_release	= openssl_pmd_qp_release,
-		.queue_pair_start	= openssl_pmd_qp_start,
-		.queue_pair_stop	= openssl_pmd_qp_stop,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
 		.session_get_size	= openssl_pmd_session_get_size,
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 84dd5bec8..ee8633b85 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -202,8 +202,6 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.stats_reset		= qat_sym_stats_reset,
 		.queue_pair_setup	= qat_sym_qp_setup,
 		.queue_pair_release	= qat_sym_qp_release,
-		.queue_pair_start	= NULL,
-		.queue_pair_stop	= NULL,
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 802585f4c..9b2f99eb2 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -439,22 +439,6 @@ scheduler_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return 0;
 }
 
-/** Start queue pair */
-static int
-scheduler_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-scheduler_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 scheduler_pmd_qp_count(struct rte_cryptodev *dev)
@@ -535,8 +519,6 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 
 		.queue_pair_setup	= scheduler_pmd_qp_setup,
 		.queue_pair_release	= scheduler_pmd_qp_release,
-		.queue_pair_start	= scheduler_pmd_qp_start,
-		.queue_pair_stop	= scheduler_pmd_qp_stop,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
 		.session_get_size	= scheduler_pmd_session_get_size,
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index e5c7a863a..26c84b652 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -231,22 +231,6 @@ snow3g_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-snow3g_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-snow3g_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 snow3g_pmd_qp_count(struct rte_cryptodev *dev)
@@ -327,8 +311,6 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 
 		.queue_pair_setup   = snow3g_pmd_qp_setup,
 		.queue_pair_release = snow3g_pmd_qp_release,
-		.queue_pair_start   = snow3g_pmd_qp_start,
-		.queue_pair_stop    = snow3g_pmd_qp_stop,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
 		.session_get_size   = snow3g_pmd_session_get_size,
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index e51c102c3..ce5816b75 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -515,8 +515,6 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 
 	.queue_pair_setup                = virtio_crypto_qp_setup,
 	.queue_pair_release              = virtio_crypto_qp_release,
-	.queue_pair_start                = NULL,
-	.queue_pair_stop                 = NULL,
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index e151750fb..1d72a0757 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -231,22 +231,6 @@ zuc_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	return -1;
 }
 
-/** Start queue pair */
-static int
-zuc_pmd_qp_start(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
-/** Stop queue pair */
-static int
-zuc_pmd_qp_stop(__rte_unused struct rte_cryptodev *dev,
-		__rte_unused uint16_t queue_pair_id)
-{
-	return -ENOTSUP;
-}
-
 /** Return the number of allocated queue pairs */
 static uint32_t
 zuc_pmd_qp_count(struct rte_cryptodev *dev)
@@ -328,8 +312,6 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 
 		.queue_pair_setup   = zuc_pmd_qp_setup,
 		.queue_pair_release = zuc_pmd_qp_release,
-		.queue_pair_start   = zuc_pmd_qp_start,
-		.queue_pair_stop    = zuc_pmd_qp_stop,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
 		.session_get_size   = zuc_pmd_session_get_size,
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 457ac5670..a07904fb9 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -702,50 +702,6 @@ rte_cryptodev_queue_pairs_config(struct rte_cryptodev *dev, uint16_t nb_qpairs,
 	return 0;
 }
 
-int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_start, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_start(dev, queue_pair_id);
-
-}
-
-int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%" PRIu8, dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-	if (queue_pair_id >= dev->data->nb_queue_pairs) {
-		CDEV_LOG_ERR("Invalid queue_pair_id=%d", queue_pair_id);
-		return -EINVAL;
-	}
-
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_pair_stop, -ENOTSUP);
-
-	return dev->dev_ops->queue_pair_stop(dev, queue_pair_id);
-
-}
-
 int
 rte_cryptodev_configure(uint8_t dev_id, struct rte_cryptodev_config *config)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 7989eb876..b5d208917 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -566,43 +566,6 @@ rte_cryptodev_queue_pair_setup(uint8_t dev_id, uint16_t queue_pair_id,
 		const struct rte_cryptodev_qp_conf *qp_conf, int socket_id,
 		struct rte_mempool *session_pool);
 
-/**
- * @deprecated
- * Start a specified queue pair of a device. It is used
- * when deferred_start flag of the specified queue is true.
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to start. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_crypto_dev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_start(uint8_t dev_id, uint16_t queue_pair_id);
-
-/**
- * @deprecated
- * Stop specified queue pair of a device
- *
- * @param	dev_id		The identifier of the device
- * @param	queue_pair_id	The index of the queue pair to stop. The value
- *				must be in the range [0, nb_queue_pair - 1]
- *				previously supplied to
- *				rte_cryptodev_configure().
- * @return
- *   - 0: Success, the transmit queue is correctly set up.
- *   - -EINVAL: The dev_id or the queue_id out of range.
- *   - -ENOTSUP: The function not supported in PMD driver.
- */
-__rte_deprecated
-extern int
-rte_cryptodev_queue_pair_stop(uint8_t dev_id, uint16_t queue_pair_id);
-
 /**
  * Get the number of queue pairs on a specific crypto device
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1fb7e7d5e..641dd1369 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -184,28 +184,6 @@ typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
 typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
 				struct rte_cryptodev_info *dev_info);
 
-/**
- * Start queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_start_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
-/**
- * Stop queue pair of a device.
- *
- * @param	dev	Crypto device pointer
- * @param	qp_id	Queue Pair Index
- *
- * @return	Returns 0 on success.
- */
-typedef int (*cryptodev_queue_pair_stop_t)(struct rte_cryptodev *dev,
-				uint16_t qp_id);
-
 /**
  * Setup a queue pair for a device.
  *
@@ -344,10 +322,6 @@ struct rte_cryptodev_ops {
 	/**< Set up a device queue pair. */
 	cryptodev_queue_pair_release_t queue_pair_release;
 	/**< Release a queue pair. */
-	cryptodev_queue_pair_start_t queue_pair_start;
-	/**< Start a queue pair. */
-	cryptodev_queue_pair_stop_t queue_pair_stop;
-	/**< Stop a queue pair. */
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index be8f4c1a7..020b45754 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -22,8 +22,6 @@ DPDK_16.04 {
 	rte_cryptodev_stop;
 	rte_cryptodev_queue_pair_count;
 	rte_cryptodev_queue_pair_setup;
-	rte_cryptodev_queue_pair_start;
-	rte_cryptodev_queue_pair_stop;
 	rte_crypto_op_pool_create;
 
 	local: *;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 12/16] cryptodev: remove old get session size functions
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (10 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
                     ` (4 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Removed rte_cryptodev_get_header_session_size
and rte_cryptodev_get_private_session_size functions,
as they have been substituted with functions
specific for symmetric operations, with _sym_ word
after "rte_cryptodev_".

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  6 ------
 doc/guides/rel_notes/release_18_08.rst         |  8 ++++++++
 lib/librte_cryptodev/rte_cryptodev.c           | 12 ------------
 lib/librte_cryptodev/rte_cryptodev.h           | 25 -------------------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 --
 5 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 91592534e..9a73b1d8e 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -107,9 +107,3 @@ Deprecation Notices
     with them.
   - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
     so some will be replaced by more explicit flags.
-  - Function ``rte_cryptodev_get_header_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_header_session_size()``.
-    It will be removed in 18.08.
-  - Function ``rte_cryptodev_get_private_session_size()`` will be deprecated
-    in 18.05, and it gets replaced with ``rte_cryptodev_sym_get_private_session_size()``.
-    It will be removed in 18.08.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 0718f7a0a..1eb622d97 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -70,6 +70,14 @@ API Changes
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
 
+* cryptodev: Following functions were deprecated and are replaced by
+  other functions in 18.08:
+
+  - ``rte_cryptodev_get_header_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_header_session_size``
+  - ``rte_cryptodev_get_private_session_size`` is replaced with
+    ``rte_cryptodev_sym_get_private_session_size``
+
 * compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
   replaced with the following more explicit flags:
   - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a07904fb9..381330f3d 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1181,12 +1181,6 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 	return 0;
 }
 
-unsigned int
-rte_cryptodev_get_header_session_size(void)
-{
-	return rte_cryptodev_sym_get_header_session_size();
-}
-
 unsigned int
 rte_cryptodev_sym_get_header_session_size(void)
 {
@@ -1198,12 +1192,6 @@ rte_cryptodev_sym_get_header_session_size(void)
 	return ((sizeof(void *) * nb_drivers) + sizeof(uint8_t));
 }
 
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id)
-{
-	return rte_cryptodev_sym_get_private_session_size(dev_id);
-}
-
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 {
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index b5d208917..cc219c722 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -898,31 +898,6 @@ int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 			struct rte_cryptodev_sym_session *sess);
 
-/**
- * @deprecated
- * Get the size of the header session, for all registered drivers.
- *
- * @return
- *   Size of the header session.
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_header_session_size(void);
-
-/**
- * @deprecated
- * Get the size of the private session data for a device.
- *
- * @param	dev_id		The device identifier.
- *
- * @return
- *   - Size of the private data, if successful
- *   - 0 if device is invalid or does not have private session
- */
-__rte_deprecated
-unsigned int
-rte_cryptodev_get_private_session_size(uint8_t dev_id);
-
 /**
  * Get the size of the header session, for all registered drivers.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 020b45754..0ab6d5195 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -63,8 +63,6 @@ DPDK_17.08 {
 	rte_cryptodev_driver_id_get;
 	rte_cryptodev_driver_name_get;
 	rte_cryptodev_get_aead_algo_enum;
-	rte_cryptodev_get_header_session_size;
-	rte_cryptodev_get_private_session_size;
 	rte_cryptodev_sym_capability_check_aead;
 	rte_cryptodev_sym_session_init;
 	rte_cryptodev_sym_session_clear;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 13/16] cryptodev: replace mbuf scatter gather flag
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (11 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 12/16] cryptodev: remove old get session size functions Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 14/16] cryptodev: remove attach/detach session API Pablo de Lara
                     ` (3 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The current mbuf scatter gatter feature flag is
too ambiguous, as it is not clear if input and/or output
buffers can be scatter gather mbufs or not, plus
if in-place and/or out-of-place is supported.

Therefore, five new flags will replace this flag:
- RTE_CRYPTODEV_FF_IN_PLACE_SGL
- RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT
- RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT
- RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/cryptodevs/features/aesni_gcm.ini |  3 +-
 doc/guides/cryptodevs/features/default.ini   |  6 +++-
 doc/guides/cryptodevs/features/dpaa2_sec.ini |  6 +++-
 doc/guides/cryptodevs/features/dpaa_sec.ini  |  6 +++-
 doc/guides/cryptodevs/features/null.ini      |  2 +-
 doc/guides/cryptodevs/features/openssl.ini   |  3 +-
 doc/guides/cryptodevs/features/qat.ini       |  6 +++-
 doc/guides/cryptodevs/overview.rst           | 33 ++++++++++++++-----
 doc/guides/rel_notes/deprecation.rst         |  2 --
 doc/guides/rel_notes/release_18_08.rst       |  8 +++++
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c     |  3 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c  |  6 +++-
 drivers/crypto/dpaa_sec/dpaa_sec.c           |  6 +++-
 drivers/crypto/null/null_crypto_pmd.c        |  2 +-
 drivers/crypto/openssl/rte_openssl_pmd.c     |  3 +-
 drivers/crypto/qat/qat_sym_pmd.c             |  6 +++-
 lib/librte_cryptodev/rte_cryptodev.c         | 12 +++++--
 lib/librte_cryptodev/rte_cryptodev.h         | 49 +++++++++++++++++++---------
 test/test/test_cryptodev.c                   | 31 +++++++++++++-----
 test/test/test_cryptodev_blockcipher.c       | 21 +++++++++---
 20 files changed, 161 insertions(+), 53 deletions(-)

diff --git a/doc/guides/cryptodevs/features/aesni_gcm.ini b/doc/guides/cryptodevs/features/aesni_gcm.ini
index 920b6b6ac..b9e9c9060 100644
--- a/doc/guides/cryptodevs/features/aesni_gcm.ini
+++ b/doc/guides/cryptodevs/features/aesni_gcm.ini
@@ -10,7 +10,8 @@ CPU AESNI              = Y
 CPU SSE                = Y
 CPU AVX                = Y
 CPU AVX2               = Y
-Mbuf scatter gather    = Y
+OOP SGL In LB  Out     = Y
+OOP LB  In LB  Out     = Y
 ;
 ; Supported crypto algorithms of the 'aesni_gcm' crypto driver.
 ;
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 42783887a..92a7ccf36 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -18,7 +18,11 @@ CPU AVX512             =
 CPU AESNI              =
 CPU NEON               =
 CPU ARM CE             =
-Mbuf scatter gather    =
+In Place SGL           =
+OOP SGL In SGL Out     =
+OOP SGL In LB  Out     =
+OOP LB  In SGL Out     =
+OOP LB  In LB  Out     =
 
 ;
 ; Supported crypto algorithms of a default crypto driver.
diff --git a/doc/guides/cryptodevs/features/dpaa2_sec.ini b/doc/guides/cryptodevs/features/dpaa2_sec.ini
index 68c9960d8..69700df40 100644
--- a/doc/guides/cryptodevs/features/dpaa2_sec.ini
+++ b/doc/guides/cryptodevs/features/dpaa2_sec.ini
@@ -8,7 +8,11 @@ Symmetric crypto       = Y
 Sym operation chaining = Y
 HW Accelerated         = Y
 Protocol offload       = Y
-Mbuf scatter gather    = Y
+In Place SGL           = Y
+OOP SGL In SGL Out     = Y
+OOP SGL In LB  Out     = Y
+OOP LB  In SGL Out     = Y
+OOP LB  In LB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'dpaa2_sec' crypto driver.
diff --git a/doc/guides/cryptodevs/features/dpaa_sec.ini b/doc/guides/cryptodevs/features/dpaa_sec.ini
index 260fae728..937b621c0 100644
--- a/doc/guides/cryptodevs/features/dpaa_sec.ini
+++ b/doc/guides/cryptodevs/features/dpaa_sec.ini
@@ -8,7 +8,11 @@ Symmetric crypto       = Y
 Sym operation chaining = Y
 HW Accelerated         = Y
 Protocol offload       = Y
-Mbuf scatter gather    = Y
+In Place SGL           = Y
+OOP SGL In SGL Out     = Y
+OOP SGL In LB  Out     = Y
+OOP LB  In SGL Out     = Y
+OOP LB  In LB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'dpaa_sec' crypto driver.
diff --git a/doc/guides/cryptodevs/features/null.ini b/doc/guides/cryptodevs/features/null.ini
index a9e172da8..ecf5779ac 100644
--- a/doc/guides/cryptodevs/features/null.ini
+++ b/doc/guides/cryptodevs/features/null.ini
@@ -6,7 +6,7 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
-Mbuf scatter gather    = Y
+In Place SGL           = Y
 
 ;
 ; Supported crypto algorithms of the 'null' crypto driver.
diff --git a/doc/guides/cryptodevs/features/openssl.ini b/doc/guides/cryptodevs/features/openssl.ini
index 691565865..626ec1be2 100644
--- a/doc/guides/cryptodevs/features/openssl.ini
+++ b/doc/guides/cryptodevs/features/openssl.ini
@@ -6,7 +6,8 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
-Mbuf scatter gather    = Y
+OOP SGL In LB  Out     = Y
+OOP LB  In LB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'openssl' crypto driver.
diff --git a/doc/guides/cryptodevs/features/qat.ini b/doc/guides/cryptodevs/features/qat.ini
index 51ed5967f..29d865e07 100644
--- a/doc/guides/cryptodevs/features/qat.ini
+++ b/doc/guides/cryptodevs/features/qat.ini
@@ -7,7 +7,11 @@
 Symmetric crypto       = Y
 Sym operation chaining = Y
 HW Accelerated         = Y
-Mbuf scatter gather    = Y
+In Place SGL           = Y
+OOP SGL In SGL Out     = Y
+OOP SGL In LB  Out     = Y
+OOP LB  In SGL Out     = Y
+OOP LB  In LB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'qat' crypto driver.
diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst
index 493cd5f55..3f776f078 100644
--- a/doc/guides/cryptodevs/overview.rst
+++ b/doc/guides/cryptodevs/overview.rst
@@ -11,14 +11,31 @@ Supported Feature Flags
 
 .. include:: overview_feature_table.txt
 
-Note, the mbuf scatter gather feature (aka chained mbufs, scatter-gather-lists
-or SGLs) indicate all following combinations are supported unless otherwise called
-out in the Limitations section of each PMD.
-
-* In place operation, input buffer as multiple segments, same buffer used for output
-* Out of place operation, input buffer as single segment and output as multiple segments
-* Out of place operation, input buffer as multiple segments and output as single segment
-* Out of place operation, input buffer as multiple segments and output as multiple segments
+.. Note::
+
+   - "In Place SGL" feature flag stands for "In place Scatter-gather list",
+     which means that an input buffer can consist of multiple segments,
+     being the operation in-place (input address = output address).
+
+   - "OOP SGL In SGL Out" feature flag stands for
+     "Out-of-place Scatter-gather list Input, Scatter-gater list Output",
+     which means pmd supports different scatter-gather styled input and output buffers
+     (i.e. both can consists of multiple segments).
+
+   - "OOP SGL In LB Out" feature flag stands for
+     "Out-of-place Scatter-gather list Input, Linear Buffers Output",
+     which means PMD supports input from scatter-gathered styled buffers,
+     outputting linear buffers (i.e. single segment).
+
+   - "OOP LB In SGL Out" feature flag stands for
+     "Out-of-place Linear Buffers Input, Scatter-gather list Output",
+     which means PMD supports input from linear buffer, outputting
+     scatter-gathered styled buffers.
+
+   - "OOP LB In LB Out" feature flag stands for
+     "Out-of-place Linear Buffers Input, Scatter-gather list Output",
+     which means that Out-of-place operation is supported,
+     with linear input and output buffers.
 
 
 Supported Cipher Algorithms
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 9a73b1d8e..62d635b74 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -105,5 +105,3 @@ Deprecation Notices
     ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
     18.05 and removed in 18.08, as there are no drivers doing anything useful
     with them.
-  - Some feature flags such as ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` are ambiguous,
-    so some will be replaced by more explicit flags.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 1eb622d97..9d8b0457b 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -78,6 +78,14 @@ API Changes
   - ``rte_cryptodev_get_private_session_size`` is replaced with
     ``rte_cryptodev_sym_get_private_session_size``
 
+* cryptodev: Feature flag ``RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER`` is
+  replaced with the following more explicit flags:
+  - ``RTE_CRYPTODEV_FF_IN_PLACE_SGL``
+  - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT``
+  - ``RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT``
+
 * compressdev: Feature flag ``RTE_COMP_FF_MBUF_SCATTER_GATHER`` is
   replaced with the following more explicit flags:
   - ``RTE_COMP_FF_OOP_SGL_IN_SGL_OUT``
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 88307e0e7..456ab9512 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -492,7 +492,8 @@ aesni_gcm_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT;
 
 	switch (vector_mode) {
 	case RTE_AESNI_GCM_SSE:
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 1b1c30d85..51c786154 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2762,7 +2762,11 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT;
 
 	internals = cryptodev->data->dev_private;
 
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index b96552c57..69965cd87 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2271,7 +2271,11 @@ dpaa_sec_dev_init(struct rte_cryptodev *cryptodev)
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_SECURITY |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->max_nb_queue_pairs = RTE_DPAA_MAX_NB_SEC_QPS;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 07276833b..3d7caf1f1 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -176,7 +176,7 @@ cryptodev_null_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL;
 
 	internals = dev->data->dev_private;
 
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 1ccab4ab5..2cbe9401f 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1660,7 +1660,8 @@ cryptodev_openssl_create(const char *name,
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			RTE_CRYPTODEV_FF_CPU_AESNI |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT;
 
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index ee8633b85..c9fc1a805 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -274,7 +274,11 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 	cryptodev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
-			RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER;
+			RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT;
 
 	internals = cryptodev->data->dev_private;
 	internals->qat_dev = qat_pci_dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 381330f3d..754509c9c 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -361,8 +361,16 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		return "CPU_AESNI";
 	case RTE_CRYPTODEV_FF_HW_ACCELERATED:
 		return "HW_ACCELERATED";
-	case RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER:
-		return "MBUF_SCATTER_GATHER";
+	case RTE_CRYPTODEV_FF_IN_PLACE_SGL:
+		return "IN_PLACE_SGL";
+	case RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT:
+		return "OOP_SGL_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT:
+		return "OOP_SGL_IN_LB_OUT";
+	case RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT:
+		return "OOP_LB_IN_SGL_OUT";
+	case RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT:
+		return "OOP_LB_IN_LB_OUT";
 	case RTE_CRYPTODEV_FF_CPU_NEON:
 		return "CPU_NEON";
 	case RTE_CRYPTODEV_FF_CPU_ARM_CE:
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index cc219c722..49e9cba11 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -292,31 +292,50 @@ rte_cryptodev_get_aead_algo_enum(enum rte_crypto_aead_algorithm *algo_enum,
  *
  * Keep these flags synchronised with rte_cryptodev_get_feature_name()
  */
-#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO	(1ULL << 0)
+#define	RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO		(1ULL << 0)
 /**< Symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO	(1ULL << 1)
+#define	RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO		(1ULL << 1)
 /**< Asymmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING	(1ULL << 2)
+#define	RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING		(1ULL << 2)
 /**< Chaining symmetric crypto operations are supported */
-#define	RTE_CRYPTODEV_FF_CPU_SSE		(1ULL << 3)
+#define	RTE_CRYPTODEV_FF_CPU_SSE			(1ULL << 3)
 /**< Utilises CPU SIMD SSE instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX		(1ULL << 4)
+#define	RTE_CRYPTODEV_FF_CPU_AVX			(1ULL << 4)
 /**< Utilises CPU SIMD AVX instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AVX2		(1ULL << 5)
+#define	RTE_CRYPTODEV_FF_CPU_AVX2			(1ULL << 5)
 /**< Utilises CPU SIMD AVX2 instructions */
-#define	RTE_CRYPTODEV_FF_CPU_AESNI		(1ULL << 6)
+#define	RTE_CRYPTODEV_FF_CPU_AESNI			(1ULL << 6)
 /**< Utilises CPU AES-NI instructions */
-#define	RTE_CRYPTODEV_FF_HW_ACCELERATED		(1ULL << 7)
-/**< Operations are off-loaded to an external hardware accelerator */
-#define	RTE_CRYPTODEV_FF_CPU_AVX512		(1ULL << 8)
+#define	RTE_CRYPTODEV_FF_HW_ACCELERATED			(1ULL << 7)
+/**< Operations are off-loaded to an
+ * external hardware accelerator
+ */
+#define	RTE_CRYPTODEV_FF_CPU_AVX512			(1ULL << 8)
 /**< Utilises CPU SIMD AVX512 instructions */
-#define	RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER	(1ULL << 9)
-/**< Scatter-gather mbufs are supported */
-#define	RTE_CRYPTODEV_FF_CPU_NEON		(1ULL << 10)
+#define	RTE_CRYPTODEV_FF_IN_PLACE_SGL			(1ULL << 9)
+/**< In-place Scatter-gather (SGL) buffers, with multiple segments,
+ * are supported
+ */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT		(1ULL << 10)
+/**< Out-of-place Scatter-gather (SGL) buffers are
+ * supported in input and output
+ */
+#define RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT		(1ULL << 11)
+/**< Out-of-place Scatter-gather (SGL) buffers are supported
+ * in input, combined with linear buffers (LB), with a
+ * single segment in output
+ */
+#define RTE_CRYPTODEV_FF_OOP_LB_IN_SGL_OUT		(1ULL << 12)
+/**< Out-of-place Scatter-gather (SGL) buffers are supported
+ * in output, combined with linear buffers (LB) in input
+ */
+#define RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT		(1ULL << 13)
+/**< Out-of-place linear buffers (LB) are supported in input and output */
+#define	RTE_CRYPTODEV_FF_CPU_NEON			(1ULL << 14)
 /**< Utilises CPU NEON instructions */
-#define	RTE_CRYPTODEV_FF_CPU_ARM_CE		(1ULL << 11)
+#define	RTE_CRYPTODEV_FF_CPU_ARM_CE			(1ULL << 15)
 /**< Utilises ARM CPU Cryptographic Extensions */
-#define	RTE_CRYPTODEV_FF_SECURITY		(1ULL << 12)
+#define	RTE_CRYPTODEV_FF_SECURITY			(1ULL << 16)
 /**< Support Security Protocol Processing */
 
 
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 877dc1658..b759e0811 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -3160,8 +3160,11 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3308,8 +3311,11 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -3659,8 +3665,12 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
 	struct rte_cryptodev_info dev_info;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT)) {
+		printf("Device doesn't support out-of-place scatter-gather "
+				"in both input and output mbufs. "
 				"Test Skipped.\n");
 		return 0;
 	}
@@ -4493,10 +4503,13 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
 		return -ENOTSUP;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
-	if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-		printf("Device doesn't support scatter-gather. "
+
+	uint64_t feat_flags = dev_info.feature_flags;
+
+	if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+		printf("Device doesn't support in-place scatter-gather. "
 				"Test Skipped.\n");
-		return -ENOTSUP;
+		return 0;
 	}
 
 	plaintext_len = ceil_byte_length(tdata->plaintext.len);
diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 256a7daa2..828f7b525 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -77,12 +77,25 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 
 	if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) {
 		rte_cryptodev_info_get(dev_id, &dev_info);
-		if (!(dev_info.feature_flags &
-				RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER)) {
-			printf("Device doesn't support scatter-gather. "
+		uint64_t feat_flags = dev_info.feature_flags;
+		uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT;
+
+		if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+			if (!(feat_flags & oop_flag)) {
+				printf("Device doesn't support out-of-place "
+					"scatter-gather in input mbuf. "
+					"Test Skipped.\n");
+				return 0;
+			}
+		} else {
+			if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
+				printf("Device doesn't support in-place "
+					"scatter-gather mbufs. "
 					"Test Skipped.\n");
-			return 0;
+				return 0;
+			}
 		}
+
 		nb_segs = 3;
 	}
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 14/16] cryptodev: remove attach/detach session API
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (12 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
                     ` (2 subsequent siblings)
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

As announced in the previous release,
The API to attach/dettach a session to a queue pair
is removed, as it was only used in DPAA, and it is not
actually needed.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/rel_notes/deprecation.rst           |  8 ----
 doc/guides/rel_notes/release_18_08.rst         |  2 +
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 32 +--------------
 drivers/crypto/virtio/virtio_cryptodev.c       |  4 +-
 lib/librte_cryptodev/rte_cryptodev.c           | 54 --------------------------
 lib/librte_cryptodev/rte_cryptodev.h           | 36 -----------------
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 30 --------------
 lib/librte_cryptodev/rte_cryptodev_version.map |  2 -
 8 files changed, 4 insertions(+), 164 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 62d635b74..8bdaaaf5d 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -97,11 +97,3 @@ Deprecation Notices
   - ``rte_pdump_set_socket_dir`` will be removed;
   - The parameter, ``path``, of ``rte_pdump_init`` will be removed;
   - The enum ``rte_pdump_socktype`` will be removed.
-
-* cryptodev: The following changes will be made in the library
-  for 18.08:
-
-  - Functions ``rte_cryptodev_queue_pair_attach_sym_session()`` and
-    ``rte_cryptodev_queue_pair_dettach_sym_session()`` will be deprecated from
-    18.05 and removed in 18.08, as there are no drivers doing anything useful
-    with them.
diff --git a/doc/guides/rel_notes/release_18_08.rst b/doc/guides/rel_notes/release_18_08.rst
index 9d8b0457b..b819b3bc0 100644
--- a/doc/guides/rel_notes/release_18_08.rst
+++ b/doc/guides/rel_notes/release_18_08.rst
@@ -69,6 +69,8 @@ API Changes
 
   - ``rte_cryptodev_queue_pair_start``
   - ``rte_cryptodev_queue_pair_stop``
+  - ``rte_cryptodev_queue_pair_attach_sym_session``
+  - ``rte_cryptodev_queue_pair_detach_sym_session``
 
 * cryptodev: Following functions were deprecated and are replaced by
   other functions in 18.08:
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 69965cd87..a83dd1801 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1734,34 +1734,6 @@ dpaa_sec_attach_sess_q(struct dpaa_sec_qp *qp, dpaa_sec_session *sess)
 	return ret;
 }
 
-static int
-dpaa_sec_qp_attach_sess(struct rte_cryptodev *dev __rte_unused,
-			uint16_t qp_id __rte_unused,
-			void *ses __rte_unused)
-{
-	PMD_INIT_FUNC_TRACE();
-	return 0;
-}
-
-static int
-dpaa_sec_qp_detach_sess(struct rte_cryptodev *dev,
-			uint16_t qp_id  __rte_unused,
-			void *ses)
-{
-	dpaa_sec_session *sess = ses;
-	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
-
-	PMD_INIT_FUNC_TRACE();
-
-	if (sess->inq)
-		dpaa_sec_detach_rxq(qi, sess->inq);
-	sess->inq = NULL;
-
-	sess->qp = NULL;
-
-	return 0;
-}
-
 static int
 dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 			    struct rte_crypto_sym_xform *xform,	void *sess)
@@ -2210,9 +2182,7 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
 	.session_get_size     = dpaa_sec_session_get_size,
 	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear,
-	.qp_attach_session    = dpaa_sec_qp_attach_sess,
-	.qp_detach_session    = dpaa_sec_qp_detach_sess,
+	.session_clear        = dpaa_sec_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index ce5816b75..be6d5d7dc 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -520,9 +520,7 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	/* Crypto related operations */
 	.session_get_size	= virtio_crypto_sym_get_session_private_size,
 	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session,
-	.qp_attach_session = NULL,
-	.qp_detach_session = NULL
+	.session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 754509c9c..745ea1cac 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1095,60 +1095,6 @@ rte_cryptodev_sym_session_create(struct rte_mempool *mp)
 	return sess;
 }
 
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_attach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_attach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to attach qp: %d with session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *sess)
-{
-	struct rte_cryptodev *dev;
-
-	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
-		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
-		return -EINVAL;
-	}
-
-	dev = &rte_crypto_devices[dev_id];
-
-	/* The API is optional, not returning error if driver do not suuport */
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->qp_detach_session, 0);
-
-	void *sess_priv = get_session_private_data(sess, dev->driver_id);
-
-	if (dev->dev_ops->qp_detach_session(dev, qp_id, sess_priv)) {
-		CDEV_LOG_ERR("dev_id %d failed to detach qp: %d from session",
-				dev_id, qp_id);
-		return -EPERM;
-	}
-
-	return 0;
-}
-
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
 		struct rte_cryptodev_sym_session *sess)
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 49e9cba11..8fd304524 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -940,42 +940,6 @@ rte_cryptodev_sym_get_header_session_size(void);
 unsigned int
 rte_cryptodev_sym_get_private_session_size(uint8_t dev_id);
 
-/**
- * @deprecated
- * Attach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session will be attached.
- * @param	qp_id		Queue pair to which the session will be attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_attach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
-/**
- * @deprecated
- * Detach queue pair with sym session.
- *
- * @param	dev_id		Device to which the session is attached.
- * @param	qp_id		Queue pair to which the session is attached.
- * @param	session		Session pointer previously allocated by
- *				*rte_cryptodev_sym_session_create*.
- *
- * @return
- *  - On success, zero.
- *  - On failure, a negative value.
- */
-__rte_deprecated
-int
-rte_cryptodev_queue_pair_detach_sym_session(uint8_t dev_id, uint16_t qp_id,
-		struct rte_cryptodev_sym_session *session);
-
 /**
  * Provide driver identifier.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 641dd1369..ec4f1ecfb 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -278,32 +278,6 @@ typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
 typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess);
 
-/**
- * Optional API for drivers to attach sessions with queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for attaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_attach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
-/**
- * Optional API for drivers to detach sessions from queue pair.
- * @param	dev		Crypto device pointer
- * @param	qp_id		queue pair id for detaching session
- * @param	priv_sess       Pointer to cryptodev's private session structure
- * @return
- *  - Return 0 on success
- */
-typedef int (*cryptodev_sym_queue_pair_detach_session_t)(
-		  struct rte_cryptodev *dev,
-		  uint16_t qp_id,
-		  void *session_private);
-
 /** Crypto device operations function pointer table */
 struct rte_cryptodev_ops {
 	cryptodev_configure_t dev_configure;	/**< Configure device. */
@@ -331,10 +305,6 @@ struct rte_cryptodev_ops {
 	/**< Configure a Crypto session. */
 	cryptodev_sym_free_session_t session_clear;
 	/**< Clear a Crypto sessions private data. */
-	cryptodev_sym_queue_pair_attach_session_t qp_attach_session;
-	/**< Attach session to queue pair. */
-	cryptodev_sym_queue_pair_detach_session_t qp_detach_session;
-	/**< Detach session from queue pair. */
 };
 
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 0ab6d5195..77abd8ddc 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -50,8 +50,6 @@ DPDK_17.05 {
 
 	rte_cryptodev_get_auth_algo_enum;
 	rte_cryptodev_get_cipher_algo_enum;
-	rte_cryptodev_queue_pair_attach_sym_session;
-	rte_cryptodev_queue_pair_detach_sym_session;
 
 } DPDK_17.02;
 
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 15/16] cryptodev: rename PMD symmetric session API
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (13 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 14/16] cryptodev: remove attach/detach session API Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
  2018-07-10 11:00   ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes De Lara Guarch, Pablo
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

The PMD specific API to configure, clear and
obtain session private size is renamed, including
the word _sym_ to clarify that it is API
for symmetric sessions, so there will not be any
conflicts for asymmetric and other type of sessions
in the future.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c       |  6 +++---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c   | 18 ++++++++---------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     |  8 ++++----
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 18 ++++++++---------
 drivers/crypto/armv8/rte_armv8_pmd.c           |  6 +++---
 drivers/crypto/armv8/rte_armv8_pmd_ops.c       | 18 ++++++++---------
 drivers/crypto/ccp/ccp_crypto.c                | 28 +++++++++++++-------------
 drivers/crypto/ccp/ccp_pmd_ops.c               | 18 ++++++++---------
 drivers/crypto/ccp/rte_ccp_pmd.c               |  4 ++--
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c    | 20 +++++++++---------
 drivers/crypto/dpaa_sec/dpaa_sec.c             | 20 +++++++++---------
 drivers/crypto/kasumi/rte_kasumi_pmd.c         |  6 +++---
 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c     | 18 ++++++++---------
 drivers/crypto/mvsam/rte_mrvl_pmd.c            |  2 +-
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c        | 18 ++++++++---------
 drivers/crypto/null/null_crypto_pmd.c          |  6 +++---
 drivers/crypto/null/null_crypto_pmd_ops.c      | 18 ++++++++---------
 drivers/crypto/openssl/rte_openssl_pmd.c       |  6 +++---
 drivers/crypto/openssl/rte_openssl_pmd_ops.c   | 18 ++++++++---------
 drivers/crypto/qat/qat_sym.c                   |  2 +-
 drivers/crypto/qat/qat_sym.h                   |  2 +-
 drivers/crypto/qat/qat_sym_pmd.c               |  6 +++---
 drivers/crypto/qat/qat_sym_session.c           |  6 +++---
 drivers/crypto/scheduler/scheduler_pmd_ops.c   | 14 ++++++-------
 drivers/crypto/snow3g/rte_snow3g_pmd.c         |  6 +++---
 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c     | 18 ++++++++---------
 drivers/crypto/virtio/virtio_cryptodev.c       | 10 ++++-----
 drivers/crypto/virtio/virtio_rxtx.c            |  2 +-
 drivers/crypto/zuc/rte_zuc_pmd.c               |  6 +++---
 drivers/crypto/zuc/rte_zuc_pmd_ops.c           | 18 ++++++++---------
 lib/librte_cryptodev/rte_cryptodev.c           | 11 +++++-----
 lib/librte_cryptodev/rte_cryptodev_pmd.h       | 10 ++++-----
 32 files changed, 184 insertions(+), 183 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index 456ab9512..5a77a34f4 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -127,7 +127,7 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(sym_op->session != NULL))
 			sess = (struct aesni_gcm_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					sym_op->session,
 					cryptodev_driver_id);
 	} else  {
@@ -149,8 +149,8 @@ aesni_gcm_get_session(struct aesni_gcm_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(sym_op->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(sym_op->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
index 489d2e08f..b6b4dd028 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
@@ -251,14 +251,14 @@ aesni_gcm_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned
-aesni_gcm_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_gcm_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_gcm_session);
 }
 
 /** Configure a aesni gcm session from a crypto xform chain */
 static int
-aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+aesni_gcm_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -287,7 +287,7 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -295,17 +295,17 @@ aesni_gcm_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_gcm_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_gcm_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct aesni_gcm_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -325,9 +325,9 @@ struct rte_cryptodev_ops aesni_gcm_pmd_ops = {
 		.queue_pair_release	= aesni_gcm_pmd_qp_release,
 		.queue_pair_count	= aesni_gcm_pmd_qp_count,
 
-		.session_get_size	= aesni_gcm_pmd_session_get_size,
-		.session_configure	= aesni_gcm_pmd_session_configure,
-		.session_clear		= aesni_gcm_pmd_session_clear
+		.sym_session_get_size	= aesni_gcm_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_gcm_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_gcm_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_gcm_pmd_ops = &aesni_gcm_pmd_ops;
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 17ac43f0f..85b37cda5 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -458,7 +458,7 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct aesni_mb_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -480,8 +480,8 @@ get_session(struct aesni_mb_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
@@ -658,7 +658,7 @@ static inline struct rte_crypto_op *
 post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
 {
 	struct rte_crypto_op *op = (struct rte_crypto_op *)job->user_data;
-	struct aesni_mb_session *sess = get_session_private_data(
+	struct aesni_mb_session *sess = get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
 
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 b806c4d52..fa3e96316 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -518,14 +518,14 @@ aesni_mb_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni multi-buffer session structure */
 static unsigned
-aesni_mb_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+aesni_mb_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct aesni_mb_session);
 }
 
 /** Configure a aesni multi-buffer session from a crypto xform chain */
 static int
-aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -555,7 +555,7 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -563,17 +563,17 @@ aesni_mb_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-aesni_mb_pmd_session_clear(struct rte_cryptodev *dev,
+aesni_mb_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct aesni_mb_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -593,9 +593,9 @@ struct rte_cryptodev_ops aesni_mb_pmd_ops = {
 		.queue_pair_release	= aesni_mb_pmd_qp_release,
 		.queue_pair_count	= aesni_mb_pmd_qp_count,
 
-		.session_get_size	= aesni_mb_pmd_session_get_size,
-		.session_configure	= aesni_mb_pmd_session_configure,
-		.session_clear		= aesni_mb_pmd_session_clear
+		.sym_session_get_size	= aesni_mb_pmd_sym_session_get_size,
+		.sym_session_configure	= aesni_mb_pmd_sym_session_configure,
+		.sym_session_clear	= aesni_mb_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops = &aesni_mb_pmd_ops;
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index db0d8a2a9..9d15fee53 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -502,7 +502,7 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 		/* get existing session */
 		if (likely(op->sym->session != NULL)) {
 			sess = (struct armv8_crypto_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 		}
@@ -526,8 +526,8 @@ get_session(struct armv8_crypto_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
index 5e8a5a292..ae03117ea 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c
@@ -267,14 +267,14 @@ armv8_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-armv8_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+armv8_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct armv8_crypto_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -302,7 +302,7 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -310,17 +310,17 @@ armv8_crypto_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-armv8_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+armv8_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct armv8_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -340,9 +340,9 @@ struct rte_cryptodev_ops armv8_crypto_pmd_ops = {
 		.queue_pair_release	= armv8_crypto_pmd_qp_release,
 		.queue_pair_count	= armv8_crypto_pmd_qp_count,
 
-		.session_get_size	= armv8_crypto_pmd_session_get_size,
-		.session_configure	= armv8_crypto_pmd_session_configure,
-		.session_clear		= armv8_crypto_pmd_session_clear
+		.sym_session_get_size	= armv8_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= armv8_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= armv8_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_armv8_crypto_pmd_ops = &armv8_crypto_pmd_ops;
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 3ce0f39f3..19ae9153d 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1566,7 +1566,7 @@ ccp_perform_hmac(struct rte_crypto_op *op,
 	void *append_ptr;
 	uint8_t *addr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 	addr = session->auth.pre_compute;
@@ -1739,7 +1739,7 @@ ccp_perform_sha(struct rte_crypto_op *op,
 	void *append_ptr;
 	uint64_t auth_msg_bits;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -1828,7 +1828,7 @@ ccp_perform_sha3_hmac(struct rte_crypto_op *op,
 	uint32_t tail;
 	phys_addr_t src_addr, dest_addr, ctx_paddr, dest_addr_t;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -1968,7 +1968,7 @@ ccp_perform_sha3(struct rte_crypto_op *op,
 	uint32_t tail;
 	phys_addr_t src_addr, dest_addr, ctx_paddr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2036,7 +2036,7 @@ ccp_perform_aes_cmac(struct rte_crypto_op *op,
 	phys_addr_t src_addr, dest_addr, key_addr;
 	int length, non_align_len;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 	key_addr = rte_mem_virt2phy(session->auth.key_ccp);
@@ -2188,7 +2188,7 @@ ccp_perform_aes(struct rte_crypto_op *op,
 	phys_addr_t src_addr, dest_addr, key_addr;
 	uint8_t *iv;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 	function.raw = 0;
@@ -2276,7 +2276,7 @@ ccp_perform_3des(struct rte_crypto_op *op,
 	uint8_t *iv;
 	phys_addr_t src_addr, dest_addr, key_addr;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2379,7 +2379,7 @@ ccp_perform_aes_gcm(struct rte_crypto_op *op, struct ccp_queue *cmd_q)
 	phys_addr_t digest_dest_addr;
 	int length, non_align_len;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 	iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->iv.offset);
@@ -2546,7 +2546,7 @@ ccp_crypto_cipher(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					 ccp_cryptodev_driver_id);
 
@@ -2584,7 +2584,7 @@ ccp_crypto_auth(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2654,7 +2654,7 @@ ccp_crypto_aead(struct rte_crypto_op *op,
 	int result = 0;
 	struct ccp_session *session;
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2711,7 +2711,7 @@ process_ops_to_enqueue(struct ccp_qp *qp,
 	b_info->head_offset = (uint32_t)(cmd_q->qbase_phys_addr + cmd_q->qidx *
 					 Q_DESC_SIZE);
 	for (i = 0; i < nb_ops; i++) {
-		session = (struct ccp_session *)get_session_private_data(
+		session = (struct ccp_session *)get_sym_session_private_data(
 						 op[i]->sym->session,
 						 ccp_cryptodev_driver_id);
 		switch (session->cmd_id) {
@@ -2787,7 +2787,7 @@ static inline void ccp_auth_dq_prepare(struct rte_crypto_op *op)
 	int offset, digest_offset;
 	uint8_t digest_le[64];
 
-	session = (struct ccp_session *)get_session_private_data(
+	session = (struct ccp_session *)get_sym_session_private_data(
 					 op->sym->session,
 					ccp_cryptodev_driver_id);
 
@@ -2863,7 +2863,7 @@ ccp_prepare_ops(struct ccp_qp *qp,
 
 	for (i = 0; i < min_ops; i++) {
 		op_d[i] = b_info->op[b_info->op_idx++];
-		session = (struct ccp_session *)get_session_private_data(
+		session = (struct ccp_session *)get_sym_session_private_data(
 						 op_d[i]->sym->session,
 						ccp_cryptodev_driver_id);
 		switch (session->cmd_id) {
diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c
index 1cb944406..6984913f1 100644
--- a/drivers/crypto/ccp/ccp_pmd_ops.c
+++ b/drivers/crypto/ccp/ccp_pmd_ops.c
@@ -755,13 +755,13 @@ ccp_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static unsigned
-ccp_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+ccp_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct ccp_session);
 }
 
 static int
-ccp_pmd_session_configure(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_configure(struct rte_cryptodev *dev,
 			  struct rte_crypto_sym_xform *xform,
 			  struct rte_cryptodev_sym_session *sess,
 			  struct rte_mempool *mempool)
@@ -788,25 +788,25 @@ ccp_pmd_session_configure(struct rte_cryptodev *dev,
 		rte_mempool_put(mempool, sess_private_data);
 		return ret;
 	}
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 				 sess_private_data);
 
 	return 0;
 }
 
 static void
-ccp_pmd_session_clear(struct rte_cryptodev *dev,
+ccp_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		      struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	if (sess_priv) {
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
 		rte_mempool_put(sess_mp, sess_priv);
 		memset(sess_priv, 0, sizeof(struct ccp_session));
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 	}
 }
 
@@ -825,9 +825,9 @@ struct rte_cryptodev_ops ccp_ops = {
 		.queue_pair_release	= ccp_pmd_qp_release,
 		.queue_pair_count	= ccp_pmd_qp_count,
 
-		.session_get_size	= ccp_pmd_session_get_size,
-		.session_configure	= ccp_pmd_session_configure,
-		.session_clear		= ccp_pmd_session_clear,
+		.sym_session_get_size	= ccp_pmd_sym_session_get_size,
+		.sym_session_configure	= ccp_pmd_sym_session_configure,
+		.sym_session_clear	= ccp_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *ccp_pmd_ops = &ccp_ops;
diff --git a/drivers/crypto/ccp/rte_ccp_pmd.c b/drivers/crypto/ccp/rte_ccp_pmd.c
index d70640f6d..92d8a9559 100644
--- a/drivers/crypto/ccp/rte_ccp_pmd.c
+++ b/drivers/crypto/ccp/rte_ccp_pmd.c
@@ -160,7 +160,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
 			return NULL;
 
 		sess = (struct ccp_session *)
-			get_session_private_data(
+			get_sym_session_private_data(
 				op->sym->session,
 				ccp_cryptodev_driver_id);
 	} else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS) {
@@ -183,7 +183,7 @@ get_ccp_session(struct ccp_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session,
+		set_sym_session_private_data(op->sym->session,
 					 ccp_cryptodev_driver_id,
 					 _sess_private_data);
 	}
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 51c786154..d769a9c63 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1080,7 +1080,7 @@ build_sec_fd(struct rte_crypto_op *op,
 	PMD_INIT_FUNC_TRACE();
 
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
-		sess = (dpaa2_sec_session *)get_session_private_data(
+		sess = (dpaa2_sec_session *)get_sym_session_private_data(
 				op->sym->session, cryptodev_driver_id);
 	else if (op->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION)
 		sess = (dpaa2_sec_session *)get_sec_session_private_data(
@@ -1481,7 +1481,7 @@ dpaa2_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the aesni gcm session structure */
 static unsigned int
-dpaa2_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa2_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -2436,7 +2436,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused,
 }
 
 static int
-dpaa2_sec_session_configure(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -2457,7 +2457,7 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -2465,12 +2465,12 @@ dpaa2_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa2_sec_session_clear(struct rte_cryptodev *dev,
+dpaa2_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	PMD_INIT_FUNC_TRACE();
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 	dpaa2_sec_session *s = (dpaa2_sec_session *)sess_priv;
 
 	if (sess_priv) {
@@ -2479,7 +2479,7 @@ dpaa2_sec_session_clear(struct rte_cryptodev *dev,
 		rte_free(s->auth_key.data);
 		memset(sess, 0, sizeof(dpaa2_sec_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -2697,9 +2697,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa2_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa2_sec_queue_pair_release,
 	.queue_pair_count     = dpaa2_sec_queue_pair_count,
-	.session_get_size     = dpaa2_sec_session_get_size,
-	.session_configure    = dpaa2_sec_session_configure,
-	.session_clear        = dpaa2_sec_session_clear,
+	.sym_session_get_size     = dpaa2_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa2_sec_sym_session_configure,
+	.sym_session_clear        = dpaa2_sec_sym_session_clear,
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index a83dd1801..c00197e4a 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1416,7 +1416,7 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
 			switch (op->sess_type) {
 			case RTE_CRYPTO_OP_WITH_SESSION:
 				ses = (dpaa_sec_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 							op->sym->session,
 							cryptodev_driver_id);
 				break;
@@ -1596,7 +1596,7 @@ dpaa_sec_queue_pair_count(struct rte_cryptodev *dev)
 
 /** Returns the size of session structure */
 static unsigned int
-dpaa_sec_session_get_size(struct rte_cryptodev *dev __rte_unused)
+dpaa_sec_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	PMD_INIT_FUNC_TRACE();
 
@@ -1811,7 +1811,7 @@ dpaa_sec_set_session_parameters(struct rte_cryptodev *dev,
 }
 
 static int
-dpaa_sec_session_configure(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_configure(struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -1835,7 +1835,7 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 
@@ -1844,12 +1844,12 @@ dpaa_sec_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-dpaa_sec_session_clear(struct rte_cryptodev *dev,
+dpaa_sec_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct dpaa_sec_dev_private *qi = dev->data->dev_private;
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1863,7 +1863,7 @@ dpaa_sec_session_clear(struct rte_cryptodev *dev,
 		rte_free(s->cipher_key.data);
 		rte_free(s->auth_key.data);
 		memset(s, 0, sizeof(dpaa_sec_session));
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -2180,9 +2180,9 @@ static struct rte_cryptodev_ops crypto_ops = {
 	.queue_pair_setup     = dpaa_sec_queue_pair_setup,
 	.queue_pair_release   = dpaa_sec_queue_pair_release,
 	.queue_pair_count     = dpaa_sec_queue_pair_count,
-	.session_get_size     = dpaa_sec_session_get_size,
-	.session_configure    = dpaa_sec_session_configure,
-	.session_clear        = dpaa_sec_session_clear
+	.sym_session_get_size     = dpaa_sec_sym_session_get_size,
+	.sym_session_configure    = dpaa_sec_sym_session_configure,
+	.sym_session_clear        = dpaa_sec_sym_session_clear
 };
 
 static const struct rte_security_capability *
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index 9eb43b2eb..5c9d54b1f 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -135,7 +135,7 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct kasumi_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -157,8 +157,8 @@ kasumi_get_session(struct kasumi_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
index c7556d478..9e4bf1b52 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
@@ -238,14 +238,14 @@ kasumi_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the KASUMI session structure */
 static unsigned
-kasumi_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+kasumi_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct kasumi_session);
 }
 
 /** Configure a KASUMI session from a crypto xform chain */
 static int
-kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+kasumi_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -273,7 +273,7 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -281,17 +281,17 @@ kasumi_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-kasumi_pmd_session_clear(struct rte_cryptodev *dev,
+kasumi_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct kasumi_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -311,9 +311,9 @@ struct rte_cryptodev_ops kasumi_pmd_ops = {
 		.queue_pair_release = kasumi_pmd_qp_release,
 		.queue_pair_count   = kasumi_pmd_qp_count,
 
-		.session_get_size   = kasumi_pmd_session_get_size,
-		.session_configure  = kasumi_pmd_session_configure,
-		.session_clear      = kasumi_pmd_session_clear
+		.sym_session_get_size   = kasumi_pmd_sym_session_get_size,
+		.sym_session_configure  = kasumi_pmd_sym_session_configure,
+		.sym_session_clear      = kasumi_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_kasumi_pmd_ops = &kasumi_pmd_ops;
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
index a7f5389ee..73eff7573 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
@@ -447,7 +447,7 @@ mrvl_request_prepare(struct sam_cio_op_params *request,
 		return -EINVAL;
 	}
 
-	sess = (struct mrvl_crypto_session *)get_session_private_data(
+	sess = (struct mrvl_crypto_session *)get_sym_session_private_data(
 			op->sym->session, cryptodev_driver_id);
 	if (unlikely(sess == NULL)) {
 		MRVL_CRYPTO_LOG_ERR("Session was not created for this device");
diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
index f83a6115f..c045562ca 100644
--- a/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
+++ b/drivers/crypto/mvsam/rte_mrvl_pmd_ops.c
@@ -612,7 +612,7 @@ mrvl_crypto_pmd_qp_count(struct rte_cryptodev *dev)
  * @returns Size of Marvell crypto session.
  */
 static unsigned
-mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
+mrvl_crypto_pmd_sym_session_get_size(__rte_unused struct rte_cryptodev *dev)
 {
 	return sizeof(struct mrvl_crypto_session);
 }
@@ -625,7 +625,7 @@ mrvl_crypto_pmd_session_get_size(__rte_unused struct rte_cryptodev *dev)
  * @returns 0 upon success, negative value otherwise.
  */
 static int
-mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_configure(__rte_unused struct rte_cryptodev *dev,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -653,7 +653,7 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id, sess_private_data);
+	set_sym_session_private_data(sess, dev->driver_id, sess_private_data);
 
 	mrvl_sess = (struct mrvl_crypto_session *)sess_private_data;
 	if (sam_session_create(&mrvl_sess->sam_sess_params,
@@ -672,12 +672,12 @@ mrvl_crypto_pmd_session_configure(__rte_unused struct rte_cryptodev *dev,
  * @returns 0. Always.
  */
 static void
-mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+mrvl_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
@@ -691,7 +691,7 @@ mrvl_crypto_pmd_session_clear(struct rte_cryptodev *dev,
 
 		memset(sess, 0, sizeof(struct mrvl_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -714,9 +714,9 @@ static struct rte_cryptodev_ops mrvl_crypto_pmd_ops = {
 		.queue_pair_release	= mrvl_crypto_pmd_qp_release,
 		.queue_pair_count	= mrvl_crypto_pmd_qp_count,
 
-		.session_get_size	= mrvl_crypto_pmd_session_get_size,
-		.session_configure	= mrvl_crypto_pmd_session_configure,
-		.session_clear		= mrvl_crypto_pmd_session_clear
+		.sym_session_get_size	= mrvl_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= mrvl_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= mrvl_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops = &mrvl_crypto_pmd_ops;
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 3d7caf1f1..fca8e3598 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -78,7 +78,7 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(sym_op->session != NULL))
 			sess = (struct null_crypto_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					sym_op->session, cryptodev_driver_id);
 	} else {
 		void *_sess = NULL;
@@ -99,8 +99,8 @@ get_session(struct null_crypto_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		sym_op->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(sym_op->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	return sess;
diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c
index 66bd62bd3..bb2b6e144 100644
--- a/drivers/crypto/null/null_crypto_pmd_ops.c
+++ b/drivers/crypto/null/null_crypto_pmd_ops.c
@@ -250,14 +250,14 @@ null_crypto_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the NULL crypto session structure */
 static unsigned
-null_crypto_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+null_crypto_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct null_crypto_session);
 }
 
 /** Configure a null crypto session from a crypto xform chain */
 static int
-null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+null_crypto_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mp)
@@ -285,7 +285,7 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -293,17 +293,17 @@ null_crypto_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-null_crypto_pmd_session_clear(struct rte_cryptodev *dev,
+null_crypto_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct null_crypto_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -323,9 +323,9 @@ struct rte_cryptodev_ops pmd_ops = {
 		.queue_pair_release	= null_crypto_pmd_qp_release,
 		.queue_pair_count	= null_crypto_pmd_qp_count,
 
-		.session_get_size	= null_crypto_pmd_session_get_size,
-		.session_configure	= null_crypto_pmd_session_configure,
-		.session_clear		= null_crypto_pmd_session_clear
+		.sym_session_get_size	= null_crypto_pmd_sym_session_get_size,
+		.sym_session_configure	= null_crypto_pmd_sym_session_configure,
+		.sym_session_clear	= null_crypto_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *null_crypto_pmd_ops = &pmd_ops;
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 2cbe9401f..5228b9229 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -736,7 +736,7 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 		/* get existing session */
 		if (likely(op->sym->session != NULL))
 			sess = (struct openssl_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -759,8 +759,8 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (sess == NULL)
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 20d4e26de..533568556 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -657,14 +657,14 @@ openssl_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the session structure */
 static unsigned
-openssl_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+openssl_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct openssl_session);
 }
 
 /** Configure the session from a crypto xform chain */
 static int
-openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+openssl_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -692,7 +692,7 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 			sess_private_data);
 
 	return 0;
@@ -701,18 +701,18 @@ openssl_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-openssl_pmd_session_clear(struct rte_cryptodev *dev,
+openssl_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		openssl_reset_session(sess_priv);
 		memset(sess_priv, 0, sizeof(struct openssl_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -732,9 +732,9 @@ struct rte_cryptodev_ops openssl_pmd_ops = {
 		.queue_pair_release	= openssl_pmd_qp_release,
 		.queue_pair_count	= openssl_pmd_qp_count,
 
-		.session_get_size	= openssl_pmd_session_get_size,
-		.session_configure	= openssl_pmd_session_configure,
-		.session_clear		= openssl_pmd_session_clear
+		.sym_session_get_size	= openssl_pmd_sym_session_get_size,
+		.sym_session_configure	= openssl_pmd_sym_session_configure,
+		.sym_session_clear	= openssl_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_openssl_pmd_ops = &openssl_pmd_ops;
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 17d63eb1e..aa6eeb0c0 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -174,7 +174,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		return -EINVAL;
 	}
 
-	ctx = (struct qat_sym_session *)get_session_private_data(
+	ctx = (struct qat_sym_session *)get_sym_session_private_data(
 			op->sym->session, cryptodev_qat_driver_id);
 
 	if (unlikely(ctx == NULL)) {
diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h
index d425892f4..e4e1ae89c 100644
--- a/drivers/crypto/qat/qat_sym.h
+++ b/drivers/crypto/qat/qat_sym.h
@@ -143,7 +143,7 @@ qat_sym_process_response(void **op, uint8_t *resp)
 		rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
 	} else {
 		struct qat_sym_session *sess = (struct qat_sym_session *)
-						get_session_private_data(
+						get_sym_session_private_data(
 						rx_op->sym->session,
 						cryptodev_qat_driver_id);
 
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index c9fc1a805..96f442e80 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -205,9 +205,9 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 		.queue_pair_count	= NULL,
 
 		/* Crypto related operations */
-		.session_get_size	= qat_sym_session_get_private_size,
-		.session_configure	= qat_sym_session_configure,
-		.session_clear		= qat_sym_session_clear
+		.sym_session_get_size	= qat_sym_session_get_private_size,
+		.sym_session_configure	= qat_sym_session_configure,
+		.sym_session_clear	= qat_sym_session_clear
 };
 
 static uint16_t
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index dc1c20044..4d975ae07 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -112,7 +112,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 	struct qat_sym_session *s = (struct qat_sym_session *)sess_priv;
 
 	if (sess_priv) {
@@ -121,7 +121,7 @@ qat_sym_session_clear(struct rte_cryptodev *dev,
 		memset(s, 0, qat_sym_session_get_private_size(dev));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
 
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -396,7 +396,7 @@ qat_sym_session_configure(struct rte_cryptodev *dev,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
diff --git a/drivers/crypto/scheduler/scheduler_pmd_ops.c b/drivers/crypto/scheduler/scheduler_pmd_ops.c
index 9b2f99eb2..a74216ad7 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_ops.c
+++ b/drivers/crypto/scheduler/scheduler_pmd_ops.c
@@ -447,7 +447,7 @@ scheduler_pmd_qp_count(struct rte_cryptodev *dev)
 }
 
 static uint32_t
-scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+scheduler_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
 	uint8_t i = 0;
@@ -457,7 +457,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 	for (i = 0; i < sched_ctx->nb_slaves; i++) {
 		uint8_t slave_dev_id = sched_ctx->slaves[i].dev_id;
 		struct rte_cryptodev *dev = &rte_cryptodevs[slave_dev_id];
-		uint32_t priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+		uint32_t priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 		if (max_priv_sess_size < priv_sess_size)
 			max_priv_sess_size = priv_sess_size;
@@ -467,7 +467,7 @@ scheduler_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
 }
 
 static int
-scheduler_pmd_session_configure(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_configure(struct rte_cryptodev *dev,
 	struct rte_crypto_sym_xform *xform,
 	struct rte_cryptodev_sym_session *sess,
 	struct rte_mempool *mempool)
@@ -492,7 +492,7 @@ scheduler_pmd_session_configure(struct rte_cryptodev *dev,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-scheduler_pmd_session_clear(struct rte_cryptodev *dev,
+scheduler_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	struct scheduler_ctx *sched_ctx = dev->data->dev_private;
@@ -521,9 +521,9 @@ struct rte_cryptodev_ops scheduler_pmd_ops = {
 		.queue_pair_release	= scheduler_pmd_qp_release,
 		.queue_pair_count	= scheduler_pmd_qp_count,
 
-		.session_get_size	= scheduler_pmd_session_get_size,
-		.session_configure	= scheduler_pmd_session_configure,
-		.session_clear		= scheduler_pmd_session_clear,
+		.sym_session_get_size	= scheduler_pmd_sym_session_get_size,
+		.sym_session_configure	= scheduler_pmd_sym_session_configure,
+		.sym_session_clear	= scheduler_pmd_sym_session_clear,
 };
 
 struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops = &scheduler_pmd_ops;
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 7db5d4064..c8170cd76 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -137,7 +137,7 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
 			sess = (struct snow3g_session *)
-					get_session_private_data(
+					get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -159,8 +159,8 @@ snow3g_get_session(struct snow3g_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
index 26c84b652..cfbc9522a 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
@@ -240,14 +240,14 @@ snow3g_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the SNOW 3G session structure */
 static unsigned
-snow3g_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+snow3g_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct snow3g_session);
 }
 
 /** Configure a SNOW 3G session from a crypto xform chain */
 static int
-snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+snow3g_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -275,7 +275,7 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -283,17 +283,17 @@ snow3g_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-snow3g_pmd_session_clear(struct rte_cryptodev *dev,
+snow3g_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct snow3g_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -313,9 +313,9 @@ struct rte_cryptodev_ops snow3g_pmd_ops = {
 		.queue_pair_release = snow3g_pmd_qp_release,
 		.queue_pair_count   = snow3g_pmd_qp_count,
 
-		.session_get_size   = snow3g_pmd_session_get_size,
-		.session_configure  = snow3g_pmd_session_configure,
-		.session_clear      = snow3g_pmd_session_clear
+		.sym_session_get_size   = snow3g_pmd_sym_session_get_size,
+		.sym_session_configure  = snow3g_pmd_sym_session_configure,
+		.sym_session_clear      = snow3g_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_snow3g_pmd_ops = &snow3g_pmd_ops;
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index be6d5d7dc..5cadfcbfa 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -518,9 +518,9 @@ static struct rte_cryptodev_ops virtio_crypto_dev_ops = {
 	.queue_pair_count                = NULL,
 
 	/* Crypto related operations */
-	.session_get_size	= virtio_crypto_sym_get_session_private_size,
-	.session_configure	= virtio_crypto_sym_configure_session,
-	.session_clear		= virtio_crypto_sym_clear_session
+	.sym_session_get_size		= virtio_crypto_sym_get_session_private_size,
+	.sym_session_configure		= virtio_crypto_sym_configure_session,
+	.sym_session_clear		= virtio_crypto_sym_clear_session
 };
 
 static void
@@ -958,7 +958,7 @@ virtio_crypto_sym_clear_session(
 
 	hw = dev->data->dev_private;
 	vq = hw->cvq;
-	session = (struct virtio_crypto_session *)get_session_private_data(
+	session = (struct virtio_crypto_session *)get_sym_session_private_data(
 		sess, cryptodev_virtio_driver_id);
 	if (session == NULL) {
 		VIRTIO_CRYPTO_SESSION_LOG_ERR("Invalid session parameter");
@@ -1392,7 +1392,7 @@ virtio_crypto_sym_configure_session(
 		goto error_out;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		session_private);
 
 	return 0;
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index 4f695f3e6..e32a1ecd6 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -207,7 +207,7 @@ virtqueue_crypto_sym_enqueue_xmit(
 			sizeof(struct vring_desc) * NUM_ENTRY_VIRTIO_CRYPTO_OP;
 	struct rte_crypto_sym_op *sym_op = cop->sym;
 	struct virtio_crypto_session *session =
-		(struct virtio_crypto_session *)get_session_private_data(
+		(struct virtio_crypto_session *)get_sym_session_private_data(
 		cop->sym->session, cryptodev_virtio_driver_id);
 	struct virtio_crypto_op_data_req *op_data_req;
 	uint32_t hash_result_len = 0;
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 8de5c27db..74cf49856 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -134,7 +134,7 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 
 	if (op->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
 		if (likely(op->sym->session != NULL))
-			sess = (struct zuc_session *)get_session_private_data(
+			sess = (struct zuc_session *)get_sym_session_private_data(
 					op->sym->session,
 					cryptodev_driver_id);
 	} else {
@@ -156,8 +156,8 @@ zuc_get_session(struct zuc_qp *qp, struct rte_crypto_op *op)
 			sess = NULL;
 		}
 		op->sym->session = (struct rte_cryptodev_sym_session *)_sess;
-		set_session_private_data(op->sym->session, cryptodev_driver_id,
-			_sess_private_data);
+		set_sym_session_private_data(op->sym->session,
+				cryptodev_driver_id, _sess_private_data);
 	}
 
 	if (unlikely(sess == NULL))
diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
index 1d72a0757..6da396542 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c
@@ -240,14 +240,14 @@ zuc_pmd_qp_count(struct rte_cryptodev *dev)
 
 /** Returns the size of the ZUC session structure */
 static unsigned
-zuc_pmd_session_get_size(struct rte_cryptodev *dev __rte_unused)
+zuc_pmd_sym_session_get_size(struct rte_cryptodev *dev __rte_unused)
 {
 	return sizeof(struct zuc_session);
 }
 
 /** Configure a ZUC session from a crypto xform chain */
 static int
-zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
+zuc_pmd_sym_session_configure(struct rte_cryptodev *dev __rte_unused,
 		struct rte_crypto_sym_xform *xform,
 		struct rte_cryptodev_sym_session *sess,
 		struct rte_mempool *mempool)
@@ -276,7 +276,7 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 		return ret;
 	}
 
-	set_session_private_data(sess, dev->driver_id,
+	set_sym_session_private_data(sess, dev->driver_id,
 		sess_private_data);
 
 	return 0;
@@ -284,17 +284,17 @@ zuc_pmd_session_configure(struct rte_cryptodev *dev __rte_unused,
 
 /** Clear the memory of session so it doesn't leave key material behind */
 static void
-zuc_pmd_session_clear(struct rte_cryptodev *dev,
+zuc_pmd_sym_session_clear(struct rte_cryptodev *dev,
 		struct rte_cryptodev_sym_session *sess)
 {
 	uint8_t index = dev->driver_id;
-	void *sess_priv = get_session_private_data(sess, index);
+	void *sess_priv = get_sym_session_private_data(sess, index);
 
 	/* Zero out the whole structure */
 	if (sess_priv) {
 		memset(sess_priv, 0, sizeof(struct zuc_session));
 		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
-		set_session_private_data(sess, index, NULL);
+		set_sym_session_private_data(sess, index, NULL);
 		rte_mempool_put(sess_mp, sess_priv);
 	}
 }
@@ -314,9 +314,9 @@ struct rte_cryptodev_ops zuc_pmd_ops = {
 		.queue_pair_release = zuc_pmd_qp_release,
 		.queue_pair_count   = zuc_pmd_qp_count,
 
-		.session_get_size   = zuc_pmd_session_get_size,
-		.session_configure  = zuc_pmd_session_configure,
-		.session_clear      = zuc_pmd_session_clear
+		.sym_session_get_size   = zuc_pmd_sym_session_get_size,
+		.sym_session_configure  = zuc_pmd_sym_session_configure,
+		.sym_session_clear      = zuc_pmd_sym_session_clear
 };
 
 struct rte_cryptodev_ops *rte_zuc_pmd_ops = &zuc_pmd_ops;
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 745ea1cac..9292f93bb 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1064,7 +1064,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 	index = dev->driver_id;
 
 	if (sess->sess_private_data[index] == NULL) {
-		ret = dev->dev_ops->session_configure(dev, xforms, sess, mp);
+		ret = dev->dev_ops->sym_session_configure(dev, xforms,
+							sess, mp);
 		if (ret < 0) {
 			CDEV_LOG_ERR(
 				"dev_id %d failed to configure session details",
@@ -1106,7 +1107,7 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
-	dev->dev_ops->session_clear(dev, sess);
+	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
 }
@@ -1123,7 +1124,7 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess)
 
 	/* Check that all device private data has been freed */
 	for (i = 0; i < nb_drivers; i++) {
-		sess_priv = get_session_private_data(sess, i);
+		sess_priv = get_sym_session_private_data(sess, i);
 		if (sess_priv != NULL)
 			return -EBUSY;
 	}
@@ -1158,10 +1159,10 @@ rte_cryptodev_sym_get_private_session_size(uint8_t dev_id)
 
 	dev = rte_cryptodev_pmd_get_dev(dev_id);
 
-	if (*dev->dev_ops->session_get_size == NULL)
+	if (*dev->dev_ops->sym_session_get_size == NULL)
 		return 0;
 
-	priv_sess_size = (*dev->dev_ops->session_get_size)(dev);
+	priv_sess_size = (*dev->dev_ops->sym_session_get_size)(dev);
 
 	/*
 	 * If size is less than session header size,
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index ec4f1ecfb..ac6a1c4f7 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -299,11 +299,11 @@ struct rte_cryptodev_ops {
 	cryptodev_queue_pair_count_t queue_pair_count;
 	/**< Get count of the queue pairs. */
 
-	cryptodev_sym_get_session_private_size_t session_get_size;
+	cryptodev_sym_get_session_private_size_t sym_session_get_size;
 	/**< Return private session. */
-	cryptodev_sym_configure_session_t session_configure;
+	cryptodev_sym_configure_session_t sym_session_configure;
 	/**< Configure a Crypto session. */
-	cryptodev_sym_free_session_t session_clear;
+	cryptodev_sym_free_session_t sym_session_clear;
 	/**< Clear a Crypto sessions private data. */
 };
 
@@ -436,13 +436,13 @@ static void init_ ##driver_id(void)\
 }
 
 static inline void *
-get_session_private_data(const struct rte_cryptodev_sym_session *sess,
+get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id) {
 	return sess->sess_private_data[driver_id];
 }
 
 static inline void
-set_session_private_data(struct rte_cryptodev_sym_session *sess,
+set_sym_session_private_data(struct rte_cryptodev_sym_session *sess,
 		uint8_t driver_id, void *private_data)
 {
 	sess->sess_private_data[driver_id] = private_data;
-- 
2.14.4

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

* [dpdk-dev] [PATCH v6 16/16] cryptodev: check if symmetric sessions are supported
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (14 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
@ 2018-07-10  0:36   ` Pablo de Lara
  2018-07-10 11:00   ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes De Lara Guarch, Pablo
  16 siblings, 0 replies; 135+ messages in thread
From: Pablo de Lara @ 2018-07-10  0:36 UTC (permalink / raw)
  To: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev, Pablo de Lara

Since asymmetric functionality will be implemented soon,
not all PMDs must support symmetric sessions.
Therefore, a check is added if a device does not implement
the symmetric functions, meaning that the device does not
support symmetric operations.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 4 ++++
 lib/librte_cryptodev/rte_cryptodev.h | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 9292f93bb..0b20f3f70 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -1063,6 +1063,8 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
 
 	index = dev->driver_id;
 
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_configure, -ENOTSUP);
+
 	if (sess->sess_private_data[index] == NULL) {
 		ret = dev->dev_ops->sym_session_configure(dev, xforms,
 							sess, mp);
@@ -1107,6 +1109,8 @@ rte_cryptodev_sym_session_clear(uint8_t dev_id,
 	if (dev == NULL || sess == NULL)
 		return -EINVAL;
 
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->sym_session_clear, -ENOTSUP);
+
 	dev->dev_ops->sym_session_clear(dev, sess);
 
 	return 0;
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index 8fd304524..94d4b2684 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -891,7 +891,8 @@ rte_cryptodev_sym_session_free(struct rte_cryptodev_sym_session *sess);
  * @return
  *  - On success, zero.
  *  - -EINVAL if input parameters are invalid.
- *  - -ENOTSUP if crypto device does not support the crypto transform.
+ *  - -ENOTSUP if crypto device does not support the crypto transform or
+ *    does not support symmetric operations.
  *  - -ENOMEM if the private session could not be allocated.
  */
 int
@@ -912,6 +913,7 @@ rte_cryptodev_sym_session_init(uint8_t dev_id,
  * @return
  *  - 0 if successful.
  *  - -EINVAL if device is invalid or session is NULL.
+ *  - -ENOTSUP if crypto device does not support symmetric operations.
  */
 int
 rte_cryptodev_sym_session_clear(uint8_t dev_id,
-- 
2.14.4

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

* Re: [dpdk-dev] [PATCH v6 09/16] cryptodev: remove max number of sessions parameter
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
@ 2018-07-10  8:46     ` Akhil Goyal
  0 siblings, 0 replies; 135+ messages in thread
From: Akhil Goyal @ 2018-07-10  8:46 UTC (permalink / raw)
  To: Pablo de Lara, declan.doherty, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou
  Cc: dev

On 7/10/2018 6:06 AM, Pablo de Lara wrote:

> Most crypto PMDs do not have a limitation
> of the number of the sessions that can be handled
> internally. The value that was set before was not
> actually used at all, since the sessions are created
> at the application level.
> Therefore, this value is not parsed from the initial
> crypto parameters anymore and it is set to 0,
> meaning that there is no actual limit.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
@ 2018-07-10 10:42     ` Tomasz Duszynski
  2018-07-10 10:45       ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 135+ messages in thread
From: Tomasz Duszynski @ 2018-07-10 10:42 UTC (permalink / raw)
  To: Pablo de Lara
  Cc: declan.doherty, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, roy.fan.zhang, fiona.trahe, tdu, jianjay.zhou, dev

Looks good.

Acked-by: Tomasz Duszynski <tdu@semihalf.com>
On Tue, Jul 10, 2018 at 01:36:14AM +0100, Pablo de Lara wrote:
> The maximum number of sessions device argument will be removed,
> as most PMDs do not have a limitation on this number.
> Therefore, the MVSAM PMD needs to parse this value internally.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  drivers/crypto/mvsam/rte_mrvl_pmd.c | 132 ++++++++++++++++++++++++++++++++----
>  1 file changed, 120 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> index 1b6029a56..a7f5389ee 100644
> --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c
> +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c
> @@ -16,8 +16,23 @@
>
>  #define MRVL_MUSDK_DMA_MEMSIZE 41943040
>
> +#define MRVL_PMD_MAX_NB_SESS_ARG		("max_nb_sessions")
> +#define MRVL_PMD_DEFAULT_MAX_NB_SESSIONS	2048
> +
>  static uint8_t cryptodev_driver_id;
>
> +struct mrvl_pmd_init_params {
> +	struct rte_cryptodev_pmd_init_params common;
> +	uint32_t max_nb_sessions;
> +};
> +
> +const char *mrvl_pmd_valid_params[] = {
> +	RTE_CRYPTODEV_PMD_NAME_ARG,
> +	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
> +	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
> +	MRVL_PMD_MAX_NB_SESS_ARG
> +};
> +
>  /**
>   * Flag if particular crypto algorithm is supported by PMD/MUSDK.
>   *
> @@ -691,14 +706,15 @@ mrvl_crypto_pmd_dequeue_burst(void *queue_pair,
>  static int
>  cryptodev_mrvl_crypto_create(const char *name,
>  		struct rte_vdev_device *vdev,
> -		struct rte_cryptodev_pmd_init_params *init_params)
> +		struct mrvl_pmd_init_params *init_params)
>  {
>  	struct rte_cryptodev *dev;
>  	struct mrvl_crypto_private *internals;
>  	struct sam_init_params	sam_params;
>  	int ret;
>
> -	dev = rte_cryptodev_pmd_create(name, &vdev->device, init_params);
> +	dev = rte_cryptodev_pmd_create(name, &vdev->device,
> +			&init_params->common);
>  	if (dev == NULL) {
>  		MRVL_CRYPTO_LOG_ERR("failed to create cryptodev vdev");
>  		goto init_error;
> @@ -718,7 +734,7 @@ cryptodev_mrvl_crypto_create(const char *name,
>  	/* Set vector instructions mode supported */
>  	internals = dev->data->dev_private;
>
> -	internals->max_nb_qpairs = init_params->max_nb_queue_pairs;
> +	internals->max_nb_qpairs = init_params->common.max_nb_queue_pairs;
>  	internals->max_nb_sessions = init_params->max_nb_sessions;
>
>  	/*
> @@ -740,12 +756,99 @@ cryptodev_mrvl_crypto_create(const char *name,
>
>  init_error:
>  	MRVL_CRYPTO_LOG_ERR(
> -		"driver %s: %s failed", init_params->name, __func__);
> +		"driver %s: %s failed", init_params->common.name, __func__);
>
>  	cryptodev_mrvl_crypto_uninit(vdev);
>  	return -EFAULT;
>  }
>
> +/** Parse integer from integer argument */
> +static int
> +parse_integer_arg(const char *key __rte_unused,
> +		const char *value, void *extra_args)
> +{
> +	int *i = (int *) extra_args;
> +
> +	*i = atoi(value);
> +	if (*i < 0) {
> +		MRVL_CRYPTO_LOG_ERR("Argument has to be positive.\n");
> +		return -EINVAL;
> +	}
> +
> +	return 0;
> +}
> +
> +/** Parse name */
> +static int
> +parse_name_arg(const char *key __rte_unused,
> +		const char *value, void *extra_args)
> +{
> +	struct rte_cryptodev_pmd_init_params *params = extra_args;
> +
> +	if (strlen(value) >= RTE_CRYPTODEV_NAME_MAX_LEN - 1) {
> +		MRVL_CRYPTO_LOG_ERR("Invalid name %s, should be less than "
> +				"%u bytes.\n", value,
> +				RTE_CRYPTODEV_NAME_MAX_LEN - 1);
> +		return -EINVAL;
> +	}
> +
> +	strncpy(params->name, value, RTE_CRYPTODEV_NAME_MAX_LEN);
> +
> +	return 0;
> +}
> +
> +static int
> +mrvl_pmd_parse_input_args(struct mrvl_pmd_init_params *params,
> +			 const char *input_args)
> +{
> +	struct rte_kvargs *kvlist = NULL;
> +	int ret = 0;
> +
> +	if (params == NULL)
> +		return -EINVAL;
> +
> +	if (input_args) {
> +		kvlist = rte_kvargs_parse(input_args,
> +					  mrvl_pmd_valid_params);
> +		if (kvlist == NULL)
> +			return -1;
> +
> +		/* Common VDEV parameters */
> +		ret = rte_kvargs_process(kvlist,
> +					 RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
> +					 &parse_integer_arg,
> +					 &params->common.max_nb_queue_pairs);
> +		if (ret < 0)
> +			goto free_kvlist;
> +
> +		ret = rte_kvargs_process(kvlist,
> +					 RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
> +					 &parse_integer_arg,
> +					 &params->common.socket_id);
> +		if (ret < 0)
> +			goto free_kvlist;
> +
> +		ret = rte_kvargs_process(kvlist,
> +					 RTE_CRYPTODEV_PMD_NAME_ARG,
> +					 &parse_name_arg,
> +					 &params->common);
> +		if (ret < 0)
> +			goto free_kvlist;
> +
> +		ret = rte_kvargs_process(kvlist,
> +					 MRVL_PMD_MAX_NB_SESS_ARG,
> +					 &parse_integer_arg,
> +					 params);
> +		if (ret < 0)
> +			goto free_kvlist;
> +
> +	}
> +
> +free_kvlist:
> +	rte_kvargs_free(kvlist);
> +	return ret;
> +}
> +
>  /**
>   * Initialize the crypto device.
>   *
> @@ -755,7 +858,18 @@ cryptodev_mrvl_crypto_create(const char *name,
>  static int
>  cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
>  {
> -	struct rte_cryptodev_pmd_init_params init_params = { };
> +	struct mrvl_pmd_init_params init_params = {
> +		.common = {
> +			.name = "",
> +			.private_data_size =
> +				sizeof(struct mrvl_crypto_private),
> +			.max_nb_queue_pairs =
> +				sam_get_num_inst() * SAM_HW_RING_NUM,
> +			.socket_id = rte_socket_id()
> +		},
> +		.max_nb_sessions = MRVL_PMD_DEFAULT_MAX_NB_SESSIONS
> +	};
> +
>  	const char *name, *args;
>  	int ret;
>
> @@ -764,13 +878,7 @@ cryptodev_mrvl_crypto_init(struct rte_vdev_device *vdev)
>  		return -EINVAL;
>  	args = rte_vdev_device_args(vdev);
>
> -	init_params.private_data_size = sizeof(struct mrvl_crypto_private);
> -	init_params.max_nb_queue_pairs = sam_get_num_inst() * SAM_HW_RING_NUM;
> -	init_params.max_nb_sessions =
> -		RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_SESSIONS;
> -	init_params.socket_id = rte_socket_id();
> -
> -	ret = rte_cryptodev_pmd_parse_input_args(&init_params, args);
> +	ret = mrvl_pmd_parse_input_args(&init_params, args);
>  	if (ret) {
>  		RTE_LOG(ERR, PMD,
>  			"Failed to parse initialisation arguments[%s]\n",
> --
> 2.14.4
>

--
- Tomasz Duszyński

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

* Re: [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions
  2018-07-10 10:42     ` Tomasz Duszynski
@ 2018-07-10 10:45       ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-07-10 10:45 UTC (permalink / raw)
  To: Tomasz Duszynski
  Cc: Doherty, Declan, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, Zhang, Roy Fan, Trahe, Fiona, jianjay.zhou, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Duszynski
> Sent: Tuesday, July 10, 2018 11:42 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> shally.verma@caviumnetworks.com; ravi1.kumar@amd.com;
> jerin.jacob@caviumnetworks.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> Trahe, Fiona <fiona.trahe@intel.com>; tdu@semihalf.com;
> jianjay.zhou@huawei.com; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of
> sessions
> 
> Looks good.
> 
> Acked-by: Tomasz Duszynski <tdu@semihalf.com>

Thanks Tomasz!

Pablo

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

* Re: [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes
  2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
                     ` (15 preceding siblings ...)
  2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
@ 2018-07-10 11:00   ` De Lara Guarch, Pablo
  16 siblings, 0 replies; 135+ messages in thread
From: De Lara Guarch, Pablo @ 2018-07-10 11:00 UTC (permalink / raw)
  To: Doherty, Declan, akhil.goyal, shally.verma, ravi1.kumar,
	jerin.jacob, Zhang, Roy Fan, Trahe, Fiona, tdu, jianjay.zhou
  Cc: dev



> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, July 10, 2018 1:36 AM
> To: Doherty, Declan <declan.doherty@intel.com>; akhil.goyal@nxp.com;
> shally.verma@caviumnetworks.com; ravi1.kumar@amd.com;
> jerin.jacob@caviumnetworks.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>;
> Trahe, Fiona <fiona.trahe@intel.com>; tdu@semihalf.com;
> jianjay.zhou@huawei.com
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v6 00/16] Cryptodev API changes
> 
> API changes in the cryptodev library, announced in the previous release, 18.05.
> 

Series applied to dpdk-next-crypto.

Pablo

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

end of thread, other threads:[~2018-07-10 11:00 UTC | newest]

Thread overview: 135+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08 22:02 [dpdk-dev] [PATCH 0/6] Cryptodev API changes Pablo de Lara
2018-06-08 22:02 ` [dpdk-dev] [PATCH 1/6] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-21 12:43   ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 2/6] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-21 13:03   ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions Pablo de Lara
2018-06-12 11:37   ` Tomasz Duszynski
2018-06-12 13:53     ` De Lara Guarch, Pablo
2018-06-13  6:11       ` Tomasz Duszynski
2018-06-13  8:23         ` De Lara Guarch, Pablo
2018-06-13 10:11           ` Tomasz Duszynski
2018-06-19 13:20             ` Trahe, Fiona
2018-06-25 16:42               ` De Lara Guarch, Pablo
2018-06-08 22:02 ` [dpdk-dev] [PATCH 4/6] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-21 12:50   ` Akhil Goyal
2018-06-08 22:02 ` [dpdk-dev] [PATCH 5/6] cryptodev: remove old get session size functions Pablo de Lara
2018-06-21 12:59   ` Akhil Goyal
2018-06-22 17:02     ` Verma, Shally
2018-06-25 16:40       ` De Lara Guarch, Pablo
2018-06-26  5:28         ` Verma, Shally
2018-06-26  8:17           ` De Lara Guarch, Pablo
2018-06-08 22:02 ` [dpdk-dev] [PATCH 6/6] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-18  6:29   ` Akhil Goyal
2018-06-25 16:43     ` De Lara Guarch, Pablo
2018-06-25  8:48 ` [dpdk-dev] [PATCH v2 00/15] Cryptodev API changes for 18.08 Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 01/15] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 02/15] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 03/15] app/crypto-perf: limit number of sessions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 04/15] test/crypto: " Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 05/15] examples/l2fwd-crypto: " Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 06/15] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 07/15] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 08/15] cryptodev: define value for unlimited sessions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 09/15] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-06-29  8:02     ` Tomasz Duszynski
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 10/15] doc: remove unneeded deprecation notice Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 11/15] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 12/15] cryptodev: remove old get session size functions Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 13/15] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 14/15] cryptodev: remove attach/detach session API Pablo de Lara
2018-06-25  8:48   ` [dpdk-dev] [PATCH v2 15/15] cryptodev: rename PMD symmetric " Pablo de Lara
2018-06-28  0:52 ` [dpdk-dev] [PATCH v3 00/16] Cryptodev API changes for 18.08 Pablo de Lara
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-04 12:13     ` Akhil Goyal
2018-07-04 12:15     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 04/16] test/crypto: " Pablo de Lara
2018-07-04 12:21     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-04 12:04     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-04 12:30     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-04 12:40     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-06-29  8:04     ` Tomasz Duszynski
2018-07-02 10:58       ` De Lara Guarch, Pablo
2018-07-04 12:42     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-04 11:29     ` Akhil Goyal
2018-06-28  0:52   ` [dpdk-dev] [PATCH v3 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-04 11:31     ` Akhil Goyal
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-04 12:57     ` Akhil Goyal
2018-07-04 15:53       ` De Lara Guarch, Pablo
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-04 11:33     ` Akhil Goyal
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-04 11:36     ` Akhil Goyal
2018-06-28  0:53   ` [dpdk-dev] [PATCH v3 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-06-28 13:40     ` Verma, Shally
2018-06-28 14:15       ` De Lara Guarch, Pablo
2018-07-04 12:27     ` Akhil Goyal
2018-07-04  8:51 ` [dpdk-dev] [PATCH v4 00/16] Cryptodev API changes Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 04/16] test/crypto: " Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-04  8:51   ` [dpdk-dev] [PATCH v4 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-07-05  2:07 ` [dpdk-dev] [PATCH v5 00/16] Cryptodev API changes Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 04/16] test/crypto: " Pablo de Lara
2018-07-05 11:27     ` Verma, Shally
2018-07-05 11:30       ` Akhil Goyal
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-09 10:53     ` De Lara Guarch, Pablo
2018-07-05  2:07   ` [dpdk-dev] [PATCH v5 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-05 11:35     ` Akhil Goyal
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-05  2:08   ` [dpdk-dev] [PATCH v5 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-07-10  0:36 ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 01/16] cryptodev: replace bus specific struct with generic dev Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 02/16] cryptodev: remove max number of sessions per queue Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 03/16] app/crypto-perf: limit number of sessions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 04/16] test/crypto: " Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 05/16] examples/l2fwd-crypto: " Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 06/16] examples/ipsec-secgw: check for max supported sessions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 07/16] crypto/mvsam: parse max number of sessions Pablo de Lara
2018-07-10 10:42     ` Tomasz Duszynski
2018-07-10 10:45       ` De Lara Guarch, Pablo
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 08/16] cryptodev: define value for unlimited sessions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 09/16] cryptodev: remove max number of sessions parameter Pablo de Lara
2018-07-10  8:46     ` Akhil Goyal
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 10/16] doc: remove unneeded deprecation notice Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 11/16] cryptodev: remove queue start/stop functions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 12/16] cryptodev: remove old get session size functions Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 13/16] cryptodev: replace mbuf scatter gather flag Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 14/16] cryptodev: remove attach/detach session API Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 15/16] cryptodev: rename PMD symmetric " Pablo de Lara
2018-07-10  0:36   ` [dpdk-dev] [PATCH v6 16/16] cryptodev: check if symmetric sessions are supported Pablo de Lara
2018-07-10 11:00   ` [dpdk-dev] [PATCH v6 00/16] Cryptodev API changes De Lara Guarch, Pablo

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