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 EA0EB4CBD for ; Thu, 26 Apr 2018 06:58:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2018 21:58:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,329,1520924400"; d="scan'208";a="37134727" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by orsmga006.jf.intel.com with ESMTP; 25 Apr 2018 21:58:15 -0700 Received: from pgsmsx102.gar.corp.intel.com ([169.254.6.245]) by KMSMSX151.gar.corp.intel.com ([169.254.10.3]) with mapi id 14.03.0319.002; Thu, 26 Apr 2018 12:58:14 +0800 From: "Gujjar, Abhinandan S" To: Akhil Goyal , "jerin.jacob@caviumnetworks.com" , "hemant.agrawal@nxp.com" , "dev@dpdk.org" CC: "Vangati, Narender" , "Rao, Nikhil" , "Eads, Gage" Thread-Topic: [dpdk-dev] [v2,4/6] test: add event crypto adapter auto-test Thread-Index: AQHT28neG3L4qiIoJ0yyeUsCocM1oaQRCPYAgAFyWWA= Date: Thu, 26 Apr 2018 04:58:14 +0000 Message-ID: <5612CB344B05EE4F95FC5B729939F780706FF999@PGSMSX102.gar.corp.intel.com> References: <1524573807-168522-1-git-send-email-abhinandan.gujjar@intel.com> <1524573807-168522-5-git-send-email-abhinandan.gujjar@intel.com> <4750e560-5c72-8f1d-ac8e-99af53f5bc20@nxp.com> In-Reply-To: <4750e560-5c72-8f1d-ac8e-99af53f5bc20@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2M1MjJkMGMtYzAwZi00OTFiLWI2YTAtY2U1ZGFmMTA5M2VhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkwraU9GSm1DQ0NKQkF2cTNSMXZJZHpodThwalU4aDBaWjRpV0pZUzRVQm89In0= dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [v2,4/6] test: add event crypto adapter auto-test 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: Thu, 26 Apr 2018 04:58:20 -0000 > -----Original Message----- > From: Akhil Goyal [mailto:akhil.goyal@nxp.com] > Sent: Wednesday, April 25, 2018 8:10 PM > To: Gujjar, Abhinandan S ; > jerin.jacob@caviumnetworks.com; hemant.agrawal@nxp.com; > akhil.goyal@nxp.com; dev@dpdk.org > Cc: Vangati, Narender ; Rao, Nikhil > ; Eads, Gage > Subject: Re: [dpdk-dev] [v2,4/6] test: add event crypto adapter auto-test >=20 > Hi Abhinandan, > On 4/24/2018 6:13 PM, Abhinandan Gujjar wrote: > > Signed-off-by: Abhinandan Gujjar > > --- > > test/test/Makefile | 1 + > > test/test/test_event_crypto_adapter.c | 915 > > ++++++++++++++++++++++++++++++++++ > > 2 files changed, 916 insertions(+) > > create mode 100644 test/test/test_event_crypto_adapter.c > > > > diff --git a/test/test/Makefile b/test/test/Makefile index > > c9c007c9..3200daa 100644 > > --- a/test/test/Makefile > > +++ b/test/test/Makefile > > @@ -186,6 +186,7 @@ SRCS-y +=3D test_eventdev.c SRCS-y +=3D > > test_event_ring.c SRCS-y +=3D test_event_eth_rx_adapter.c SRCS-y +=3D > > test_event_timer_adapter.c > > +SRCS-y +=3D test_event_crypto_adapter.c > > endif > > > > ifeq ($(CONFIG_RTE_LIBRTE_RAWDEV),y) > > diff --git a/test/test/test_event_crypto_adapter.c > > b/test/test/test_event_crypto_adapter.c > > new file mode 100644 > > index 0000000..ea13e3b > > --- /dev/null > > +++ b/test/test/test_event_crypto_adapter.c > > @@ -0,0 +1,915 @@ > > +/* SPDX-License-Identifier: BSD-3-Clause > > + * Copyright(c) 2018 Intel Corporation */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include #include "test.h" > > + > > +#define PKT_TRACE 0 > > +#define NUM 1 > > +#define DEFAULT_NUM_XFORMS (2) > > +#define NUM_MBUFS (8191) > > +#define MBUF_CACHE_SIZE (256) > > +#define MAXIMUM_IV_LENGTH (16) > > +#define DEFAULT_NUM_OPS_INFLIGHT (128) > > +#define TEST_APP_PORT_ID 0 > > +#define TEST_APP_EV_QUEUE_ID 0 > > +#define TEST_CRYPTO_EV_QUEUE_ID 1 > > +#define TEST_ADAPTER_ID 0 > > +#define TEST_CDEV_ID 0 > > +#define TEST_CDEV_QP_ID 0 > > +#define PACKET_LENGTH 64 > > +#define NB_TEST_PORTS 1 > > +#define NB_TEST_QUEUES 2 > > +#define CRYPTODEV_NAME_NULL_PMD crypto_null > I think the supported cryptodevs should be more than just null It should = be done > similar to other test and example applications. My intension is to have minimal cryptodev code and emphasis more on adapter part. More of cryptodev, will make test more complex. That's the reason for choosing NULL cryptodev. Anyway, depending upon chosen cryptodev the adapter code should still work. > > + > > +#define MBUF_SIZE (sizeof(struct rte_mbuf) + \ > > + RTE_PKTMBUF_HEADROOM + > PACKET_LENGTH) > > +#define IV_OFFSET (sizeof(struct rte_crypto_op) + \ > > + sizeof(struct rte_crypto_sym_op) + \ > > + DEFAULT_NUM_XFORMS * \ > > + sizeof(struct rte_crypto_sym_xform)) > > + > > + > > +static const uint8_t text_64B[] =3D { > > + 0x05, 0x15, 0x77, 0x32, 0xc9, 0x66, 0x91, 0x50, > > + 0x93, 0x9f, 0xbb, 0x4e, 0x2e, 0x5a, 0x02, 0xd0, > > + 0x2d, 0x9d, 0x31, 0x5d, 0xc8, 0x9e, 0x86, 0x36, > > + 0x54, 0x5c, 0x50, 0xe8, 0x75, 0x54, 0x74, 0x5e, > > + 0xd5, 0xa2, 0x84, 0x21, 0x2d, 0xc5, 0xf8, 0x1c, > > + 0x55, 0x1a, 0xba, 0x91, 0xce, 0xb5, 0xa3, 0x1e, > > + 0x31, 0xbf, 0xe9, 0xa1, 0x97, 0x5c, 0x2b, 0xd6, > > + 0x57, 0xa5, 0x9f, 0xab, 0xbd, 0xb0, 0x9b, 0x9c }; > > + > > +struct event_crypto_adapter_test_params { > > + struct rte_mempool *mbuf_pool; > > + struct rte_mempool *op_mpool; > > + struct rte_mempool *session_mpool; > > + struct rte_cryptodev_config *config; > > + uint8_t crypto_event_port_id; > > +}; > > + > > +struct rte_event response_info =3D { > > + .queue_id =3D TEST_APP_EV_QUEUE_ID, > > + .sched_type =3D RTE_SCHED_TYPE_ATOMIC, > > + .flow_id =3D 0xAABB, > I believe all fields shall be filled here. In some GCC version it will gi= ve warning. Ok. Regards Abhinandan > > +}; > > + > > +struct rte_event_crypto_request request_info =3D { > > + .cdev_id =3D TEST_CDEV_ID, > > + .queue_pair_id =3D TEST_CDEV_QP_ID > > +}; > > + > > +static struct event_crypto_adapter_test_params params; static uint8_t > > +crypto_adapter_setup_done; static uint32_t slcore_id; static int > > +evdev; > > + >=20 > Regards, > Akhil