From patchwork Thu Apr 11 14:16:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kovacevic, Marko" X-Patchwork-Id: 52649 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC10B5F0D; Thu, 11 Apr 2019 16:17:07 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D04C75911; Thu, 11 Apr 2019 16:17:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 07:17:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,337,1549958400"; d="scan'208";a="335858347" Received: from silpixa00399502.ir.intel.com (HELO silpixa00399502.ger.corp.intel.com) ([10.237.222.111]) by fmsmga006.fm.intel.com with ESMTP; 11 Apr 2019 07:17:01 -0700 From: Marko Kovacevic To: dev@dpdk.org Cc: john.mcnamara@intel.com, xinfengx.zhao@intel.com, akhil.goyal@nxp.com, Marko Kovacevic , stable@dpdk.org Date: Thu, 11 Apr 2019 15:16:55 +0100 Message-Id: <20190411141656.27720-2-marko.kovacevic@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190411141656.27720-1-marko.kovacevic@intel.com> References: <20190411141656.27720-1-marko.kovacevic@intel.com> Subject: [dpdk-dev] [PATCH v1 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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;