[dpdk-dev] [PATCH 3/3] examples/power_guest: send request for specified core capabilities

Daly, Lee lee.daly at intel.com
Mon Sep 30 14:54:38 CEST 2019



> -----Original Message-----
> From: Daly, Lee
> Sent: Monday, September 30, 2019 11:55 AM
> To: 'Hajkowski' <marcinx.hajkowski at intel.com>; Hunt, David
> <david.hunt at intel.com>
> Cc: dev at dpdk.org; Hajkowski, MarcinX <marcinx.hajkowski at intel.com>
> Subject: RE: [dpdk-dev] [PATCH 3/3] examples/power_guest: send request
> for specified core capabilities
> 
> Hi dave,
> See comments below.
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Hajkowski
> > Sent: Thursday, May 30, 2019 5:15 PM
> > To: Hunt, David <david.hunt at intel.com>
> > Cc: dev at dpdk.org; Hajkowski, MarcinX <marcinx.hajkowski at intel.com>
> > Subject: [dpdk-dev] [PATCH 3/3] examples/power_guest: send request for
> > specified core capabilities
> >
> > From: Marcin Hajkowski <marcinx.hajkowski at intel.com>
> >
> > Send request to power manager for core id provided by user to get
> > related capabilities.
> >
> > Signed-off-by: Marcin Hajkowski <marcinx.hajkowski at intel.com>
> > ---
> >  .../guest_cli/vm_power_cli_guest.c            | 119 +++++++++++++++++-
> >  1 file changed, 117 insertions(+), 2 deletions(-)
> >
> > 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 = rte_get_next_lcore(-1,
> > +				0,
> > +				0);
> > +		if (lcore_id == RTE_MAX_LCORE) {
> > +			cmdline_printf(cl, "Enabled core not found.\n");
> > +			return;
> > +		}
> > +
> > +		pkt.command = 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.
Feel free to add my ack after that small change.
Acked-by: Lee Daly <lee.daly at intel.com>



More information about the dev mailing list