aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/cryptodev/cryptodev.h
diff options
context:
space:
mode:
authorDastin Wilski <dastinx.wilski@intel.com>2021-11-26 14:57:51 +0000
committerFan Zhang <roy.fan.zhang@intel.com>2021-11-30 11:02:11 +0000
commit4d232ff5ac70f5a16fa4e324bb0dee073785b0eb (patch)
tree707abe2ecf35241347ce17550202030d8b0005c5 /src/plugins/dpdk/cryptodev/cryptodev.h
parentbb1413bd1e16ab093fbde2a04555ec961ea7c20f (diff)
dpdk-cryptodev: scalable session count
Originally cryptodev allocates mempools for seesion and session private data during its initialization. Moreover the size of these mempools are fixed resulting in limited session count (up to value specified in CRYPTODEV_NB_SESSION macro). This patch allows for session count to scale up by allocating new mempools as they are needed during session creation. Type: improvement Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com> Change-Id: I6ae240b474d3089d3ff50ca5bc7ff48f149983db
Diffstat (limited to 'src/plugins/dpdk/cryptodev/cryptodev.h')
-rw-r--r--src/plugins/dpdk/cryptodev/cryptodev.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/dpdk/cryptodev/cryptodev.h b/src/plugins/dpdk/cryptodev/cryptodev.h
index 3b47b43f538..80719ee69c8 100644
--- a/src/plugins/dpdk/cryptodev/cryptodev.h
+++ b/src/plugins/dpdk/cryptodev/cryptodev.h
@@ -27,7 +27,7 @@
#define CRYPTODEV_MAX_INFLIGHT (CRYPTODEV_NB_CRYPTO_OPS - 1)
#define CRYPTODEV_AAD_MASK (CRYPTODEV_NB_CRYPTO_OPS - 1)
#define CRYPTODEV_DEQ_CACHE_SZ 32
-#define CRYPTODEV_NB_SESSION 10240
+#define CRYPTODEV_NB_SESSION 4096
#define CRYPTODEV_MAX_IV_SIZE 16
#define CRYPTODEV_MAX_AAD_SIZE 16
#define CRYPTODEV_MAX_N_SGL 8 /**< maximum number of segments */
@@ -120,6 +120,11 @@ typedef struct
{
struct rte_mempool *sess_pool;
struct rte_mempool *sess_priv_pool;
+} cryptodev_session_pool_t;
+
+typedef struct
+{
+ cryptodev_session_pool_t *sess_pools;
} cryptodev_numa_data_t;
typedef struct
@@ -170,6 +175,8 @@ typedef struct
clib_bitmap_t *active_cdev_inst_mask;
clib_spinlock_t tlock;
cryptodev_capability_t *supported_caps;
+ u32 sess_sz;
+ u32 drivers_cnt;
u8 is_raw_api;
} cryptodev_main_t;