[dpdk-dev] app/test: fix symmetric session free in crypto perf tests

Message ID 1484567398-32721-1-git-send-email-arkadiuszx.kusztal@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Arkadiusz Kusztal Jan. 16, 2017, 11:49 a.m. UTC
  This commit fixes problem with deallocation of symmetric
session entries in cryptodev performance tests.

Fixes: 390919829fdb ("app/test: update AES SHA performance test")
Fixes: 79521c438363 ("app/test: add AES GCM performance test")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 app/test/test_cryptodev_perf.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

De Lara Guarch, Pablo Jan. 17, 2017, 10:17 a.m. UTC | #1
Hi Arek,

> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Monday, January 16, 2017 11:50 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona; De Lara Guarch, Pablo; Griffin, John; Jain, Deepak K;
> Kusztal, ArkadiuszX
> Subject: [PATCH] app/test: fix symmetric session free in crypto perf tests
> 
> This commit fixes problem with deallocation of symmetric
> session entries in cryptodev performance tests.
> 
> Fixes: 390919829fdb ("app/test: update AES SHA performance test")
> Fixes: 79521c438363 ("app/test: add AES GCM performance test")
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  app/test/test_cryptodev_perf.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/app/test/test_cryptodev_perf.c
> b/app/test/test_cryptodev_perf.c
> index 7751ff2..8c89a65 100644
> --- a/app/test/test_cryptodev_perf.c
> +++ b/app/test/test_cryptodev_perf.c
> @@ -3056,6 +3056,7 @@ test_perf_aes_sha(uint8_t dev_id, uint16_t
> queue_id,
> 
>  	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
>  		rte_pktmbuf_free(mbufs[i]);
> +	rte_cryptodev_sym_session_free(dev_id, sess);
> 
>  	printf("\n");
>  	return TEST_SUCCESS;
> @@ -3980,6 +3981,7 @@ perf_AES_GCM(uint8_t dev_id, uint16_t
> queue_id,
> 
>  	for (i = 0; i < burst; i++)
>  		rte_pktmbuf_free(mbufs[i]);
> +	rte_cryptodev_sym_session_free(dev_id, sess);
> 
>  	return 0;
>  }
> --
> 2.1.0

There are other tests that have this issue as well, such as "test_perf_snow3g".
Could you fix these too?

Thanks,
Pablo
  

Patch

diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c
index 7751ff2..8c89a65 100644
--- a/app/test/test_cryptodev_perf.c
+++ b/app/test/test_cryptodev_perf.c
@@ -3056,6 +3056,7 @@  test_perf_aes_sha(uint8_t dev_id, uint16_t queue_id,
 
 	for (i = 0; i < pparams->burst_size * NUM_MBUF_SETS; i++)
 		rte_pktmbuf_free(mbufs[i]);
+	rte_cryptodev_sym_session_free(dev_id, sess);
 
 	printf("\n");
 	return TEST_SUCCESS;
@@ -3980,6 +3981,7 @@  perf_AES_GCM(uint8_t dev_id, uint16_t queue_id,
 
 	for (i = 0; i < burst; i++)
 		rte_pktmbuf_free(mbufs[i]);
+	rte_cryptodev_sym_session_free(dev_id, sess);
 
 	return 0;
 }