From patchwork Tue Jun 21 11:41:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 113169 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DBF2FA00C5; Tue, 21 Jun 2022 13:41:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C06474069C; Tue, 21 Jun 2022 13:41:39 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id D953C40151; Tue, 21 Jun 2022 13:41:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655811698; x=1687347698; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=6rNacorfmABjE1BtOhg8eWrxwWHOL/w0V8qopcZnkzU=; b=fGudqruwhdvatHqBlVdMYjSG8D17viKmwOzKjIlqhJdGK94EX1NGnlGa U8K/LC/4uRfqb0Lw+F8ANl73DqX9PZy3qqbyDQaIXOTHfZgbDD+upF5yq eleh5fkCUsQ6FL7rOLzaUFgt0dAHo3t9PFWeYjf9liJguJMYqAzuyzx5E LGQ0FUL3iQr+/ie9ddtxUqtk3eVjEa7ccMz0ouxShsqwfkEQpobmwGSNp iYbdi38J5ZdpZIM0l0Io31WyZDmCIX85BP8D1zXGqKtjaKJK1236a9wFp 3upgalAVTtnjXN8LhOvHPCI7wZhK7lx77bQ6GuBHJGvPTdUAb3OWFWV7O w==; X-IronPort-AV: E=McAfee;i="6400,9594,10384"; a="263130480" X-IronPort-AV: E=Sophos;i="5.92,209,1650956400"; d="scan'208";a="263130480" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2022 04:41:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,209,1650956400"; d="scan'208";a="689900604" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.49]) by fmsmga002.fm.intel.com with ESMTP; 21 Jun 2022 04:41:34 -0700 From: Ciara Power To: Akhil Goyal , Fan Zhang Cc: dev@dpdk.org, kai.ji@intel.com, Ciara Power , pablo.de.lara.guarch@intel.com, stable@dpdk.org Subject: [PATCH] test/crypto: fix cipher offset for ZUC tests Date: Tue, 21 Jun 2022 11:41:32 +0000 Message-Id: <20220621114132.850412-1-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The cipher offset in bits was not being used in ZUC encryption test functions when creating the operation, it was hardcoded to 0. This is fixed to use the offset from the test vector as intended. Fixes: fd01a9be38d5 ("test/crypto: move IV to crypto op private data") Cc: pablo.de.lara.guarch@intel.com Cc: stable@dpdk.org Signed-off-by: Ciara Power --- app/test/test_cryptodev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 2766e0cc10..49424496b0 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -6035,7 +6035,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata) retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, tdata->cipher_iv.len, tdata->plaintext.len, - 0); + tdata->validCipherOffsetInBits.len); if (retval < 0) return retval; @@ -6130,7 +6130,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata) /* Create ZUC operation */ retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, tdata->cipher_iv.len, tdata->plaintext.len, - 0); + tdata->validCipherOffsetInBits.len); if (retval < 0) return retval;