X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvm_power_manager%2Fchannel_manager.h;h=8284be0a1811e6b7e411fc06e8874abbe3351379;hb=a35919a1139b2e2351216e1a42a5e35f9e27b06c;hp=3766e93c82a9362bc847b728099166130cf69956;hpb=221e7026d521c97c58fcee867f003e414dba2eea;p=dpdk.git diff --git a/examples/vm_power_manager/channel_manager.h b/examples/vm_power_manager/channel_manager.h index 3766e93c82..8284be0a18 100644 --- a/examples/vm_power_manager/channel_manager.h +++ b/examples/vm_power_manager/channel_manager.h @@ -12,6 +12,7 @@ extern "C" { #include #include #include +#include /* Maximum name length including '\0' terminator */ #define CHANNEL_MGR_MAX_NAME_LEN 64 @@ -79,6 +80,7 @@ struct vm_info { unsigned num_vcpus; /**< number of vCPUS */ struct channel_info channels[RTE_MAX_LCORE]; /**< channel_info array */ unsigned num_channels; /**< Number of channels */ + int allow_query; /**< is query allowed */ }; /** @@ -143,6 +145,22 @@ uint16_t get_pcpu(struct channel_info *chan_info, unsigned int vcpu); */ int set_pcpu(char *vm_name, unsigned int vcpu, unsigned int pcpu); +/** + * Allow or disallow queries for specified VM. + * It is thread-safe. + * + * @param name + * Virtual Machine name to lookup. + * + * @param allow_query + * Query status to be set. + * + * @return + * - 0 on success. + * - Negative on error. + */ +int set_query_status(char *vm_name, bool allow_query); + /** * Add a VM as specified by name to the Channel Manager. The name must * correspond to a valid libvirt domain name.