DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: declan.doherty@intel.com, akhil.goyal@nxp.com,
	ravi1.kumar@amd.com, jerin.jacob@caviumnetworks.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: [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions
Date: Fri,  8 Jun 2018 23:02:31 +0100	[thread overview]
Message-ID: <20180608220234.10170-4-pablo.de.lara.guarch@intel.com> (raw)
In-Reply-To: <20180608220234.10170-1-pablo.de.lara.guarch@intel.com>

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

  parent reply	other threads:[~2018-06-08 22:02 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Pablo de Lara [this message]
2018-06-12 11:37   ` [dpdk-dev] [PATCH 3/6] cryptodev: remove max number of sessions 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180608220234.10170-4-pablo.de.lara.guarch@intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=ravi1.kumar@amd.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=tdu@semihalf.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).