Skip to contentSkip to conversation

app/test: fix qat autotest failure

PATCH Applied Deepak Kumar JAIN 3 participants 3 messages Mar 1, 2016 – Mar 10, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 app/test: fix qat autotest failure

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

---
 app/test/test_cryptodev.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
app/test/test_cryptodev.c +12 -0
index 208fc14..acba98a 100644
@@ -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 */
Signature · 1 line
2.1.0
Acked-by on v1 1/1
#1 lore raw
Quoted 47 lines

-----Original Message-----
From: Jain, Deepak K
Sent: Tuesday, March 01, 2016 4:55 PM
To: [email protected]
Cc: Griffin, John; Trahe, Fiona; Jain, Deepak K
Subject: [PATCH] app/test: fix qat autotest failure

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

---
 app/test/test_cryptodev.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
app/test/test_cryptodev.c index renamed from app/test/test_cryptodev.c +0 -0

208fc14..acba98a 100644

app/test/test_cryptodev.c +12 -1
@@ -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 */
--
Quoted 1 line

2.1.0

#2 lore raw
Quoted 5 lines
Quoted 5 lines

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)
Quoted 7 lines
Quoted 5 lines

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

Applied, thanks