From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F1AA0A2EDB for ; Mon, 30 Sep 2019 12:54:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 579AD3423; Mon, 30 Sep 2019 12:54:52 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 53DCF324D for ; Mon, 30 Sep 2019 12:54:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Sep 2019 03:54:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,565,1559545200"; d="scan'208";a="342605923" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by orsmga004.jf.intel.com with ESMTP; 30 Sep 2019 03:54:48 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.184]) by IRSMSX151.ger.corp.intel.com ([169.254.4.234]) with mapi id 14.03.0439.000; Mon, 30 Sep 2019 11:54:47 +0100 From: "Daly, Lee" To: Hajkowski , "Hunt, David" CC: "dev@dpdk.org" , "Hajkowski, MarcinX" Thread-Topic: [dpdk-dev] [PATCH 3/3] examples/power_guest: send request for specified core capabilities Thread-Index: AQHVFwMbv6hIzVHRvEKgRKJ1ufxzPqdEykqA Date: Mon, 30 Sep 2019 10:54:47 +0000 Message-ID: References: <20190530161517.11916-1-marcinx.hajkowski@intel.com> <20190530161517.11916-4-marcinx.hajkowski@intel.com> In-Reply-To: <20190530161517.11916-4-marcinx.hajkowski@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjlhZmFiYjYtYmZlMC00OTk4LWI5MGQtODgzYjZiNmMxNzJlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibWVTa2NBK3RadWN5V29jXC9QbGs4UVwvXC8rS2tyRGl6SEJpSCtxMVJWdHB0V3ZDeXRObWgyZmk5OU5FYWphTVwvMWcifQ== 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 3/3] examples/power_guest: send request for specified core capabilities 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi dave,=20 See comments below.=20 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Hajkowski > Sent: Thursday, May 30, 2019 5:15 PM > To: Hunt, David > Cc: dev@dpdk.org; Hajkowski, MarcinX > Subject: [dpdk-dev] [PATCH 3/3] examples/power_guest: send request for > specified core capabilities >=20 > From: Marcin Hajkowski >=20 > Send request to power manager for core id provided by user to get related > capabilities. >=20 > Signed-off-by: Marcin Hajkowski > --- > .../guest_cli/vm_power_cli_guest.c | 119 +++++++++++++++++- > 1 file changed, 117 insertions(+), 2 deletions(-) >=20 > diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c > b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c > index 848230248..de85c1406 100644 > --- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c > +++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c )); > + > + if (!strcmp(res->cpu_num, "all")) { > + > + /* Get first enabled lcore. */ > + lcore_id =3D rte_get_next_lcore(-1, > + 0, > + 0); > + if (lcore_id =3D=3D RTE_MAX_LCORE) { > + cmdline_printf(cl, "Enabled core not found.\n"); > + return; > + } > + > + pkt.command =3D CPU_POWER_QUERY_CAPS_LIST; > + strcpy(pkt.vm_name, policy.vm_name); 2 uses of strcpy in this patch, could this be changed to strlcpy(). /Lee.