All 4 nr<e-(ue)softmodems are compiling
This commit is contained in:
@@ -178,9 +178,9 @@ typedef struct RrcConfigurationReq_s {
|
||||
uint16_t mnc[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t num_plmn;
|
||||
|
||||
int enable_measurement_reports;
|
||||
int enable_x2;
|
||||
uint32_t rrc_inactivity_timer_thres; // for testing, maybe change later
|
||||
|
||||
paging_drx_t default_drx;
|
||||
int16_t nb_cc;
|
||||
lte_frame_type_t frame_type[MAX_NUM_CCs];
|
||||
|
||||
@@ -122,8 +122,13 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
for (j = 0; j < ue_report[i]->n_rlc_report; j++) {
|
||||
|
||||
rlc_reports[j] = malloc(sizeof(Protocol__FlexRlcBsr));
|
||||
if (rlc_reports[j] == NULL)
|
||||
if (rlc_reports[j] == NULL){
|
||||
for (k = 0; k < j; k++){
|
||||
free(rlc_reports[k]);
|
||||
}
|
||||
free(rlc_reports);
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_rlc_bsr__init(rlc_reports[j]);
|
||||
rlc_reports[j]->lc_id = j+1;
|
||||
rlc_reports[j]->has_lc_id = 1;
|
||||
@@ -180,8 +185,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
//Create the actual CSI reports.
|
||||
Protocol__FlexDlCsi **csi_reports;
|
||||
csi_reports = malloc(sizeof(Protocol__FlexDlCsi *)*dl_report->n_csi_report);
|
||||
if (csi_reports == NULL)
|
||||
if (csi_reports == NULL) {
|
||||
free(dl_report);
|
||||
goto error;
|
||||
}
|
||||
for (j = 0; j < dl_report->n_csi_report; j++) {
|
||||
|
||||
csi_reports[j] = malloc(sizeof(Protocol__FlexDlCsi));
|
||||
@@ -402,14 +409,18 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
//Provide a report for each pending paging message
|
||||
Protocol__FlexPagingInfo **p_info;
|
||||
p_info = malloc(sizeof(Protocol__FlexPagingInfo *) * paging_report->n_paging_info);
|
||||
if (p_info == NULL)
|
||||
if (p_info == NULL){
|
||||
free(paging_report);
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (j = 0; j < paging_report->n_paging_info; j++) {
|
||||
|
||||
p_info[j] = malloc(sizeof(Protocol__FlexPagingInfo));
|
||||
if(p_info[j] == NULL)
|
||||
if(p_info[j] == NULL){
|
||||
free(paging_report);
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_paging_info__init(p_info[j]);
|
||||
//TODO: Set paging index. This index is the same that will be used for the scheduling of the
|
||||
//paging message by the controller
|
||||
@@ -450,14 +461,22 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
full_ul_report->n_cqi_meas = 1;
|
||||
Protocol__FlexUlCqi **ul_report;
|
||||
ul_report = malloc(sizeof(Protocol__FlexUlCqi *) * full_ul_report->n_cqi_meas);
|
||||
if(ul_report == NULL)
|
||||
if(ul_report == NULL) {
|
||||
free(full_ul_report);
|
||||
goto error;
|
||||
}
|
||||
//Fill each UL report of the UE for each of the configured report types
|
||||
for(j = 0; j < full_ul_report->n_cqi_meas; j++) {
|
||||
|
||||
ul_report[j] = malloc(sizeof(Protocol__FlexUlCqi));
|
||||
if(ul_report[j] == NULL)
|
||||
goto error;
|
||||
if(ul_report[j] == NULL) {
|
||||
for (k = 0; k < j; k++) {
|
||||
free(ul_report[k]);
|
||||
}
|
||||
free(ul_report);
|
||||
free(full_ul_report);
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_ul_cqi__init(ul_report[j]);
|
||||
//TODO: Set the type of the UL report. As an example set it to SRS UL report
|
||||
// See enum flex_ul_cqi_type in FlexRAN specification for more details
|
||||
@@ -468,8 +487,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
ul_report[j]->n_sinr = 0;
|
||||
uint32_t *sinr_meas;
|
||||
sinr_meas = (uint32_t *) malloc(sizeof(uint32_t) * ul_report[j]->n_sinr);
|
||||
if (sinr_meas == NULL)
|
||||
if (sinr_meas == NULL) {
|
||||
for (k = 0; k < j; k++) {
|
||||
free(ul_report[k]);
|
||||
}
|
||||
free(ul_report);
|
||||
free(full_ul_report);
|
||||
goto error;
|
||||
}
|
||||
//TODO:Set the SINR measurements for the specified type
|
||||
for (k = 0; k < ul_report[j]->n_sinr; k++) {
|
||||
sinr_meas[k] = 10;
|
||||
@@ -573,8 +598,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
Protocol__FlexMacSdusDl ** mac_sdus;
|
||||
mac_sdus = malloc(sizeof(Protocol__FlexMacSdusDl) * flexran_get_num_mac_sdu_tx(mod_id, UE_id, cc_id));
|
||||
if (mac_sdus == NULL)
|
||||
if (mac_sdus == NULL) {
|
||||
free(macstats);
|
||||
goto error;
|
||||
}
|
||||
|
||||
macstats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, UE_id, cc_id);
|
||||
|
||||
@@ -653,10 +680,125 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
error:
|
||||
|
||||
if (cell_report != NULL)
|
||||
free(cell_report);
|
||||
if (ue_report != NULL)
|
||||
free(ue_report);
|
||||
if (cell_report != NULL) {
|
||||
if (report_config->nr_cc > 0) {
|
||||
for (i = 0; i < report_config->nr_cc; i++) {
|
||||
if (cell_report[i]->noise_inter_report != NULL) {
|
||||
free(cell_report[i]->noise_inter_report);
|
||||
cell_report[i]->noise_inter_report = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
free(cell_report);
|
||||
cell_report = NULL;
|
||||
}
|
||||
|
||||
if (ue_report != NULL) {
|
||||
if (report_config->nr_ue > 0) {
|
||||
for (i = 0; i < report_config->nr_ue; i++) {
|
||||
if (ue_report[i]->bsr != NULL) {
|
||||
free(ue_report[i]->bsr);
|
||||
ue_report[i]->bsr = NULL;
|
||||
}
|
||||
if (ue_report[i]->rlc_report != NULL) {
|
||||
for (j = 0; j < ue_report[i]->n_rlc_report; j++) {
|
||||
if (ue_report[i]->rlc_report[j] != NULL) {
|
||||
free(ue_report[i]->rlc_report[j]);
|
||||
ue_report[i]->rlc_report[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->rlc_report);
|
||||
ue_report[i]->rlc_report = NULL;
|
||||
}
|
||||
if (ue_report[i]->dl_cqi_report != NULL) {
|
||||
if (ue_report[i]->dl_cqi_report->csi_report != NULL) {
|
||||
for (j = 0; j < ue_report[i]->dl_cqi_report->n_csi_report; j++) {
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j] != NULL) {
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j]->p10csi != NULL) {
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]->p10csi);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j]->p10csi = NULL;
|
||||
}
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j]->p11csi != NULL) {
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j]->p11csi->wb_cqi != NULL) {
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]->p11csi->wb_cqi);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j]->p11csi->wb_cqi = NULL;
|
||||
}
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]->p11csi);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j]->p11csi = NULL;
|
||||
}
|
||||
if (ue_report[i]->dl_cqi_report->csi_report[j]->p20csi != NULL) {
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]->p20csi);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j]->p20csi = NULL;
|
||||
}
|
||||
free(ue_report[i]->dl_cqi_report->csi_report[j]);
|
||||
ue_report[i]->dl_cqi_report->csi_report[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->dl_cqi_report->csi_report);
|
||||
ue_report[i]->dl_cqi_report->csi_report = NULL;
|
||||
}
|
||||
free(ue_report[i]->dl_cqi_report);
|
||||
ue_report[i]->dl_cqi_report = NULL;
|
||||
}
|
||||
if (ue_report[i]->pbr != NULL) {
|
||||
if (ue_report[i]->pbr->paging_info != NULL) {
|
||||
for (j = 0; j < ue_report[i]->pbr->n_paging_info; j++) {
|
||||
free(ue_report[i]->pbr->paging_info[j]);
|
||||
ue_report[i]->pbr->paging_info[j] = NULL;
|
||||
}
|
||||
free(ue_report[i]->pbr->paging_info);
|
||||
ue_report[i]->pbr->paging_info = NULL;
|
||||
}
|
||||
free(ue_report[i]->pbr);
|
||||
ue_report[i]->pbr = NULL;
|
||||
}
|
||||
if (ue_report[i]->ul_cqi_report != NULL) {
|
||||
if (ue_report[i]->ul_cqi_report->cqi_meas != NULL) {
|
||||
for (j = 0; j < ue_report[i]->ul_cqi_report->n_cqi_meas; j++) {
|
||||
if (ue_report[i]->ul_cqi_report->cqi_meas[j] != NULL) {
|
||||
if (ue_report[i]->ul_cqi_report->cqi_meas[j]->sinr != NULL) {
|
||||
free(ue_report[i]->ul_cqi_report->cqi_meas[j]->sinr);
|
||||
ue_report[i]->ul_cqi_report->cqi_meas[j]->sinr = NULL;
|
||||
}
|
||||
free(ue_report[i]->ul_cqi_report->cqi_meas[j]);
|
||||
ue_report[i]->ul_cqi_report->cqi_meas[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->ul_cqi_report->cqi_meas);
|
||||
ue_report[i]->ul_cqi_report->cqi_meas = NULL;
|
||||
}
|
||||
if (ue_report[i]->ul_cqi_report->pucch_dbm != NULL) {
|
||||
for (j = 0; j < MAX_NUM_CCs; j++) {
|
||||
if (ue_report[i]->ul_cqi_report->pucch_dbm[j] != NULL) {
|
||||
free(ue_report[i]->ul_cqi_report->pucch_dbm[j]);
|
||||
ue_report[i]->ul_cqi_report->pucch_dbm[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->ul_cqi_report->pucch_dbm);
|
||||
ue_report[i]->ul_cqi_report->pucch_dbm = NULL;
|
||||
}
|
||||
free(ue_report[i]->ul_cqi_report);
|
||||
ue_report[i]->ul_cqi_report = NULL;
|
||||
}
|
||||
if (ue_report[i]->mac_stats != NULL) {
|
||||
if (ue_report[i]->mac_stats->mac_sdus_dl != NULL) {
|
||||
for (j = 0; j < ue_report[i]->mac_stats->n_mac_sdus_dl; j++) {
|
||||
if (ue_report[i]->mac_stats->mac_sdus_dl[j] != NULL) {
|
||||
free(ue_report[i]->mac_stats->mac_sdus_dl[j]);
|
||||
ue_report[i]->mac_stats->mac_sdus_dl[j] = NULL;
|
||||
}
|
||||
}
|
||||
free(ue_report[i]->mac_stats->mac_sdus_dl);
|
||||
ue_report[i]->mac_stats->mac_sdus_dl = NULL;
|
||||
}
|
||||
free(ue_report[i]->mac_stats);
|
||||
ue_report[i]->mac_stats = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
free(ue_report);
|
||||
ue_report = NULL;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -1014,11 +1156,28 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
if (header != NULL)
|
||||
free(header);
|
||||
if (sf_trigger_msg != NULL) {
|
||||
for (i = 0; i < sf_trigger_msg->n_dl_info; i++) {
|
||||
free(sf_trigger_msg->dl_info[i]->harq_status);
|
||||
if (sf_trigger_msg->dl_info != NULL) {
|
||||
for (i = 0; i < sf_trigger_msg->n_dl_info; i++) {
|
||||
if (sf_trigger_msg->dl_info[i] != NULL) {
|
||||
if (sf_trigger_msg->dl_info[i]->harq_status != NULL) {
|
||||
free(sf_trigger_msg->dl_info[i]->harq_status);
|
||||
}
|
||||
free(sf_trigger_msg->dl_info[i]);
|
||||
}
|
||||
}
|
||||
free(sf_trigger_msg->dl_info);
|
||||
}
|
||||
if (sf_trigger_msg->ul_info != NULL) {
|
||||
for (i = 0; i < sf_trigger_msg->n_ul_info; i++) {
|
||||
if (sf_trigger_msg->ul_info[i] != NULL) {
|
||||
if (sf_trigger_msg->ul_info[i]->ul_reception != NULL) {
|
||||
free(sf_trigger_msg->ul_info[i]->ul_reception);
|
||||
}
|
||||
free(sf_trigger_msg->ul_info[i]);
|
||||
}
|
||||
}
|
||||
free(sf_trigger_msg->ul_info);
|
||||
}
|
||||
free(sf_trigger_msg->dl_info);
|
||||
free(sf_trigger_msg->ul_info);
|
||||
free(sf_trigger_msg);
|
||||
}
|
||||
if(*msg != NULL)
|
||||
@@ -1063,6 +1222,7 @@ int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMess
|
||||
Protocol__FlexDlMacConfig *dl_mac_config_msg;
|
||||
dl_mac_config_msg = malloc(sizeof(Protocol__FlexDlMacConfig));
|
||||
if (dl_mac_config_msg == NULL) {
|
||||
free(header);
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_dl_mac_config__init(dl_mac_config_msg);
|
||||
@@ -1072,8 +1232,11 @@ int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMess
|
||||
dl_mac_config_msg->sfn_sf = flexran_get_sfn_sf(mod_id);
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
if(*msg == NULL)
|
||||
if(*msg == NULL) {
|
||||
free(dl_mac_config_msg);
|
||||
free(header);
|
||||
goto error;
|
||||
}
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXRAN_DIRECTION__INITIATING_MESSAGE;
|
||||
@@ -1167,8 +1330,10 @@ int flexran_agent_mac_create_empty_ul_config(mid_t mod_id, Protocol__FlexranMess
|
||||
ul_mac_config_msg->sfn_sf = flexran_get_sfn_sf(mod_id);
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
if(*msg == NULL)
|
||||
if(*msg == NULL) {
|
||||
free(ul_mac_config_msg);
|
||||
goto error;
|
||||
}
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_UL_MAC_CONFIG_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXRAN_DIRECTION__INITIATING_MESSAGE;
|
||||
@@ -1177,6 +1342,10 @@ int flexran_agent_mac_create_empty_ul_config(mid_t mod_id, Protocol__FlexranMess
|
||||
return 0;
|
||||
|
||||
error:
|
||||
if(header){
|
||||
free(header);
|
||||
header = NULL;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1292,7 +1461,7 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
|
||||
|
||||
void flexran_agent_send_sr_info(mid_t mod_id) {
|
||||
int size;
|
||||
Protocol__FlexranMessage *msg;
|
||||
Protocol__FlexranMessage *msg = NULL;
|
||||
void *data;
|
||||
int priority = 0;
|
||||
err_code_t err_code;
|
||||
@@ -1322,7 +1491,7 @@ void flexran_agent_send_sr_info(mid_t mod_id) {
|
||||
|
||||
void flexran_agent_send_sf_trigger(mid_t mod_id) {
|
||||
int size;
|
||||
Protocol__FlexranMessage *msg;
|
||||
Protocol__FlexranMessage *msg = NULL;
|
||||
void *data;
|
||||
int priority = 0;
|
||||
err_code_t err_code;
|
||||
|
||||
@@ -151,6 +151,15 @@ Protocol__FlexranMessage * flexran_agent_generate_diff_mac_stats_report(Protocol
|
||||
return msg;
|
||||
|
||||
error:
|
||||
if (stats_reply_msg) {
|
||||
if (stats_reply_msg->ue_report) {
|
||||
free(stats_reply_msg->ue_report);
|
||||
}
|
||||
if (stats_reply_msg->cell_report) {
|
||||
free(stats_reply_msg->cell_report);
|
||||
}
|
||||
free(stats_reply_msg);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -233,6 +242,12 @@ Protocol__FlexUeStatsReport * copy_ue_stats_report(Protocol__FlexUeStatsReport *
|
||||
return copy;
|
||||
|
||||
error:
|
||||
if (copy){
|
||||
if (copy->bsr){
|
||||
free(copy->bsr);
|
||||
}
|
||||
free(copy);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -303,6 +318,20 @@ Protocol__FlexUlCqiReport * copy_ul_cqi_report(Protocol__FlexUlCqiReport * origi
|
||||
return full_ul_report;
|
||||
|
||||
error:
|
||||
if (full_ul_report){
|
||||
if (ul_report){
|
||||
for (i = 0; i < full_ul_report->n_cqi_meas; i++){
|
||||
if (ul_report[i]){
|
||||
if ( ul_report[i]->sinr ){
|
||||
free(ul_report[i]->sinr);
|
||||
}
|
||||
free(ul_report[i]);
|
||||
}
|
||||
}
|
||||
free(ul_report);
|
||||
}
|
||||
free(full_ul_report);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -369,6 +398,18 @@ Protocol__FlexPagingBufferReport * copy_paging_buffer_report(Protocol__FlexPagin
|
||||
|
||||
error:
|
||||
/*TODO: free memory properly*/
|
||||
if (copy){
|
||||
if (p_info){
|
||||
for (i = 0; i < copy->n_paging_info; i++){
|
||||
if (p_info[i]){
|
||||
free(p_info[i]);
|
||||
}
|
||||
}
|
||||
free(p_info);
|
||||
}
|
||||
free(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -902,6 +943,13 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
|
||||
LOG_I(FLEXRAN_AGENT, "Scheduler could not be loaded\n");
|
||||
}
|
||||
|
||||
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||
if (flexran_agent_get_mac_xface(mod_id)->dl_scheduler_loaded_lib != lib) {
|
||||
dlclose(lib);
|
||||
}
|
||||
} else {
|
||||
dlclose(lib);
|
||||
}
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
||||
@@ -44,6 +44,8 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
int size;
|
||||
Protocol__FlexranMessage *msg = NULL;
|
||||
Protocol__FlexHeader *header = NULL;
|
||||
Protocol__FlexUeStateChange *ue_state_change_msg = NULL;
|
||||
Protocol__FlexUeConfig *config = NULL;
|
||||
void *data;
|
||||
int priority = 0;
|
||||
err_code_t err_code=0;
|
||||
@@ -53,7 +55,6 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
if (flexran_create_header(xid, PROTOCOL__FLEX_TYPE__FLPT_UE_STATE_CHANGE, &header) != 0)
|
||||
goto error;
|
||||
|
||||
Protocol__FlexUeStateChange *ue_state_change_msg;
|
||||
ue_state_change_msg = malloc(sizeof(Protocol__FlexUeStateChange));
|
||||
if(ue_state_change_msg == NULL) {
|
||||
goto error;
|
||||
@@ -62,7 +63,6 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
ue_state_change_msg->has_type = 1;
|
||||
ue_state_change_msg->type = state_change;
|
||||
|
||||
Protocol__FlexUeConfig *config;
|
||||
config = malloc(sizeof(Protocol__FlexUeConfig));
|
||||
if (config == NULL) {
|
||||
goto error;
|
||||
@@ -103,11 +103,24 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
|
||||
}
|
||||
|
||||
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
|
||||
free(header);
|
||||
return;
|
||||
error:
|
||||
if (err_code != 0)
|
||||
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d for RNTI %x\n",
|
||||
err_code, rnti);
|
||||
if (header){
|
||||
free(header);
|
||||
}
|
||||
if (ue_state_change_msg) {
|
||||
free(ue_state_change_msg);
|
||||
}
|
||||
if (config) {
|
||||
free(config);
|
||||
}
|
||||
if (msg) {
|
||||
free(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -405,8 +418,13 @@ int flexran_agent_rrc_stats_reply(mid_t mod_id,
|
||||
for (int j = 0; j < neigh_meas->n_eutra_meas; j++ ){
|
||||
|
||||
eutra_meas[j] = malloc(sizeof(Protocol__FlexEutraMeasurements));
|
||||
if (eutra_meas[j] == NULL)
|
||||
if (eutra_meas[j] == NULL) {
|
||||
for (int k = 0 ; k < j ; k++) {
|
||||
free(eutra_meas[k]);
|
||||
}
|
||||
free(eutra_meas);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_eutra_measurements__init(eutra_meas[j]);
|
||||
|
||||
|
||||
@@ -48,19 +48,18 @@
|
||||
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
|
||||
#include "nfapi_vnf.h"
|
||||
#include "nfapi_pnf.h"
|
||||
|
||||
#include "targets/RT/USER/lte-softmodem.h"
|
||||
#include "L1_paramdef.h"
|
||||
#include "MACRLC_paramdef.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "RRC_config_tools.h"
|
||||
#include "enb_paramdef.h"
|
||||
#include "proto_agent.h"
|
||||
#define RRC_INACTIVITY_THRESH 0
|
||||
|
||||
extern void set_parallel_conf(char *parallel_conf);
|
||||
extern void set_worker_conf(char *worker_conf);
|
||||
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
|
||||
extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
//extern PARALLEL_CONF_t get_thread_parallel_conf(void);
|
||||
//extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw);
|
||||
extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t bw);
|
||||
extern char *parallel_config;
|
||||
@@ -383,7 +382,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I)
|
||||
PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = RRC_INACTIVITY_THRESH; // set to 0 to deactivate
|
||||
//RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = RRC_INACTIVITY_THRESH; // set to 0 to deactivate
|
||||
// In the configuration file it is in seconds. For RRC it has to be in milliseconds
|
||||
RRC_CONFIGURATION_REQ (msg_p).rrc_inactivity_timer_thres = (*ENBParamList.paramarray[i][ENB_RRC_INACTIVITY_THRES_IDX].uptr) * 1000;
|
||||
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id;
|
||||
RRC_CONFIGURATION_REQ (msg_p).tac = *ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].uptr;
|
||||
AssertFatal(!ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr
|
||||
@@ -413,6 +414,22 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ(msg_p).mnc[l]);
|
||||
}
|
||||
|
||||
/* measurement reports enabled? */
|
||||
if (ENBParamList.paramarray[i][ENB_ENABLE_MEASUREMENT_REPORTS].strptr != NULL &&
|
||||
*(ENBParamList.paramarray[i][ENB_ENABLE_MEASUREMENT_REPORTS].strptr) != NULL &&
|
||||
!strcmp(*(ENBParamList.paramarray[i][ENB_ENABLE_MEASUREMENT_REPORTS].strptr), "yes"))
|
||||
RRC_CONFIGURATION_REQ (msg_p).enable_measurement_reports = 1;
|
||||
else
|
||||
RRC_CONFIGURATION_REQ (msg_p).enable_measurement_reports = 0;
|
||||
|
||||
/* x2 enabled? */
|
||||
if (ENBParamList.paramarray[i][ENB_ENABLE_X2].strptr != NULL &&
|
||||
*(ENBParamList.paramarray[i][ENB_ENABLE_X2].strptr) != NULL &&
|
||||
!strcmp(*(ENBParamList.paramarray[i][ENB_ENABLE_X2].strptr), "yes"))
|
||||
RRC_CONFIGURATION_REQ (msg_p).enable_x2 = 1;
|
||||
else
|
||||
RRC_CONFIGURATION_REQ (msg_p).enable_x2 = 0;
|
||||
|
||||
// Parse optional physical parameters
|
||||
config_getlist( &CCsParamList,NULL,0,enbpath);
|
||||
LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt);
|
||||
@@ -2551,6 +2568,8 @@ int RCconfig_parallel(void) {
|
||||
set_worker_conf(worker_conf);
|
||||
}
|
||||
|
||||
free(worker_conf);
|
||||
free(parallel_conf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,6 +192,9 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_LOCAL_S_PORTD "local_s_portd"
|
||||
#define ENB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
|
||||
#define ENB_CONFIG_STRING_NR_CELLID "nr_cellid"
|
||||
#define ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD "rrc_inactivity_threshold"
|
||||
#define ENB_CONFIG_STRING_MEASUREMENT_REPORTS "enable_measurement_reports"
|
||||
#define ENB_CONFIG_STRING_X2 "enable_x2"
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* cell configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -211,7 +214,10 @@ typedef enum {
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_X2, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
#define ENB_ENB_ID_IDX 0
|
||||
#define ENB_CELL_TYPE_IDX 1
|
||||
@@ -228,6 +234,9 @@ typedef enum {
|
||||
#define ENB_LOCAL_S_PORTD_IDX 12
|
||||
#define ENB_REMOTE_S_PORTD_IDX 13
|
||||
#define ENB_NRCELLID_IDX 14
|
||||
#define ENB_RRC_INACTIVITY_THRES_IDX 15
|
||||
#define ENB_ENABLE_MEASUREMENT_REPORTS 16
|
||||
#define ENB_ENABLE_X2 17
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define ENBPARAMS_CHECK { \
|
||||
@@ -245,6 +254,8 @@ typedef enum {
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -84,6 +84,9 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
|
||||
|
||||
error:
|
||||
LOG_I(FLEXRAN_AGENT, "%s(): there was an error\n", __func__);
|
||||
if (channel){
|
||||
free(channel);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,6 @@ int flexran_agent_hello(mid_t mod_id, const void *params, Protocol__FlexranMessa
|
||||
hello_msg->bs_id = flexran_get_bs_id(mod_id);
|
||||
hello_msg->has_bs_id = 1;
|
||||
hello_msg->n_capabilities = flexran_get_capabilities(mod_id, &hello_msg->capabilities);
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
@@ -296,8 +295,10 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
||||
for (int i = 0; i < reply->n_cell_config; i++) {
|
||||
if (reply->cell_config[i]->mbsfn_subframe_config_rfoffset)
|
||||
free(reply->cell_config[i]->mbsfn_subframe_config_rfoffset);
|
||||
|
||||
if (reply->cell_config[i]->mbsfn_subframe_config_rfperiod)
|
||||
free(reply->cell_config[i]->mbsfn_subframe_config_rfperiod);
|
||||
|
||||
if (reply->cell_config[i]->mbsfn_subframe_config_sfalloc)
|
||||
free(reply->cell_config[i]->mbsfn_subframe_config_sfalloc);
|
||||
|
||||
@@ -305,6 +306,7 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
||||
for(int j = 0; j < reply->cell_config[i]->si_config->n_si_message; j++) {
|
||||
free(reply->cell_config[i]->si_config->si_message[j]);
|
||||
}
|
||||
|
||||
free(reply->cell_config[i]->si_config->si_message);
|
||||
free(reply->cell_config[i]->si_config);
|
||||
}
|
||||
@@ -319,6 +321,7 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
||||
}
|
||||
|
||||
free(reply->cell_config[i]->slice_config->dl);
|
||||
|
||||
for (int j = 0; j < reply->cell_config[i]->slice_config->n_ul; ++j) {
|
||||
if (reply->cell_config[i]->slice_config->ul[j]->n_sorting > 0)
|
||||
free(reply->cell_config[i]->slice_config->ul[j]->sorting);
|
||||
@@ -492,16 +495,15 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
goto error;
|
||||
|
||||
lc_config_reply_msg->header = header;
|
||||
|
||||
/* the lc_config_reply entirely depends on MAC except for the
|
||||
* mac_eNB_get_rrc_status() function (which in the current OAI implementation
|
||||
* is reachable if F1 is present). Therefore we check here wether MAC CM is
|
||||
* present and the message gets properly filled if it is or remains empty if
|
||||
* not */
|
||||
lc_config_reply_msg->n_lc_ue_config =
|
||||
flexran_agent_get_mac_xface(mod_id) ? flexran_get_mac_num_ues(mod_id) : 0;
|
||||
|
||||
flexran_agent_get_mac_xface(mod_id) ? flexran_get_mac_num_ues(mod_id) : 0;
|
||||
Protocol__FlexLcUeConfig **lc_ue_config = NULL;
|
||||
|
||||
if (lc_config_reply_msg->n_lc_ue_config > 0) {
|
||||
lc_ue_config = malloc(sizeof(Protocol__FlexLcUeConfig *) * lc_config_reply_msg->n_lc_ue_config);
|
||||
|
||||
@@ -512,7 +514,13 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
// Fill the config for each UE
|
||||
for (int i = 0; i < lc_config_reply_msg->n_lc_ue_config; i++) {
|
||||
lc_ue_config[i] = malloc(sizeof(Protocol__FlexLcUeConfig));
|
||||
if (!lc_ue_config[i]) goto error;
|
||||
if (!lc_ue_config[i]){
|
||||
for (int j = 0; j < i; j++){
|
||||
free(lc_ue_config[j]);
|
||||
}
|
||||
free(lc_ue_config);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_lc_ue_config__init(lc_ue_config[i]);
|
||||
const int UE_id = flexran_get_mac_ue_id(mod_id, i);
|
||||
@@ -524,8 +532,13 @@ int flexran_agent_lc_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
|
||||
if (*msg == NULL)
|
||||
if (*msg == NULL){
|
||||
for (int k = 0; k < lc_config_reply_msg->n_lc_ue_config; k++){
|
||||
free(lc_ue_config[k]);
|
||||
}
|
||||
free(lc_ue_config);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG;
|
||||
@@ -554,8 +567,7 @@ error:
|
||||
* ************************************
|
||||
*/
|
||||
|
||||
int sort_ue_config(const void *a, const void *b)
|
||||
{
|
||||
int sort_ue_config(const void *a, const void *b) {
|
||||
const Protocol__FlexUeConfig *fa = a;
|
||||
const Protocol__FlexUeConfig *fb = b;
|
||||
|
||||
@@ -563,6 +575,7 @@ int sort_ue_config(const void *a, const void *b)
|
||||
return -1;
|
||||
else if (fa->rnti < fb->rnti)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -584,8 +597,8 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
goto error;
|
||||
|
||||
ue_config_reply_msg->header = header;
|
||||
|
||||
ue_config_reply_msg->n_ue_config = 0;
|
||||
|
||||
if (flexran_agent_get_rrc_xface(mod_id))
|
||||
ue_config_reply_msg->n_ue_config = flexran_get_rrc_num_ues(mod_id);
|
||||
else if (flexran_agent_get_mac_xface(mod_id))
|
||||
@@ -597,7 +610,7 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
const int nmac = flexran_get_mac_num_ues(mod_id);
|
||||
ue_config_reply_msg->n_ue_config = nrrc < nmac ? nrrc : nmac;
|
||||
LOG_E(FLEXRAN_AGENT, "%s(): different numbers of UEs in RRC (%d) and MAC (%d), reporting for %lu UEs\n",
|
||||
__func__, nrrc, nmac, ue_config_reply_msg->n_ue_config);
|
||||
__func__, nrrc, nmac, ue_config_reply_msg->n_ue_config);
|
||||
}
|
||||
|
||||
Protocol__FlexUeConfig **ue_config;
|
||||
@@ -608,8 +621,10 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
if (ue_config == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
rnti_t rntis[ue_config_reply_msg->n_ue_config];
|
||||
flexran_get_rrc_rnti_list(mod_id, rntis, ue_config_reply_msg->n_ue_config);
|
||||
|
||||
for (int i = 0; i < ue_config_reply_msg->n_ue_config; i++) {
|
||||
const rnti_t rnti = rntis[i];
|
||||
ue_config[i] = malloc(sizeof(Protocol__FlexUeConfig));
|
||||
@@ -617,11 +632,13 @@ int flexran_agent_ue_config_reply(mid_t mod_id, const void *params, Protocol__Fl
|
||||
|
||||
if (flexran_agent_get_rrc_xface(mod_id))
|
||||
flexran_agent_fill_rrc_ue_config(mod_id, rnti, ue_config[i]);
|
||||
|
||||
if (flexran_agent_get_mac_xface(mod_id)) {
|
||||
const int UE_id = flexran_get_mac_ue_id_rnti(mod_id, rnti);
|
||||
flexran_agent_fill_mac_ue_config(mod_id, UE_id, ue_config[i]);
|
||||
}
|
||||
}
|
||||
|
||||
ue_config_reply_msg->ue_config = ue_config;
|
||||
}
|
||||
|
||||
@@ -725,14 +742,26 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F
|
||||
|
||||
if(cell_conf == NULL)
|
||||
goto error;
|
||||
for(int i = 0; i < enb_config_reply_msg->n_cell_config; i++){
|
||||
|
||||
for(int i = 0; i < enb_config_reply_msg->n_cell_config; i++) {
|
||||
cell_conf[i] = malloc(sizeof(Protocol__FlexCellConfig));
|
||||
if (!cell_conf[i]) goto error;
|
||||
|
||||
if (!cell_conf[i]) {
|
||||
for (int j = 0; j < i; j++) {
|
||||
free(cell_conf[j]);
|
||||
}
|
||||
free(cell_conf);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_cell_config__init(cell_conf[i]);
|
||||
|
||||
if (flexran_agent_get_phy_xface(mod_id))
|
||||
flexran_agent_fill_phy_cell_config(mod_id, i, cell_conf[i]);
|
||||
|
||||
if (flexran_agent_get_rrc_xface(mod_id))
|
||||
flexran_agent_fill_rrc_cell_config(mod_id, i, cell_conf[i]);
|
||||
|
||||
if (flexran_agent_get_mac_xface(mod_id))
|
||||
flexran_agent_fill_mac_cell_config(mod_id, i, cell_conf[i]);
|
||||
|
||||
@@ -745,8 +774,13 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
|
||||
if(*msg == NULL)
|
||||
if(*msg == NULL) {
|
||||
for (int k = 0; k < enb_config_reply_msg->n_cell_config; k++) {
|
||||
free(cell_conf[k]);
|
||||
}
|
||||
free(cell_conf);
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG;
|
||||
@@ -776,6 +810,8 @@ int flexran_agent_rrc_measurement(mid_t mod_id, const void *params, Protocol__Fl
|
||||
Protocol__FlexRrcTriggering *triggering = input->rrc_triggering;
|
||||
agent_reconf_rrc *reconf_param = malloc(sizeof(agent_reconf_rrc));
|
||||
reconf_param->trigger_policy = triggering->rrc_trigger;
|
||||
reconf_param->report_interval = 0;
|
||||
reconf_param->report_amount = 0;
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[mod_id]->rrc_ue_head)) {
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, mod_id, ENB_FLAG_YES, ue_context_p->ue_context.rnti, flexran_get_current_frame(mod_id), flexran_get_current_subframe (mod_id), mod_id);
|
||||
@@ -804,10 +840,11 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Prot
|
||||
|
||||
if (enb_config->n_cell_config > 1)
|
||||
LOG_W(FLEXRAN_AGENT, "ignoring slice configs for other cell except cell 0\n");
|
||||
|
||||
if (flexran_agent_get_mac_xface(mod_id) && enb_config->cell_config[0]->slice_config) {
|
||||
prepare_update_slice_config(mod_id, enb_config->cell_config[0]->slice_config);
|
||||
//} else {
|
||||
// initiate_soft_restart(mod_id, enb_config->cell_config[0]);
|
||||
//} else {
|
||||
// initiate_soft_restart(mod_id, enb_config->cell_config[0]);
|
||||
}
|
||||
|
||||
*msg = NULL;
|
||||
|
||||
@@ -293,7 +293,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
/* Check if request was periodical */
|
||||
if (comp_req->report_frequency == PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_PERIODICAL) {
|
||||
/* Create a one off flexran message as an argument for the periodical task */
|
||||
Protocol__FlexranMessage *timer_msg;
|
||||
Protocol__FlexranMessage *timer_msg = NULL;
|
||||
stats_request_config_t request_config;
|
||||
request_config.report_type = PROTOCOL__FLEX_STATS_TYPE__FLST_COMPLETE_STATS;
|
||||
request_config.report_frequency = PROTOCOL__FLEX_STATS_REPORT_FREQ__FLSRF_ONCE;
|
||||
@@ -311,7 +311,10 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
report_config.ue_report_type[0].ue_report_flags = ue_flags;
|
||||
}
|
||||
request_config.config = &report_config;
|
||||
flexran_agent_stats_request(enb_id, xid, &request_config, &timer_msg);
|
||||
if (flexran_agent_stats_request(enb_id, xid, &request_config, &timer_msg) == -1) {
|
||||
err_code = -100;
|
||||
goto error;
|
||||
}
|
||||
/* Create a timer */
|
||||
long timer_id = 0;
|
||||
flexran_agent_timer_args_t *timer_args = malloc(sizeof(flexran_agent_timer_args_t));
|
||||
@@ -420,19 +423,21 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr
|
||||
int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *report_config, Protocol__FlexranMessage **msg){
|
||||
|
||||
Protocol__FlexHeader *header = NULL;
|
||||
err_code_t err_code;
|
||||
int i;
|
||||
Protocol__FlexUeStatsReport **ue_report = NULL;
|
||||
Protocol__FlexCellStatsReport **cell_report = NULL;
|
||||
Protocol__FlexStatsReply *stats_reply_msg = NULL;
|
||||
err_code_t err_code = PROTOCOL__FLEXRAN_ERR__UNEXPECTED;
|
||||
int i,j;
|
||||
|
||||
if (flexran_create_header(xid, PROTOCOL__FLEX_TYPE__FLPT_STATS_REPLY, &header) != 0)
|
||||
if (flexran_create_header(xid, PROTOCOL__FLEX_TYPE__FLPT_STATS_REPLY, &header) != 0) {
|
||||
goto error;
|
||||
|
||||
|
||||
Protocol__FlexStatsReply *stats_reply_msg;
|
||||
}
|
||||
|
||||
stats_reply_msg = malloc(sizeof(Protocol__FlexStatsReply));
|
||||
|
||||
if (stats_reply_msg == NULL)
|
||||
if (stats_reply_msg == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_stats_reply__init(stats_reply_msg);
|
||||
stats_reply_msg->header = header;
|
||||
@@ -442,16 +447,18 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
|
||||
// UE report
|
||||
|
||||
Protocol__FlexUeStatsReport **ue_report;
|
||||
|
||||
|
||||
ue_report = malloc(sizeof(Protocol__FlexUeStatsReport *) * report_config->nr_ue);
|
||||
if (ue_report == NULL)
|
||||
goto error;
|
||||
|
||||
if (ue_report == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i = 0; i < report_config->nr_ue; i++) {
|
||||
|
||||
ue_report[i] = malloc(sizeof(Protocol__FlexUeStatsReport));
|
||||
if (ue_report[i] == NULL) {
|
||||
goto error;
|
||||
}
|
||||
protocol__flex_ue_stats_report__init(ue_report[i]);
|
||||
ue_report[i]->rnti = report_config->ue_report_type[i].ue_rnti;
|
||||
ue_report[i]->has_rnti = 1;
|
||||
@@ -460,19 +467,18 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
}
|
||||
|
||||
// cell rpoert
|
||||
|
||||
Protocol__FlexCellStatsReport **cell_report;
|
||||
|
||||
|
||||
cell_report = malloc(sizeof(Protocol__FlexCellStatsReport *) * report_config->nr_cc);
|
||||
if (cell_report == NULL)
|
||||
if (cell_report == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i = 0; i < report_config->nr_cc; i++) {
|
||||
|
||||
cell_report[i] = malloc(sizeof(Protocol__FlexCellStatsReport));
|
||||
if(cell_report[i] == NULL)
|
||||
if(cell_report[i] == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
protocol__flex_cell_stats_report__init(cell_report[i]);
|
||||
cell_report[i]->carrier_index = report_config->cc_report_type[i].cc_id;
|
||||
@@ -507,8 +513,9 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
stats_reply_msg->ue_report = ue_report;
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
if(*msg == NULL)
|
||||
if(*msg == NULL) {
|
||||
goto error;
|
||||
}
|
||||
protocol__flexran_message__init(*msg);
|
||||
(*msg)->msg_case = PROTOCOL__FLEXRAN_MESSAGE__MSG_STATS_REPLY_MSG;
|
||||
(*msg)->msg_dir = PROTOCOL__FLEXRAN_DIRECTION__SUCCESSFUL_OUTCOME;
|
||||
@@ -518,8 +525,38 @@ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *re
|
||||
|
||||
error :
|
||||
LOG_E(FLEXRAN_AGENT, "errno %d occured\n", err_code);
|
||||
return err_code;
|
||||
|
||||
if (header != NULL) {
|
||||
free(header);
|
||||
header = NULL;
|
||||
}
|
||||
|
||||
if (stats_reply_msg != NULL) {
|
||||
free(stats_reply_msg);
|
||||
stats_reply_msg = NULL;
|
||||
}
|
||||
|
||||
if (ue_report != NULL) {
|
||||
for (j = 0; j < report_config->nr_ue; j++) {
|
||||
if (ue_report[j] != NULL) {
|
||||
free(ue_report[j]);
|
||||
}
|
||||
}
|
||||
free(ue_report);
|
||||
ue_report = NULL;
|
||||
}
|
||||
|
||||
if (cell_report != NULL) {
|
||||
for (j = 0; j < report_config->nr_cc; j++) {
|
||||
if (cell_report[j] != NULL) {
|
||||
free(cell_report[j]);
|
||||
}
|
||||
}
|
||||
free(cell_report);
|
||||
cell_report = NULL;
|
||||
}
|
||||
|
||||
return err_code;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -705,7 +742,7 @@ err_code_t flexran_agent_enable_cont_stats_update(mid_t mod_id,
|
||||
goto error;
|
||||
}
|
||||
|
||||
Protocol__FlexranMessage *req_msg;
|
||||
Protocol__FlexranMessage *req_msg = NULL;
|
||||
|
||||
flexran_agent_stats_request(mod_id, xid, stats_req, &req_msg);
|
||||
stats_context[mod_id].stats_req = req_msg;
|
||||
|
||||
@@ -177,7 +177,7 @@ int f1ap_du_add_cu_ue_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t du_ue_f1ap_id,
|
||||
module_id_t cu_ue_f1ap_id) {
|
||||
module_id_t f1ap_uid = f1ap_get_du_uid(f1_inst,du_ue_f1ap_id);
|
||||
if (f1ap_uid < 0) return -1;
|
||||
if (f1ap_uid < 0 || f1ap_uid >= MAX_MOBILES_PER_ENB) return -1;
|
||||
f1_inst->f1ap_ue[f1ap_uid].cu_ue_f1ap_id = cu_ue_f1ap_id;
|
||||
LOG_I(F1AP, "Adding cu_ue_f1ap_id %d for UE with RNTI %x\n", cu_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti);
|
||||
return 0;
|
||||
@@ -187,7 +187,7 @@ int f1ap_cu_add_du_ue_id(f1ap_cudu_inst_t *f1_inst,
|
||||
module_id_t cu_ue_f1ap_id,
|
||||
module_id_t du_ue_f1ap_id) {
|
||||
module_id_t f1ap_uid = f1ap_get_cu_uid(f1_inst,cu_ue_f1ap_id);
|
||||
if (f1ap_uid < 0) return -1;
|
||||
if (f1ap_uid < 0 || f1ap_uid >= MAX_MOBILES_PER_ENB) return -1;
|
||||
f1_inst->f1ap_ue[f1ap_uid].du_ue_f1ap_id = du_ue_f1ap_id;
|
||||
LOG_I(F1AP, "Adding du_ue_f1ap_id %d for UE with RNTI %x\n", du_ue_f1ap_id, f1_inst->f1ap_ue[f1ap_uid].rnti);
|
||||
return 0;
|
||||
|
||||
@@ -327,6 +327,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_resp->mcc[i], f1ap_setup_resp->mnc[i], f1ap_setup_resp->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_resp->nr_cellid[i], &nRCGI.nRCellIdentity);
|
||||
@@ -562,6 +563,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
@@ -611,6 +613,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
@@ -787,6 +790,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI,0,sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
|
||||
@@ -95,6 +95,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
ie->value.present = F1AP_UEContextSetupRequestIEs__value_PR_NRCGI;
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_ue_context_setup_req->mcc,
|
||||
f1ap_ue_context_setup_req->mnc,
|
||||
f1ap_ue_context_setup_req->mnc_digit_length,
|
||||
@@ -1183,6 +1184,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
|
||||
|
||||
// /* - sCell_ID */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
@@ -1222,6 +1224,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
|
||||
|
||||
/* - sCell_ID */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(mcc, mnc, mnc_digit_length,
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(123456, &nRCGI.nRCellIdentity);
|
||||
|
||||
@@ -169,6 +169,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
||||
LOG_D(F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]);
|
||||
//MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity);
|
||||
@@ -619,6 +620,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
memset((void *)&served_cell_information, 0, sizeof(F1AP_Served_Cell_Information_t));
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
||||
LOG_D(F1AP, "nr_cellId : %x %x %x %x %x\n",
|
||||
nRCGI.nRCellIdentity.buf[0],
|
||||
@@ -778,6 +780,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
/* 3.1 oldNRCGI */
|
||||
F1AP_NRCGI_t oldNRCGI;
|
||||
memset(&oldNRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i],
|
||||
&oldNRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &oldNRCGI.nRCellIdentity);
|
||||
@@ -790,6 +793,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
/* - nRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &nRCGI.nRCellIdentity);
|
||||
@@ -944,6 +948,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
/* 3.1 oldNRCGI */
|
||||
F1AP_NRCGI_t oldNRCGI;
|
||||
memset(&oldNRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i],
|
||||
&oldNRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &oldNRCGI.nRCellIdentity);
|
||||
@@ -980,6 +985,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
|
||||
|
||||
/* 3.1 oldNRCGI */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_setup_req->mcc[i], f1ap_setup_req->mnc[i], f1ap_setup_req->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_setup_req->nr_cellid[i], &nRCGI.nRCellIdentity);
|
||||
|
||||
@@ -543,7 +543,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
, 0
|
||||
, rrc_dl_sdu_len
|
||||
, pdcp_pdu_p
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL
|
||||
,NULL
|
||||
#endif
|
||||
@@ -799,6 +799,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
|
||||
ie->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_NRCGI;
|
||||
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[0], f1ap_du_data->mnc[0], f1ap_du_data->mnc_digit_length[0],
|
||||
&nRCGI.pLMN_Identity);
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
|
||||
|
||||
@@ -470,6 +470,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
|
||||
|
||||
/* sCell_ID */
|
||||
F1AP_NRCGI_t nRCGI; // issue here
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity);
|
||||
|
||||
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[0], &nRCGI.nRCellIdentity);
|
||||
@@ -703,7 +704,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
||||
, 0
|
||||
, sdu_len
|
||||
, pdu_p
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL
|
||||
,NULL
|
||||
#endif
|
||||
@@ -1155,6 +1156,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
|
||||
|
||||
/* - sCell_ID */
|
||||
F1AP_NRCGI_t nRCGI;
|
||||
memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t));
|
||||
MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i],
|
||||
&nRCGI.pLMN_Identity);
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
|
||||
}
|
||||
|
||||
/* Checking procedure Code and direction of message */
|
||||
if (pdu.choice.initiatingMessage->procedureCode > sizeof(f1ap_messages_callback) / (3 * sizeof(
|
||||
if (pdu.choice.initiatingMessage->procedureCode >= sizeof(f1ap_messages_callback) / (3 * sizeof(
|
||||
f1ap_message_decoded_callback))
|
||||
|| (pdu.present > F1AP_F1AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
LOG_E(F1AP, "[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n",
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "openair2/RRC/LTE/rrc_eNB_UE_context.h"
|
||||
|
||||
//#include "LAYER2/MAC/pre_processor.c"
|
||||
#include "pdcp.h"
|
||||
|
||||
@@ -1399,7 +1399,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
|
||||
|
||||
//
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
|
||||
LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id,(int)(UE_RNTI(module_idP, UE_id)));
|
||||
// initialize harq_pid and round
|
||||
cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
N_RBG[CC_id] = to_rbg(cc->mib->message.dl_Bandwidth);
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "openair2/PHY_INTERFACE/phy_stub_UE.h"
|
||||
|
||||
#include "pdcp.h"
|
||||
#include "targets/RT/USER/lte-softmodem.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#include "intertask_interface.h"
|
||||
@@ -3329,7 +3330,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t
|
||||
|
||||
|
||||
SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subframeP) {
|
||||
mac_rlc_status_resp_t rlc_status; //, rlc_status_data;
|
||||
mac_rlc_status_resp_t rlc_status = {0,0,0,0,0}; //, rlc_status_data;
|
||||
uint32_t absSF = (frameP*10)+subframeP;
|
||||
UE_MAC_INST *ue = &UE_mac_inst[module_idP];
|
||||
int rvtab[4] = {0,2,3,1};
|
||||
@@ -3370,10 +3371,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
|
||||
(ue->sltx_active == 1)) { // every 4th subframe, check for new data from RLC
|
||||
// 10 PRBs, mcs 19
|
||||
int TBS = 4584/8;
|
||||
int req;
|
||||
|
||||
if (TBS <= rlc_status.bytes_in_buffer) req = TBS;
|
||||
else req = rlc_status.bytes_in_buffer;
|
||||
int req = (TBS <= rlc_status.bytes_in_buffer) ? TBS : rlc_status.bytes_in_buffer;
|
||||
|
||||
if (req>0) {
|
||||
sdu_length = mac_rlc_data_req(module_idP,
|
||||
|
||||
@@ -80,13 +80,13 @@ void config_nr_mib(int Mod_idP,
|
||||
|
||||
void config_common(int Mod_idP,
|
||||
int CC_idP,
|
||||
int cellid,
|
||||
int cellid,
|
||||
int nr_bandP,
|
||||
uint64_t ssb_pattern,
|
||||
uint16_t ssb_periodicity,
|
||||
uint64_t dl_CarrierFreqP,
|
||||
uint32_t dl_BandwidthP){
|
||||
|
||||
uint16_t ssb_periodicity,
|
||||
uint64_t dl_CarrierFreqP,
|
||||
uint32_t dl_BandwidthP)
|
||||
{
|
||||
nfapi_nr_config_request_t *cfg = &RC.nrmac[Mod_idP]->config[CC_idP];
|
||||
|
||||
int mu = 1;
|
||||
@@ -134,19 +134,17 @@ void config_common(int Mod_idP,
|
||||
|
||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
int CC_idP,
|
||||
int cellid,
|
||||
int cellid,
|
||||
int p_gNB,
|
||||
int nr_bandP,
|
||||
uint64_t ssb_pattern,
|
||||
uint64_t ssb_pattern,
|
||||
uint16_t ssb_enum_periodicity,
|
||||
uint64_t dl_CarrierFreqP,
|
||||
int dl_BandwidthP,
|
||||
NR_BCCH_BCH_Message_t *mib,
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon
|
||||
){
|
||||
|
||||
|
||||
uint16_t ssb_periodicity;
|
||||
NR_ServingCellConfigCommon_t *servingcellconfigcommon)
|
||||
{
|
||||
uint16_t ssb_periodicity=0;
|
||||
|
||||
switch (ssb_enum_periodicity) {
|
||||
case 0:
|
||||
@@ -167,7 +165,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
case 5:
|
||||
ssb_periodicity = 160;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if( mib != NULL ){
|
||||
@@ -191,17 +188,15 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
if( servingcellconfigcommon != NULL ){
|
||||
config_common(Mod_idP,
|
||||
CC_idP,
|
||||
cellid,
|
||||
cellid,
|
||||
nr_bandP,
|
||||
ssb_pattern,
|
||||
ssb_pattern,
|
||||
ssb_periodicity,
|
||||
dl_CarrierFreqP,
|
||||
dl_BandwidthP
|
||||
);
|
||||
}//END if( servingcellconfigcommon != NULL )
|
||||
|
||||
|
||||
|
||||
LOG_E(MAC, "%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req);
|
||||
|
||||
// if in nFAPI mode
|
||||
@@ -227,4 +222,3 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
return(0);
|
||||
|
||||
}// END rrc_mac_config_req_gNB
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
#include "UTIL/OSA/osa_defs.h"
|
||||
#include "openair2/RRC/NAS/nas_config.h"
|
||||
# include "intertask_interface.h"
|
||||
#include "intertask_interface.h"
|
||||
#include "openair3/S1AP/s1ap_eNB.h"
|
||||
|
||||
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
|
||||
@@ -499,7 +499,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
|
||||
(void)data_p;
|
||||
pdcp_t *pdcp_p = NULL;
|
||||
//TTN for D2D (PC5S)
|
||||
int prose_addr_len;
|
||||
int prose_addr_len = sizeof(prose_pdcp_addr);
|
||||
char send_buf[BUFSIZE], receive_buf[BUFSIZE];
|
||||
//int optval;
|
||||
int bytes_received;
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
#include "assertions.h"
|
||||
#include "proto_agent_net_comm.h"
|
||||
#include "proto_agent_async.h"
|
||||
|
||||
#include <common/utils/system.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#define ENB_AGENT_MAX 9
|
||||
|
||||
proto_agent_instance_t proto_agent[MAX_DU];
|
||||
|
||||
pthread_t new_thread(void *(*f)(void *), void *b);
|
||||
//pthread_t new_thread(void *(*f)(void *), void *b);
|
||||
|
||||
Protocol__FlexsplitMessage *proto_agent_timeout_fsp(void *args);
|
||||
|
||||
@@ -117,7 +117,8 @@ int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p) {
|
||||
// over the channel
|
||||
// */
|
||||
//}
|
||||
proto_agent[mod_id].recv_thread = new_thread(proto_agent_receive, &proto_agent[mod_id]);
|
||||
//proto_agent[mod_id].recv_thread = new_thread(proto_agent_receive, &proto_agent[mod_id]);
|
||||
threadCreate(&proto_agent[mod_id].recv_thread, proto_agent_receive, &proto_agent[mod_id], "proto", -1, OAI_PRIORITY_RT_LOW);
|
||||
fprintf(stderr, "[PROTO_AGENT] server started at port %s:%d\n", p->local_ipv4_address, p->local_port);
|
||||
return 0;
|
||||
error:
|
||||
|
||||
@@ -426,7 +426,7 @@ int proto_agent_pdcp_data_req_process(mod_id_t mod_id, const void *params, Proto
|
||||
,confirmP
|
||||
,pdcp_pdu_size
|
||||
,pdcp_pdu_p
|
||||
#ifdef Rel14
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,NULL
|
||||
,NULL
|
||||
#endif
|
||||
|
||||
@@ -112,7 +112,7 @@ signed int rlc_um_get_pdu_infos(
|
||||
// PROTOCOL_RLC_UM_CTXT_FMT"[GET PDU INFO] SN %04d TOO MANY LIs ",
|
||||
// PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||
// pdu_info_pP->sn);
|
||||
if(pdu_info_pP->num_li > RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) {
|
||||
if(pdu_info_pP->num_li >= RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU) {
|
||||
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT"[GET PDU INFO] SN %04d TOO MANY LIs \n",
|
||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP, rlc_pP),
|
||||
pdu_info_pP->sn);
|
||||
|
||||
@@ -66,14 +66,14 @@ void handle_nr_rach(NR_UL_IND_t *UL_info)
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) || (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) || (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (UL_info->rach_ind_br.rach_indication_body.number_of_preambles>0) {
|
||||
|
||||
AssertFatal(UL_info->rach_ind_br.rach_indication_body.number_of_preambles<5,"More than 4 preambles not supported\n");
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef struct{
|
||||
/// RACH indication list
|
||||
nfapi_rach_indication_t rach_ind;
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// RACH indication list for BR UEs
|
||||
nfapi_rach_indication_t rach_ind_br;
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
|
||||
#include "flexran_agent_extern.h"
|
||||
#undef C_RNTI // C_RNTI is used in F1AP generated code, prevent preprocessor replace
|
||||
#include "f1ap_du_rrc_message_transfer.h"
|
||||
//#include "f1ap_du_rrc_message_transfer.h"
|
||||
#include "openair2/F1AP/f1ap_du_rrc_message_transfer.h"
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
|
||||
@@ -809,7 +809,7 @@ typedef struct UE_RRC_INST_s {
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
uint8_t MBMS_flag;
|
||||
uint8_t MBMS_flag;
|
||||
uint8_t *MCCH_MESSAGE[NB_CNX_UE];
|
||||
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
|
||||
uint8_t MCCH_MESSAGEStatus[NB_CNX_UE];
|
||||
|
||||
+55
-29
@@ -1460,7 +1460,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
/* for no gcc warnings */
|
||||
(void)dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int x2_enabled;
|
||||
int measurements_enabled;
|
||||
uint8_t next_xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id);
|
||||
ue_context_pP->ue_context.Status = RRC_CONNECTED;
|
||||
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED
|
||||
@@ -1872,7 +1872,8 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
dedicatedInfoNASList = NULL;
|
||||
}
|
||||
|
||||
x2_enabled = is_x2ap_enabled();
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
|
||||
// send LTE_RRCConnectionReconfiguration
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
@@ -1887,9 +1888,9 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
//#ifdef EXMIMO_IOT
|
||||
// NULL, NULL, NULL,NULL,
|
||||
//#else
|
||||
x2_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL, // MeasObj_list,
|
||||
x2_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL, // ReportConfig_list,
|
||||
x2_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL, //quantityConfig,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL, // MeasObj_list,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL, // ReportConfig_list,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL, //quantityConfig,
|
||||
(LTE_MeasIdToAddModList_t *)NULL,
|
||||
//#endif
|
||||
(LTE_MAC_MainConfig_t *)ue_context_pP->ue_context.mac_MainConfig,
|
||||
@@ -2798,7 +2799,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
/* For no gcc warnings */
|
||||
(void) dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int x2_enabled;
|
||||
int measurements_enabled;
|
||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
|
||||
LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
|
||||
@@ -3340,7 +3341,8 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
dedicatedInfoNASList = NULL;
|
||||
}
|
||||
|
||||
x2_enabled = is_x2ap_enabled();
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
|
||||
@@ -3352,10 +3354,10 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
||||
(LTE_DRB_ToReleaseList_t *) NULL, // DRB2_list,
|
||||
(struct LTE_SPS_Config *) NULL, // *sps_Config,
|
||||
(struct LTE_PhysicalConfigDedicated *) *physicalConfigDedicated,
|
||||
x2_enabled ? (LTE_MeasObjectToAddModList_t *) MeasObj_list : NULL,
|
||||
x2_enabled ? (LTE_ReportConfigToAddModList_t *) ReportConfig_list : NULL,
|
||||
x2_enabled ? (LTE_QuantityConfig_t *) quantityConfig : NULL,
|
||||
x2_enabled ? (LTE_MeasIdToAddModList_t *) MeasId_list : NULL,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *) MeasObj_list : NULL,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *) ReportConfig_list : NULL,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *) quantityConfig : NULL,
|
||||
measurements_enabled ? (LTE_MeasIdToAddModList_t *) MeasId_list : NULL,
|
||||
(LTE_MAC_MainConfig_t *) mac_MainConfig,
|
||||
(LTE_MeasGapConfig_t *) NULL,
|
||||
(LTE_MobilityControlInfo_t *) NULL,
|
||||
@@ -3473,7 +3475,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
/* for no gcc warnings */
|
||||
(void)dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int x2_enabled;
|
||||
int measurements_enabled;
|
||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
#ifdef CBA
|
||||
//struct PUSCH_CBAConfigDedicated_vlola *pusch_CBAConfigDedicated_vlola;
|
||||
@@ -3843,7 +3845,8 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
dedicatedInfoNASList = NULL;
|
||||
}
|
||||
|
||||
x2_enabled = is_x2ap_enabled();
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
size = do_RRCConnectionReconfiguration(ctxt_pP,
|
||||
@@ -3857,10 +3860,10 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
// #ifdef EXMIMO_IOT
|
||||
// NULL, NULL, NULL,NULL,
|
||||
// #else
|
||||
x2_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
|
||||
x2_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
|
||||
x2_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
|
||||
x2_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
|
||||
measurements_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
// #endif
|
||||
(LTE_MAC_MainConfig_t *)mac_MainConfig,
|
||||
(LTE_MeasGapConfig_t *)NULL,
|
||||
@@ -3912,6 +3915,27 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
size,
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP);
|
||||
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRP = NULL;
|
||||
|
||||
free(quantityConfig->quantityConfigEUTRA);
|
||||
quantityConfig->quantityConfigEUTRA = NULL;
|
||||
|
||||
free(quantityConfig);
|
||||
quantityConfig = NULL;
|
||||
|
||||
free(mac_MainConfig->ul_SCH_Config);
|
||||
mac_MainConfig->ul_SCH_Config = NULL;
|
||||
|
||||
free(mac_MainConfig->phr_Config);
|
||||
mac_MainConfig->phr_Config = NULL;
|
||||
|
||||
free(mac_MainConfig);
|
||||
mac_MainConfig = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -4108,7 +4132,7 @@ rrc_eNB_process_MeasurementReport(
|
||||
return;
|
||||
|
||||
/* if X2AP is disabled, do nothing */
|
||||
if (!is_x2ap_enabled())
|
||||
if (!RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2)
|
||||
return;
|
||||
|
||||
LOG_D(RRC, "A3 event is triggered...\n");
|
||||
@@ -4498,7 +4522,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
/* for no gcc warnings */
|
||||
(void)dedicatedInfoNas;
|
||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||
int x2_enabled;
|
||||
int measurements_enabled;
|
||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||
#ifdef CBA
|
||||
//struct PUSCH_CBAConfigDedicated_vlola *pusch_CBAConfigDedicated_vlola;
|
||||
@@ -5260,7 +5284,8 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
|
||||
#endif
|
||||
|
||||
x2_enabled = is_x2ap_enabled();
|
||||
measurements_enabled = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2 ||
|
||||
RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_measurement_reports;
|
||||
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
char rrc_buf[1000 /* arbitrary, should be big enough, has to be less than size of return buf by a few bits/bytes */];
|
||||
@@ -5276,10 +5301,10 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
//#ifdef EXMIMO_IOT
|
||||
// NULL, NULL, NULL,NULL,
|
||||
//#else
|
||||
x2_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
|
||||
x2_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
|
||||
x2_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
|
||||
x2_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
measurements_enabled ? (LTE_MeasObjectToAddModList_t *)MeasObj_list : NULL,
|
||||
measurements_enabled ? (LTE_ReportConfigToAddModList_t *)ReportConfig_list : NULL,
|
||||
measurements_enabled ? (LTE_QuantityConfig_t *)quantityConfig : NULL,
|
||||
measurements_enabled ? (LTE_MeasIdToAddModList_t *)MeasId_list : NULL,
|
||||
//#endif
|
||||
(LTE_MAC_MainConfig_t *)mac_MainConfig,
|
||||
(LTE_MeasGapConfig_t *)NULL,
|
||||
@@ -5604,7 +5629,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
rb_conf_ipv4(0, //add
|
||||
ue_module_id, //cx
|
||||
ctxt_pP->module_id, //inst
|
||||
(ue_module_id * LTE_maxDRB) + DRB_configList->list.array[i]->drb_Identity, // RB
|
||||
(ue_module_id * LTE_maxDRB) + DRB_configList->list.array[i]->drb_Identity, // RB
|
||||
0, //dscp
|
||||
ipv4_address(ctxt_pP->module_id + 1, ctxt_pP->module_id + 1), //saddr
|
||||
ipv4_address(ctxt_pP->module_id + 1, dest_ip_offset + ue_module_id + 1)); //daddr
|
||||
@@ -7458,7 +7483,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id)
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX, VCD_FUNCTION_IN);
|
||||
|
||||
if (is_x2ap_enabled()) {
|
||||
if (RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]->configuration.enable_x2) {
|
||||
/* send a tick to x2ap */
|
||||
msg = itti_alloc_new_message(TASK_RRC_ENB, X2AP_SUBFRAME_PROCESS);
|
||||
itti_send_msg_to_task(TASK_X2AP, ctxt_pP->module_id, msg);
|
||||
@@ -7732,9 +7757,9 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
|
||||
&ctxt,
|
||||
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size);
|
||||
|
||||
if (RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size >= RRC_BUFFER_SIZE_MAX) {
|
||||
if (RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size >= CCCH_SDU_SIZE) {
|
||||
LOG_I(RRC, "CCCH message has size %d > %d\n",
|
||||
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,RRC_BUFFER_SIZE_MAX);
|
||||
RRC_MAC_CCCH_DATA_IND(msg_p).sdu_size,CCCH_SDU_SIZE);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -8150,7 +8175,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_Sidelink(
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
uint8_t buffer[RRC_BUF_SIZE];
|
||||
uint16_t size = -1;
|
||||
uint16_t size = 0;
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
|
||||
// allocate dedicated pools for UE -sl-CommConfig/sl-DiscConfig (sl-V2X-ConfigDedicated)
|
||||
@@ -8287,6 +8312,7 @@ LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool( const protocol_ctxt_t *
|
||||
LTE_SL_DiscConfig_r12_t rrc_eNB_get_sidelink_discTXPool( const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, int n_discoveryMessages ) {
|
||||
//TODO
|
||||
LTE_SL_DiscConfig_r12_t sl_DiscConfig;
|
||||
memset(&sl_DiscConfig,0,sizeof(LTE_SL_DiscConfig_r12_t));
|
||||
sl_DiscConfig.discTxResources_r12 = CALLOC(1,sizeof(*sl_DiscConfig.discTxResources_r12));
|
||||
sl_DiscConfig.discTxResources_r12->present = LTE_SL_DiscConfig_r12__discTxResources_r12_PR_setup;
|
||||
sl_DiscConfig.discTxResources_r12->choice.setup.present = LTE_SL_DiscConfig_r12__discTxResources_r12__setup_PR_scheduled_r12;
|
||||
|
||||
@@ -256,23 +256,28 @@ rrc_eNB_S1AP_get_ue_ids(
|
||||
}
|
||||
|
||||
if (ue_desc_p != NULL) {
|
||||
result = rrc_eNB_S1AP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, eNB_ue_s1ap_id);
|
||||
if (ue_desc_p->ue_initial_id != UE_INITIAL_ID_INVALID) {
|
||||
result = rrc_eNB_S1AP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, eNB_ue_s1ap_id);
|
||||
|
||||
if (result != NULL) {
|
||||
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ENB_INSTANCE_TO_MODULE_ID(instance)], result->ue_rnti);
|
||||
if (result != NULL) {
|
||||
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ENB_INSTANCE_TO_MODULE_ID(instance)], result->ue_rnti);
|
||||
|
||||
if ((ue_context_p != NULL) && (ue_context_p->ue_context.eNB_ue_s1ap_id == 0)) {
|
||||
ue_context_p->ue_context.eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
} else {
|
||||
LOG_E(RRC, "[eNB %ld] Incoherence between RRC context and S1AP context (%d != %d) for UE RNTI %d or UE RRC context doesn't exist\n",
|
||||
rrc_instance_pP - RC.rrc[0],
|
||||
(ue_context_p==NULL)?99999:ue_context_p->ue_context.eNB_ue_s1ap_id,
|
||||
eNB_ue_s1ap_id,
|
||||
result->ue_rnti);
|
||||
if ((ue_context_p != NULL) && (ue_context_p->ue_context.eNB_ue_s1ap_id == 0)) {
|
||||
ue_context_p->ue_context.eNB_ue_s1ap_id = eNB_ue_s1ap_id;
|
||||
} else {
|
||||
LOG_E(RRC, "[eNB %ld] Incoherence between RRC context and S1AP context (%d != %d) for UE RNTI %d or UE RRC context doesn't exist\n",
|
||||
rrc_instance_pP - RC.rrc[0],
|
||||
(ue_context_p==NULL)?99999:ue_context_p->ue_context.eNB_ue_s1ap_id,
|
||||
eNB_ue_s1ap_id,
|
||||
result->ue_rnti);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG_E(S1AP, "[eNB %ld] S1AP context found but ue_initial_id is invalid (0)\n", rrc_instance_pP - RC.rrc[0]);
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
LOG_E(S1AP, "[eNB %ld] In hashtable_get, couldn't find in s1ap_id2_s1ap_ids eNB_ue_s1ap_id %"PRIu32", even when looking at S1AP context\n",
|
||||
LOG_E(S1AP, "[eNB %ld] In hashtable_get, couldn't find in s1ap_id2_s1ap_ids eNB_ue_s1ap_id %"PRIu32", because ue_initial_id is invalid in S1AP context\n",
|
||||
rrc_instance_pP - RC.rrc[0],
|
||||
eNB_ue_s1ap_id);
|
||||
return NULL;
|
||||
@@ -840,6 +845,7 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
||||
uint8_t srb_id;
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||
protocol_ctxt_t ctxt;
|
||||
memset(&ctxt, 0, sizeof(protocol_ctxt_t));
|
||||
ue_initial_id = S1AP_DOWNLINK_NAS (msg_p).ue_initial_id;
|
||||
eNB_ue_s1ap_id = S1AP_DOWNLINK_NAS (msg_p).eNB_ue_s1ap_id;
|
||||
ue_context_p = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
|
||||
|
||||
@@ -61,9 +61,9 @@ void nas_getparams(void) {
|
||||
/* configuration parameters for netlink, includes network parameters when running in noS1 mode */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
{"NetworkPrefix", NASHLP_NETPREFIX, 0, strptr:&baseNetAddress, defstrval:"10.0", TYPE_STRING, 0 },
|
||||
{"NetworkPrefix", NASHLP_NETPREFIX, 0, strptr:&baseNetAddress, defstrval:"10.0", TYPE_STRING, 0 },
|
||||
{"NetworkMask", NASHLP_NETMASK, 0, strptr:&netMask, defstrval:"255.255.255.0", TYPE_STRING, 0 },
|
||||
{"BroadcastAddr", NASHLP_BROADCASTADDR, 0, strptr:&broadcastAddr, defstrval:"10.0.255.255", TYPE_STRING, 0 },
|
||||
{"BroadcastAddr", NASHLP_BROADCASTADDR, 0, strptr:&broadcastAddr, defstrval:"10.0.255.255", TYPE_STRING, 0 },
|
||||
};
|
||||
config_get( nasoptions,sizeof(nasoptions)/sizeof(paramdef_t),"nas.noS1");
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ link_manager_t *create_link_manager(
|
||||
socket_link_t *link)
|
||||
{
|
||||
link_manager_t *ret = NULL;
|
||||
pthread_attr_t attr;
|
||||
//pthread_attr_t attr;
|
||||
pthread_t t;
|
||||
|
||||
LOG_D(MAC, "create new link manager\n");
|
||||
|
||||
@@ -228,7 +228,7 @@ socket_link_t *new_link_udp_client(const char *server, int port){
|
||||
|
||||
struct sockaddr_in si_other;
|
||||
int s;
|
||||
socklen_t slen;
|
||||
socklen_t slen = sizeof(si_other);
|
||||
|
||||
if ( (s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1){
|
||||
goto error;
|
||||
@@ -402,7 +402,7 @@ static int socket_udp_receive(int socket_fd, void *buf, int size)
|
||||
LOG_D(PROTO_AGENT,"UDP RECEIVE\n");
|
||||
|
||||
struct sockaddr_in client;
|
||||
socklen_t slen;
|
||||
socklen_t slen = sizeof(client);
|
||||
int l;
|
||||
|
||||
l = recvfrom(socket_fd, buf, size, 0, (struct sockaddr *) &client, &slen);
|
||||
|
||||
@@ -192,7 +192,7 @@ int x2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
|
||||
|
||||
case X2AP_X2AP_PDU_PR_initiatingMessage:
|
||||
/* Checking procedure Code and direction of message */
|
||||
if (pdu.choice.initiatingMessage.procedureCode > sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
if (pdu.choice.initiatingMessage.procedureCode >= sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
x2ap_message_decoded_callback))) {
|
||||
//|| (pdu.present > X2AP_X2AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
X2AP_ERROR("[SCTP %d] Either procedureCode %ld exceed expected\n",
|
||||
@@ -218,7 +218,7 @@ int x2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
|
||||
|
||||
case X2AP_X2AP_PDU_PR_successfulOutcome:
|
||||
/* Checking procedure Code and direction of message */
|
||||
if (pdu.choice.successfulOutcome.procedureCode > sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
if (pdu.choice.successfulOutcome.procedureCode >= sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
x2ap_message_decoded_callback))) {
|
||||
//|| (pdu.present > X2AP_X2AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
X2AP_ERROR("[SCTP %d] Either procedureCode %ld exceed expected\n",
|
||||
@@ -244,7 +244,7 @@ int x2ap_eNB_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
|
||||
|
||||
case X2AP_X2AP_PDU_PR_unsuccessfulOutcome:
|
||||
/* Checking procedure Code and direction of message */
|
||||
if (pdu.choice.unsuccessfulOutcome.procedureCode > sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
if (pdu.choice.unsuccessfulOutcome.procedureCode >= sizeof(x2ap_messages_callback) / (3 * sizeof(
|
||||
x2ap_message_decoded_callback))) {
|
||||
//|| (pdu.present > X2AP_X2AP_PDU_PR_unsuccessfulOutcome)) {
|
||||
X2AP_ERROR("[SCTP %d] Either procedureCode %ld exceed expected\n",
|
||||
|
||||
Reference in New Issue
Block a user