[dpdk-dev] [PATCH v3 1/3] app/test: cleanup of test code for kasumi

Jain, Deepak K deepak.k.jain at intel.com
Mon Sep 19 11:17:06 CEST 2016


Hi Pablo,

> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Saturday, September 17, 2016 2:00 AM
> To: Jain, Deepak K <deepak.k.jain at intel.com>; dev at dpdk.org
> Subject: RE: [PATCH v3 1/3] app/test: cleanup of test code for kasumi
> 
> Hi Deepak,
> 
> > -----Original Message-----
> > From: Jain, Deepak K
> > Sent: Thursday, September 15, 2016 3:04 AM
> > To: dev at 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.
> 
> Typo in "funcitons".
> 
> 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 reordering.
Other than this, cleaner usage of Additional Authentication data is included in the code.
Motivation behind this is to have code consistency across the wireless specific algorithms.
Will send another version with comments incorporated.
> 
> >
> > Signed-off-by: Deepak Kumar Jain <deepak.k.jain at intel.com>
> > ---
> >  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,
> 
> ...
> 
> >  	TEST_ASSERT_NOT_NULL(sym_op->auth.aad.data,
> >  			"no room to prepend aad");
> >  	sym_op->auth.aad.phys_addr = rte_pktmbuf_mtophys(
> >  			ut_params->ibuf);
> >  	sym_op->auth.aad.length = aad_len;
> > -
> > -	memset(sym_op->auth.aad.data, 0, aad_buffer_len);
> > +		memset(sym_op->auth.aad.data, 0, aad_buffer_len);
> 
> No need to include extra tab.
> 
> >  	rte_memcpy(sym_op->auth.aad.data, aad, aad_len);
> > +		TEST_HEXDUMP(stdout, "aad:",
> > +		sym_op->auth.aad.data, aad_len);
> 
> No need to include extra tab.
> 
> >
> > -	TEST_HEXDUMP(stdout, "aad:",
> > -			sym_op->auth.aad.data, aad_len);
> > -
> > -	/* digest */
> > -	sym_op->auth.digest.data = (uint8_t *)rte_pktmbuf_append(
> > -			ut_params->ibuf, auth_tag_len);
> 
> ...
> 
> > @@ -2714,12 +2707,12 @@ test_snow3g_authenticated_encryption(const
> > struct snow3g_test_data *tdata)
> >  	ut_params->obuf = ut_params->op->sym->m_src;
> >  	if (ut_params->obuf)
> >  		ciphertext = rte_pktmbuf_mtod(ut_params->obuf, uint8_t
> *)
> > -				+ tdata->iv.len;
> > +				+ tdata->iv.len + tdata->aad.len;
> >  	else
> >  		ciphertext = plaintext;
> >
> >  	TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, plaintext_len);
> > -
> > +	TEST_HEXDUMP(stdout, "OUTPUT BUFFER:", ut_params->obuf, 512);
> 
> Magic number? What are you showing here?
> 
> >  	/* 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");
> >



More information about the dev mailing list