From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2FA0D69A5 for ; Thu, 23 Mar 2017 12:55:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490270134; x=1521806134; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=cgvAb9io4RORdVQj0a1892pOCvt2CVbPoFSBTA4V+hI=; b=d2pU+wRB47HW5M/yyWZfkKMdo32tHrXU7Gfcp4ZkNNkuxwTxJkISOk1x cBVXM2tUhtJJuedUzoJlKiVIykY50w==; Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Mar 2017 04:55:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,209,1486454400"; d="scan'208";a="239499467" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga004.fm.intel.com with ESMTP; 23 Mar 2017 04:55:29 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.230]) by IRSMSX104.ger.corp.intel.com ([169.254.5.142]) with mapi id 14.03.0248.002; Thu, 23 Mar 2017 11:55:28 +0000 From: "Van Haaren, Harry" To: Jerin Jacob , "dev@dpdk.org" CC: "thomas.monjalon@6wind.com" , "Richardson, Bruce" , "hemant.agrawal@nxp.com" , "Eads, Gage" , "nipun.gupta@nxp.com" , "santosh.shukla@caviumnetworks.com" Thread-Topic: [dpdk-dev] [PATCH 22/39] app/test: octeontx eventdev unit test infrastructure Thread-Index: AQHSlEPimSE2Q74KQ06BCwfj/2uCU6GibOcg Date: Thu, 23 Mar 2017 11:55:27 +0000 Message-ID: References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> <1488562101-6658-23-git-send-email-jerin.jacob@caviumnetworks.com> In-Reply-To: <1488562101-6658-23-git-send-email-jerin.jacob@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTdlOWZiNWItM2E3NS00ZWE2LWI5N2ItMDdhMDVmZTdkODY5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiJaMmx5Vkl1UDl1OFF0cDBYWkxOQkFOSGJ2ZWRIUGFLRkxJQ25MVXU4VGJJPSJ9 x-ctpclassification: CTP_PUBLIC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 22/39] app/test: octeontx eventdev unit test infrastructure 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, 23 Mar 2017 11:55:34 -0000 > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Friday, March 3, 2017 5:28 PM > To: dev@dpdk.org > Cc: thomas.monjalon@6wind.com; Richardson, Bruce ; Van Haaren, > Harry ; hemant.agrawal@nxp.com; Eads, Gage ; > nipun.gupta@nxp.com; santosh.shukla@caviumnetworks.com; Jerin Jacob > > Subject: [dpdk-dev] [PATCH 22/39] app/test: octeontx eventdev unit test i= nfrastructure >=20 > add test setup and teardown routines. >=20 > Signed-off-by: Jerin Jacob 1) I think the autotest_data.py file needs to be updated to run the test co= mmand too, event/sw example at top of patch http://dpdk.org/dev/patchwork/patch/21694/ 2) This requires a rebase against latest head, app/test has moved to test/t= est/. I will ignore this app/test to test/test move for the remaining patches of = the series. With fixes above, Acked-by: Harry van Haaren > --- > app/test/Makefile | 5 +- > app/test/test_eventdev_octeontx.c | 98 +++++++++++++++++++++++++++++++++= ++++++ > 2 files changed, 102 insertions(+), 1 deletion(-) > create mode 100644 app/test/test_eventdev_octeontx.c >=20 > diff --git a/app/test/Makefile b/app/test/Makefile > index a426548..b45a1d3 100644 > --- a/app/test/Makefile > +++ b/app/test/Makefile > @@ -197,7 +197,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) +=3D test_crypto= dev_blockcipher.c > SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) +=3D test_cryptodev_perf.c > SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) +=3D test_cryptodev.c >=20 > -SRCS-$(CONFIG_RTE_LIBRTE_EVENTDEV) +=3D test_eventdev.c > +ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y) > +SRCS-y +=3D test_eventdev.c > +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) +=3D test_eventdev_octeontx= .c > +endif >=20 > SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) +=3D test_kvargs.c >=20 > diff --git a/app/test/test_eventdev_octeontx.c b/app/test/test_eventdev_o= cteontx.c > new file mode 100644 > index 0000000..9744961 > --- /dev/null > +++ b/app/test/test_eventdev_octeontx.c > @@ -0,0 +1,98 @@ > +/*- > + * BSD LICENSE > + * > + * Copyright(c) 2017 Cavium networks. All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * 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 copyright > + * notice, this list of conditions and the following disclaimer in > + * the documentation and/or other materials provided with the > + * distribution. > + * * Neither the name of Cavium networks 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 F= OR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGH= T > + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTA= L, > + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF US= E, > + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON A= NY > + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE U= SE > + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE= . > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "test.h" > + > +#define NUM_PACKETS (1 << 18) > +#define MAX_EVENTS (16 * 1024) > + > +static int evdev; > + > +static int > +testsuite_setup(void) > +{ > + const char *eventdev_name =3D "event_octeontx"; > + > + evdev =3D rte_event_dev_get_dev_id(eventdev_name); > + if (evdev < 0) { > + printf("%d: Eventdev %s not found - creating.\n", > + __LINE__, eventdev_name); > + if (rte_eal_vdev_init(eventdev_name, NULL) < 0) { > + printf("Error creating eventdev\n"); > + return TEST_FAILED; > + } > + evdev =3D rte_event_dev_get_dev_id(eventdev_name); > + if (evdev < 0) { > + printf("Error finding newly created eventdev\n"); > + return TEST_FAILED; > + } > + } > + > + return TEST_SUCCESS; > +} > + > +static void > +testsuite_teardown(void) > +{ > + rte_event_dev_close(evdev); > +} > + > + > +static struct unit_test_suite eventdev_octeontx_testsuite =3D { > + .suite_name =3D "eventdev octeontx unit test suite", > + .setup =3D testsuite_setup, > + .teardown =3D testsuite_teardown, > +}; > + > +static int > +test_eventdev_octeontx(void) > +{ > + return unit_test_suite_runner(&eventdev_octeontx_testsuite); > +} > + > +REGISTER_TEST_COMMAND(eventdev_octeontx_autotest, test_eventdev_octeontx= ); > -- > 2.5.5