From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0053.outbound.protection.outlook.com [104.47.38.53]) by dpdk.org (Postfix) with ESMTP id 140183989 for ; Fri, 31 Mar 2017 21:37:56 +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=1vDyO4P1ZD1YrL37Lw8RMHGevvZuv2sUIX4L0fi+Yvk=; b=X8kZ1BRT1aWG8sJyucUpiQOwTOdHNL9WNut2WUS404EU0JXzywBfi1o/IjAj+YPQUNsGFeHqb1RvIrlxVdq7O6uawLq1LkmULh+ZtRei+lCnETRbjMy+/PcMbOOLl5+xk5s3p5Ra7T0mGddixwXTK0I91iID8zieLM2PRWWd0Ik= 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:51 +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:05:01 +0530 Message-Id: <1490988905-12584-35-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: d16b8dad-3a5a-43ae-42b4-08d4786d6d65 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:nJWFnhOlPZrkurdcsKTYSsIKEkJ8w0Pz/HGqOl8vWUXmuI5uIeQX2RFXotIB5yqiDFY05wYBr82F7gtuNi/K2gg0ucmkTFWQICms0rA4AR3Paea5ZhvuW5Q764tnaamFJsp0+pgjpt5doTZ0BoMBWFQcWm8qrApyQvaDBIodpjShRFG8gMLGIK3p0dkw4CkC8w78YSnz9FBFX4wwxXg27TIJsWOxj76pJw1x6bjtOZaDqwavLaaoeJReaV9rB9YFPMCG7U8A1SFnse8R176+k+4zMoAUxD2runhBIRDLrs8YnhwD5wKkZQPmEteUKl3BU/RujRkwhUuZTaYwFaOaqg==; 25:BLHoL5dan5IQfM+rSdQNE/wVPkxT5lstpWqs0uXAzQPF2z28v6sM8G2gF9RbBhk4HJTGYJwva9kVjx+F4MGsmA8KMdgiOEQsZuJCcazTSCviH8EDj/oIPGxGq3yrXdOtN1NNvL4GQdCJ+cQwTExc/ohz6NQxggekjHkUmLc+/EEZ2HdEihPZj8NbsLT5Xp27tKGxJA1x2XkXBTsoxxCzK3XsOkVETcWh8DmynYvHClCNdwxBXsE8fJCNCqWT8eCLTNbqr74WsSnXid+RqmjbSbN4EflNTCuJ7pq8pHKt3XlrtAl3ive87DS5wDM+9riYLaX9oQq061tpVhEVNiq9dUxsHLbwgPsuh6QGbm1LuxEwVH4aW6B2aIqlS/1MbxtpN2mdEnJkxnC2nGpMLWFezFPC4JN3Fh/0DVaQFlk01nm/J2HA8wdn81iRyz8I5uqIz4Z4tu8Cv7DiViy4Vsw0Pg== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:T/2FhaoyHkgqqo/AKVc3iqqJpLF5DFA6Rq8LD8/v1N6uwifqWSpZVP/d+urj5iEpypjsmUhHTJ1enwBVIEw9APO/uswTYU6Uo2tZOcmwLphidsvZZ6CdDPoHrFUoGUSusEdzveySNAms/qC762B3TDd8lMzZE3v+ewcCCg5XgpMYFlGHC3ZmVA21PmlSOzmlc84VfjId3N+8hogmLLd2zp8Ziay/eEBC9V5cGGm8Gdej/bUPmhSJp+A9rH293eFK; 20:hQkksT5ZHn90JB+35zlovhBrFzs2DoKbEz9XKSQlZ7bDzjXM8YwGoMSA4QX/55uysntak6Y1kXaulnfS+/JC9/gomhdh8yEqcswhf7WTUkgFB/YAv0uA2PvCNTfoE2hElOQLsAr9UL2MtyLD+4NlO4VQDpGjXAKwtvK07mFrgFYzkMDhRK4401iYE0PGxTFkQxIzdfhjfJCUT3mOU9euT46+vQmQ3qZgmzHfkknjyO1x/qLMVKT7SjBfzdGm446rkNJm0H0MJB4CqDgCeLgavtm4r6QQBdj/4i1hmL3wmt/XvzQ7tUsdBskOFVyb0STpEJXk6xA/l6WmSWbM6aXlXboN/iI1SEA5cSjOEKm4tvRBUVQ7KpxR23Bxx26e60ahlPvwJnRNwzTqcLa7ltVDgcKfNQvhmJVQr8QA9Rha0E+esN5TeM1Ao5Ce/cu4Nkdh/52ZTb4wBaEFXLv+hQWgYEbnUPVQvXtSAvYL1yb7Jl+8GCS3Sane5sbNr/hR2tGPNRS+ORXpH9qJXYPW7VF6EovXFa+apANaSjaBt7OGLV1qTQ1MyShWJ+uhGU5aN4xoA9RBCdf+rSCwMnNvssMuduAPeuf6QaargXzKH2EvDw8= 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:YZgC4c4MeDTG9rWLUrN1eGbJSdxq8E24VhACDAxkWjlBeRIBe+EZPJVJBtyI512YMrosZalD9caCpOpZO2Iqtr2yi9BfgInLDeAoIGu2cr6q2S6cr2P2OIqQ/HUrrJ789n6PN3NXwLhD1xvNyT05vJA/5h9+6ZyJSzwS3fa/kZRctOjThAe5b521Jc8t+LkiPw1LeNKkZ3UHs+z8ERb6d59Gh4gEdCi21//dus/f+fu4uUx0KMA2l78zVC7cgVXNVWIxKrBGjSBDG08PCvsQ2o/ujtkzeTSGcu8Tx0F4AlRy5ZjYNVXSlwjFwNN0uxYlkcNEkHe3/W5zy/ASZLsh2zJot64oBLPTnbPz1/oDMQusaZsqy2M9QC9u7p0Hz06c5Om84NqyZlpLarmbjI49IK+g9N5N6NNP3jQaRVSNcCqwDNkt/zpBVvS2rpFjb12V3fz50oIHVSen9WPzXLmI4PJXd32hz7LmZtruGt9f+e6/Tun63vBOp99k73Le9x8dP7bJY4UJ7XZnMGvi4kLbHstvKh2mRAIpwnFY0WDWg4vhKOiyWfj/Bu59TyQAcJb9bpME/+n0GWhDwCtf7aQZuoVrOUDspTsjVTzgU+bvNK7h4XEnOgtty3Weg6ZCyWVvQjz14UIfCJIwWoyFfnZIySXOJ7JiurbK/QQdZ52e//BnpTvtrYQYkrR02b01H7uq2uoNqP8FPcQygqpA45LkZPQSUqhpE1iBiDJ6dTLXK+Igvm4do1SyiKIX9Y03dWiC X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(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)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; MLV:ovr; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:AUMbB+Sy1rqvh5a14atKNAKbPuX0o18sAw+m0w4?= =?us-ascii?Q?hjns6XLb9FMhCAZ+Y/367FltjMLL5tyOlKsyvWAF+1Trrb1bMlVcvlqurZ/K?= =?us-ascii?Q?03BUt6mcS/5FFAIdPxuigkanh38BLz4dU7cqlc3fU9vt+75WEowd7XgT5VaE?= =?us-ascii?Q?Gx8UaTapL8Euq2yqOnc5savE1MCUBTDCbfRJ+YF1D91cHpRhk5UaXz6rYJkQ?= =?us-ascii?Q?Vbg97/Phu+I4sLWd6xHMiGDs0uNn6Z1nODYw1j/TjTjbSTkenSH9mcGzngPP?= =?us-ascii?Q?TwcRaM+n1UYBlZnkRiLo6YAdDDLbLlmgkvXn176Oyo0dXwZqv59nOqpS2O8Y?= =?us-ascii?Q?sH9FYLrny4xP2F4Ebo/A2dbdRYq+xsYlF8ePOv3aNUrtfACNSUczRZkLjyCd?= =?us-ascii?Q?sHefbkIFBYrf9y5CQRHZfWpHCjVKC2DXhwNWppGeizGBeBIVkRWH2iLMxHFZ?= =?us-ascii?Q?RaAqpaeQDv5BfEOLz3kLThiTw4/I4I5KaWHLhTmL6LB4aJNeeWO269ZqoJBm?= =?us-ascii?Q?T1nbqDImmCCX+pe3KbjW2ph0JIdjxXZER+dx2YJ645A9hRbnFEMewz41HMlG?= =?us-ascii?Q?k0hbpVPVAfZSneucJsnzqbIKJVprYaSHL8fJHWgZ7t7EBBMDTkoBFYQ38NLO?= =?us-ascii?Q?RYnZN1bzb90WcBOMhCyrXPZVJ7/VbNttCUUHsZLLo1gbmIdXeizOqYuP+/uN?= =?us-ascii?Q?4Y0BUkEP5+7f1jQ5Cegc499S6vTIOSeC52T3zlDMNbkcZ4KyGcuXBZjc32L7?= =?us-ascii?Q?HwoQVvp1NnLZvguxIbBEs64Z8SdNNHOc10O6voxgsA3j19b47NuyDCcM8OSL?= =?us-ascii?Q?0sXpKD0taG7Ye8d8LrAv6ORU+YPCmGx08m+l+L5K47DPbKHM3F136KvKbl7W?= =?us-ascii?Q?Gq5W7koP48A3DuLOHjS9cj74AO4bvWG4C0NTGood8T3DS0H9K1fkLQoQP5m+?= =?us-ascii?Q?WzPnzqMSIF0Zh5oP+nLTDGuP60+so+3SWg7huhIBBU/3OKTk07450+MM0Onk?= =?us-ascii?Q?KS+cI7Jak0rLxmJuA8rJDSoxDIdVSZOR5sTZ0d9HeXXHH5hommBflhur1r/f?= =?us-ascii?Q?Lzg3lZg67gReT4oZzzGrIPkP6kJL5oTpw2fKeyzzU+vs3Vu8GyFqmp2s3v3j?= =?us-ascii?Q?4Dp5erttbQNafrNE7kX9Css33ToTo5+BvMudzahybf9QTotsw7meoT/F0GEp?= =?us-ascii?Q?xvyR4CKcfdWwTHP835y3oHGlZxMGu0UtMBeaI5EVK7Nah14TdvoI2eLti93w?= =?us-ascii?Q?sF+nG/lATJVfUvixKqHtJBTd3TD1zhi7ZHXKPS/tq?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 6:WEk9RJ5Imuq8aCV3AbLATycpZgA05AUMKCY08owXptdMJL1hX5R6Kg5D3Qpizwp/a9VcLsyWO8N1nBhWB2iYf+vxyW0cVlYP30cqnP9F8NURJloanvX9GUe5mz6P+HXJngDZQ28fWIy9cYv0DlD8jcQLC79Ixj8yEUIMbXJ+cNslQbufUIgYyOcVhOethvTLXD1h7cX/yotl6DHTwKZRiAZz5Dn9m2sZjMHIVWCHCydqrWs3HJ/8Ec5l4jCa/r9xHuBFL3ZaUQmVl2jB+ecT59jp+ZFITTTldzv5xH6rdL8Ivd6YA15kYG1a1XEHjyfDuyj6QNducw/z9xDtRhgUvpgYTgGcB9SNUBDltQqP3ReM90oXVJSZDswwtFMnT0PHPiaYZmN8eUyB/OKpgR2mlQ==; 5:axqAw/WW9tX1QP7Vd5QSZ9lDnDm98HW1njchRYapl7QR/FCd1825BzW35Zh6jweAyp3pj4k8LBM1besgBT3b89CGln+LBm/RToh3XxIJJUWoB/KeL4+UgTwDFCoJx2IkqJ/w+I8AKYOqiN1NLq3N8zOW4Bh6Zw8Ve3xC0JRU9yI=; 24:UtXuSHO9hOGZ/DFAJwouwcIi+aaKRPR0unkNCf0D/a9+RlH7u+CkaAa9vIvFYGs0HBJ4DXubnlK1W3y1w116R5aNMHYILyAFjXWgQhD83zM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:dvEBanvQbMPtnRsznJ3Hs58mVZ9he5w/cZ9RGcA8ouiFFEUM1r1Y7Azc2sNIY8MU0jjYUHoZvXWf2+s5Y2WZKDc/mzrEMEIPLam99KlMJsYWo1Bw81TZ5URuSvcQ8mjTSBgnbcDo3QHVP+sp9OlimN3iLys3HnEjXlss/72vyRUKPWOJeKiU50WcA5ZpZkejbHtPUBt7l8LNBJ884CnN4BG/pxCClnD+a19vulg67x2Y9cfMoZY5/AYvNOXonzHfz43MU1jsADmHDxMrlYV8ogrUuUQ6xgEfGmnMzGR14b+gkp2uA6FiWYGsLw+beM2d6zjGhNbCOweiXq5e24jbaQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 19:37:51.3872 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v2 34/38] test/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, 31 Mar 2017 19:37:57 -0000 Add flow based producer-consumer based ingress order test Signed-off-by: Jerin Jacob Acked-by: Harry van Haaren --- test/test/test_eventdev_octeontx.c | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c index 3022fdc..8ae8c63 100644 --- a/test/test/test_eventdev_octeontx.c +++ b/test/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 = {}; + + 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