From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0041.outbound.protection.outlook.com [104.47.40.41]) by dpdk.org (Postfix) with ESMTP id 213EB2BDF for ; Fri, 31 Mar 2017 21:37:07 +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=Kb3OOFoKd/xhBES8nPaQFBKXk0Luk4EoTc1fhZqDcko=; b=T2dert0o8QL+l6ZA+3nBX28MNblmNAwTdxKTGw8U+MtQUgpeBB8T+e2JUsF0Jveq8LNXfp4l/5ZjzeRMPI0swGEu2ERbMMNWmz+JgYYAZyM9UKxULsuBsFgOo7sSuPFfDph1hj4mQEcyx6hBFSR6BJoPVsJzxXKBRRJH2axE4HE= 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:37:02 +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:49 +0530 Message-Id: <1490988905-12584-23-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: c5a674c3-25f9-4b47-5f15-08d4786d5020 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:9BoGCGNLeZ8QsUS7uErBojD6FNr+ojVXkpHD7QfmIjcBLwJi0YDFDEKgkE1kGbGFOC7YmZ8pcJZVC4DU6vG8wqjYMD3XDuoqNljWLKCEItmC0cbUASfn6+R/LpKrbgSgClKXsgtFTGROKmnd41dOqIzspRsb8I0+t2tEhg1KFWdjdcw22MxDjrCkrpR6jjyekm1gd2LCCN9bHOXrWgZpVdgHDKzhVQi7Qp2JWnpHgmksWKKYe6fqbK2rdevskihCxLx/Y2GMGCgmWH3CcFmJliHq7xY4czTsSIwFN3W7YK4gnNG6HcwiM8irpJ57itz/5H0S1vZOGDfH/PxgyE7cbg==; 25:N9bImRU4r5dw1Kz7MkRWPjm6lXjl3KeGRVxr0pn1Ipak3NeUJtaAgCWfgZ/qedyOkDnGw/fqSqNsl9BJd8cS6f7gD/i9pmwBmPsP+8FuPsf9kDcnWxS7icHGtaAAszopowJmgIbPhXFa11b5uZH+TVQa7M0wEdrJFrNb8I7nY8EzWZ+TYD15ER2Dg1IFqVSpHjkDwoZZGEohh7mwut0vQfeg6R+NAgc8bTiTDTp9IvdXMyENtsNUhJGV9xRgJ9i9WHI40TjsLA8zvBqdxJZOeL6GLqX60Sx23IzcqpuCyS0IqoiCCW3KPSzPO88lRyCowNxGwK7f3zmOmCuYWtI80E1E4vYIfgN9BHzLVXB9aNkcIqyrAtTWlGRyC4WfpFBXMBg4/EwQWHzK4isbqHcnsrm27la5sz9muvv3dEpYQmhOZXny1UDMdeupu5b4/L98EVtnCvCF3GMxcneRM0QmSg== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:JnXfcM20P2bFp3uo7jqtSI5vPfar7+ozP/eVlUydttoG5muQa2ztch4he/awxz/Qw2vAONVMT7pPv0eCzlE0rRCN5jANqk/n+RMr0cVr2SnXDMdpfDsr9S6RitIF/N0RJYlWFTN44rvayS8nMQlDshxVVe4BpUsBZst6YT6LmuAeCroLs3iUpmGgm+1WRzAq1tsgASSMJnsytSkNiyOnFSYCCh2olx7of2bxa5rEhns6HGEYUo0UnwwGOjhS+xTW; 20:QjyHNT7CqzwBtdzaZxRaqi66rElAw0QR+xxAQVRjeN8iG/vdgCrwZxIRHR77iILQ5Cd1qJB4NW2WsVLYEB4Glq0KQaIBFRh56uxtwWdjG8mVDaA+gt/j6W8nVVKMex8TKUJVKQXo9wD9iRbgS83Y4Zihw1lQaBttNQOo1fcCK70Z5ZavbkK4/cPAtR1479a4YcpUyVdJbnFgAjbBp7bIdEhsT8zFWVw6FrMVfWhYqL/eotrjtTwlUJaeGfQGQIuBmWfP24EQwg9Xl//DDGyMxmcejBcgIkmc2qdWObhOpIWCVfIm6ejimY3YCsezrVROThIAgSMoETphQ82vo3q1Q1lIdl1nYxCquMorLS4650FMb3N9THqK0Wv28RyYdzyCAOfzJ6uJ8w2LcwCkOuhHSrHOdZ+ZqDIIZzo7CAD5xkAnw7wSdSw59ooOrGLvohRQyDWURqFLeOaYr3r/qi/KgeVtaHvRLR+Zi/MrnlZkug6OvnXFbwB7rTypJg2YcRcxFazx7/QNtQN5nmpc5YwXkJ7V1NaTX/IJqGWVZUIeh+yPzUPsdlvv7Mx9ohcY3BMHkdty2sxeAuY0lrUcWiI434JHJMuXS/OzQ62qbxGA4ck= 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:YexwCN9WhacTKL0S3msdyW59+BuaeLHNiWHr4WFA302VGMfKzH1Px2sYSTfixE0ghZe5y5FsqSKTsJCbyXTfizUfJsHvlynS/cIi6wR6YYCncjR/bdq0l0ylj+Hkz8u5UDWzpL+nq9/40nXkfPUxTo0Cv1cAcGX7+wWkzRGHKVS0fTLRiuD7Garpc+qx9D5YGmIPXgNx99vh+dkvQ8/rg7GnV06i2yRt50eHEZFfQtOfnvFi18+vbb/HdGMZzqlzDpRNWJbIJDuHGsQR+fQ7Ug96w8bmPIC+uqFtyPTt/Xk+4XAe3gvbAtI9AqDqtAVLG74LrjJvuB00DHR5ikOE/dafPla6JW9Q+hBJ9BlTwR2mboxbTX0dD6UVg8GuPRQpHBANsnkSmD3jWYG0uMtkS4TFUFw8tjTch4tt7HD/pAIFEhhQDnGHWXfa8ogL9I/d1mHb9BE2ranCoX0VQqbzo5nVSh2wYq4sz9f2yYSxZaBiVM7I5hQhOtcLxFqibrBROQweNnzWOVmfJ7wcO6R05tgcABHEqCmkJudlmuCK9i8TrBAD310loTagnqT/LpUP9CaC2bw+I8HBjhCV3IGyGn+chm2IXyort+8CDtla87/yhulctCMBBhTRO6Kvu8gw/yuFzlpsAg/DFZ7MpzMOe+yjIzazylSxm6YqINi1D/sYlrAnJBgnd29GlsKjDuLW4CwajY3ZCfVyDV7PVwKGmD67YzGFQJE1O6U7t30QWTBqMSwZqyuQEz0J+YYF0RZ8 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:B2iC0UoohkAbRSAJsL6InvLsHlPucbX0b+tv8gt?= =?us-ascii?Q?GcFojz5plndArQfDrbziLH3k7IA6J6WrMGZrBTZR8gMV7AOiPEYSZ4WquGQK?= =?us-ascii?Q?lsIxAurhTuvowjoSx0VmBHEwIhRREjvsWMn4LPIkgccgU3cPyaMZo3W1JRIO?= =?us-ascii?Q?POngJx8wYd3lP8n1fTWbvtwfK4IuWsceHG49W+LSZKHIGVd2ThcJzIizrXaD?= =?us-ascii?Q?Re+8nTYp0ZYKcW28iQU8RUievPzR378q3YE2TIT3Vg/TBVZ1zWhMKeQNuiOr?= =?us-ascii?Q?hGzz8+QSROxn4EA4gDLFRBVsReQUaJf34dy4viSJmNJmBbDVrzoFFrlkhyhQ?= =?us-ascii?Q?c69FJnm9PFYe61dKCHX2qwN70+iV56GpNAfoSoNmzABZHCaJ7nGevHX95puW?= =?us-ascii?Q?4hDnrXOtNeYXt84P476lhY9N9AjCQX1+SwWfcDnhnNz5MIBjenKJS3ULPZlO?= =?us-ascii?Q?A3ufxmIi64QNnzxjLlDmRfzelF/X/gRuvJNNjYv6Vi0bYomFFu26pXkI9PY0?= =?us-ascii?Q?nyyBqL0G2bJjvc0u32hC5mFUwkErZS+3KC3z4Vn0icf7E6tbRzrm3FgfaJqX?= =?us-ascii?Q?C+AhoVHxofFVRLwUvZEDjI3pVGNH9uAUc3Xg0c/Hn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po7krdrRrInbFfNNUonxjGmefPRun4tmWTR48K1mvNsYVuwh+Tq8rkB6rfzRX5myW8mhuwKsXwq8r1dZ0H6+rQ==; 5:BbA9XM+rgU4X27NBXMRrCPHJ2fQ0IE84RJ2PduRV4Nxku4CsVRpqHWtRE3khfBIrd3JbEtGCTgdTf1ITu5ld9JkKa+0xHHcgM/wo/tT9PHMk2eFA4pl0G5jZs9Qd0VOCjv/BrOEK7imXA+lIZ7oVyM7iLsdZSlb00PqjZimGsy4=; 24:lgIHOF3gUA2NQtYM1TdlipUspkio4Apzi9jdzv1GUXRO3uDw6hXUZR0Y2jwNN4iYflFOws4Odqvb1Q3Ixof9N57qY+noOYwd8KeCYLZAWFk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:+0SdnIk7BoEmED1DfiLqaZdTJVUjmQREwxL8zw9yt51WsbrnCb9kp5fO6j6DyyoS2jyh0dWHS0+kpk6vlnSWQKzCSHEN3EY2P2D4gt9H6jLsMGNszGkKmuHxSABLwCXBO+QnbBB7TVjTjfanapRigIBzMb67UM7sXOxyjyJqy6uJSyd5c74b85go/RgXKtpF60MnHLlutkBrnZY1ddy4cDbLMug9EhXvAxtpGmPxIAkCWp1f42GcmUxZy+5GUW0rJBxpC99yC6cVXPl7CIaYSFOztRA1hP8lf0unQR7WxPgIOvoH73AWez80LAqmsY8RdXJSGTDB/GB5qO/POmv70g== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 19:37:02.4430 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v2 22/38] test/test: octeontx simple event enqueue and dequeue 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: Fri, 31 Mar 2017 19:37:08 -0000 Added unit test case to verify simple event enqueue and dequeue operation with different schedule types Signed-off-by: Jerin Jacob Acked-by: Harry van Haaren --- test/test/test_eventdev_octeontx.c | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c index 412944d..c1cad65 100644 --- a/test/test/test_eventdev_octeontx.c +++ b/test/test/test_eventdev_octeontx.c @@ -407,10 +407,64 @@ consume_events(uint8_t port, const uint32_t total_events, validate_event_cb fn) return check_excess_events(port); } +static int +validate_simple_enqdeq(uint32_t index, uint8_t port, struct rte_event *ev) +{ + RTE_SET_USED(port); + TEST_ASSERT_EQUAL(index, ev->mbuf->seqn, "index=%d != seqn=%d", index, + ev->mbuf->seqn); + return 0; +} + +static inline int +test_simple_enqdeq(uint8_t sched_type) +{ + int ret; + + ret = inject_events(0 /*flow_id */, + RTE_EVENT_TYPE_CPU /* event_type */, + 0 /* sub_event_type */, + sched_type, + 0 /* queue */, + 0 /* port */, + MAX_EVENTS); + if (ret) + return TEST_FAILED; + + return consume_events(0 /* port */, MAX_EVENTS, validate_simple_enqdeq); +} + +static int +test_simple_enqdeq_ordered(void) +{ + return test_simple_enqdeq(RTE_SCHED_TYPE_ORDERED); +} + +static int +test_simple_enqdeq_atomic(void) +{ + return test_simple_enqdeq(RTE_SCHED_TYPE_ATOMIC); +} + +static int +test_simple_enqdeq_parallel(void) +{ + return test_simple_enqdeq(RTE_SCHED_TYPE_PARALLEL); +} + static struct unit_test_suite eventdev_octeontx_testsuite = { .suite_name = "eventdev octeontx unit test suite", .setup = testsuite_setup, .teardown = testsuite_teardown, + .unit_test_cases = { + TEST_CASE_ST(eventdev_setup, eventdev_teardown, + test_simple_enqdeq_ordered), + TEST_CASE_ST(eventdev_setup, eventdev_teardown, + test_simple_enqdeq_atomic), + TEST_CASE_ST(eventdev_setup, eventdev_teardown, + test_simple_enqdeq_parallel), + TEST_CASES_END() /**< NULL terminate unit test array */ + } }; static int -- 2.5.5