From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id ACB275F33 for ; Tue, 8 May 2018 10:27:39 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2018 01:27:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,377,1520924400"; d="scan'208";a="37672392" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga007.fm.intel.com with ESMTP; 08 May 2018 01:27:36 -0700 Received: from pgsmsx102.gar.corp.intel.com ([169.254.6.245]) by PGSMSX103.gar.corp.intel.com ([169.254.2.118]) with mapi id 14.03.0319.002; Tue, 8 May 2018 16:27:36 +0800 From: "Gujjar, Abhinandan S" To: Jerin Jacob CC: "hemant.agrawal@nxp.com" , "akhil.goyal@nxp.com" , "dev@dpdk.org" , "Vangati, Narender" , "Rao, Nikhil" , "Eads, Gage" Thread-Topic: [v3,4/5] test: add event crypto adapter auto-test Thread-Index: AQHT5KFy4vc5RMArn0quCJ6O7fAyG6Qjh1cAgAH670A= Date: Tue, 8 May 2018 08:27:35 +0000 Message-ID: <5612CB344B05EE4F95FC5B729939F7807070360A@PGSMSX102.gar.corp.intel.com> References: <1525546030-11204-1-git-send-email-abhinandan.gujjar@intel.com> <1525546030-11204-5-git-send-email-abhinandan.gujjar@intel.com> <20180507100833.GA7848@jerin> In-Reply-To: <20180507100833.GA7848@jerin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [v3,4/5] 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: Tue, 08 May 2018 08:27:40 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Monday, May 7, 2018 3:39 PM > To: Gujjar, Abhinandan S > Cc: hemant.agrawal@nxp.com; akhil.goyal@nxp.com; dev@dpdk.org; Vangati, > Narender ; Rao, Nikhil = ; > Eads, Gage > Subject: Re: [v3,4/5] test: add event crypto adapter auto-test >=20 > -----Original Message----- > > Date: Sun, 6 May 2018 00:17:09 +0530 > > From: Abhinandan Gujjar > > To: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, > > akhil.goyal@nxp.com, dev@dpdk.org > > CC: narender.vangati@intel.com, abhinandan.gujjar@intel.com, > > nikhil.rao@intel.com, gage.eads@intel.com > > Subject: [v3,4/5] test: add event crypto adapter auto-test > > X-Mailer: git-send-email 1.9.1 > > > > Signed-off-by: Abhinandan Gujjar > > --- > > +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, > > + .sub_event_type =3D 0, > > + .event_type =3D 0, > > + .priority =3D 0, > > + .impl_opaque =3D 0 > > +}; >=20 > This may break old compiler. > see http://dpdk.org/dev/patchwork/patch/39398/ This change was done as Akhil had suggested. My compiler was not throwing any warning on this. Anyway, I will revert the change now. >=20 > > + > > +struct rte_event_crypto_request request_info =3D { > > + .cdev_id =3D TEST_CDEV_ID, > > + .queue_pair_id =3D TEST_CDEV_QP_ID > > +}; > > + > > +static int > > +test_crypto_adapter_stats(void) > > +{ > > + struct rte_event_crypto_adapter_stats stats; > > + > > + rte_event_crypto_adapter_stats_get(TEST_ADAPTER_ID, &stats); > > + printf(" +------------------------------------------------------+\n")= ; > > + printf(" + Crypto adapter stats for instance %u:\n", TEST_ADAPTER_ID)= ; > > + printf(" + Event port poll count %lu\n", > > + stats.event_poll_count); > > + printf(" + Event dequeue count %lu\n", > > + stats.event_deq_count); > > + printf(" + Cryptodev enqueue count %lu\n", > > + stats.crypto_enq_count); > > + printf(" + Cryptodev enqueue failed count %lu\n", > > + stats.crypto_enq_fail); > > + printf(" + Cryptodev dequeue count %lu\n", > > + stats.crypto_deq_count); > > + printf(" + Event enqueue count %lu\n", > > + stats.event_enq_count); > > + printf(" + Event enqueue retry count %lu\n", > > + stats.event_enq_retry_count); > > + printf(" + Event enqueue fail count %lu\n", >=20 > Use PRIx64 to fix issue with 32b build target. Ok >=20 > > + stats.event_enq_fail_count); > > + printf(" > > ++------------------------------------------------------+\n"); > > + > > + rte_event_crypto_adapter_stats_reset(TEST_ADAPTER_ID); > > + return TEST_SUCCESS; > > +} > > + > > +static int > > +configure_eventdev(void) > > +{ > > + const char *eventdev_name =3D "event_sw0"; > > + struct rte_event_queue_conf queue_conf; > > + struct rte_event_dev_config devconf; > > + struct rte_event_dev_info info; > > + uint32_t queue_count; > > + uint32_t port_count; > > + int ret; > > + uint8_t qid; > > + > > + evdev =3D rte_event_dev_get_dev_id(eventdev_name); >=20 > No need to assume it is "event_sw0" driver. You can select 0th event devi= ce for > testing. If none of the event device is available then you can create "ev= ent_sw0" > with vdev. Ok >=20 > > + if (evdev < 0) { > > + if (rte_vdev_init(eventdev_name, NULL) < 0) { > > + RTE_LOG(DEBUG, USER1, "Error creating eventdev\n"); > > + return TEST_FAILED; > > + } > > + evdev =3D rte_event_dev_get_dev_id(eventdev_name); > > + if (evdev < 0) { > > + RTE_LOG(DEBUG, USER1, "Error finding eventdev!\n"); > > + return TEST_FAILED; > > + } > > + } > > + > > + ret =3D rte_event_dev_info_get(evdev, &info); > > + TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info\n"); > > + > > +static struct unit_test_suite service_tests =3D { >=20 > It is not "service_tests". Choose an appropriate name. Ok