[1/3] test/crypto: fix asym session mempool creation

Message ID 20200608131503.4003-1-adamx.dybkowski@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [1/3] test/crypto: fix asym session mempool creation |

Checks

Context Check Description
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing warning Testing issues
ci/checkpatch success coding style OK

Commit Message

Dybkowski, AdamX June 8, 2020, 1:15 p.m. UTC
  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 <adamx.dybkowski@intel.com>
---
 app/test/test_cryptodev_asym.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

Fiona Trahe June 24, 2020, 2:49 p.m. UTC | #1
> -----Original Message-----
> From: Dybkowski, AdamX <adamx.dybkowski@intel.com>
> Sent: Monday, June 8, 2020 2:15 PM
> To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; akhil.goyal@nxp.com
> Cc: Dybkowski, AdamX <adamx.dybkowski@intel.com>; stable@dpdk.org
> Subject: [PATCH 1/3] test/crypto: fix asym 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 <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
  
Akhil Goyal July 1, 2020, 7:53 p.m. UTC | #2
> > 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 <adamx.dybkowski@intel.com>
> Acked-by: Fiona Trahe <fiona.trahe@intel.com>

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
  

Patch

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index b8e050048..dc62ed7bf 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