From patchwork Thu Oct 22 09:57:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fan Zhang X-Patchwork-Id: 81776 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3438EA04DD; Thu, 22 Oct 2020 11:58:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7CFD9A991; Thu, 22 Oct 2020 11:58:10 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id DD7ACA988 for ; Thu, 22 Oct 2020 11:58:05 +0200 (CEST) IronPort-SDR: i2POQGLSKJp+dxvtqdFnfd7WTkc0vWWytFOHAbTl+RFRTETyG47k03MlJDMdRaE9i+AqIG+f3Q DpXSi0rJLlnw== X-IronPort-AV: E=McAfee;i="6000,8403,9781"; a="185179707" X-IronPort-AV: E=Sophos;i="5.77,404,1596524400"; d="scan'208";a="185179707" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2020 02:58:04 -0700 IronPort-SDR: ui9/M7frgLV3+lbITIHXuHMeqo/cc7ouhHNrxw9psEm33RTqofeJAGwdhLSwY+cnkxHqf26cnb j5yEEWMnVNQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,404,1596524400"; d="scan'208";a="359192794" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.11]) by FMSMGA003.fm.intel.com with ESMTP; 22 Oct 2020 02:58:03 -0700 From: Fan Zhang To: dev@dpdk.org Cc: akhil.goyal@nxp.com, Fan Zhang Date: Thu, 22 Oct 2020 10:57:58 +0100 Message-Id: <20201022095758.587755-3-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201022095758.587755-1-roy.fan.zhang@intel.com> References: <20201022095758.587755-1-roy.fan.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/2] fips_validation: fix gcm test 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" This patch fixes FIPS GCM test of the redundant plaintext string write and insufficient test case support check for some corner cases. Fixes: d09abf2d1007 ("examples/fips_validation: update GCM test") Cc: roy.fan.zhang@intel.com Signed-off-by: Fan Zhang --- examples/fips_validation/fips_validation_gcm.c | 1 - examples/fips_validation/main.c | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/fips_validation/fips_validation_gcm.c b/examples/fips_validation/fips_validation_gcm.c index df3caa267..250d09bf9 100644 --- a/examples/fips_validation/fips_validation_gcm.c +++ b/examples/fips_validation/fips_validation_gcm.c @@ -175,7 +175,6 @@ parse_test_gcm_writeback(struct fips_val *val) if (vec.status == RTE_CRYPTO_OP_STATUS_SUCCESS) { fprintf(info.fp_wr, "%s", PT_STR); if (!info.interim_info.gcm_data.is_gmac) { - fprintf(info.fp_wr, "%s", PT_STR); tmp_val.val = val->val; tmp_val.len = vec.pt.len; diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index 07532c956..f3678f056 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -927,10 +927,14 @@ prepare_gmac_xform(struct rte_crypto_sym_xform *xform) if (rte_cryptodev_sym_capability_check_auth(cap, auth_xform->key.length, - auth_xform->digest_length, 0) != 0) { - RTE_LOG(ERR, USER1, "PMD %s key length %u IV length %u\n", + auth_xform->digest_length, + auth_xform->iv.length) != 0) { + + RTE_LOG(ERR, USER1, + "PMD %s key length %u Digest length %u IV length %u\n", info.device_name, auth_xform->key.length, - auth_xform->digest_length); + auth_xform->digest_length, + auth_xform->iv.length); return -EPERM; }