[dpdk-dev] [PATCH 3/3] examples/power_guest: send request for specified core capabilities
Daly, Lee
lee.daly at intel.com
Mon Sep 30 12:54:47 CEST 2019
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.
More information about the dev
mailing list