From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0066.outbound.protection.outlook.com [104.47.41.66]) by dpdk.org (Postfix) with ESMTP id C20277CB6 for ; Sun, 28 May 2017 21:59:51 +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=dudfnne5kVetGkXx9dlfK+Z79QjatfbMhnCF3WO48U4=; b=jjtPrfi3aVHK6BD7P+hneozkXzDK1PMtkCKRq3/4ywDdGcmOfAK7lrKZ5g0K2efPnNfygrXVkGTIrW8DB9aeXJShhhhSoiLvGwU8lCv5PG+nnzupThE0+70aYeyp2z8D20bZCN+Pv1pzjYH7Xu0dCEVTpkYluKG/7aq/L7pckoE= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin.domain.name (111.93.218.67) by CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Sun, 28 May 2017 19:59:46 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, narender.vangati@intel.com, nikhil.rao@intel.com, gprathyusha@caviumnetworks.com, Jerin Jacob Date: Mon, 29 May 2017 01:28:24 +0530 Message-Id: <20170528195854.6064-4-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170528195854.6064-1-jerin.jacob@caviumnetworks.com> References: <20170528195854.6064-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0003.INDPRD01.PROD.OUTLOOK.COM (10.174.214.141) To CY1PR0701MB1725.namprd07.prod.outlook.com (10.163.21.14) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0701MB1725: X-MS-Office365-Filtering-Correlation-Id: 55c0c52a-8bf8-41ee-162c-08d4a604199e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 3:tP98H41HIs7WVU3xRPBX5LCcgbfvvrfS9ELvZJx0IqoIFJDh6NpzbKZVoAVQyZjP20JbMZJh9wLwKLDayRFJ5dAq7wlT3jxJzkOLnt283AeJsTojaIkE3CH2hvwW6D6vRLRWqQ3IEHaH2Nkn7vQHUkh/rxa5Lnz6o0gEDVxhFpm8WoMKCWaS/GEWnstoJw7VXPLYsG6qE6C4JbP1r6BYGrGv4DnbQHM9ksinsTxgzWIpXcKZF1fNI9QsfSO7ttEJF39jFXFolDuH+ACCKYsjGgPEbqP9ubIofGXyyXjEoT8sO9nEd4yJ/wKoKAbZfdmmsKKYL3pJdxoY0C1nvPzK4Q==; 25:SZsl4/2SFdEptYQln6qv4mKsVL4F4oYxPviiU6N3zbs9oeYJGKzWnFw9kZprDCxhchxvycF8Uh19abarq/ADfeZJXpo0u0DZOBiC8IYaLBodfW0Eycp4PMR9XZuik68X0CGprgn4Q3fU+GdgX/XTlPxWcHwknd6WIdEPIPzB+AU5F0ReWFclETUZIWbAfhtIVYLo3NHOK7ORTGTr5KiK8wEoqGo0CLMYlEc4oyBkHVXLw5lGpABOFOWa3k0ibfL0ItoNhRdJ3kOrYROOoP7DsD8XJ7g2D18NjOgTsXfTTZkej8H5U/8mG2fThuvaN7s8eNwH/VnfOCujZ5aKusjZ4apYjaAvoSuiy0udksTYOVD4/L6SxQRp7xBuXAbh7f3jZbDEfRKVhoVBUlwT8rjG158Q9LCfnGqWaB3tMne3/+DFLJpPMwb9lHrn9vCXTg3ypG1FTOR2s1pNi/+8zu+qkIkY40tmIDrK0/ogR32sw5c= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 31:ktVvtnSMSu4BSJvmBPxdXNOOeIPAS9Q8mPfjIzwcapiWahBHZ2X9FgAbWJBnbLX+o/0Ks7nQ5x3VYMgDnaLILbmqil0/iSbhQlPV+zybTYpP3gxDM4Vx8D0zoT48Wd7WwJzu+2qKe6eAJ1BF+MDrfFSgIbtlX2S9hRPW766lANqqRCQbOcOkIMUd0P0GdUy3vwZ56U/9ogmlTWXbpfNDLhNxO7z1KVkSFMsXDs23yvo=; 20:28x/3kaEizVEuc4W+/qtmXD+MrKBauPzc8Iy7KqG9gWu/r97BKCH+wdw6ORTEAri4w18v1vyQ1VPJC6oEyZtuYZjl6GstReo9WN4CfOgcG6CTdVI66KKwkG055l6DkSkalAQlwj+4+6O+gTQAPhYUGFIlfkkPC8b+7HF/mdZoP+iL4n4/brDX6YMh0q7iMFYxBrfH9tguHBmiSaHqxq0nRhQC02XSwk6+KvjHRqVPYzw+tEDIVfQjBjStZUrQSr0gE15Xz2xpLn94ORPHtTxfalkayffl6Jhp+/GSCnSEg/a/A/bzD6evtEKGYyxtiDZ0/vIDYDIujDLTVhGJEA4NezQhsSf8glYcqEejJWfIU8zzEUi/JVepWFLqRmRhUHplUSqbZCE2mKOEgWeBChTbvyf/8LUI8cFTLjNua0VUDk/t1z2zW9/HDx/BkMi+kEh+aEaiaXqL9ADJ0gtkBMZAiENAW+dQ/lRPMv4w6DX2uioUPBfP6DolqNWDDdFYUD5zOY904a/4yWHd3+PX1xIupOR/3Me8XJPjCwV5ZwU5c0wFNRZOAWen5zDDD5WnySEzRfj+yUZF0JC9FK7X+ns79WrazTPtDqQRs+UHHoqVmw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(100000703073)(100105400095)(6041248)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:CY1PR0701MB1725; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1725; 4:cj8HhjHtCa8+2nAll9DKgrzvVTnDN6y8T7LPUJJD?= =?us-ascii?Q?kNIIN/uEQF1TBzxK9cbtoJxQhDfL32c5uSMDXpRoye8lYxWIdwTFz0TC/JOb?= =?us-ascii?Q?5ir/S169lsG5ZuKFL3od2cARuzWFzStm1Nu4in0whPjn8Z0NVRJBuBHQksGS?= =?us-ascii?Q?DjJHn3qqo2W8CdC3YvfzhRZx7vPciu+IUR1a1mvXipMVLAGhFATa8A4naJWk?= =?us-ascii?Q?/y2mCVd2U+6VQqBySINSOPe34SRXqE8guNUEpuxX95JrL4awQuWqoVrBsE8x?= =?us-ascii?Q?f6sbQJC05PmThK+lhYN7jkhGfZf4NRT0MvGJMuxaN2CHgtTh3c+PM33L/n9o?= =?us-ascii?Q?VwLqTaR70lk57thuQYGIPak7gI1temOe25qCQtjreEVky1FTJeWXz2O6neWR?= =?us-ascii?Q?6dTkTu2OMmjRivqjejqjAonhnohZ5vt5pluDH4Es3fMxoRyYGeyMuyarQuxs?= =?us-ascii?Q?7vCH8pgnZlIH+W7AuJ4yRfjYdBnhYfhu96OrVccQXqEuDk1aYawP0m0/h84t?= =?us-ascii?Q?YVFjA5FDGF6N1PhH5zd+Y+1SXL+xHWR5CTvVJn2dzVrY6WXQP2CGAMnwEA2O?= =?us-ascii?Q?9r0e1OP5FPZE1Go4zby1mhoUaJw3cENcFaHw4x/hG46JGII+C5U/Yrka60gM?= =?us-ascii?Q?UxzJEIr31bRP2NYtBlI4uXejhWiSxR3yZB9WhWybpevf2yrlkKxCwq6hnkdl?= =?us-ascii?Q?9oXdiW3FeJU5SOimdkq8fvj0za6SwOcwJHLUsT6jIabcyvGLB3MHnPm+hu4M?= =?us-ascii?Q?N8kgTZpZp19ZucUw0I6TEiQyv+GRnLHBFrRVoZ6GeiaCvwg2QtwgftJjhOav?= =?us-ascii?Q?vwRy3McF2cXjdfcr3fPTRBR/SMPzibbNbZSWXfbDnRIsGN+ebc4dAVyli+Gg?= =?us-ascii?Q?86y9Y3KM/Pi044yXzQSRfQ7jYzMLk6n7SP6r7upLlOnwhwHXvLz3+MZmY3sR?= =?us-ascii?Q?u9nkMQ2w0Eo/+0iqkYYK9QWhHzHpXo05JKUnrQlGUXKxoRUF/F/K1v8lw2Hf?= =?us-ascii?Q?utc2aJ9ZoAG37YUrzldzXTUwzgeQPJ8GtRdHzNaFLMH7U+0abEMmqXeLDavY?= =?us-ascii?Q?rZTAWxpUNGf9pvXfkGbMBUFmb6bhKZAcPw9huGIzwSxGWJp86Z2jcqiDRp4J?= =?us-ascii?Q?F+za8f0wKFw=3D?= X-Forefront-PRVS: 03218BFD9F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39850400002)(39410400002)(39840400002)(39400400002)(81166006)(6486002)(66066001)(4326008)(50986999)(76176999)(50226002)(189998001)(72206003)(36756003)(6506006)(38730400002)(5003940100001)(5009440100003)(110136004)(107886003)(42186005)(53416004)(7736002)(8676002)(48376002)(50466002)(1076002)(3846002)(6116002)(6512007)(2361001)(305945005)(2906002)(6666003)(478600001)(25786009)(5660300001)(2351001)(6916009)(42882006)(2950100002)(33646002)(8656002)(47776003)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1725; H:jerin.domain.name; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1725; 23:HTiOhzWiudC98RGLhonCkRehIAYbAL69h8LM47T?= =?us-ascii?Q?XvSZd/HADuL3PI15Bp2/27YsAw5jUasPrJIg5CRRMt9Gyf41wUQyIaLy2Ohw?= =?us-ascii?Q?vq8IWIqBy/vxhHbnKd5kuj5fkUfmB0W7722Z6XMSCkW7/sd2aJ7tCgGTHTZV?= =?us-ascii?Q?ubzSkSjulE1/t7lEcGl2q/A0WSODzww/3cAzLOo3EfIlq6LBWCg+FngN1d29?= =?us-ascii?Q?ly1sL7n7oT/UYKuodpxMnZ+9SUOTZmBXWACvrYm7B6QfvdPxbyY08OyKulSP?= =?us-ascii?Q?pl3xNNcqTByVaELQ5Lb9g2XzL+TNiH8nHtYc18ZTMbwKs0jMkvhaJ7My0goj?= =?us-ascii?Q?aO7b5hdrVCbZ8rahQQlkIYoozt3+obse9ZvnqGG/Xy4ovbRt21Zom8fPS/J8?= =?us-ascii?Q?OKKlXe411s6yaipCBHlaVOexGLdYyTXFsU5wM818qu1buwfoFxCoA1jbhVfB?= =?us-ascii?Q?PoL3yDnfjcSHYH1N/xyY2RZGoRXvt6LGLV1kQCq6lAHbT5EHTPx4DvSurGUq?= =?us-ascii?Q?qotOXR+dDHM4uzfSywpPocxuLFwV4So6ihF91oCSNIn2SPcywWLpzmCANPKO?= =?us-ascii?Q?EGhhXEykcP+YqnTMzKbZlaVyqpa0ISF8HZ+UGYNjmyrZTgAMG0D2cycyHNk/?= =?us-ascii?Q?ACqLLRtN94hB5amCARp5/n1rEo7sFHxbc0h2J/rg3ijw3hjq0f1yKrZjPpKU?= =?us-ascii?Q?rDkHX2XzQiXIV0q4SP9WbRVeKB00zBY8yyGeomIx8DGfNJAsvBTKYzeyvmAS?= =?us-ascii?Q?KLjzY2SNkjbglGsdx391FBj4tvjbSutuY1PunWYglKL0r/Bao/nYtXVM9U5D?= =?us-ascii?Q?G44UTk8pu4ltePiXqqdjKH1RU9Z/y4Aq9ZbJ/Ku2pUwfK2wKE+Wxuv8lwz/y?= =?us-ascii?Q?AnHacNgByBMHozKs7fsfGlHHOspuCJd/1K1Y2FdGC1jVVcfhcD3mxN7onAmX?= =?us-ascii?Q?QoyiBus0I5qXEVb4O/zpZ9prwlP+so/oTA6WbSBM/iDo85uk7vECd+M1isnU?= =?us-ascii?Q?pHAtWdJOi2X1igYF6pFjr8iW70XnYKlA+Dlm7XoJpjHFueQ2+PvoOi7+D5JB?= =?us-ascii?Q?+gH4VtYg8f0Q3WBSpa8z2Q+Md2K/nO2mVgWDDIa3TJodfolP+jTW+BpveeiA?= =?us-ascii?Q?BSQpmeHk2ZQx0GJrdcM7St3IXv6oEYAJFr7XXPlUKgHyCAwdmS2VkIvcp3Vl?= =?us-ascii?Q?KnpHLjBu49ZEqTKfavP3wE3TGWtisKRm3S+Bq?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 6:m9Xb4mCu16DSNJnqQezJ0kjwL2vXmJn0eDlzlwU+WyQE1S4ZOTIuJcty3IB4Y3idlEXzOT+e+i81oo1x8I4rPsZtRyhrKgC9QwZYoEkIFfm57u7eomIhS2fhy7Qn/XcPP7dR+NGJqILFgirVlkHg16buXfXuKf0dIXeHWx1ry/K+kPATTvBEdiE/UXGJWHDfHjocj9M5L+74RzqY2nmA0NOoAH3GJRHr7Ln4P0A/tdKXlHDuKLk6QN1OZT8fFZpwJS7xGnGPyRnSR5ZJBBr0bypfPoKHZbdVXhMvWhBSuhmseIMm6uJPKnVrDTyM+HTW3Z+9NzI0nmWcyV7j5aeXfQaGHEOxvqSVt6hjk4/llc9du0Gq/K4aEkOKnFD34iH5JfCrjDNvGAjlRnBVmAqbs6jXamFlDbM7dmRreewh94IndLgNyNs3jhSKRUkewr92KGqe54Z3qUY/wZO6GlhJqtJvmJgdX36+13ubDX9wS+6MhAc2OWHq0aFxMzdihdciUwBMUM22ZcNbRwpWaLqpiA== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 5:TKcI7EnODkm6cYnZg93fVWFHw3tqn9WXfjCJVbwvZ1pjE58G9BuvdQ59esI+aRcXViEZuNJyc5OAY2gFCyLSZ1Eqrxpe8Gxs0fzhPJ1q2kepNJ4Bm6xl9kt+Wcqxli5gsY73adOnAEfHNUALKhbjdP2D4oubVRXZiS999YnXdGB9EDb15AUa7lspR18SyKskfhHRGINcU6ODN0T1sR6JG6+o6+avJaLAJi78L0lF+0B02ao4HNa4gAltUtab9iNYD6aSheIA35eX+rpHjwgG+O6444CPRao98xctn7zHb/sXT1OyIxo53qN/INi+VJIxjZZdYO+QcxOOnBqu9q3Rc2Rxeos/t8tmOnbUfXEJZqQC1Wn8dmvk9Cak8mgjQCrEjddp8qibOG2e1RgqyJxwtIg8hcXVtHsoUcIzMWqChXDHGh83liqqo3N8pF+63Xzywn97zy40e25Ka3FXrTkd3WLqldaZExa9bBjuQ2RgUQnTYytcn381YgUM1AolhlRs; 24:lSHaL8LR4s2uxgZ5zoFadEMU5mIx5l6iHKuYJesobAZ/UeMHLNZ5OlGT8SkkEwD8SSHkWxrNRJBkqvPOI0smIyvqtai3rekjj5KGbdXu6so= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1725; 7:AD3+UIVftMGfmbJViAAJd9jpPINk9+Usi0tSaH2AZnIcAtc6rucZsitpaAjwBS8Vg8Q1HMkPSw9Dz7hucmk8t+KfxuSaiXLDjod1sQh4sQufXLv+gYSNpR8qQRifKk4PaZ9CADSko65vGquZnwC7/v1lf2WfLjo3mIE/n3Hw8kGReMeKEgraJbIxgcBRa1w4DgMjEI18IsOyD4jDuRBeVY5rhEYyhdnNaKw22eao5GXVWTX76fzm8WLpgThKVcBffIUm8navHkQ0s41q8dltGpwY/5yLiWGdkj+0omLmqjZZpiMdel9rjKJddkeqoe1Kh3Pv38j5iYnMYtCWJM//ag== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2017 19:59:46.6251 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 Subject: [dpdk-dev] [PATCH 03/33] app/testeventdev: add eventdev test registration framework 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: Sun, 28 May 2017 19:59:52 -0000 adding routines to register and retrieve eventdev test cases. The RTE_INIT based constructor approach has been taken to simplify the test case registration. Signed-off-by: Jerin Jacob --- app/test-eventdev/Makefile | 1 + app/test-eventdev/evt_test.c | 70 ++++++++++++++++++++++++++++++++++++++++++++ app/test-eventdev/evt_test.h | 28 ++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 app/test-eventdev/evt_test.c diff --git a/app/test-eventdev/Makefile b/app/test-eventdev/Makefile index 4f7c25c38..8f4fc5f45 100644 --- a/app/test-eventdev/Makefile +++ b/app/test-eventdev/Makefile @@ -39,5 +39,6 @@ CFLAGS += $(WERROR_FLAGS) # all source are stored in SRCS-y # SRCS-y := evt_main.c +SRCS-y += evt_test.c include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-eventdev/evt_test.c b/app/test-eventdev/evt_test.c new file mode 100644 index 000000000..863cbdf77 --- /dev/null +++ b/app/test-eventdev/evt_test.c @@ -0,0 +1,70 @@ +/* + * BSD LICENSE + * + * Copyright (C) Cavium networks Ltd. 2017. + * + * 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 "evt_test.h" + +static STAILQ_HEAD(, evt_test_entry) head = STAILQ_HEAD_INITIALIZER(head); + +void +evt_test_register(struct evt_test_entry *entry) +{ + STAILQ_INSERT_TAIL(&head, entry, next); +} + +struct evt_test* +evt_test_get(const char *name) +{ + struct evt_test_entry *entry; + + if (!name) + return NULL; + + STAILQ_FOREACH(entry, &head, next) + if (!strncmp(entry->test.name, name, strlen(name))) + return &entry->test; + + return NULL; +} + +void +evt_test_dump_names(void) +{ + struct evt_test_entry *entry; + + STAILQ_FOREACH(entry, &head, next) + if (entry->test.name) + printf("\t %s\n", entry->test.name); +} diff --git a/app/test-eventdev/evt_test.h b/app/test-eventdev/evt_test.h index 3839430d6..3d3cbf973 100644 --- a/app/test-eventdev/evt_test.h +++ b/app/test-eventdev/evt_test.h @@ -94,4 +94,32 @@ struct evt_test { struct evt_test_ops ops; }; +struct evt_test_entry { + struct evt_test test; + + STAILQ_ENTRY(evt_test_entry) next; +}; + +void evt_test_register(struct evt_test_entry *test); +void evt_test_dump_names(void); + +#define EVT_TEST_REGISTER(nm) \ +static struct evt_test_entry _evt_test_entry_ ##nm; \ +RTE_INIT(evt_test_ ##nm); \ +static void evt_test_ ##nm(void) \ +{ \ + _evt_test_entry_ ##nm.test.name = RTE_STR(nm);\ + memcpy(&_evt_test_entry_ ##nm.test.ops, &nm, \ + sizeof(struct evt_test_ops)); \ + evt_test_register(&_evt_test_entry_ ##nm); \ +} + +struct evt_test *evt_test_get(const char *name); + +static inline void * +evt_test_priv(struct evt_test *test) +{ + return test->test_priv; +} + #endif /* _EVT_TEST_ */ -- 2.13.0