From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0059.outbound.protection.outlook.com [104.47.33.59]) by dpdk.org (Postfix) with ESMTP id 19E1CFB4E for ; Fri, 3 Mar 2017 18:31:27 +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=HZN1AcZoyEDFZg7NIBNpBiL7Q2iUDHAEoHJjPR4DjkU=; b=VpnKGDKzdQN3NV5NbPh0qP114TDlMTLem/33Ud4EakS97YmYjbO9/hgBc9IIL8kLcserlcmJasEexgx78KwiusmScO+0az+XJC+mkTg4f1NZGLKD8fKkmaUePiHN7Lh1XYxfQlgu2dSx6s8go/+KPXGe8ZjSZj0rduirEUH7Ya4= 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:31:23 +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:19 +0530 Message-Id: <1488562101-6658-38-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: b69773aa-3f05-40a7-506c-08d4625b1f17 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:TEH6M8BY7rn1eVfQFXePHNXlJXrpinRuU9cLGlHT7SZB4cvXZRPlGhg5INYFNn7hcefPQ2EG7sQEUh9FflLA2Sh9YKzGw493r1g+gsElG5aNYwIQgRmHNt6VgltEPJwxjkQm8VbtB1QdKqLchsrj95MBPzjvHO2ZWmuDuKSJmWAUpYdFx/awCtqXJaqKmTHMnMZ011nFRr8inqkxnGwxqSDINljXCkW9f0kfM5CGueUE9mBFjg3ZxhUoNmribdnluNqFc3da7n+QpYDiMo4sxg==; 25:gpGONH5/L3+QWwt0yzYXngxfueCVTGLfJNt4hf8oyI7jYZjK4C73H9640abYyRY/+7Y3FOZepdukIGQKmvpx3yWrvrjgSBG0ayrNaGtfNyRQXDzSj1wQZxciMCEzfclTL0Db4NZf3uXqP4EyRdmTCpxUOa6mJEaN5o5L6ItxnEzA1nuTviry1DnPVB/4RalP7a3jpBrX1ny+DXI2Dmrgv8SFS9KUvTuaf+la+mTvK4KzeQZ1l2OZ3HWMLzWxMRhI4qNzBJd0quaO1liLsVsLAoUrsPNRCqdRh9bQ1kSISTv92cfSiyr+dxsEZLIJ4sXkiIn7HpZD0w7vVre1Bz+tQaRxFxou3P8HgwkIKgPGZhv4f+9ULbKUpj5pXT6pW5+BJNOVu7mG8OXGr3Bum2p1j2G/4MldX2ieSnd70epEVM/hV4uRLCPn0dOdILx3AimXrt5O6jAlqAsDPUpT7cTOfg== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:LvvgulgRccG3cxwSqqMrzylf5RPnXJVbXf83LbLMWzCyn94h6f4dD4YSZd9NpBXNhjxRKOnpm6rDQO56HKhSmM+p9dIHur4BFpR+eTdgBEqrF/gol2eLk7rR8XvSe2gWpoYfMkMB9DbC2vyAL4B1OkzwYl3ZMuJyCflB0ect5xstvhsoztLhj40NEhXibqodyejLcRGIZQ5layR2V9i2x4gFfD5ewkwb5o7qxKYaVUWwcwCh7M/XqdTFnXZNvxxh; 20:iGI/igqAa6b8PrjxT+958yLEO5vEWiar5+tcv5ha9xLbQhbkHpK+kTOoXjoRYcpWFhjjHnGkXDGM9svNDUDYcCKjdW5pz7UEmEenA0QI0xW6LfxcXI9esiOB2TzJtS4A0P+LH8PJyk8VXooSjnW2k5D54qK01rOqa+WVuefu0AOqxw/mvXsXq+VfoI/7xErc++Z60K9irSYhn/VVThQ9zLXnd5+QJygXpFh7+xaLgPMRHK2+U8LJfnhDilDRZhICbq3xr4oBun1zkakRzfGCdjWR1kj8UBJCfSRCgy2RR0i9oEJSRF3IinTmn73S8Oymgofm82heR2D2gHw58zArYmEBUwQgh9sLRV0KtH38MGAvAQ+3l+dznPKchH1LIb02+6v1gmlxJSpR22QIDrr9KB0HyKe5a3WmwVT0NWpSp2t29kXUKvUAJn6X2t3LcBeg3FQy6BYnAf212a/0ZLE2nRPb38/c+H7HT0aBCBBy4RvTQ2225BncfRtaMMt7X75dipLf7HLZW0BLA+7xWagzApaLCfCfJlrjPeV7/kE3sqaAiRdpVpYrfwTgYednOiIRJ1klAi/xXlmmXdAG7TLo74w9qHuw/nf6wkNHSFg6emQ= 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:eQT55mbCFFU54+anmMOphQCFdNViybK8ZNgYheCpkuKBg+sv+aD5ID9tVHe4rlW8oX/hO2n1kcDPPDH90v8z3MXYfitta+n3aFSqkiEsGyEw5A9kwHA5ydEfxB3Xp35aNKfOfqGBF0KshK2yh29+H2sdDpc8842L/BjMvWUWhnrFlb7Pg+g1A4P2NJ2Kh9oplHXG0beOSsGMFFKUrEG0CmdmIFdC5CIarMRXVD5yldgP+o7DnmDsecx0zgmSgmXHnBRdTYUyznrb5t3mWqSKKPOVvoW8OWNSAVn+uzpKR4l+xucie8AvkHvRUzYnMrnVgOSOxKQzvwNHFGSTtONJrXAyPylZxWFWroYQ8aJbHjOYOUxrMR1hkaDx0SX541oVz++oWCVmTz7puQ9ly41L2U5QVx0tFMOzCMJ8KBsurkbM+Jb5942uifmXl3nyUYKfpIuEPf0fR2nAgM3MWVYEpNewLWp9N8vIgS4Q+8XsNbK+e3Gavrc5B8OjfBdFdc8im98CaSHtMQlwgwFi9lZ+U2wFvgPj8WKK0EIVfAN26jVxppEEkjvpZVLVJ1awWdgwfF/cWGFFdKl3tkOAFTYU90HoInS5w73/2I/x5KHRv3U= 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: =?us-ascii?Q?1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amDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:17qXNN0Tn70maOT/LN7NZXAp8AO57Xd5s1KJWFjSn8cNA0qlKmjsQUqKPLOiOym2kl2rB0kk7klXtnPtb2Ni7DJ5k8EO0B0wWhZ0hyYT7ow3doW2yB18vOaCvk6MFCPYb16KoD4Tk13J8qrTBd81lGuBTmn1uAPa620s3D7BaIJCYFKZKSnooDLlLe++4P98YVrnU8vreCH2gB3dEK/vTGc+xYp7OGBj7Wr9dvVNXvBfLFvrh3R2Kjov0MjEc909jGyUBIqtjOPkr0bVxhgW388HhSWbhcoJvXWRnpxTSeieaVcA+ONxnmw2NxNN7GhLxi4F0wzpSQt9A1je0Fd3rw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 17:31:23.5343 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 37/39] app/test: octeontx producer-consumer based order 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, 03 Mar 2017 17:31:28 -0000 Add flow based producer-consumer based ingress order test Signed-off-by: Jerin Jacob --- app/test/test_eventdev_octeontx.c | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/app/test/test_eventdev_octeontx.c b/app/test/test_eventdev_octeontx.c index 1afb52e..e54279e 100644 --- a/app/test/test_eventdev_octeontx.c +++ b/app/test/test_eventdev_octeontx.c @@ -1247,6 +1247,64 @@ test_multi_port_mixed_max_stages_random_sched_type(void) return launch_multi_port_max_stages_random_sched_type( worker_mixed_pipeline_max_stages_rand_sched_type); } + +static int +worker_ordered_flow_producer(void *arg) +{ + struct test_core_param *param = arg; + uint8_t port = param->port; + struct rte_mbuf *m; + int counter = 0; + + while (counter < NUM_PACKETS) { + m = rte_pktmbuf_alloc(eventdev_test_mempool); + if (m == NULL) + continue; + + m->seqn = counter++; + + struct rte_event ev = {0}; + + ev.flow_id = 0x1; /* Generate a fat flow */ + ev.sub_event_type = 0; + /* Inject the new event */ + ev.op = RTE_EVENT_OP_NEW; + ev.event_type = RTE_EVENT_TYPE_CPU; + ev.sched_type = RTE_SCHED_TYPE_ORDERED; + ev.queue_id = 0; + ev.mbuf = m; + rte_event_enqueue_burst(evdev, port, &ev, 1); + } + + return 0; +} + +static inline int +test_producer_consumer_ingress_order_test(int (*fn)(void *)) +{ + uint8_t nr_ports; + + nr_ports = RTE_MIN(rte_event_port_count(evdev), rte_lcore_count() - 1); + + if (rte_lcore_count() < 3 || nr_ports < 2) { + printf("### Not enough cores for %s test.\n", __func__); + return TEST_SUCCESS; + } + + launch_workers_and_wait(worker_ordered_flow_producer, fn, + NUM_PACKETS, nr_ports, RTE_SCHED_TYPE_ATOMIC); + /* Check the events order maintained or not */ + return seqn_list_check(NUM_PACKETS); +} + +/* Flow based producer consumer ingress order test */ +static int +test_flow_producer_consumer_ingress_order_test(void) +{ + return test_producer_consumer_ingress_order_test( + worker_flow_based_pipeline); +} + static struct unit_test_suite eventdev_octeontx_testsuite = { .suite_name = "eventdev octeontx unit test suite", .setup = testsuite_setup, @@ -1310,6 +1368,8 @@ static struct unit_test_suite eventdev_octeontx_testsuite = { test_multi_port_queue_max_stages_random_sched_type), TEST_CASE_ST(eventdev_setup, eventdev_teardown, test_multi_port_mixed_max_stages_random_sched_type), + TEST_CASE_ST(eventdev_setup, eventdev_teardown, + test_flow_producer_consumer_ingress_order_test), TEST_CASES_END() /**< NULL terminate unit test array */ } }; -- 2.5.5