static int ofp_global_config_alloc_shared_memory(void) { shm = ofp_shared_memory_alloc(SHM_NAME_GLOBAL_CONFIG, sizeof(*shm)); if (shm == NULL) { OFP_ERR("ofp_shared_memory_alloc failed"); return -1; } return 0; }
static int ofp_rt_lookup_alloc_shared_memory(void) { shm = ofp_shared_memory_alloc(SHM_NAME_RT_LOOKUP_MTRIE, sizeof(*shm)); if (shm == NULL) { OFP_ERR("ofp_shared_memory_alloc failed"); return -1; } return 0; }
static int ofp_hook_alloc_shared_memory(void) { shm_hook = ofp_shared_memory_alloc(SHM_NAME_HOOK, sizeof(*shm_hook)); if (shm_hook == NULL) { OFP_ERR("ofp_shared_memory_alloc failed"); return -1; } return 0; }
static int ofp_uma_alloc_shared_memory(void) { shm = ofp_shared_memory_alloc(SHM_NAME_UMA, sizeof(*shm)); if (shm == NULL) { OFP_ERR("ofp_shared_memory_alloc failed"); return -1; } return 0; }
static int ofp_stat_alloc_shared_memory(void) { shm_stat = ofp_shared_memory_alloc(SHM_NAME_STAT, sizeof(*shm_stat)); if (shm_stat == NULL) { OFP_ERR("ofp_shared_memory_alloc failed"); return -1; } return 0; }