MCPcopy Create free account
hub / github.com/F-Stack/f-stack / channel_manager_exit

Function channel_manager_exit

dpdk/examples/vm_power_manager/channel_manager.c:1004–1036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1002}
1003
1004void
1005channel_manager_exit(void)
1006{
1007 unsigned i;
1008 char mask[RTE_MAX_LCORE];
1009 struct virtual_machine_info *vm_info, *tmp;
1010
1011 RTE_TAILQ_FOREACH_SAFE(vm_info, &vm_list_head, vms_info, tmp) {
1012
1013 rte_spinlock_lock(&(vm_info->config_spinlock));
1014
1015 memcpy(mask, (char *)vm_info->channel_mask, RTE_MAX_LCORE);
1016 for (i = 0; i < RTE_MAX_LCORE; i++) {
1017 if (mask[i] != 1)
1018 continue;
1019 remove_channel_from_monitor(
1020 vm_info->channels[i]);
1021 close(vm_info->channels[i]->fd);
1022 rte_free(vm_info->channels[i]);
1023 }
1024 rte_spinlock_unlock(&(vm_info->config_spinlock));
1025
1026 TAILQ_REMOVE(&vm_list_head, vm_info, vms_info);
1027 rte_free(vm_info);
1028 }
1029
1030 if (global_hypervisor_available) {
1031 /* Only needed if hypervisor available */
1032 rte_free(global_cpumaps);
1033 rte_free(global_vircpuinfo);
1034 disconnect_hypervisor();
1035 }
1036}

Callers 2

cmd_quit_parsedFunction · 0.85
sig_handlerFunction · 0.85

Calls 7

rte_freeFunction · 0.85
disconnect_hypervisorFunction · 0.85
rte_spinlock_lockFunction · 0.50
memcpyFunction · 0.50
closeFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected