From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0058.outbound.protection.outlook.com [104.47.32.58]) by dpdk.org (Postfix) with ESMTP id 851D5FB3A for ; Fri, 3 Mar 2017 18:31:15 +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=3GATwZ7jWb3Wi/OEeefTb/ip1Y9/zvzzoHRZD1Y5REQ=; b=X8LUIY7eXrmj0tZQoiPVEITJIpuQJ9eC3oEJfmhvOds9StaRXqwbhjaFH/PNn1hBViqH+gRpfhTOT1YW+rOJRkAr82BrgXBVGhu62BZM9Uv0L8ohDNe2V/iUHZAsW9oX2qc+W3lsk3rT2F+NLPX5xE0gLSjoRa7YdAS1usGi/CU= 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:10 +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:16 +0530 Message-Id: <1488562101-6658-35-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: 03f79d09-ae1f-4c1d-60c5-08d4625b179a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:2qC4wRj2j6DWy3QovlNqk7b0mJKnBWHw17LTDcq2RWGXLNJfBSW2BA4tGZXQdvpEHvES8iyXdsiQNTBiHiKzpdVaXZBP/Rts4vyBDYZN/cJv0rPWPsuteA7EI8akvCvToyXr3guU3F7NXEtKsea5PixGgtgo17xVB5BlZkOBp5mKhgNrPzB6HXHsXG5WJx2bpDgFOG4NzBjqvq/6V0fNZzENhI/ahqq2VdVB2+7spLGeDxWIhbrqr66CAaa4wFlb4dzWcPr6A49C47PGA0QXgA==; 25:TJkJraVUGhuZGBB8u28ESd5OqDAYtJ5B0+16JJq3eLCszgNphWewf5QHOXmyItSIKXbkcQFrwLMmMlQvnieu6PJL+2uYCJYc1sCZCwQlH2Ve88wsNix4hp83S/JqXXv2avGbPvSkZ7t3z5vQx5jc9z/mIfqzk0mkm6YF50e6LnU3igCRBk1vWHJiDK90oKnxnih60s3chhy2sZ0onpPzT5GAb1L8jj+JwWyaW4yyADMcm2XPNloyP6ldTygkkdaLSxU8ebKj8pyxNBvwT+41f66qxR75ykDhjjv2ziuHse6jkNr0U4K+xSgO6kDPHPoaRQqcZoEuikQ8kmyHAEAjyLrpjytQv9NREcDmsyVh7zGl1ekoMc/BavN2ji/pch5CMDJnkdeG1Tyg/kBj3+RMZTJtzBi4e8SexsHB/9JojkNp01uQ6T4RAJTmNUnX7CfVBhglgvPi1UiNEDWMom3I2Q== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:JDyzU/78HwmSdJ2CuMU1bGc4ew9ps0Dfgd0EwtEoxE36S+K7Mo9CNcQ6Ghxjz60lJ4j99dhb5JEjI6sZXOhnmmWzwfRtznQMxc8aiQRZwGYcSZunICnF28Y2nPpnG2yZY67nIN0iPMeUseLOKzv8B+XZtgtWx2PnjiZlqeHPTSZ7hOv9+HhRkK5NX5vt76IiVRKC5hcNFtGEF4yQXWYKXrEeiZCRHZC1sT7tLoQ0IZO+nkXuBVDjD0dbbx2dK0GS; 20:rU4V5YqsPSiKi2yxoafxQ+wieHhjxUNr9Df0t9yewnkYM0CDoJZLD49mvSb1TnObKpQGhDL9BRIzkuM4bSiQxugTOcBItSxyd5eq0iJN7nbpyio9eQG1ERM8E5ikzj1ff33I5bI9rI3tk8VC3MR9JX8qKsHi2U6JgDlKhTNTIdOra+lQHTyZmHOPwZfU1Q/c3it3sgn5S9gUiCCVY72KU+vrt5HdQmK56624gLqKnlWrf4TzLbT5j5azS+fq/09PKCUTT4hLO08XtK9yzkNi++gTqmWjnP+XsKWmB/DLjI6hpcTL3iJsUIYrPnPx7QtJ51ogr9z5yuvyIM+invEWnP2VsHWNnTaBWdKjTRLII9wG8sJf/gRIAvFB65UGKA6hqaurKyAAzguwxidCkgRegKlIXk+aaEFU2xpkWaTOVV3TohiMuWHThsdsJLSWNpTcs7dpPObqOjy07/mjqVI38RsR/ZlALRLb6ZztNHHDSrXjRlKGPRgz7IXGhyNlkQfYA64IVbSSfeV1u+RHNfjptpzgWjRbqToR2hknTQ6GdxDSeHmfABrUvjYr0iRz1pSodehYc7PiItIrMLRw1q+oT3W4D6KQGWAGib2JvWakYXA= 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:ZWnoff1QF5Im5nWxo813ijS2SOyn2/ynmh8bjEb3CCDhsM5fVpxgk1dmY4KvHCyFkcJgqNbBwd8EfyTReStJDVaSAtIAe9lmhw592nCCakzIVxCfDWyq0g2Edy1d9V5GGqcCwRAuuiSvr3DLnNl227gce6LKaFlUMXzA3oxuFrAV2R4ukOy/VZq1Qr7ar/BDLeh6YCkGUDpb9UfZJGnWhTbULnAMdxCu1y7lRzbLB4GvP0qQT+OQ+WNTuKAvmGtgH2osthcKOUcutxF71gzb2NYXuqbcluSTbrdL0Er3ei+47e+Gsm64IiHy4NdK2kSSsjseDh4wIkMDiwZ0LiHbj/1SPz+t4dAlkxwRuQLee6qMDpApoftgFR63OU35EZX/9iP+yHElBfu1pP1VY4GSpcVLtPOP5zLAqKJTcSl8b/dbSIXNoXB1TSW3yybVzy1OxacLN7RjlLyx07YacsqTzH5UNDneMPVti0PPymdl6H7zBdhZj0g04wnb9omSpabzi1vhmxwYwlaxHCmuTxroVwEbF9bE4xH3DaoEBBn701pglSHyi0l76SCyP/CGTUD656GWglFACek32ugSuumlpwR9GCzsFr515X55ddEpLU4= 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)(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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Z+bIVdTIrLd6Gr?= =?us-ascii?Q?UpMiHDPQsTAziVL7kOFeSdCgtXLHHSawvfh3rEKZZLx2sIoXWAEu4LE/bTvp?= =?us-ascii?Q?jXyBqCPaHbtiODf6Dt2c/3l+P4HOkhB5KIPwyUomIEYP2iYV/Fvwve6/15nT?= =?us-ascii?Q?7vhhqedQUNl/qTwewlnop1i9xkCusFo0OmKjcTrIZjxP5cJB6PQU+7OFobLZ?= =?us-ascii?Q?mbGziLe9LWI0Jab0aIyNd66TpYLO/eyRJfnNPtP8isKBqC6s+Frqsudio9s+?= =?us-ascii?Q?gT7ruRzoykM2OhANxyi5CFKe6U562xZnT?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 6:VYHvpnD1E6yo97anZwqoCdTic1PBu3/kXuQnLiQE69lEqr0voxQXphO9kVyYYz2dE8Hfq5kBGrbpDFXLDFYSBYIfaVAF+RDH3+WmOCONjMvMhUa0/anNAV9EV2I+sA0cQSDl6LGJvbu6qTn+W0J6qWUDkMEElo7cIRFOLYPTWVRLVy05j8lAGlebv9fVXxZAcSy/5TJUw9svHddXUZJtap6rgqbAbtcKBtYenJwfG4Ff4NdsQTD/VTcHVOGGKdvJE8meJKYGRPCgwzCeLIxy75BZ9Y1oM++55lxW++CodmJaw91gMmhkA/6DZqJRtMINEmAmH+7kl5P9nj/6ac9JdysJMYwjbmddYXWoafNk9uT2t3ffRR8+hzvxKX3e23GAh35DCNMIlBIXJHXZLxtIeQ==; 5:mqD2CXFE+NVcFEC6jPJdqIkM+9U8/f+ZYMUfpDg2PuC53DJEQT8ALn7n221V5301yLhY3hHklrg+Blxni27wV/kzDDKXM+7zj+rlpfRJ1OsFT/pKP0BaxrVp3/jw4FhgyBijNJmCMoRURY8FYqdggg==; 24:7iRXfgy7L4lucl4nd79m3A/16EiImlOYHd45ozxxp4SyivAnWDbNJumDsX1olQjE6g7tG/6dtWmemZMANWbzgZ/rD7DJi5eiLfuqhrey6/4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:c151pcfNjQKhrNtXEmR6Vhke16SAZu4sARoMmy4v7pnN4TFEP4xebV0L4q7BF1v3SD+DIcUvlQdsP1TCj7P2lLCkoLv6/XqYcHbtEcyYX8+BsnW9/lJ6/XoC+f6h8ictLL8tTGUKwWtjaP59f++W7DkTCUnvc1qgA55rf7igroCGYyxkd4PlEJZRHzuxm14buu0QOoHHVNpGAE3zxwlsQMq9UjOFOrvRvsRROr16XttkU6fo59fA4tRHh++LV9xEMiUafG6s/cH/t1HM+n6TroTA+3xYo+9GzHKEYISgvG31ALE+gC76cuJpvt8ebTuOIW/Lq8kCZbOE31GBI/NqaQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 17:31:10.9402 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 34/39] app/test: octeontx flow based maximum stage pipeline 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:16 -0000 Add flow based pipeline test with maximum number of stages available in the device. Signed-off-by: Jerin Jacob --- app/test/test_eventdev_octeontx.c | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/app/test/test_eventdev_octeontx.c b/app/test/test_eventdev_octeontx.c index 2265576..da1da62 100644 --- a/app/test/test_eventdev_octeontx.c +++ b/app/test/test_eventdev_octeontx.c @@ -1103,6 +1103,74 @@ test_multi_port_queue_parallel_to_parallel(void) return test_multiport_queue_sched_type_test(RTE_SCHED_TYPE_PARALLEL, RTE_SCHED_TYPE_PARALLEL); } + +static int +worker_flow_based_pipeline_max_stages_rand_sched_type(void *arg) +{ + struct test_core_param *param = arg; + struct rte_event ev; + uint16_t valid_event; + uint8_t port = param->port; + rte_atomic32_t *total_events = param->total_events; + + while (rte_atomic32_read(total_events) > 0) { + valid_event = rte_event_dequeue_burst(evdev, port, &ev, 1, 0); + if (!valid_event) + continue; + + if (ev.sub_event_type == 255) { /* last stage */ + rte_pktmbuf_free(ev.mbuf); + rte_atomic32_sub(total_events, 1); + } else { + ev.event_type = RTE_EVENT_TYPE_CPU; + ev.sub_event_type++; + ev.sched_type = + rte_rand() % (RTE_SCHED_TYPE_PARALLEL + 1); + ev.op = RTE_EVENT_OP_FORWARD; + rte_event_enqueue_burst(evdev, port, &ev, 1); + } + } + return 0; +} + +static int +launch_multi_port_max_stages_random_sched_type(int (*fn)(void *)) +{ + uint8_t nr_ports; + int ret; + + nr_ports = RTE_MIN(rte_event_port_count(evdev), rte_lcore_count() - 1); + + if (!nr_ports) { + printf("%s: Not enough ports=%d or workers=%d\n", __func__, + rte_event_port_count(evdev), rte_lcore_count() - 1); + return TEST_SUCCESS; + } + + /* Injects events with m->seqn=0 to total_events */ + ret = inject_events( + 0x1 /*flow_id */, + RTE_EVENT_TYPE_CPU /* event_type */, + 0 /* sub_event_type (stage 0) */, + rte_rand() % (RTE_SCHED_TYPE_PARALLEL + 1) /* sched_type */, + 0 /* queue */, + 0 /* port */, + MAX_EVENTS /* events */); + if (ret) + return TEST_FAILED; + + return launch_workers_and_wait(fn, fn, MAX_EVENTS, nr_ports, + 0xff /* invalid */); +} + +/* Flow based pipeline with maximum stages with random sched type */ +static int +test_multi_port_flow_max_stages_random_sched_type(void) +{ + return launch_multi_port_max_stages_random_sched_type( + worker_flow_based_pipeline_max_stages_rand_sched_type); +} + static struct unit_test_suite eventdev_octeontx_testsuite = { .suite_name = "eventdev octeontx unit test suite", .setup = testsuite_setup, @@ -1160,6 +1228,8 @@ static struct unit_test_suite eventdev_octeontx_testsuite = { test_multi_port_queue_parallel_to_ordered), TEST_CASE_ST(eventdev_setup, eventdev_teardown, test_multi_port_queue_parallel_to_parallel), + TEST_CASE_ST(eventdev_setup, eventdev_teardown, + test_multi_port_flow_max_stages_random_sched_type), TEST_CASES_END() /**< NULL terminate unit test array */ } }; -- 2.5.5