From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0077.outbound.protection.outlook.com [104.47.32.77]) by dpdk.org (Postfix) with ESMTP id 608D3FAEF for ; Fri, 3 Mar 2017 18:30:26 +0100 (CET) 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=+7Fveak5g4Y4HC2/sLaabx88UO5PELo0iyGCHk4XOSY=; b=hzBnhP09zBrNirBd5MnrKSQnz+CSNT9m3oCv5zLx7Rjc8yFpcsSU0RH8MpEqVoUPg98Pm1O0k4OudCrwbzBysmsBx+RMu8pqdkV0VxujV6yPUSQY5wo6pP+CccUyNnj4rkPNngYcW/KWdIL04yaSa+PJqf5WqiR6pKwK8RPUVSI= 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.localdomain (14.140.2.178) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Fri, 3 Mar 2017 17:30:21 +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: Fri, 3 Mar 2017 22:58:04 +0530 Message-Id: <1488562101-6658-23-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-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: BMXPR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.174.214.159) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: d5d7e9b6-9b30-491a-9c22-08d4625afa41 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:Q4OBrbsUsmeiG5q/mQ9TEAU9xssmM5SHYSicb+RA5tCLjAfuZlPae3fCW/bSkwvxpjgfPbSZoHW99oTJ4YCVhGdDQS1BoceSf39rXQWrzsVmdCU8Tb5Cmv4CwrTwJ0mJQLeiieeTZZSQOvs7RlT9h77qVTSkp38gYUkf8viWzH8FDXrd4RBy0Ze7tSk2UD7QX35m8inrC5JMiBusnLUjRZoy76U3ghlmCsliwYvSnG8T5mWE1b1qQ64vevTaDdzeO4dgd3VM4RtCgCBaqCSLQw==; 25:Hzy0MsVf7gL5AizhFeEBC97T4uMfl/7EC7F6Dj2bBYTUPUXD9MvAvbG1wHrdYFyMQdn6CgB4aGrJ+prCPikfTgh9FL8mxPPtVXw1sC2+DaGm+kkFYh6A2ECELPlz38RDBGY0QkQQgB+KH4srjkxUGz30gU9e03h6xczQZ3hxe4urlyEd+bViuJqHocUiKRz2fTYyezWce8BqWroWBpKj3WO9Hpst31wnhgM7qHPcbQONmisdsAmn/bjxJFygJbVwvVD2LcfZKntRVo2WVTe73vKmgEAtXBKYsz4fW6toHj5dUpCc5dYe9wknQM9ENTZrDADVol4BH0pW3LRxc8x3jc+UMINN3MMh1z5keGkuqAAyQFJn8kvRsjtW+wRiIbF/E5NvpS/GYcIeyaUXalz5CRxHkJ8PTJZ37awlKXXvVhbJ4MsGA4tFCIAeCX/0/3M+S8kmr7kDHSCjZ/BgXaDzbw== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:OXbYgx1vR8zh0gEycOMT+4EZpqWrPV+J0MFUC0uXYAUhHlOPNnO2rlhkX299+jPsR68mPmUcA3WmvtkS5kSGisXKAqq7IYctJ29+3H8TBQvsVQYyLQnM/90k7WiKwfC55XIq9Rcwe5JJ15MZbLg4ZeNWXy3IA7H6VYj/Lpz6mK/k55zfH+IMjb9ph47yH2Qy0DLedIEa9jM0H8M88Zik7VdM5CoMeGPEOvxL+EFPk1Y=; 20:06kGHlN8elruhGxm0BLxIp4bU+dYOfEiGTpG8H1/0dJ8q87cvacby3QSsWj+ULewXIoRuECozoVMCAqBihpAdFi5w7X9CDgvrLqgY0Kpys1SY3+smxS2h0qRJMvMfavoi0N1FDKbEHvdCDoNS9IJyymArdCj4ADAV/tfgF/SCQLrnkjJP7fxnJQg1+/z2uJvqyXlPrr24hOOJRkWFhaja3JvXLslpVwrCg3kFYTHlEYFYPhW2/ctcLqpDq+0in0p1xZd2fvgGMLcLpGuG9Qh02pgE6XxN5jdBODkHoCQEzvQVQDK/JtYZhn8eHmhPvbk6larafSqDeABOvzIIgPG/2cvxoCrfpdKhAv4fxDa1O32kpaZiixCat4sR9Ej0T1T7XhCwefvj7Nev5Qriid4Ny+UJM78qtkG0WwqPSQ16ufz+J60hoDcz5XEKIbB1C4I317NVwZnPjTpFRuIymrFfDuNmJzjQyYioxLxTSf4zKg1fRp+Ef759toWchzmn6i5JONLyF8JqzW3JmHQ7Ip6E2JvtE5/QBByeNj+Xn7t3SHfT9nZ1A3BYLyIdYl7+uaZ5xgIvaOGknM08rvrj3dAbF6S54Utziiw/FHXUPjHjmY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123558025)(20161123564025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:h443iu7qbjH8k8x4Lb/gNKazO+vWeeRFr/2ariTdDm7iL09m3QTTpYagZv6xrKe4tQp1N9sw7UlN8Uhmi+8ldkmwla3eGnSVfaD40fa8wxGGLflIkyW8xpSrsJ51v0YdCnfUVEgM4HdmVCbvYLS4LBPStRoLciB0DLGoUozKdUSNJSt6YHLBrDt795MBqsv4xCs8H4W0yzRSdf220bHdlaWnuMGO9is9BmzBhBWx6Bio0hxOOtM04RTA3Sgo4Czlb5sK7EUO5IKOuPhlXdqxo12apl/ZggJNG/TCDZ6JQo9X4Kwd/g+KCA9a+WT+PON1T0bWckzZcgIoFm5H61OrUlq8kYkldwOptvF5PW43Qxlknv3LC867hwuVOKTSUHFQQmtmmLY7V7Oap3BTAFPEd+cj4EHziHF8cH6Zbb9EulZ1SZd0F7Ur8S3sR2XZ6DpAzUPb4sXgJ9fas3EA+2gQ1qIET9hG1VRChAfIBJU5yqkSHcXPizxKBQtrueqB4FM3NmIlufYYr1KRn6OW8KG6ruiu1oYWXkMzgf4eJOTEPAhHjIn6oc4SLZ+mDEk0zEQ0FFZI/bqcdozX/6eI5trD3+FCQIU+HxR0+tUNEsuZ+OA= X-Forefront-PRVS: 0235CBE7D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(3846002)(50986999)(6116002)(36756003)(81166006)(6512007)(97736004)(2361001)(2351001)(6506006)(5660300001)(42186005)(50226002)(8676002)(6666003)(106356001)(8656002)(2950100002)(2906002)(25786008)(47776003)(6486002)(76176999)(33646002)(7736002)(107886003)(42882006)(66066001)(110136004)(4326008)(38730400002)(6916009)(305945005)(48376002)(92566002)(5009440100003)(5003940100001)(50466002)(189998001)(53936002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: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agnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:PE+VTBX8GxN/JYBxz/oGmlQTCUPDqOiG6O85Q0V3tOiSYtKHh3f6H2hocYUczEOcQAYAAt/kW4IQFLzZsnP20ddF7E6Ry/qtAaqtTjs+SSFpY6su1IwZGk2fxBujw/Mt7PG2QEd46ZDWuZVR6LP6TOkktwXYMbRObs9uTf5Ig2DPLp+S3y+3vdfryoNDpEwaeXiEds9Z8DA1/HBkdH375lIyBTrw3HX0iVsfq1G3tkVcOanm4hUuTBORT6CIvHgisMx+bDVC0AkZFqFw9YKY8ZNh6nWCIyAomYb6KzGDdEH4XTgiVwF6eZbtzeYUvI5Qxpy+3M+ZLCab94AByz9hLA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 17:30:21.7514 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [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: Fri, 03 Mar 2017 17:30:26 -0000 add test setup and teardown routines. Signed-off-by: Jerin Jacob --- 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 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) += 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/app/test/test_eventdev_octeontx.c b/app/test/test_eventdev_octeontx.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 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