#include <stdio.h>
#include <stdlib.h>
-#include <sys/un.h>
#include <fcntl.h>
#include <unistd.h>
#include <inttypes.h>
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_log.h>
-#include <rte_atomic.h>
#include <rte_spinlock.h>
#include <libvirt/libvirt.h>
#include "channel_manager.h"
-#include "channel_commands.h"
#include "channel_monitor.h"
#include "power_manager.h"
#define RTE_LOGTYPE_CHANNEL_MANAGER RTE_LOGTYPE_USER1
+struct libvirt_vm_info lvm_info[MAX_CLIENTS];
+
/* Global pointer to libvirt connection */
static virConnectPtr global_vir_conn_ptr;
continue;
}
- snprintf(chan_info->channel_path,
+ if ((size_t)snprintf(chan_info->channel_path,
sizeof(chan_info->channel_path), "%s%s",
- CHANNEL_MGR_SOCKET_PATH, dir->d_name);
+ CHANNEL_MGR_SOCKET_PATH, dir->d_name)
+ >= sizeof(chan_info->channel_path)) {
+ RTE_LOG(ERR, CHANNEL_MANAGER, "Pathname too long for channel '%s%s'\n",
+ CHANNEL_MGR_SOCKET_PATH, dir->d_name);
+ rte_free(chan_info);
+ continue;
+ }
if (setup_channel_info(&vm_info, &chan_info, channel_num) < 0) {
rte_free(chan_info);
}
for (i = 0; i < len_channel_list; i++) {
-
if (channel_list[i] >= RTE_MAX_LCORE) {
RTE_LOG(INFO, CHANNEL_MANAGER, "Channel(%u) is out of range "
"0...%d\n", channel_list[i],
}
for (i = 0; i < ci->core_count; i++) {
+ if (rte_lcore_index(i) == -1)
+ continue;
+
if (ci->cd[i].global_enabled_cpus == 0)
continue;