DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] test/ipsec: fixes
@ 2019-06-28 13:29 Bernard Iremonger
  2019-06-28 13:29 ` [dpdk-dev] [PATCH 1/2] test/ipsec: fix teardown function Bernard Iremonger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bernard Iremonger @ 2019-06-28 13:29 UTC (permalink / raw)
  To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger

The patches in this patch set depend on the following patches:

http://patches.dpdk.org/patch/54541/
http://patches.dpdk.org/patch/54542/
http://patches.dpdk.org/patch/54543/

Bernard Iremonger (2):
  test/ipsec: fix teardown function
  test/ipsec: fix destroy sa function

 app/test/test_ipsec.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 1/2] test/ipsec: fix teardown function
  2019-06-28 13:29 [dpdk-dev] [PATCH 0/2] test/ipsec: fixes Bernard Iremonger
@ 2019-06-28 13:29 ` Bernard Iremonger
  2019-06-28 13:29 ` [dpdk-dev] [PATCH 2/2] test/ipsec: fix destroy sa function Bernard Iremonger
  2019-07-01 11:46 ` [dpdk-dev] [PATCH 0/2] test/ipsec: fixes Akhil Goyal
  2 siblings, 0 replies; 4+ messages in thread
From: Bernard Iremonger @ 2019-06-28 13:29 UTC (permalink / raw)
  To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger, stable

Set freed cop pointers to NULL
Set other freed pointers to NULL instead of 0

Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test/test_ipsec.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 5389a59..2328342 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -451,8 +451,10 @@ ut_teardown(void)
 
 	for (i = 0; i < BURST_SIZE; i++) {
 		/* free crypto operation structure */
-		if (ut_params->cop[i])
+		if (ut_params->cop[i]) {
 			rte_crypto_op_free(ut_params->cop[i]);
+			ut_params->cop[i] = NULL;
+		}
 
 		/*
 		 * free mbuf - both obuf and ibuf are usually the same,
@@ -462,17 +464,17 @@ ut_teardown(void)
 		if (ut_params->obuf[i]) {
 			rte_pktmbuf_free(ut_params->obuf[i]);
 			if (ut_params->ibuf[i] == ut_params->obuf[i])
-				ut_params->ibuf[i] = 0;
-			ut_params->obuf[i] = 0;
+				ut_params->ibuf[i] = NULL;
+			ut_params->obuf[i] = NULL;
 		}
 		if (ut_params->ibuf[i]) {
 			rte_pktmbuf_free(ut_params->ibuf[i]);
-			ut_params->ibuf[i] = 0;
+			ut_params->ibuf[i] = NULL;
 		}
 
 		if (ut_params->testbuf[i]) {
 			rte_pktmbuf_free(ut_params->testbuf[i]);
-			ut_params->testbuf[i] = 0;
+			ut_params->testbuf[i] = NULL;
 		}
 	}
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/2] test/ipsec: fix destroy sa function
  2019-06-28 13:29 [dpdk-dev] [PATCH 0/2] test/ipsec: fixes Bernard Iremonger
  2019-06-28 13:29 ` [dpdk-dev] [PATCH 1/2] test/ipsec: fix teardown function Bernard Iremonger
@ 2019-06-28 13:29 ` Bernard Iremonger
  2019-07-01 11:46 ` [dpdk-dev] [PATCH 0/2] test/ipsec: fixes Akhil Goyal
  2 siblings, 0 replies; 4+ messages in thread
From: Bernard Iremonger @ 2019-06-28 13:29 UTC (permalink / raw)
  To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger, stable

Call rte_cryptodev_sym_session_clear() function.

Cc: stable@dpdk.org
Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test/test_ipsec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 2328342..ea558fd 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -1170,9 +1170,11 @@ static void
 destroy_sa(uint32_t j)
 {
 	struct ipsec_unitest_params *ut = &unittest_params;
+	struct ipsec_testsuite_params *ts = &testsuite_params;
 
 	rte_ipsec_sa_fini(ut->ss[j].sa);
 	rte_free(ut->ss[j].sa);
+	rte_cryptodev_sym_session_clear(ts->valid_dev, ut->ss[j].crypto.ses);
 	rte_cryptodev_sym_session_free(ut->ss[j].crypto.ses);
 	memset(&ut->ss[j], 0, sizeof(ut->ss[j]));
 }
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] test/ipsec: fixes
  2019-06-28 13:29 [dpdk-dev] [PATCH 0/2] test/ipsec: fixes Bernard Iremonger
  2019-06-28 13:29 ` [dpdk-dev] [PATCH 1/2] test/ipsec: fix teardown function Bernard Iremonger
  2019-06-28 13:29 ` [dpdk-dev] [PATCH 2/2] test/ipsec: fix destroy sa function Bernard Iremonger
@ 2019-07-01 11:46 ` Akhil Goyal
  2 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2019-07-01 11:46 UTC (permalink / raw)
  To: Bernard Iremonger, dev, konstantin.ananyev



> -----Original Message-----
> From: Bernard Iremonger <bernard.iremonger@intel.com>
> Sent: Friday, June 28, 2019 6:59 PM
> To: dev@dpdk.org; konstantin.ananyev@intel.com; Akhil Goyal
> <akhil.goyal@nxp.com>
> Cc: Bernard Iremonger <bernard.iremonger@intel.com>
> Subject: [PATCH 0/2] test/ipsec: fixes
> 
> The patches in this patch set depend on the following patches:
> 
> http://patches.dpdk.org/patch/54541/
> http://patches.dpdk.org/patch/54542/ 
> http://patches.dpdk.org/patch/54543/ 
> 
> Bernard Iremonger (2):
>   test/ipsec: fix teardown function
>   test/ipsec: fix destroy sa function
> 
>  app/test/test_ipsec.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> --
> 2.7.4
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-01 11:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-28 13:29 [dpdk-dev] [PATCH 0/2] test/ipsec: fixes Bernard Iremonger
2019-06-28 13:29 ` [dpdk-dev] [PATCH 1/2] test/ipsec: fix teardown function Bernard Iremonger
2019-06-28 13:29 ` [dpdk-dev] [PATCH 2/2] test/ipsec: fix destroy sa function Bernard Iremonger
2019-07-01 11:46 ` [dpdk-dev] [PATCH 0/2] test/ipsec: fixes Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).