[v3,38/38] crypto/qat: remove configurable max number of sessions
diff mbox series

Message ID 1528892062-4997-39-git-send-email-tomaszx.jozwiak@intel.com
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers show
Series
  • crypto/qat: refactor to support multiple services
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Tomasz Jozwiak June 13, 2018, 12:14 p.m. UTC
This patch removes CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS
from common_base, config/rte_config.h files and
defines QAT_SYM_PMD_MAX_NB_SESSIONS inside qat_sym_pmd.h
file instead.

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 config/common_base               | 5 -----
 config/rte_config.h              | 5 -----
 drivers/crypto/qat/qat_sym_pmd.c | 4 ++--
 drivers/crypto/qat/qat_sym_pmd.h | 1 +
 4 files changed, 3 insertions(+), 12 deletions(-)

Patch
diff mbox series

diff --git a/config/common_base b/config/common_base
index cf0741199..f03f9c390 100644
--- a/config/common_base
+++ b/config/common_base
@@ -491,11 +491,6 @@  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
-#
 # Max. number of QuickAssist devices, which can be detected and attached
 #
 CONFIG_RTE_PMD_QAT_MAX_PCI_DEVICES=48
diff --git a/config/rte_config.h b/config/rte_config.h
index e353d8d6d..0ba0ead7e 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -85,12 +85,7 @@ 
 
 /****** 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
 /* Max. number of QuickAssist devices which can be attached */
 #define RTE_PMD_QAT_MAX_PCI_DEVICES 48
 
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 6b39b32f8..c94a8a197 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -77,7 +77,7 @@  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 = RTE_QAT_PMD_MAX_NB_SESSIONS;
+		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);
 	}
@@ -250,7 +250,7 @@  qat_sym_dev_create(struct qat_pci_device *qat_pci_dev)
 			.name = "",
 			.socket_id = qat_pci_dev->pci_dev->device.numa_node,
 			.private_data_size = sizeof(struct qat_sym_dev_private),
-			.max_nb_sessions = RTE_QAT_PMD_MAX_NB_SESSIONS
+			.max_nb_sessions = QAT_SYM_PMD_MAX_NB_SESSIONS
 	};
 	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 efa3b0775..80a198741 100644
--- a/drivers/crypto/qat/qat_sym_pmd.h
+++ b/drivers/crypto/qat/qat_sym_pmd.h
@@ -13,6 +13,7 @@ 
 
 /**< 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;