FlexRAN: update slice config array dimensions

This commit is contained in:
Robert Schmidt
2018-09-03 18:10:28 +02:00
parent 71a9115abd
commit 08b122e3ff
2 changed files with 7 additions and 7 deletions
@@ -53,13 +53,13 @@ struct lfds700_ringbuffer_element *dl_mac_config_array[NUM_MAX_ENB];
struct lfds700_ringbuffer_state ringbuffer_state[NUM_MAX_ENB]; struct lfds700_ringbuffer_state ringbuffer_state[NUM_MAX_ENB];
/* the slice config as kept in the underlying system */ /* the slice config as kept in the underlying system */
Protocol__FlexSliceConfig *slice_config[NUM_MAX_ENB]; Protocol__FlexSliceConfig *slice_config[MAX_NUM_SLICES];
/* a structure that keeps updates which will be reflected in slice_config later */ /* a structure that keeps updates which will be reflected in slice_config later */
Protocol__FlexSliceConfig *sc_update[NUM_MAX_ENB]; Protocol__FlexSliceConfig *sc_update[MAX_NUM_SLICES];
/* indicates whether sc_update contains new data */ /* indicates whether sc_update contains new data */
int perform_slice_config_update_count = 1; int perform_slice_config_update_count = 1;
/* queue of incoming new UE<>slice association commands */ /* queue of incoming new UE<>slice association commands */
Protocol__FlexUeConfig *ue_slice_assoc_update[NUM_MAX_UE]; Protocol__FlexUeConfig *ue_slice_assoc_update[MAX_NUM_SLICES];
int n_ue_slice_assoc_updates = 0; int n_ue_slice_assoc_updates = 0;
/* mutex for sc_update: do not receive new config and write it at the same time */ /* mutex for sc_update: do not receive new config and write it at the same time */
pthread_mutex_t sc_update_mtx = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t sc_update_mtx = PTHREAD_MUTEX_INITIALIZER;
@@ -34,10 +34,10 @@
#include "flexran_agent_mac_slice_verification.h" #include "flexran_agent_mac_slice_verification.h"
/* from flexran_agent_mac.c */ /* from flexran_agent_mac.c */
extern Protocol__FlexSliceConfig *slice_config[NUM_MAX_ENB]; extern Protocol__FlexSliceConfig *slice_config[MAX_NUM_SLICES];
extern Protocol__FlexSliceConfig *sc_update[NUM_MAX_ENB]; extern Protocol__FlexSliceConfig *sc_update[MAX_NUM_SLICES];
extern int perform_slice_config_update_count; extern int perform_slice_config_update_count;
extern Protocol__FlexUeConfig *ue_slice_assoc_update[NUM_MAX_UE]; extern Protocol__FlexUeConfig *ue_slice_assoc_update[MAX_NUM_SLICES];
extern int n_ue_slice_assoc_updates; extern int n_ue_slice_assoc_updates;
extern pthread_mutex_t sc_update_mtx; extern pthread_mutex_t sc_update_mtx;
@@ -1574,7 +1574,7 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco
void prepare_ue_slice_assoc_update(mid_t mod_id, Protocol__FlexUeConfig *ue_config) void prepare_ue_slice_assoc_update(mid_t mod_id, Protocol__FlexUeConfig *ue_config)
{ {
if (n_ue_slice_assoc_updates == NUM_MAX_UE) { if (n_ue_slice_assoc_updates == MAX_NUM_SLICES) {
LOG_E(FLEXRAN_AGENT, LOG_E(FLEXRAN_AGENT,
"[%d] can not handle flex_ue_config message, buffer is full; try again later\n", "[%d] can not handle flex_ue_config message, buffer is full; try again later\n",
mod_id); mod_id);