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 3DB359A87 for ; Tue, 21 Jun 2016 04:57:19 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 20 Jun 2016 19:57:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,501,1459839600"; d="scan'208";a="125697519" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 20 Jun 2016 19:57:17 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 20 Jun 2016 19:57:17 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 20 Jun 2016 19:57:16 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.181]) with mapi id 14.03.0248.002; Tue, 21 Jun 2016 10:57:15 +0800 From: "Chen, Zhaoyan" To: "dev@dpdk.org" CC: "Doherty, Declan" , "De Lara Guarch, Pablo" , "Zhang, Roy Fan" Thread-Topic: [dpdk-dev] [PATCH v5 1/2] app/test: reworks the crypto AES unit test Thread-Index: AQHRxiNFYGxJgCY7+k2PZA92dWqgl5/p0ouAgAlsN7A= Date: Tue, 21 Jun 2016 02:57:13 +0000 Message-ID: <9DEEADBC57E43F4DA73B571777FECECA046F11DB@shsmsx102.ccr.corp.intel.com> References: <1465826893-20392-1-git-send-email-roy.fan.zhang@intel.com> <1465898239-65444-1-git-send-email-roy.fan.zhang@intel.com> <1465898239-65444-2-git-send-email-roy.fan.zhang@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTEyMDdhNTgtZDBiMC00ZGY5LTkyYjAtN2M3YmFiYmJkOWRiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InFZVFM2ZEVnSUhXUEEyOVRaU1Z4akUzaVdEY2NDZXVNOEZ2YWl2UlVLcFU9In0= x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 1/2] app/test: reworks the crypto AES unit test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2016 02:57:21 -0000 Tested-by: Chen, Zhaoyan * Commit: 3901ed99c2f82d3e979bb1bea001d61898241829 * Patch Apply: Success * Compilation: Success * Kernel/OS: 3.11.10-301.fc20.x86_64 * GCC: 4.8.3 20140911 * Case 1 ./app/test -cf -n4 cryptodev_aesni_mb_autotest Checked the AES-128-CBC / HMAC-224/384 unit test is added.=20 * Case 2 ./app/test -cf -n4 crypto_qat_autotest cryptodev_aesni_gcm_autotest cryptodev_aesni_mb_perftest cryptodev_qat_perftest cryptodev_null_autotest Checked all cryptodev unit tests run smoothly. Thanks, Joey > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, > Pablo > Sent: Wednesday, June 15, 2016 6:41 PM > To: Zhang, Roy Fan ; dev@dpdk.org > Cc: Doherty, Declan > Subject: Re: [dpdk-dev] [PATCH v5 1/2] app/test: reworks the crypto AES > unit test >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang > > Sent: Tuesday, June 14, 2016 10:57 AM > > To: dev@dpdk.org > > Cc: Doherty, Declan > > Subject: [dpdk-dev] [PATCH v5 1/2] app/test: reworks the crypto AES > > unit test > > > > This patch reworks the crypto AES unit test by introducing a new > > unified test function > > > > Signed-off-by: Fan Zhang > > --- > > app/test/Makefile | 1 + > > app/test/test_cryptodev.c | 1613 ++--------------= -------- > > app/test/test_cryptodev_aes.c | 663 ++++++++++ > > app/test/test_cryptodev_aes.h | 828 ++++++++++++ > > app/test/test_cryptodev_aes_ctr_test_vectors.h | 257 ---- > > 5 files changed, 1614 insertions(+), 1748 deletions(-) create mode > > 100644 app/test/test_cryptodev_aes.c create mode 100644 > > app/test/test_cryptodev_aes.h delete mode 100644 > > app/test/test_cryptodev_aes_ctr_test_vectors.h > > >=20 > [...] >=20 > > diff --git a/app/test/test_cryptodev_aes.c > > b/app/test/test_cryptodev_aes.c new file mode 100644 index > > 0000000..8c43441 > > --- /dev/null > > +++ b/app/test/test_cryptodev_aes.c > > @@ -0,0 +1,663 @@ > > +/*- > > + * BSD LICENSE > > + * > > + * Copyright(c) 2015-2016 Intel Corporation. All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or withou= t > > + * modification, are permitted provided that the following condition= s > > + * are met: > > + * > > + * * Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * * Redistributions in binary form must reproduce the above copyrigh= t > > + * notice, this list of conditions and the following disclaimer in > > + * the documentation and/or other materials provided with the > > + * distribution. > > + * * Neither the name of Intel Corporation nor the names of its > > + * contributors may be used to endorse or promote products derived > > + * from this software without specific prior written permission. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > > CONTRIBUTORS > > + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > > NOT > > + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > > FITNESS FOR > > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > > COPYRIGHT > > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > > INCIDENTAL, > > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, > BUT > > NOT > > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; > LOSS > > OF USE, > > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED > > AND ON ANY > > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR > > TORT > > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT > OF > > THE USE > > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH > > DAMAGE. > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > + > > +#include "test.h" > > +#include "test_cryptodev_aes.h" > > + > > +#ifndef MAX_N_AES_TESTS > > +#define MAX_N_AES_TESTS 256 > > +#endif >=20 > This macro is not used anywhere. >=20 > > + > > +#ifndef AES_TEST_MSG_LEN > > +#define AES_TEST_MSG_LEN 256 > > +#endif > > + > > +#define AES_TEST_OP_ENCRYPT 0x01 > > +#define AES_TEST_OP_DECRYPT 0x02 > > +#define AES_TEST_OP_AUTH_GEN 0x04 > > +#define AES_TEST_OP_AUTH_VERIFY 0x08