examples/ipsec-secgw: support flow director
[dpdk.git] / examples / vm_power_manager / channel_manager.h
index 3766e93..8284be0 100644 (file)
@@ -12,6 +12,7 @@ extern "C" {
 #include <linux/limits.h>
 #include <sys/un.h>
 #include <rte_atomic.h>
+#include <stdbool.h>
 
 /* 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.