From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id C7EA21B43C for ; Tue, 8 Jan 2019 03:02:32 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2019 18:02:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,452,1539673200"; d="scan'208";a="136227233" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 07 Jan 2019 18:02:31 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 7 Jan 2019 18:02:31 -0800 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 7 Jan 2019 18:02:30 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.63]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.239]) with mapi id 14.03.0415.000; Tue, 8 Jan 2019 10:02:29 +0800 From: "Yao, Lei A" To: "Hunt, David" , "dev@dpdk.org" Thread-Topic: [PATCH] examples/power: fix wrong core_id with JSON cmds Thread-Index: AQHUpn24itk/CwxBQ0aEKUTzqtz1PaWknCqQ Date: Tue, 8 Jan 2019 02:02:28 +0000 Message-ID: <2DBBFF226F7CF64BAFCA79B681719D95496063E4@shsmsx102.ccr.corp.intel.com> References: <20190107113920.37748-1-david.hunt@intel.com> In-Reply-To: <20190107113920.37748-1-david.hunt@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTBkNmY3NjItMjViYS00ZjdiLWE3MDEtOTIzNjE3MTI0ZTA2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidkpNMXkxc3YzS3RSTElHRUZuTjdVR0kyXC96QXpVQytGbUhqcGJTS0dOMWg4TVBUbWc2and0d1grRXVqUmVMNDIifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] examples/power: fix wrong core_id with JSON cmds 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, 08 Jan 2019 02:02:33 -0000 > -----Original Message----- > From: Hunt, David > Sent: Monday, January 7, 2019 7:39 PM > To: dev@dpdk.org > Cc: Hunt, David ; Yao, Lei A > Subject: [PATCH] examples/power: fix wrong core_id with JSON cmds >=20 > This patch fixes a bug introduced in the 64-core limtation > enhancement where the core_id is inadvertently converted from > virtual to physical even though it may already be a physical > core_id. >=20 > We should be using the core_type field, and only converting via > hypervisor when core_type is set to CORE_TYPE_VIRTUAL >=20 > Fixes: 5776b7a371d1 ("examples/power: allow VM to use lcores over 63") >=20 > Signed-off-by: David Hunt > --- > examples/vm_power_manager/channel_monitor.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/examples/vm_power_manager/channel_monitor.c > b/examples/vm_power_manager/channel_monitor.c > index 85622e7cb..1a3a0fa76 100644 > --- a/examples/vm_power_manager/channel_monitor.c > +++ b/examples/vm_power_manager/channel_monitor.c > @@ -640,7 +640,10 @@ process_request(struct channel_packet *pkt, struct > channel_info *chan_info) > if (pkt->command =3D=3D CPU_POWER) { > unsigned int core_num; >=20 > - core_num =3D get_pcpu(chan_info, pkt->resource_id); > + if (pkt->core_type =3D=3D CORE_TYPE_VIRTUAL) > + core_num =3D get_pcpu(chan_info, pkt->resource_id); Hi, Dave Now in DPDK code, only command send from VM(guest_cli sample) will set the= =20 pkt- + else > + core_num =3D pkt->resource_id; >=20 > switch (pkt->unit) { > case(CPU_POWER_SCALE_MIN): > -- > 2.17.1