DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test: fix qat autotest failure
@ 2016-03-01 16:55 Deepak Kumar JAIN
  2016-03-01 17:24 ` Trahe, Fiona
  0 siblings, 1 reply; 3+ messages in thread
From: Deepak Kumar JAIN @ 2016-03-01 16:55 UTC (permalink / raw)
  To: dev

This patch fix the QAT autotest failure when run for multiple times.
it was caused as mbuf was not freed.

Fixes: 202d375c60b (app/test: add cryptodev unit and performance tests)

This patch depends on following patch:
cryptodev API changes
http://dpdk.org/ml/archives/dev/2016-February/034212.html

Signed-off-by: Deepak Kumar JAIN <deepak.k.jain@intel.com>
---
 app/test/test_cryptodev.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 208fc14..acba98a 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -1845,6 +1845,18 @@ test_multi_session(void)
 				sessions[i], ut_params, ts_params),
 				"Failed to perform decrypt on request "
 				"number %u.", i);
+		/* free crypto operation structure */
+		if (ut_params->op)
+			rte_crypto_op_free(ut_params->op);
+
+		/*
+		 * free mbuf - both obuf and ibuf are usually the same,
+		 * but rte copes even if we call free twice
+		 */
+		if (ut_params->obuf) {
+			rte_pktmbuf_free(ut_params->obuf);
+			ut_params->obuf = 0;
+		}
 	}
 
 	/* Next session create should fail */
-- 
2.1.0

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

end of thread, other threads:[~2016-03-10 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-01 16:55 [dpdk-dev] [PATCH] app/test: fix qat autotest failure Deepak Kumar JAIN
2016-03-01 17:24 ` Trahe, Fiona
2016-03-10 20:09   ` Thomas Monjalon

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).