From 0ad83afdf3352e5e61e8c137131524ee6b2506ce Mon Sep 17 00:00:00 2001 From: Adam Dybkowski Date: Mon, 8 Jun 2020 15:15:01 +0200 Subject: [PATCH] test/crypto: fix asymmetric session mempool creation This patch fixes the element size of the mempool used for allocating asym crypto sessions and their private data. Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests") Cc: stable@dpdk.org Signed-off-by: Adam Dybkowski Acked-by: Fiona Trahe Acked-by: Akhil Goyal --- app/test/test_cryptodev_asym.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index b8e0500481..dc62ed7bf3 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -935,8 +935,9 @@ testsuite_setup(void) } /* setup asym session pool */ - unsigned int session_size = - rte_cryptodev_asym_get_private_session_size(dev_id); + unsigned int session_size = RTE_MAX( + rte_cryptodev_asym_get_private_session_size(dev_id), + rte_cryptodev_asym_get_header_session_size()); /* * Create mempool with TEST_NUM_SESSIONS * 2, * to include the session headers -- 2.20.1