From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <marko.kovacevic@intel.com>
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 5F55A1B1FF;
 Mon, 15 Apr 2019 17:04:55 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga008.fm.intel.com ([10.253.24.58])
 by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 15 Apr 2019 08:04:54 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,354,1549958400"; d="scan'208";a="140836575"
Received: from silpixa00399502.ir.intel.com (HELO
 silpixa00399502.ger.corp.intel.com) ([10.237.222.111])
 by fmsmga008.fm.intel.com with ESMTP; 15 Apr 2019 08:04:53 -0700
From: Marko Kovacevic <marko.kovacevic@intel.com>
To: dev@dpdk.org
Cc: john.mcnamara@intel.com, xinfengx.zhao@intel.com, akhil.goyal@nxp.com,
 Marko Kovacevic <marko.kovacevic@intel.com>, stable@dpdk.org
Date: Mon, 15 Apr 2019 16:04:48 +0100
Message-Id: <20190415150449.44799-2-marko.kovacevic@intel.com>
X-Mailer: git-send-email 2.13.6
In-Reply-To: <20190415150449.44799-1-marko.kovacevic@intel.com>
References: <20190411141656.27720-1-marko.kovacevic@intel.com>
 <20190415150449.44799-1-marko.kovacevic@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/3] examples/fips_validation: fix cmac test
	failure
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Apr 2019 15:04:56 -0000

As a result of the cmac test running the test where
PT len is 65536 it should give a result back to the
user USER1: Error -1: Prepare op USER1: PT len 65536
as this MSG len is not supported. Issue was
that the application was not freeing the op properly after
a while causing the app to fail.

CRYPTODEV: rte_cryptodev_sym_session_create() line 1340:
couldn't get object from session mempool
USER1: Error -12: test block
USER1: Error -12: Failed test CMAC/req/CMAC.req

Fixes: cd255ccf5764 ("examples/fips_validation: support AES parsing")
Cc: marko.kovacevic@intel.com
Cc: stable@dpdk.org

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 examples/fips_validation/main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 5e3d5baa8..aef45055e 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -949,19 +949,20 @@ fips_run_test(void)
 	if (ret < 0) {
 		RTE_LOG(ERR, USER1, "Error %i: Init session\n",
 				ret);
-		return ret;
+		goto exit;
 	}
 
 	ret = test_ops.prepare_op();
 	if (ret < 0) {
 		RTE_LOG(ERR, USER1, "Error %i: Prepare op\n",
 				ret);
-		return ret;
+		goto exit;
 	}
 
 	if (rte_cryptodev_enqueue_burst(env.dev_id, 0, &env.op, 1) < 1) {
 		RTE_LOG(ERR, USER1, "Error: Failed enqueue\n");
-		return ret;
+		ret = -1;
+		goto exit;
 	}
 
 	do {
@@ -973,6 +974,7 @@ fips_run_test(void)
 
 	vec.status = env.op->status;
 
+exit:
 	rte_cryptodev_sym_session_clear(env.dev_id, env.sess);
 	rte_cryptodev_sym_session_free(env.sess);
 	env.sess = NULL;
-- 
2.13.6

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 67BD8A00E6
	for <public@inbox.dpdk.org>; Mon, 15 Apr 2019 17:05:08 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 493E41B21A;
	Mon, 15 Apr 2019 17:05:00 +0200 (CEST)
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id 5F55A1B1FF;
 Mon, 15 Apr 2019 17:04:55 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga008.fm.intel.com ([10.253.24.58])
 by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 15 Apr 2019 08:04:54 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.60,354,1549958400"; d="scan'208";a="140836575"
Received: from silpixa00399502.ir.intel.com (HELO
 silpixa00399502.ger.corp.intel.com) ([10.237.222.111])
 by fmsmga008.fm.intel.com with ESMTP; 15 Apr 2019 08:04:53 -0700
From: Marko Kovacevic <marko.kovacevic@intel.com>
To: dev@dpdk.org
Cc: john.mcnamara@intel.com, xinfengx.zhao@intel.com, akhil.goyal@nxp.com,
 Marko Kovacevic <marko.kovacevic@intel.com>, stable@dpdk.org
Date: Mon, 15 Apr 2019 16:04:48 +0100
Message-Id: <20190415150449.44799-2-marko.kovacevic@intel.com>
X-Mailer: git-send-email 2.13.6
In-Reply-To: <20190415150449.44799-1-marko.kovacevic@intel.com>
References: <20190411141656.27720-1-marko.kovacevic@intel.com>
 <20190415150449.44799-1-marko.kovacevic@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/3] examples/fips_validation: fix cmac test
	failure
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <20190415150448.JAZ1hXiyf9BspsltUQ9KdA9ohUzUyhfJdTJynyUT3Xc@z>

As a result of the cmac test running the test where
PT len is 65536 it should give a result back to the
user USER1: Error -1: Prepare op USER1: PT len 65536
as this MSG len is not supported. Issue was
that the application was not freeing the op properly after
a while causing the app to fail.

CRYPTODEV: rte_cryptodev_sym_session_create() line 1340:
couldn't get object from session mempool
USER1: Error -12: test block
USER1: Error -12: Failed test CMAC/req/CMAC.req

Fixes: cd255ccf5764 ("examples/fips_validation: support AES parsing")
Cc: marko.kovacevic@intel.com
Cc: stable@dpdk.org

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 examples/fips_validation/main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 5e3d5baa8..aef45055e 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -949,19 +949,20 @@ fips_run_test(void)
 	if (ret < 0) {
 		RTE_LOG(ERR, USER1, "Error %i: Init session\n",
 				ret);
-		return ret;
+		goto exit;
 	}
 
 	ret = test_ops.prepare_op();
 	if (ret < 0) {
 		RTE_LOG(ERR, USER1, "Error %i: Prepare op\n",
 				ret);
-		return ret;
+		goto exit;
 	}
 
 	if (rte_cryptodev_enqueue_burst(env.dev_id, 0, &env.op, 1) < 1) {
 		RTE_LOG(ERR, USER1, "Error: Failed enqueue\n");
-		return ret;
+		ret = -1;
+		goto exit;
 	}
 
 	do {
@@ -973,6 +974,7 @@ fips_run_test(void)
 
 	vec.status = env.op->status;
 
+exit:
 	rte_cryptodev_sym_session_clear(env.dev_id, env.sess);
 	rte_cryptodev_sym_session_free(env.sess);
 	env.sess = NULL;
-- 
2.13.6