[PATCH v2 04/18] crypto/cnxk: limit the meta buf cache to 128
Anoob Joseph
anoobj at marvell.com
Tue Aug 9 12:53:42 CEST 2022
Limit meta buf pool cache size as 128. Having 512 as the cache size
would cause more time for refill.
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
Signed-off-by: Volodymyr Fialko <vfialko at marvell.com>
---
drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 80071872f1..a73c156d01 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -10,12 +10,13 @@
#include "cnxk_ae.h"
#include "cnxk_cryptodev.h"
-#include "cnxk_cryptodev_ops.h"
#include "cnxk_cryptodev_capabilities.h"
+#include "cnxk_cryptodev_ops.h"
#include "cnxk_se.h"
-#define CNXK_CPT_MAX_ASYM_OP_NUM_PARAMS 5
-#define CNXK_CPT_MAX_ASYM_OP_MOD_LEN 1024
+#define CNXK_CPT_MAX_ASYM_OP_NUM_PARAMS 5
+#define CNXK_CPT_MAX_ASYM_OP_MOD_LEN 1024
+#define CNXK_CPT_META_BUF_MAX_CACHE_SIZE 128
static int
cnxk_cpt_get_mlen(void)
@@ -200,7 +201,7 @@ cnxk_cpt_metabuf_mempool_create(const struct rte_cryptodev *dev,
}
mb_pool_sz = nb_elements;
- cache_sz = RTE_MIN(RTE_MEMPOOL_CACHE_MAX_SIZE, nb_elements / 1.5);
+ cache_sz = RTE_MIN(CNXK_CPT_META_BUF_MAX_CACHE_SIZE, nb_elements / 1.5);
/* For poll mode, core that enqueues and core that dequeues can be
* different. For event mode, all cores are allowed to use same crypto
--
2.25.1
More information about the dev
mailing list