From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id F10CD37B2 for ; Mon, 19 Sep 2016 11:18:08 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 19 Sep 2016 02:18:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,361,1470726000"; d="scan'208";a="170463900" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga004.fm.intel.com with ESMTP; 19 Sep 2016 02:18:07 -0700 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.95]) by irsmsx105.ger.corp.intel.com ([169.254.7.196]) with mapi id 14.03.0248.002; Mon, 19 Sep 2016 10:18:06 +0100 From: "Jain, Deepak K" To: "De Lara Guarch, Pablo" , "dev@dpdk.org" Thread-Topic: [PATCH v3 1/3] app/test: cleanup of test code for kasumi Thread-Index: AQHSDzh9LC3MVKE2v0SnlGDeC2J6cqB8zlaAgAO6zDA= Date: Mon, 19 Sep 2016 09:17:06 +0000 Deferred-Delivery: Mon, 19 Sep 2016 08:59:31 +0000 Message-ID: References: <1472131419-89617-1-git-send-email-deepak.k.jain@intel.com> <1473933815-185834-1-git-send-email-deepak.k.jain@intel.com> <1473933815-185834-2-git-send-email-deepak.k.jain@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTcyODgzNGMtNjFkMi00NTk4LWFiNTctYTU3NzAwOTI0ZmU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlRFUVhqSjhDK01YVzBlejZIK2VjSFlQNDdYRm4zZ0t4RXo2aEhaQUJTQUE9In0= x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 1/3] app/test: cleanup of test code for kasumi 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: Mon, 19 Sep 2016 09:18:09 -0000 Hi Pablo, > -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Saturday, September 17, 2016 2:00 AM > To: Jain, Deepak K ; dev@dpdk.org > Subject: RE: [PATCH v3 1/3] app/test: cleanup of test code for kasumi >=20 > Hi Deepak, >=20 > > -----Original Message----- > > From: Jain, Deepak K > > Sent: Thursday, September 15, 2016 3:04 AM > > To: dev@dpdk.org > > Cc: De Lara Guarch, Pablo; Jain, Deepak K > > Subject: [PATCH v3 1/3] app/test: cleanup of test code for kasumi > > > > Cleanup for easier kasumi enabling. > > Changed name of funcitons for clear understanding. >=20 > Typo in "funcitons". >=20 > Could you split this patch in two? One for the rename the functions and > another one for the rest. > Actually, are you doing something else apart from cleanup/reordering? Yes I can split the patch into two. One with name changes and one with reor= dering. Other than this, cleaner usage of Additional Authentication data is include= d in the code. Motivation behind this is to have code consistency across the wireless spec= ific algorithms. Will send another version with comments incorporated. >=20 > > > > Signed-off-by: Deepak Kumar Jain > > --- > > app/test/test_cryptodev.c | 117 > > ++++++++++++++++++++++------------------------ > > 1 file changed, 55 insertions(+), 62 deletions(-) > > > > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c > > index 67ca912..89d627f 100644 > > --- a/app/test/test_cryptodev.c > > +++ b/app/test/test_cryptodev.c > > @@ -1448,74 +1448,67 @@ > > create_snow3g_kasumi_cipher_hash_operation(const uint8_t *auth_tag, >=20 > ... >=20 > > TEST_ASSERT_NOT_NULL(sym_op->auth.aad.data, > > "no room to prepend aad"); > > sym_op->auth.aad.phys_addr =3D rte_pktmbuf_mtophys( > > ut_params->ibuf); > > sym_op->auth.aad.length =3D aad_len; > > - > > - memset(sym_op->auth.aad.data, 0, aad_buffer_len); > > + memset(sym_op->auth.aad.data, 0, aad_buffer_len); >=20 > No need to include extra tab. >=20 > > rte_memcpy(sym_op->auth.aad.data, aad, aad_len); > > + TEST_HEXDUMP(stdout, "aad:", > > + sym_op->auth.aad.data, aad_len); >=20 > No need to include extra tab. >=20 > > > > - TEST_HEXDUMP(stdout, "aad:", > > - sym_op->auth.aad.data, aad_len); > > - > > - /* digest */ > > - sym_op->auth.digest.data =3D (uint8_t *)rte_pktmbuf_append( > > - ut_params->ibuf, auth_tag_len); >=20 > ... >=20 > > @@ -2714,12 +2707,12 @@ test_snow3g_authenticated_encryption(const > > struct snow3g_test_data *tdata) > > ut_params->obuf =3D ut_params->op->sym->m_src; > > if (ut_params->obuf) > > ciphertext =3D rte_pktmbuf_mtod(ut_params->obuf, uint8_t > *) > > - + tdata->iv.len; > > + + tdata->iv.len + tdata->aad.len; > > else > > ciphertext =3D plaintext; > > > > TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len); > > - > > + TEST_HEXDUMP(stdout, "OUTPUT BUFFER:", ut_params->obuf, 512); >=20 > Magic number? What are you showing here? >=20 > > /* Validate obuf */ > > TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT( > > ciphertext, > > @@ -2728,7 +2721,7 @@ test_snow3g_authenticated_encryption(const > > struct snow3g_test_data *tdata) > > "Snow3G Ciphertext data not as expected"); > >