From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0088.outbound.protection.outlook.com [104.47.38.88]) by dpdk.org (Postfix) with ESMTP id 5E88A316B for ; Fri, 31 Mar 2017 21:36:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=GJD7qho9mndbYQTtVcbEVyWxaPsk4IlubVJNkyRlysc=; b=gmTtDGrX5DJ5ZJptRDsWWJegYdZZpu05s5vDOVNF2KIW/wFY+2U/H7OgHVOXAP4zwkWZZ4B3kIc/SB9uSTDF1dUgPeqEnDmg/VYIt78rYL0GIMTlqkprtXWl+T2cl07K954LTbFHefnaLdJVXHRwB06qRmyXPp90ccBmcnzo1pU= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (14.140.2.178) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 31 Mar 2017 19:36:50 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Sat, 1 Apr 2017 01:04:46 +0530 Message-Id: <1490988905-12584-20-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MAXPR01CA0058.INDPRD01.PROD.OUTLOOK.COM (10.164.146.158) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: f53e597a-c5f0-4711-9374-08d4786d48f8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:+N7FZ4Nk2pk86+CnWuTfrrvUQYIsmJe1cW9lWX7E3sQjW6Nt1o9u7AxCjPabjgWg0ymSBgIjfLnI2EWLBOJg0UZxv4sl6jKgH5bPUrksTFi/ZSTDgSoLkFriS+N7I/f4hQqvkGhLbRBBfNuxJQaKHQmQBkbs+6gvcMrq9AOB9r7oQXUhopvm3a6j07SqTAkKATDyZAK82EQ/YfUgKGnqBoJsnOj8tKx2Iw1/3Zeg+1XIowXEYMha50v1BnTU92eU9eLl12i9SzpKluKjVJXc0DgX9qR5jOMlCDmPzjYzAKZ+Q16FPAAQHXi2HDLNEpD2BqRAFwVTuvzXXjvXMaI3FA==; 25:SGE/LmgDZIDjX6gzkg6rFXCzvq7+3zK/+M48z+yuCQnHWSdRL7ScKKu3T4lCdRYW/vWJa+sWJScQno6B49ioZ3t9e9TqjvGPn2liSFwZwMXnJnFM7FIyaAJmJWhIcKRxGsTvBuOsZL6MoLH2UioQSrY1xe8lF1wEagq6JMjX93+g9tMQIMPPGpO5mQEnw7UneTAqvzL9L/tnVCnqg5ohJXLA929HgH9IBftEqVOr/vxU6gw1YVCWWR10iQxRWIb7xALb67pPYcSD5aF3H/Kh902HR+t/mb5novf52XrGsK5HSpCLlfQvGpyEOMON9Hsa0cFZ0ieLgfcbJSHjPYX4q8TpZqoG1vubadt6hvVwNjdO+aA7zO6xNixj1+eeAjuhBI7A6LySoxejWCoFqXrYGCDMVXwDP3vXo/8flOpcSYUF1a4OyWBGOlkcRbyBXpcRsVCSmX/74mDzJCkFccVtqA== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:OMIt7+2m0gwJs1YPhs9LmOoeEFfT3wMTjP7MjVjJlpj6KdP8RuI8/0kcM6Jgv99zwEJihf/YdGWgFN/K0j7xMOtFc1qA5dJXBT01IIDVEJtrm8eZwut8s/ORP4Cd8dCxwzmagE3pEZ+08lD8XEoEMG1E7IKx6p76UbMvoI/2IFf8Owg0L0r5T+F8f0ooqSV34GpslR+EFOaPZIqVh7GI2VS0BgLY30/0xKGBQhl5w4U=; 20:aUMACPFW6a5CH7fa579VQlUXi+OKtEoDbuOWLYX+6yTLF4uHSYTpxYNdqwGSBS2sA5JB8e+cdN6F66wyAqW+2VhdJgj0vIpjj+dPKWnB/Oicb2+U3CuxxwZuhD/+uGXnuZgBljKDLGqcscZq0r0zsUdzbFRCf29VRT/reVPgnadfnFFsoumCg/cxpqVQnoB6cDWP2x6ougKa8aoar4MlMnhaccNT4XI1J9Ff9WKo1xXrrpQG4KsStJqaHPYUxvSU7gg/0D7Owgj8LROUFa07iitKt2sWyQqQOmq5ziQ4co/OHE443VcugU12QsPCr9d+Ie+Z6VoEhaAQrLCyfh2N4wVZ5t3xCFKhjcvMN5Y28KmWHEZlUDWhgtZuDknQszeR8bHEecsYhiHtYxUnMuA639bp7yztgRMlcAUOjdrcqzid4c2bV4cw8219RMR2zsUu3wQQe1uEjYTEo70TRoOs6z6yl/xqlz1eLuZc2XnCmbMtYxUoVcpl05vC87zDyG2ijNcIbdtcHbIw8HspFaq5z8fR1amwUaiNA8kdSj8LQQsrOG+SPFAqQ4cDa1FMG1voIxl7pWRuBuwPtSjqftML395r5/KvbHpN0SOOIHqT0EY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(6041248)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123564025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:nYry/dwvHM5gm2BzOaDONoaojEqhpsdAV2+1aV18PlM93zEFsTNRSDxgiRFc27jtkHgXeq+Uaool1JUySAWfWDL0CrEIC3NDw0PJVNCnOsux38yonrmMxe2GZ/22IitUJYH/tJGA1QwVSBqWZSkqCdxxQv6SP2BJ/BlsRbMqG6fFNeqeCoXLnd0aOnaO5WqL+z22bCKIuuUkhzRGuQaMlteaSRd50YmZx731IzYo0od/wBpROW2KLRfe3cTzC2hsZZKk5MEfk2/mwgOa1zSb/wldCj+4bR+YLYUuLjb4/01jwbtpBva95UDT0vXD4mgTUoX2UE07vzxxUNPYGcsOnagvl6GNpe1e6JB4PDzllgcf9JAJfGXKVeK0PphMrlWjO7WQ4ksBDVdBzTo3fPxyL3mM8IL5F+omBKUjWU6V4x4E68Ck6DUiehr5DekkmCGRAL393MtAt1hfSY7uYVwhoZ2dRSCzjDQmorfsfHteRfKKvkj0jPKCAcuhnsevBx9wPOHZwDW1AsjdhPLGRNAxi3V9nHwxH1koIEgpReDsWkOzZZRebRVEpU01fKk7UCn4paABtqnZnjEgvnwK2T1BBCXY4TzojSrzG9996Vi6pI+Wmm1hVjKkdhhqdpfreUGHrQijlpDieF5CVRDvXqEaLhRhSFU7XrUU957mV4fRKOB/udNuqUXJgVzBw5e/8B11hfAwwckszOPNdHqLqoxO9fhO1a+s7wEhV77UJp8Z3Dj/BATebl7tnLxbV3Q6PJjE X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39840400002)(38730400002)(8676002)(107886003)(110136004)(50466002)(189998001)(305945005)(6506006)(36756003)(50226002)(25786009)(48376002)(6666003)(8656002)(6486002)(7736002)(2950100002)(5660300001)(53936002)(81156014)(81166006)(3846002)(42882006)(6916009)(6116002)(6512007)(42186005)(33646002)(2361001)(2351001)(76176999)(50986999)(5003940100001)(47776003)(2906002)(5009440100003)(4326008)(66066001)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:jA8FMTKVAG3hFIMNZXSLz5V3u7uctih+mJtTHUK?= =?us-ascii?Q?bM1BMXHwM6vUZDO/sRwOhNnBW0O9UILV8oq6F8S740m8/FAGvr0ObdF4kbC4?= =?us-ascii?Q?vLvUj7bRb2w5lF4SGL1QAjFoyQ5X5DuWVNjcBzYL42MV9S/HMYiBpo+oXZ4P?= =?us-ascii?Q?yqJLYjcI8Zyx5gxNLmVo0ATkCyxeC1kCjvkS9NComDhM8qEC7T4hLyAU5jpw?= =?us-ascii?Q?4C3mefYHvMV+JHmEkUokBkD9F/iwBtsZNYFYARMCNPTLKDr2etHQZPB9PBU3?= =?us-ascii?Q?4IcWSDZdlnOOQcBDJ2ZPKVv86ZsQ3gXRw3jw7GJiAoT7dGFOOQi4P4dbfNLO?= =?us-ascii?Q?+Jg7X+DkMoZ3bv4Xjcf0nr+XP76w0npBe45mQ4iNRvW1z5G72gm3y5mjN6Om?= =?us-ascii?Q?JgN17W9rixoUFAZ56KmNv/sztG00VZXJ9Qf4OtiyCkCotWEDW4mlBCMZVbuw?= =?us-ascii?Q?JEonYVQPyZm2n/l0L9zG7cMMX5hc9yj5QWJutPE1OnJShgRIz9JeasWfX6Tk?= =?us-ascii?Q?AFJbXu5AnL2SoPDEMP7VE1CAw2Ff3UV8e5VoEpbyt2rpffYu6BxxuPLUfhwa?= =?us-ascii?Q?ZPOFBuhEBSyAOixj1NkZZfa7gG3OL6aBYYLRn0Jv/MD+qxG47FXEvKLGHm+P?= =?us-ascii?Q?O4kbwdJR0iH3yqUUZPUobriPYDAyKwcCn20jg/9S3wEeYUyjEJw5m9RwU9cI?= =?us-ascii?Q?/csIhvaWKShtoEEL1wFkkk+t8QzqaYsp8gyM6VoJFZWXPAjSqbln6qCphhXy?= =?us-ascii?Q?NVnIAnU8s1UgyuuHkS/tdNPa5N+coQa4jzaYQVfl2aeu73dmWQoLsumrpEot?= =?us-ascii?Q?9QjWVsEZwCghJuOdCrMthxyYNzJsMsSP4DNW2TGvDKjkav0jnnfqmlid3KKQ?= =?us-ascii?Q?WJ4whUEeAAh1YJX5OWejqMRziMnSxg4xWsdoYm0nW/qcfM1+TwMejDLCMydC?= =?us-ascii?Q?lDkoTPOxN8Y+CspovP3GU2TIVr5MKIX7dcT4dWwUvb48LhiIaLb4heJGPDBK?= =?us-ascii?Q?rm3dJOKi3f2kjY9XDajfsWGVG+to9ySlA788gt7PkNvMWsK6iszJ29phDEXH?= =?us-ascii?Q?4j6851Ls/ENefuWeH9ARImsOzvViUwyywXi7J3AAhIxZxWysoGf+sJyRq/AS?= =?us-ascii?Q?Mzs3Z0xRbdSMSJkB9s5JGSa4DXRkV7ITFWIYLV1kaoqrv2eXXX+K53weduTm?= =?us-ascii?Q?5/isR6/5xhVgEinY=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 6:t81rJj5HAUCnEaRAwtfZW+mH95qFFWVVe1vfcVNzz2c8lyjM3s1O/nFv7zdnhdOF98lv0TI+bHncaja7kCpSMuMDjKLlLiwmM8GUydFJijypsPpjsDddDFc1aU4yi+IV47hpfC/J2FlVo5PK9u6hp+L3lcsufRo2XShFACSD025gPmwyDlGKDU/c4oEhMJOlLE4f49eGMDn6Xs0P3TzZkKr2Jek5HLKQ03c+MNu3SpphwvpSwGz+UK+hqw5DqpqRFLwP1Naga9CyYbZmZ4xPRN9pafwA7mFV31DEYDHR27D9fXhlDtrdbmPTnV1emtIaZxsGB5isU0+g5tJ+DqbMAsOfluofCSoaGCqH0YcF+MaQc3rIxp5FappqmtmMDVtCArrzMMcubkysfOuxABBr2A==; 5:m+dq9BnjM0iDC+TBcuxxsWBKVKjCFwuoTu8vbj2XzVly3HcMxguZ8BC6W1hA1MxIgg+AtNzCjUi92ZIT+ZnQa5Z5Et/u7y76DY1zASGS02CRR4BXwiQgB04zePwKvzx/FQMcvCKeMCqt/20Ri89PrUfBWNKdp0QC1c5OiBSyFzI=; 24:ycaHPZm/W9wF05nQNepkm/EaUf65dX+byVoI80/QywTaezYPBLp8hXso/zAc1T4CmiWtqfOhYNr2bYy632s0mlf7k8kEvKd3qbHj/+uhVqw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:2Q1w/uB19ZwCMRe6GPx10Paye4fZ/y5+qfOsbdXYX8qIMcUGFNqgkgmFaIC/jZ/luuMTLEqoxTL1Z8w3jAg971YWLETlvu9gLaTkndmueuvcfn2R2Ij4yEDgZIGReBbIp9riyvTzG3JPjRLoIEkEytRywvayl1cOhFMTyzDTo2GVvqgSN6JNDYyprPXVRwS81Apa8MZGZoWlrsFaNyHqwTl1flzLRQkXdUEHDuTzeAJ17wKC6dJXwOPqk+f1PFiogYCuRGAm9JmTuBUstWweJ9Qw6n8ChPI6dz+cysHvZ+vZzBl/MGsc02OmJlBebhuD7fAHbDXZKaYVVX7kIrZvNQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 19:36:50.4001 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v2 19/38] test/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: Fri, 31 Mar 2017 19:36:56 -0000 add test setup and teardown routines. Signed-off-by: Jerin Jacob Acked-by: Harry van Haaren --- test/test/Makefile | 5 +- test/test/test_eventdev_octeontx.c | 98 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 test/test/test_eventdev_octeontx.c diff --git a/test/test/Makefile b/test/test/Makefile index a426548..b45a1d3 100644 --- a/test/test/Makefile +++ b/test/test/Makefile @@ -197,7 +197,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += test_cryptodev_blockcipher.c SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += test_cryptodev_perf.c SRCS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += test_cryptodev.c -SRCS-$(CONFIG_RTE_LIBRTE_EVENTDEV) += test_eventdev.c +ifeq ($(CONFIG_RTE_LIBRTE_EVENTDEV),y) +SRCS-y += test_eventdev.c +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += test_eventdev_octeontx.c +endif SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c new file mode 100644 index 0000000..9744961 --- /dev/null +++ b/test/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 FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * 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 = "event_octeontx"; + + evdev = 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 = 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 = { + .suite_name = "eventdev octeontx unit test suite", + .setup = testsuite_setup, + .teardown = 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