From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0043.outbound.protection.outlook.com [104.47.42.43]) by dpdk.org (Postfix) with ESMTP id D7E2A14EC for ; Tue, 31 Jul 2018 10:31:17 +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:X-MS-Exchange-SenderADCheck; bh=Zbljd/gt4FV8YXaLBlOhJnuLNrY9Nz54NRvTACOeiwo=; b=QSEuK1WTUb4wPcauXpAPhNR6OyPARhcIBG2ONw9ieYnEcGL3mE3nCpBKp7EY971/ugQYib+lk6ONWkGR6USburLL7Q8cJFSp0M3KvqMCEPaVNoJp9Jow8INZB0lTjwq++rNwhVv8DW0xGkIfHT2iI7C+OiR+a6/d0wZe25UvZuo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by DM6PR07MB5002.namprd07.prod.outlook.com (2603:10b6:5:25::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Tue, 31 Jul 2018 08:31:14 +0000 Date: Tue, 31 Jul 2018 14:01:08 +0530 From: Jerin Jacob To: "Elo, Matias (Nokia - FI/Espoo)" Cc: "Van Haaren, Harry" , "dev@dpdk.org" Message-ID: <20180731083107.GA23233@jerin> References: <20180730075408.GA14117@jerin> <80CC5C07-0D73-4F86-9F93-0AB78DEF2BFD@nokia.com> <20180730092921.GA22242@jerin> <20180730103638.GA26701@jerin> <75889C0D-2790-4EB8-B202-1311D764CCF2@nokia.com> <20180730142614.GA11265@jerin> <6D43DE84-583D-42E5-B298-0E7BDA0C17FB@nokia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6D43DE84-583D-42E5-B298-0E7BDA0C17FB@nokia.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BYAPR07CA0031.namprd07.prod.outlook.com (2603:10b6:a02:bc::44) To DM6PR07MB5002.namprd07.prod.outlook.com (2603:10b6:5:25::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0bc04099-3085-42b6-27dc-08d5f6bffb51 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB5002; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 3:4B8lR9FmWeFTO8leBll/CIg1jR042sbLmlPlZtmVUSd3St7WDD/5//XBDLSe+e+JEbNLaWM//iPCw8/Yxm40XNce808PRx0+eQ5o5l17qdKHcG7dr8fw/Z8MGRznPgI9SCxy4sOPDXBMUQk0Ki2Xi2gVnySGp48bVi2nq5xZJ9eKjufUQMfEseAIXo5TkJqrUpoZJnag+EakwuEissa/nxcrj9kbpxWGElV/Cv0CiIJggXnjTTrZ44VersDbjqrk; 25:zX+Y9HWY8KN23qgYUatqFIWSVH0vvKTddYhDDNu+8NBiim3LBlS35BObNe7bmrlotqFNKCmDESosx/NOQTqoUsV1i9jP2BHUj+KbVZ4SczrkjbqAe2jyecVUg7Ziw62EYoSyD9Tadktdnk71qgZUGdRO2sSWNMko7ht4tRKTWib/HnoZHsCTTIqvuXj4yH8h/Lbw/9iMicR8VOU0KfUP6gwMqp03DtM0hIGjnUKyyBkvbTxYB2qodtnjP1BILlAWBctz6yxA0xlTlE0QLcHPCSW9z8/O3feMmGzRIG9AkvS+nqMBXxzZ4vFClB3zRHep/a/w8Vkn8OcT+PX0+Umefw==; 31:UL+ovVcM1+hMAkOBr7SEtFa/I/jbvph9jUKhcCTepAkyCHMIKPdzKpa6QWUJh+/EKPvAQqqMBop6RqLIiIjTgcwdZk8fZQzmf4BAx7qARV4oo7Kyb9l8cnIMsEWGWUHx/0FYYRI3kFYNTy6EC+f59nnz0LduQunt1Wld5PXySctfIPcETB66lL2Ss7OydJDfuTvm578hZ+wwVKHy7LRBnO9RCr9U321LWRksyy8h1F0= X-MS-TrafficTypeDiagnostic: DM6PR07MB5002: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 20:0EFS9IExOBYomKKA8NfSL1zifi5hE15avy6vsCbXeBHcvDFmbKW3GFzD0aUgH7Gx0WlTyd2tniwaWflKJrFvHhDtRAW5YU0+JRuOPODe+KkLvHDeno7k5OtdS3yTwmg/JhGs9aOMpI2wIOkdiwtb1uBaZoyleY3GtM89PDjXbuPLBR2jVtxffoYZ2idEX7LJcPezrIQUmpOoxgalCKmP4SSG2uM+EaKAEXT0k2cbMoSz++aCJJpqUb9HpHhiT/+qBG7TaBIrjwsngh1ItrsYmvLjfsaEBJwBI21oGKZKec7wYy2wIgWoKZefm3eNgH+ph1pOayy92bLRg+ViLvLWpCLKJAAlVNT/MUgrwuPKXMWpGHZj8OyrqTITa8vVDW7vBeseqjyJ790IFaSKPGDOweljJZMfFwSIT4GMQkjraXmsbTGtmGwjPSPGBNC0TlxSR4gHtx1nLD06WLZE4aUhxBFIcnu4daU7TV36JIsJMBIOAMeCjlBXUCd9o/GYf90XJfahVLceXcb1LiCvFhV9pOFjFhWKu3M/qRiwhMv4J2lYXdadRTOXI+FIwj5YMhBsxHtdBNiJr7QRTH9DgrTxKQuHBOgKqXuYtEi1KzwOI3E= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(82608151540597)(109105607167333)(195916259791689)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231311)(944501410)(52105095)(93006095)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201703031522075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB5002; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB5002; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 4:AkIPPCe/OKcFJvr+XJqdNs5SQiVKC4+ERtMYxyyOAMXsq1dG0/Jh1BrkCw1jA2ECY3naaRNuqiYVI/G4uFWU/uUAhy/5y6jzVvnR0OePe4d4adKwXeVRRFXtY3/+oWgczry4aFxWYSOW85Obgf0vXx5uxn+tFS8Mdr+J9TFdmqOqqngZVwiaxvVGb/C1FYmX1qM/xkE5Yds4tt7BpQIhcO3KchSIto73+eiMVJ8CJ26Kn0V1x6Hew9+2hIid0v4Ok8Wry9cHFtslRMRffA/9Z6E28Ml8b38DeZB4OsCaOMEkzIpHw3on6Q51tLn21E7O4z7hc4mIHuDTeTBmO2FxEHfI5iYxHHcJ/05i0p9PInp22rktvXiaJ9mnjclK2hhieYWJ1DtILY6aK/Is/+NwemMbHj5833tdecONbhK7Z2k= X-Forefront-PRVS: 0750463DC9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(346002)(376002)(136003)(366004)(39860400002)(199004)(189003)(13464003)(93886005)(33896004)(42882007)(316002)(58126008)(54906003)(296002)(66066001)(16586007)(47776003)(52116002)(16526019)(23726003)(386003)(5009440100003)(3846002)(81156014)(33716001)(6116002)(6496006)(72206003)(305945005)(2906002)(8936002)(26005)(81166006)(8676002)(186003)(68736007)(1076002)(7736002)(478600001)(33656002)(76176011)(14444005)(6666003)(97736004)(6246003)(956004)(5660300001)(55016002)(53936002)(44832011)(486006)(9686003)(6916009)(476003)(4326008)(25786009)(11346002)(106356001)(446003)(229853002)(50466002)(105586002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB5002; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR07MB5002; 23:JIorAIVehljbpTZcUcs+Nk6X7hvcwrfGxXOMSA37p?= =?us-ascii?Q?/Q2mMMX/GJvyUeIh8znBD5hhQQF2VVxAOnaL26rml09ODyQihAm37ttCW72I?= =?us-ascii?Q?sX10HVeFkENfmWPKU9XwxHhiHrFeyxRudDzV/bf8qf4YaibPJGhD2yjf2K54?= =?us-ascii?Q?8IdbIahZzAyVcYW1AnJGiXhkU9OtI/XQ2IfkaZ1QM+n8xzBoMEgsCCBAzCGI?= =?us-ascii?Q?DhxWaorbBI+5xyYODXdP1WHjUKbo86iNwt1CfI4kyj4O+Ht+/xO2C71dhfa6?= =?us-ascii?Q?lFyR2/01/Tnlo8SrTHo8ch3rP/sUAIyaGX6X9uviF3xZvtpft5NImznld/uO?= =?us-ascii?Q?UEJ2XKLsSRBXSJam2trsIod/OIYh5AF66UD1F2sOZ7EH5mHuS1wxDq47DqqQ?= =?us-ascii?Q?i9GsRE1punvk3pOuwCVT2XIlHFw7sxqTERD3xjZt7B5rvCoSuprkAnZsYJyD?= =?us-ascii?Q?4ml7DIqRxUH7tuL30Va1mfSJKI0znczOf0M2xK5WKhlECEfkYDBa8GepFrse?= =?us-ascii?Q?BHKKm767KmxtWsGznW0q9Z148+TPPkzHF7PorblO6+rvqvd/qNC+xaimiofj?= =?us-ascii?Q?MrPELAd0AC9TcKpAj+oOpmnexfS9saV3etjnGOgW0G2+HuX7+zVEpmlKdrYW?= =?us-ascii?Q?bFVenP7UagysIKBErlT9msHnDQ6d+yK8HvfR0uypExtFQkMkLa63hoUl+US0?= =?us-ascii?Q?YORuvfJE6pxsrLuswA6miJmybA+62hDSx4MlXqtewgGnlStcqRHFZl+fAEn3?= =?us-ascii?Q?qKdyhlDzH1HSowfFgwP+KKvR3ybEAFjgluUI0aNHeMJdVlKT51H5FlmmIDWe?= =?us-ascii?Q?ukGJPgJ5q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etworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2018 08:31:14.2588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0bc04099-3085-42b6-27dc-08d5f6bffb51 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB5002 Subject: Re: [dpdk-dev] eventdev: method for finding out unlink status 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: Tue, 31 Jul 2018 08:31:18 -0000 -----Original Message----- > Date: Tue, 31 Jul 2018 08:09:05 +0000 > From: "Elo, Matias (Nokia - FI/Espoo)" > To: Jerin Jacob > CC: "Van Haaren, Harry" , "dev@dpdk.org" > > Subject: Re: [dpdk-dev] eventdev: method for finding out unlink status > x-mailer: Apple Mail (2.3445.9.1) > > > >>>> > >>>> I think the end result we're hoping for is something like pseudo code below, > >>>> (keep in mind that the event/sw has a service-core thread running it, so no > >>>> application code there): > >>>> > >>>> int worker_poll = 1; > >>>> > >>>> worker() { > >>>> while(worker_poll) { > >>>> // eventdev_dequeue_burst() etc > >>>> } > >>>> go_to_sleep(1); > >>>> } > >>>> > >>>> control_plane_scale_down() { > >>>> unlink(evdev, worker, queue_id); > >>>> while(unlinks_in_progress(evdev) > 0) > >>>> usleep(100); > >>>> > >>>> /* here we know that the unlink is complete. > >>>> * so we can now stop the worker from polling */ > >>>> worker_poll = 0; > >>>> } > >>> > >>> > >>> Make sense. Instead of rte_event_is_unlink_in_progress(), How about > >>> adding a callback in rte_event_port_unlink() which will be called on > >>> unlink completion. It will reduce the need for ONE more API. > >>> > >>> Anyway it RC2 now, so we can not accept a new feature. So we will have > >>> time for deprecation notice. > >>> > >> > >> Both solutions should work but I would perhaps favor Harry's approach as it > >> requires less code in the application side and doesn't break backward > >> compatibility. > > > > OK. > > > > Does rte_event_port_unlink() returning -EBUSY will help? > > It could perhaps work. The return value becomes a bit ambiguous though. E.g. how > to differentiate a delayed unlink completion from a scenario where the port & queues > have never been linked? Based on return code? > > The implementation may also be more complex compared to a separate function but > Harry is a better person to answer this. > > > > > while (rte_event_port_unlink() != nr_links) > > usleep(100); > > > > I am trying to think, how can address this requirements without creating new API and/or less impact to other > > drivers which don't have this requirements? > > Wouldn't this function then just be NOP for the other drivers? If is used in fastpath, it will have function pointer overhead for other drivers and southbound(driver) interface needs to add for holding one more function pointer. > > > > > Are we calling this API in fastpath? or it is control thread as > > mentioned in harry's pseudo code. > > In our use case it could be called also directly from the fast path by the worker thread. If it is in fastpath, I prefer to have single API(if possible) and avoid creating new API for driver specific usecases(again if possible to do so) >