From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 92F1A1E46C for ; Thu, 14 Jun 2018 12:12:28 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2018 03:12:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,222,1526367600"; d="scan'208";a="64506662" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga001.jf.intel.com with ESMTP; 14 Jun 2018 03:12:25 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.146]) by IRSMSX153.ger.corp.intel.com ([169.254.9.60]) with mapi id 14.03.0319.002; Thu, 14 Jun 2018 11:12:24 +0100 From: "Van Haaren, Harry" To: "Eads, Gage" , "dev@dpdk.org" CC: "jerin.jacob@caviumnetworks.com" , "Richardson, Bruce" , "Rao, Nikhil" , "Carrillo, Erik G" , "Gujjar, Abhinandan S" Thread-Topic: [PATCH 1/2] service: add mechanism for quiescing a service Thread-Index: AQHT+OcthbaaVVz550uZJBBWQ49lnaRfm0BQ Date: Thu, 14 Jun 2018 10:12:24 +0000 Message-ID: References: <20180531135557.7544-1-gage.eads@intel.com> <20180531135557.7544-2-gage.eads@intel.com> In-Reply-To: <20180531135557.7544-2-gage.eads@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWJhOGVlNWEtMjUwNy00Mjk3LTgyMDYtZTJhOTllMTlmODA2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicExvczZlZFdIdmpab2hnaFRjZTR1TDdYK2lBc0FwY3pNelJGckw3S1RnN1FOZnhVUTFobkR4Vm9nRUhjU1NjdyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] service: add mechanism for quiescing a service 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, 14 Jun 2018 10:12:29 -0000 > From: Eads, Gage > Sent: Thursday, May 31, 2018 2:56 PM > To: dev@dpdk.org > Cc: jerin.jacob@caviumnetworks.com; Van Haaren, Harry > ; Richardson, Bruce ; > Rao, Nikhil ; Carrillo, Erik G > ; Gujjar, Abhinandan S > > Subject: [PATCH 1/2] service: add mechanism for quiescing a service >=20 > Existing service functions allow us to stop a service, but doing so doesn= 't > guarantee that the service has finished running on a service core. This > commit introduces rte_service_may_be_active(), which returns whether the > service may be executing on one or more lcores currently, or definitely i= s > not. >=20 > The service core layer supports this function by setting a flag when > a service core is going to execute a service, and unsetting the flag when > the core is no longer able to run the service (its runstate becomes stopp= ed > or the lcore is no longer mapped). >=20 > With this new function, applications can set a service's runstate to > stopped, then poll rte_service_may_be_active() until it returns false. At > that point, the service is quiesced. > > Signed-off-by: Gage Eads Good approach to the problem. One nit below, version map should be alphabetical; Acked-by: Harry van Haaren > diff --git a/lib/librte_eal/rte_eal_version.map > b/lib/librte_eal/rte_eal_version.map > index f7dd0e7bc..6f38b02dc 100644 > --- a/lib/librte_eal/rte_eal_version.map > +++ b/lib/librte_eal/rte_eal_version.map > @@ -238,6 +238,7 @@ DPDK_18.05 { > rte_service_set_runstate_mapped_check; > rte_service_set_stats_enable; > rte_service_start_with_defaults; > + rte_service_may_be_active; >=20 > } DPDK_18.02; Version map to be alphabetically ordered.