[dpdk-dev] [PATCH v1 1/7] examples/power: add checks around hypervisor
Stephen Hemminger
stephen at networkplumber.org
Thu Aug 30 18:59:39 CEST 2018
On Thu, 30 Aug 2018 11:54:16 +0100
David Hunt <david.hunt at intel.com> wrote:
Minor nits
> +static unsigned int global_hypervisor_available;
Please use bool for boolean values.
> /*
> * Represents a single Virtual Machine
> @@ -198,7 +199,11 @@ get_pcpus_mask(struct channel_info *chan_info, unsigned vcpu)
> {
> struct virtual_machine_info *vm_info =
> (struct virtual_machine_info *)chan_info->priv_info;
> - return rte_atomic64_read(&vm_info->pcpu_mask[vcpu]);
> +
> + if ((global_hypervisor_available) && (vm_info != NULL))
parenthesis are unnecessary here.
I know this is pre-existing, but please don't use CamelCase:
+ if (virNodeGetInfo(global_vir_conn_ptr, &info)) {
More information about the dev
mailing list