vhost/crypto: fix pool allocation
authorFan Zhang <roy.fan.zhang@intel.com>
Mon, 28 Sep 2020 10:59:13 +0000 (11:59 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 28 Sep 2020 11:16:37 +0000 (13:16 +0200)
This patch fixes the missing iv space allocation in crypto
operation mempool.

Fixes: 709521f4c2cd ("examples/vhost_crypto: support multi-core")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
examples/vhost_crypto/main.c
lib/librte_vhost/rte_vhost_crypto.h

index 1d7ba94..11b022e 100644 (file)
@@ -544,7 +544,7 @@ main(int argc, char *argv[])
                snprintf(name, 127, "COPPOOL_%u", lo->lcore_id);
                info->cop_pool = rte_crypto_op_pool_create(name,
                                RTE_CRYPTO_OP_TYPE_SYMMETRIC, NB_MEMPOOL_OBJS,
-                               NB_CACHE_OBJS, 0,
+                               NB_CACHE_OBJS, VHOST_CRYPTO_MAX_IV_LEN,
                                rte_lcore_to_socket_id(lo->lcore_id));
 
                if (!info->cop_pool) {
index d29871c..866a592 100644 (file)
@@ -10,6 +10,7 @@
 #define VHOST_CRYPTO_SESSION_MAP_ENTRIES       (1024) /**< Max nb sessions */
 /** max nb virtual queues in a burst for finalizing*/
 #define VIRTIO_CRYPTO_MAX_NUM_BURST_VQS                (64)
+#define VHOST_CRYPTO_MAX_IV_LEN                        (32)
 
 enum rte_vhost_crypto_zero_copy {
        RTE_VHOST_CRYPTO_ZERO_COPY_DISABLE = 0,