From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0052.outbound.protection.outlook.com [104.47.38.52]) by dpdk.org (Postfix) with ESMTP id E5F967CFC for ; Thu, 4 Jan 2018 16:31:07 +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=cWi07d/IU3300ZWVp83X+I42oK3m8ib3n65oiJscTnw=; b=PRF7rfkwBrWJpfJJaNBC7XcVP0bTRtGyBNCa/vL3cA3vWLwj4nfUHVNc3DpSlQY6cHflxAcvfy5909I0h+foX6Dleh/juDx81VTPcc4Rrxfy+WRHJQZDH8U6Zu20dUqG0wPv1LxkEGmCMCO706qxJ4Td8alFE7h4YTAyhgMANKY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (111.93.218.67) by CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Thu, 4 Jan 2018 15:31:05 +0000 Date: Thu, 4 Jan 2018 21:00:59 +0530 From: Pavan Nikhilesh To: Harry van Haaren Cc: dev@dpdk.org Message-ID: <20180104153058.mm4s24p2jpqmsiie@Pavan-LT> References: <1513768907-112647-1-git-send-email-harry.van.haaren@intel.com> <1513768907-112647-2-git-send-email-harry.van.haaren@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513768907-112647-2-git-send-email-harry.van.haaren@intel.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BN6PR14CA0022.namprd14.prod.outlook.com (10.173.157.160) To CY4PR07MB3462.namprd07.prod.outlook.com (10.171.252.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5e1bc72e-c89d-4ab5-4ef9-08d553882c6f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:CY4PR07MB3462; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 3:MHfQ+dShgln8Y/hYZqRRpXg7TesQJGXOEIyLX4iNp64AeLUJb4Wi94dKkushJEKujpyjk/0tmWucBCnx2PxnBIJmFi1o+6DcOEH0zSN4yH4ftDK9n3G1/jM4a4qycYjDjASp2Xfx7vJRnteo9XdtMhjvmUtqzDal/AucgK9TEH7d20DKeL4OGTwOPMNAbVXaY5tfY37/3xu+rBpeP+AQFvAN/e9d3fjKEtiqm+uLuBFMtAzVPf61v9kS4My85L4q; 25:8agtW+yxDFg9OreBRpgIOipfCslfrXeSrI4L+pYTEWeK1v5BOBK03ik4+Ga6El193TxCNOZ198U2CB70299HjXLtCGXuczmwW5u/jL/2ys4chYFt1SKyieiPUlMgH0NJkKza4lW0MLMeR+leuCrUVQmfz5GtGYNrZAWQMFtyiI188KSlnwftFCUsC4LlMqVWyynWz52H0oFuRjoGV5Q3eKCUJbwkT7Zam8x7B/YYzEmiRO6vzAMmSp8Dao1PxZ6802u+ReHv2NUZr9UzGdBqNf8uALJTxOhsJenzXeXXEv/bb2nWoymA0+UB68TvhZm/zvbKsLGZwUomLDMxRIaiTg==; 31:UbcxXA4GHAKgA8JNLFpPyzEBWdfw4tRyYS+YkdddkvRmDBS95XMbDn0u5YYMdO9riGkUKDLDksD0wtTJHRV2IsDB9V2qS3CyAYOdRHR4dBpkdx4kNqoRCf9zw4aMIS/V3zEBeD744bT7MaJOPDeWnk2lD7L/AmoUE6Y+CGC1RlyWXKSv1oS15ybm6bhrziEery3VdXHvZNMBWmBLtopSafqfHw2q7EXgkfZ7YDPBT/8= X-MS-TrafficTypeDiagnostic: CY4PR07MB3462: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3462; 20:/yTQJWxqlxwE5MkVuvQ4Os3u1LZVNy1Q1soz/l2Uy7XFRHTTA1TGKjnLxR9aHAXXCAXorLz3cLYrGmwvWXmfdO77Dk/6AOWfuHPrtDIRkZYdgpgHimF2j1usVmFeg/QsBiAylojHV7/f8nEWMwxEcYBdgaPLpFOk09tqCm5TMkvAo56HgV1zFdAz9pnuvHL56m3Xadf9wFwhpjMPaiMC28OH/Dj01cW1HASWsco8NoXF+XZPdxvTTbeWKfjuUPS3F0OYaV/52pE5+YKGjuhnIch+wqCghIFgCFnwRNWRRyRDws46VbL37LQ3y2q60gEuZ4J50PR1adEXxYkAx7HoABv35WbC/FKpZOw3wsr6No3niKu+Cirt+zVo9WrhipmpzDnXU+Emfuvt+BwdH8A0U5t2BEVbSQ63SkMyjPf6lOEYqk3FMm89xsNKxnYR9Dpil2iAA7vvsQoNaase9LUnWfySPbrbYYh/xonblrSiyv/rgUj+LBDvwDpgInX8OYIzgz00KvUa05iBRE2m+LgaLxx3nDMzWWtGctCTmVmaA5JO44AvSaUNjIOKHiOZhtN9eyNUX8MYp15hBIin5GXjQ40u1bkjTyNPY7gyKBj9Bo8=; 4:E54/ZUimx1Ff2tkl7361CQjtrfWpQdpZHDnZEwNR/0Ecz9C6N2Zopy3TEDEPfyrlUfE3GMZHxIwV9VAWnJUZWYPMMgCp5Caa9UDLBjSrqPpKB4Tp9vdPaNsw7yGEh712iqnmFcvRFPAn48cYt+8Hsak2D4R2ctbXW/STi6w2mReScOR+mtW5Yhz1UlmdqzrIm4FtoSkPfUm7pr2RMdP7NI6wWljgnUvHeYPcSMhZUNGi1LIwDhwQ4F2nPixjdsJCumQZvFTeL7CZqY9qMyYbSA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(3231023)(944501075)(3002001)(10201501046)(6041268)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:CY4PR07MB3462; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3462; X-Forefront-PRVS: 054231DC40 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(346002)(366004)(39380400002)(396003)(199004)(189003)(24454002)(5660300001)(97736004)(9686003)(55016002)(229853002)(5009440100003)(72206003)(42882006)(6666003)(2950100002)(6916009)(478600001)(305945005)(7736002)(8936002)(83506002)(66066001)(33716001)(53936002)(23726003)(58126008)(68736007)(6116002)(1076002)(81156014)(16526018)(81166006)(8676002)(47776003)(16586007)(50466002)(3846002)(6246003)(4326008)(316002)(33896004)(52116002)(76176011)(386003)(59450400001)(25786009)(2906002)(105586002)(6496006)(106356001)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3462; H:Pavan-LT; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3462; 23:tkSzRD2x4hs0MsXWxvz6CPBhB6t65ULDQPGTd5j7y?= =?us-ascii?Q?Ts+ifAD3urLjU7XUf8KI6v8kgQ47dSIhcYh7MdijRZzUT2lrnDgcF2FZu0Ww?= =?us-ascii?Q?EVCW6w96+o1le53grK0U4zkL4bVZ4S4ybcInaDtuEuDezirqZQMr7N7lsH6N?= =?us-ascii?Q?OFNsHW+dEYmjzDwuod7Lmy5HGjUgh6GsieM8M7fjn6lKbZuBJvFE6gjy76Ot?= =?us-ascii?Q?VCxazQO1X9pVks5/Hn0B/eY39cnqKgYY68B6c/cjJyqGUJq1fs1VzUMAYTMm?= =?us-ascii?Q?hB62vVjwjGpy+dV9/cLMM57KXnwFH1qeDhPTitY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SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2018 15:31:05.4412 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5e1bc72e-c89d-4ab5-4ef9-08d553882c6f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3462 Subject: Re: [dpdk-dev] [PATCH 2/2] service: fix service core launch 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: Thu, 04 Jan 2018 15:31:08 -0000 Hi Harry, On Wed, Dec 20, 2017 at 11:21:47AM +0000, Harry van Haaren wrote: > diff --git a/test/test/test_service_cores.c b/test/test/test_service_cores.c > index 311c704..43f2318 100644 > --- a/test/test/test_service_cores.c > +++ b/test/test/test_service_cores.c > @@ -348,6 +348,7 @@ service_lcore_en_dis_able(void) > > /* call remote_launch to verify that app can launch ex-service lcore */ > service_remote_launch_flag = 0; > + rte_eal_wait_lcore(slcore_id); > int ret = rte_eal_remote_launch(service_remote_launch_func, NULL, > slcore_id); > TEST_ASSERT_EQUAL(0, ret, "Ex-service core remote launch failed."); > @@ -505,6 +506,10 @@ service_threaded_test(int mt_safe) > if (!mt_safe) > test_params[1] = 1; > > + /* wait for lcores before start() */ > + rte_eal_wait_lcore(slcore_1); > + rte_eal_wait_lcore(slcore_2); > + > rte_service_lcore_start(slcore_1); > rte_service_lcore_start(slcore_2); As you are touching this file can you change following things: Need to increase the delay to a value similar to other tc. service_lcore_running_check(void) { uint64_t tick = service_tick; - rte_delay_ms(SERVICE_DELAY * 10); + rte_delay_ms(100); /* if (tick != service_tick) we know the lcore as polled the service */ return tick != service_tick; } As service_mt_unsafe_poll and service_mt_safe_poll use the same function body and are called one after the other we need to wait for them to complete before proceeding to the next tc i.e service_mt_unsafe_poll -> wait for the cores to complete -> service_mt_safe_poll else it will lead to unintended side effects. @@ -523,6 +523,8 @@ service_threaded_test(int mt_safe) TEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 0), "Failed to stop MT Safe service"); + rte_eal_wait_lcore(slcore_1); + rte_eal_wait_lcore(slcore_2); unregister_all(); /* return the value of the callback pass_test variable to caller */ Cheers, Pavan. > > @@ -611,6 +616,7 @@ service_app_lcore_poll_impl(const int mt_safe) > rte_service_runstate_set(id, 1); > > uint32_t app_core2 = rte_get_next_lcore(slcore_id, 1, 1); > + rte_eal_wait_lcore(app_core2); > int app_core2_ret = rte_eal_remote_launch(service_run_on_app_core_func, > &id, app_core2); > > -- > 2.7.4 >