From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 102152BF3 for ; Tue, 5 Sep 2017 16:34:47 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 05 Sep 2017 07:34:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,480,1498546800"; d="scan'208";a="1011135570" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by orsmga003.jf.intel.com with ESMTP; 05 Sep 2017 07:34:46 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.59]) by IRSMSX153.ger.corp.intel.com ([169.254.9.34]) with mapi id 14.03.0319.002; Tue, 5 Sep 2017 15:34:45 +0100 From: "Van Haaren, Harry" To: Guduri Prathyusha CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] service: fix service lcore stop function Thread-Index: AQHTJlDhHjNnItmZwkKOkaLfWzNuG6KmWokg Date: Tue, 5 Sep 2017 14:34:44 +0000 Message-ID: References: <20170905141057.8998-1-gprathyusha@caviumnetworks.com> In-Reply-To: <20170905141057.8998-1-gprathyusha@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzlhZTJlMmEtYmNmOS00N2Y3LThlNzctYmRhNzY4NDEwZGExIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImZwUnY0VDQyWGxRdDRjMjc1Q3dEXC9lRVZ4Qm4ydjBTMnBRaGZpRlQ2eTRrPSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] service: fix service lcore stop function 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, 05 Sep 2017 14:34:48 -0000 > From: Guduri Prathyusha [mailto:gprathyusha@caviumnetworks.com] > Sent: Tuesday, September 5, 2017 3:11 PM > To: Van Haaren, Harry > Cc: dev@dpdk.org; Guduri Prathyusha > Subject: [dpdk-dev] [PATCH 1/2] service: fix service lcore stop function >=20 > lcore_states store the state of the lcore. Fixing the invalid > dereference of lcore_states with service number >=20 > Fixes: 21698354c832 ("service: introduce service cores concept") >=20 > Signed-off-by: Guduri Prathyusha Hi Guduri, This looks like a genuine bug-fix - thanks for looking into it and providin= g a patch. Typically, DPDK tries to fix the unit-tests and a bug at the sam= e time - this ensures that the unit tests continue to pass at every test. S= o, patch 2/2 of this series can be merged into this patch, and include both= Fixes: lines. Secondly, does this patchset apply to the current dpdk (17.08), or to the f= uture service-cores patches? If it doesn't apply cleanly on the future patc= hes, it is probably better to A) include it in that patchset, or B) rebase = this fix patch onto the service cores patches. Hope that makes sense, and let me know if you'd prefer A) or B) above. Than= ks, -Harry > --- > lib/librte_eal/common/rte_service.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/= rte_service.c > index 7efb76dc8..2ac77cc2a 100644 > --- a/lib/librte_eal/common/rte_service.c > +++ b/lib/librte_eal/common/rte_service.c > @@ -609,7 +609,7 @@ rte_service_lcore_stop(uint32_t lcore) > uint32_t i; > for (i =3D 0; i < RTE_SERVICE_NUM_MAX; i++) { > int32_t enabled =3D > - lcore_states[i].service_mask & (UINT64_C(1) << i); > + lcore_states[lcore].service_mask & (UINT64_C(1) << i); > int32_t service_running =3D rte_services[i].runstate !=3D > RUNSTATE_STOPPED; > int32_t only_core =3D rte_services[i].num_mapped_cores =3D=3D 1; > -- > 2.14.1