diff options
author | Gabriel Oginski <gabrielx.oginski@intel.com> | 2023-03-27 12:01:25 +0000 |
---|---|---|
committer | Fan Zhang <fanzhang.oss@gmail.com> | 2023-03-29 14:31:51 +0000 |
commit | 2844aa186f7d33bc35b99509bfd8e405e998df0b (patch) | |
tree | 46e3c242d96f6cb8066253c8273a2d2465cbe068 /src/plugins/dpdk/cryptodev | |
parent | b41b0af609fce6fbe62b476f826a90bded9052ad (diff) |
dpdk-cryptodev: fix name formatting of session pools
Originally the name for each session pool is incorrectly prepared.
It doesn't have right length. It is not null terminated.
The fix corrects the name formatting for each session pool.
Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I67da3d64702ccb27a5907825528f8c95d91040bb
Diffstat (limited to 'src/plugins/dpdk/cryptodev')
-rw-r--r-- | src/plugins/dpdk/cryptodev/cryptodev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/dpdk/cryptodev/cryptodev.c b/src/plugins/dpdk/cryptodev/cryptodev.c index 1dae8dfa36f..adb437e3465 100644 --- a/src/plugins/dpdk/cryptodev/cryptodev.c +++ b/src/plugins/dpdk/cryptodev/cryptodev.c @@ -336,7 +336,7 @@ allocate_session_pools (u32 numa_node, u8 *name; clib_error_t *error = NULL; - name = format (0, "vcryptodev_sess_pool_%u_%u\n", numa_node, len); + name = format (0, "vcrypto_sess_pool_%u_%04x%c", numa_node, len, 0); sess_pools_elt->sess_pool = rte_cryptodev_sym_session_pool_create ( (char *) name, CRYPTODEV_NB_SESSION, 0, 0, 0, numa_node); @@ -347,7 +347,7 @@ allocate_session_pools (u32 numa_node, } vec_free (name); - name = format (0, "cryptodev_sess_pool_%u_%u\n", numa_node, len); + name = format (0, "crypto_sess_pool_%u_%04x%c", numa_node, len, 0); sess_pools_elt->sess_priv_pool = rte_mempool_create ( (char *) name, CRYPTODEV_NB_SESSION * (cmt->drivers_cnt), cmt->sess_sz, 0, 0, NULL, NULL, NULL, NULL, numa_node, 0); |