From patchwork Wed Apr 12 09:26:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "De Lara Guarch, Pablo" X-Patchwork-Id: 23590 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 4E20E4C57; Wed, 12 Apr 2017 11:26:36 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C0D4C2E8A; Wed, 12 Apr 2017 11:26:34 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2017 02:26:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,189,1488873600"; d="scan'208";a="844878639" Received: from silpixa00381631.ir.intel.com (HELO silpixa00381631.ger.corp.intel.com) ([10.237.222.122]) by FMSMGA003.fm.intel.com with ESMTP; 12 Apr 2017 02:26:32 -0700 From: Pablo de Lara To: dev@dpdk.org Cc: declan.doherty@intel.com, stable@dpdk.org, Pablo de Lara Date: Wed, 12 Apr 2017 10:26:26 +0100 Message-Id: <1491989186-159933-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] app/crypto-perf: fix AEAD tests when AAD is zero 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" For AEAD algorithms, additional authenticated data (AAD) can be passed, but it is optional, so its size can be zero. Therefore, test can be run if no memory is allocated. Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Pablo de Lara --- app/test-crypto-perf/cperf_test_vectors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test-crypto-perf/cperf_test_vectors.c index f87bb8e..757957f 100644 --- a/app/test-crypto-perf/cperf_test_vectors.c +++ b/app/test-crypto-perf/cperf_test_vectors.c @@ -463,7 +463,7 @@ cperf_test_vector_get_dummy(struct cperf_options *options) break; } - if (aad_alloc) { + if (aad_alloc && options->auth_aad_sz) { t_vec->aad.data = rte_malloc(NULL, options->auth_aad_sz, 16); if (t_vec->aad.data == NULL) {