From patchwork Tue Jul 18 07:58:18 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: 27041 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 C47A456A1; Tue, 18 Jul 2017 17:58:33 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 8C5175905 for ; Tue, 18 Jul 2017 17:58:31 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 18 Jul 2017 08:58:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,378,1496127600"; d="scan'208";a="126519389" Received: from silpixa00399464.ir.intel.com (HELO silpixa00399464.ger.corp.intel.com) ([10.237.222.157]) by orsmga005.jf.intel.com with ESMTP; 18 Jul 2017 08:58:30 -0700 From: Pablo de Lara To: declan.doherty@intel.com Cc: dev@dpdk.org, Pablo de Lara Date: Tue, 18 Jul 2017 08:58:18 +0100 Message-Id: <20170718075818.75643-4-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170718075818.75643-1-pablo.de.lara.guarch@intel.com> References: <20170718075818.75643-1-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 3/3] examples/l2fwd-crypto: fix AEAD key setting 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" AEAD key was being set using the cipher key parameters, instead of the AEAD key parameters. Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters") Signed-off-by: Pablo de Lara --- examples/l2fwd-crypto/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index da2f509..8d4a10a 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -2038,7 +2038,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, * is supported by the algorithm chosen. */ } else if (options->aead_key_random_size != -1) { - if (check_supported_size(options->ckey_random_size, + if (check_supported_size(options->aead_key_random_size, cap->sym.aead.key_size.min, cap->sym.aead.key_size.max, cap->sym.aead.key_size.increment) @@ -2047,7 +2047,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports, return -1; } options->aead_xform.aead.key.length = - options->ckey_random_size; + options->aead_key_random_size; /* No size provided, use minimum size. */ } else options->aead_xform.aead.key.length =