summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/ipsec/ipsec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dpdk/ipsec/ipsec.c')
-rw-r--r--src/plugins/dpdk/ipsec/ipsec.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c
index ade454f22cc..dd64f6db568 100644
--- a/src/plugins/dpdk/ipsec/ipsec.c
+++ b/src/plugins/dpdk/ipsec/ipsec.c
@@ -24,6 +24,7 @@
dpdk_crypto_main_t dpdk_crypto_main;
#define EMPTY_STRUCT {0}
+#define NUM_CRYPTO_MBUFS 16384
static void
algos_init (u32 n_mains)
@@ -835,11 +836,12 @@ crypto_create_crypto_op_pool (vlib_main_t * vm, u8 numa)
pool_name = format (0, "crypto_pool_numa%u%c", numa, 0);
- mp =
- rte_mempool_create ((char *) pool_name,
- conf->num_mbufs,
- crypto_op_len (), 512, pool_priv_size, NULL, NULL,
- crypto_op_init, NULL, numa, 0);
+ if (conf->num_crypto_mbufs == 0)
+ conf->num_crypto_mbufs = NUM_CRYPTO_MBUFS;
+
+ mp = rte_mempool_create ((char *) pool_name, conf->num_crypto_mbufs,
+ crypto_op_len (), 512, pool_priv_size, NULL, NULL,
+ crypto_op_init, NULL, numa, 0);
vec_free (pool_name);