From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 143407CDC for ; Wed, 21 Jun 2017 16:41:41 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2017 07:41:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,369,1493708400"; d="scan'208";a="115791805" Received: from silpixa00399464.ir.intel.com (HELO silpixa00399464.ger.corp.intel.com) ([10.237.222.157]) by orsmga005.jf.intel.com with ESMTP; 21 Jun 2017 07:41:40 -0700 From: Pablo de Lara To: declan.doherty@intel.com Cc: dev@dpdk.org, Pablo de Lara Date: Wed, 21 Jun 2017 07:41:48 +0100 Message-Id: <20170621064154.25124-4-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170621064154.25124-1-pablo.de.lara.guarch@intel.com> References: <20170621064154.25124-1-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 3/9] test/crypto: remove unnecessary offset 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: , X-List-Received-Date: Wed, 21 Jun 2017 14:41:42 -0000 For AES/DES tests, there is no need to leave out the first block from the crypto operation. Signed-off-by: Pablo de Lara --- test/test/test_cryptodev_perf.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c index 3568b01..dd4fa35 100644 --- a/test/test/test_cryptodev_perf.c +++ b/test/test/test_cryptodev_perf.c @@ -2898,10 +2898,8 @@ test_perf_create_armv8_session(uint8_t dev_id, enum chain_mode chain, } } -#define AES_BLOCK_SIZE 16 #define AES_CIPHER_IV_LENGTH 16 #define AES_GCM_AAD_LENGTH 16 -#define TRIPLE_DES_BLOCK_SIZE 8 #define TRIPLE_DES_CIPHER_IV_LENGTH 8 static struct rte_mbuf * @@ -2988,11 +2986,11 @@ test_perf_set_crypto_op_aes_gcm(struct rte_crypto_op *op, struct rte_mbuf *m, op->sym->cipher.iv.length = AES_CIPHER_IV_LENGTH; /* Data lengths/offsets Parameters */ - op->sym->auth.data.offset = AES_BLOCK_SIZE; - op->sym->auth.data.length = data_len - AES_BLOCK_SIZE; + op->sym->auth.data.offset = 0; + op->sym->auth.data.length = data_len; - op->sym->cipher.data.offset = AES_BLOCK_SIZE; - op->sym->cipher.data.length = data_len - AES_BLOCK_SIZE; + op->sym->cipher.data.offset = 0; + op->sym->cipher.data.length = data_len; op->sym->m_src = m; @@ -3124,8 +3122,8 @@ test_perf_set_crypto_op_3des(struct rte_crypto_op *op, struct rte_mbuf *m, op->sym->auth.data.offset = 0; op->sym->auth.data.length = data_len; - op->sym->cipher.data.offset = TRIPLE_DES_BLOCK_SIZE; - op->sym->cipher.data.length = data_len - TRIPLE_DES_BLOCK_SIZE; + op->sym->cipher.data.offset = 0; + op->sym->cipher.data.length = data_len; op->sym->m_src = m; -- 2.9.4