Commit b68f7d2b authored by heshanyun's avatar heshanyun

Merge remote-tracking branch 'origin/develop' into fujitsu_lte_contribution

parents c137c0bb d463d549
......@@ -324,7 +324,8 @@ int pnf_config_resp_cb(nfapi_vnf_config_t *config, int p5_idx, nfapi_pnf_config_
int wake_eNB_rxtx(PHY_VARS_eNB *eNB, uint16_t sfn, uint16_t sf) {
L1_proc_t *proc=&eNB->proc;
L1_rxtx_proc_t *L1_proc= (sf&1)? &proc->L1_proc : &proc->L1_proc_tx;
// L1_rxtx_proc_t *L1_proc= (sf&1)? &proc->L1_proc : &proc->L1_proc_tx;
L1_rxtx_proc_t *L1_proc= &proc->L1_proc;
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
//printf("%s(eNB:%p, sfn:%d, sf:%d)\n", __FUNCTION__, eNB, sfn, sf);
//int i;
......
......@@ -740,6 +740,23 @@ void update_ue_timers(module_id_t module_idP,frame_t frameP, sub_frame_t subfram
uint8_t volte_ul_cycle[MAX_NUM_CCs];
uint8_t volte_ul_buffersize[MAX_NUM_CCs];
RA_t *ra;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
for(uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
ra = (RA_t *) & eNB->common_channels[CC_id].ra[ra_i];
if((ra->state == WAITMSG3) && (ra->msg3_wait_time > 0)){
ra->msg3_wait_time++;
if(ra->msg3_wait_time > 15){
LOG_E(MAC,"update_ue_timers ra_index %d rnti %x wait msg3 timeout release ra\n",ra_i,ra->rnti);
fill_nfapi_rnti_release(module_idP, ra->rnti);
cancel_ra_proc(module_idP, CC_id, frameP, ra->rnti);
ra->msg3_wait_time = 0;
}
}
}
}
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
volte_ul_cycle[CC_id] = eNB->volte_ul_cycle[CC_id];
if (volte_ul_cycle[CC_id] != 0){
......
......@@ -273,6 +273,8 @@ void generate_Msg2(module_id_t module_idP,
LOG_E(MAC, "to_prb failed\n");
return;
}
RA_t *ra_temp;
uint8_t msg3_ra_flag = 0;
int rmax = 0;
int rep = 0;
int reps = 0;
......@@ -545,8 +547,8 @@ void generate_Msg2(module_id_t module_idP,
if (!CCE_allocation_infeasible(module_idP, CC_idP, 0, subframeP,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, ra->RA_rnti)) {
LOG_D(MAC,
"Frame %d: Subframe %d : Adding common DCI for RA_RNTI %x\n",
frameP, subframeP, ra->RA_rnti);
"Frame %d: Subframe %d : Adding common DCI for RA_RNTI %x rnti %x\n",
frameP, subframeP, ra->RA_rnti, ra->rnti);
dl_req_body->number_dci++;
dl_req_body->number_pdu++;
dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu];
......@@ -594,9 +596,22 @@ void generate_Msg2(module_id_t module_idP,
"Frame %d, Subframe %d: Setting Msg3 reception for Frame %d Subframe %d\n",
frameP, subframeP, ra->Msg3_frame,
ra->Msg3_subframe);
fill_rar(module_idP, CC_idP, ra, frameP, cc[CC_idP].RAR_pdu.payload, N_RB_DL, 7);
for (uint8_t i = 0; i < NB_RA_PROC_MAX; i++) {
ra_temp = (RA_t *) & cc[CC_idP].ra[i];
if((ra_temp != ra) && (ra_temp->state == WAITMSG3)){
if((ra->Msg3_frame == ra_temp->Msg3_frame) && (ra->Msg3_subframe == ra_temp->Msg3_subframe)){
LOG_E(PHY,"Msg3 sf_sfn repeated %d.%d msg2 frame %d subframe %d rnti %x ra_temp->msg3_first_rb %d\n",
ra->Msg3_frame,ra->Msg3_subframe,ra->Msg2_frame, ra->Msg2_subframe,ra->rnti,ra_temp->msg3_first_rb);
if(ra_temp->msg3_first_rb < 6){
msg3_ra_flag = 1;
}
}
}
}
fill_rar(module_idP, CC_idP, ra, frameP, cc[CC_idP].RAR_pdu.payload, N_RB_DL, 7, msg3_ra_flag);
add_msg3(module_idP, CC_idP, ra, frameP, subframeP);
ra->state = WAITMSG3;
ra->msg3_wait_time = 1;
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d: state:WAITMSG3\n", module_idP, frameP, subframeP);
T(T_ENB_MAC_UE_DL_RAR_PDU_WITH_DATA, T_INT(module_idP),
T_INT(CC_idP), T_INT(ra->RA_rnti), T_INT(frameP),
......@@ -1495,6 +1510,7 @@ initiate_ra_proc(module_id_t module_idP,
ra[i].Msg4_delay_cnt=0;
ra[i].timing_offset = timing_offset;
ra[i].preamble_subframe = subframeP;
ra[i].msg3_wait_time = 0;
ra[i].rach_resource_type = rach_resource_type;
ra[i].msg2_mpdcch_repetition_cnt = 0;
ra[i].msg4_mpdcch_repetition_cnt = 0;
......
......@@ -392,6 +392,7 @@ void select_ul_ue_candidate(
int UE_id_idx;
rnti_t rnti;
uint8_t ulsch_ue_max_num[MAX_NUM_CCs];
uint8_t ulsch_ue_max_num_volte[MAX_NUM_CCs];
uint8_t cc_id_flag[MAX_NUM_CCs]={0};
int rrc_status;
int tdd_sfa;
......@@ -400,6 +401,11 @@ void select_ul_ue_candidate(
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
ulsch_ue_max_num[CC_id] =RC.rrc[module_idP]->configuration.radioresourceconfig[CC_id].ue_multiple_max;
if(eNB->volte_ul_cycle[CC_id] != 0){
ulsch_ue_max_num_volte[CC_id] = (uint16_t)(ulsch_ue_max_num[CC_id] / 2);
}else{
ulsch_ue_max_num_volte[CC_id] = 0;
}
}
for(i=0;i<MAX_UE_MULTIPLEX;i++){
ul_ue_candidate[i]=-1;
......@@ -494,17 +500,8 @@ void select_ul_ue_candidate(
if (UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
continue;
if ( (index_volte >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) {
cc_id_flag[CC_id] = 1;
ret = cc_id_end(cc_id_flag);
if ( ret == 0 ) {
continue;
}
if ( ret == 1 ) {
return;
}
if (index_volte >= ulsch_ue_max_num_volte[CC_id]) {
continue;
}
int bytes_to_schedule = UE_info->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_info->UE_template[CC_id][UE_id].scheduled_ul_bytes;
......@@ -516,7 +513,7 @@ void select_ul_ue_candidate(
UE_sched_ctl = &UE_info->UE_sched_ctrl[UE_id];
if ((UE_sched_ctl->volte_configured == TRUE)
&& (index_volte < ulsch_ue_max_num[CC_id])
&& (index_volte < ulsch_ue_max_num_volte[CC_id])
&& (UE_sched_ctl->ul_periodic_timer_exp_flag == TRUE) )
{
volte_lcg = UE_sched_ctl->volte_lcg;
......@@ -546,7 +543,7 @@ void select_ul_ue_candidate(
if (UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync == 1)
continue;
if ( (index >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) {
if ( ((index+ index_volte) >= ulsch_ue_max_num[CC_id]) || (cc_id_flag[CC_id] == 1) ) {
cc_id_flag[CC_id] = 1;
ret = cc_id_end(cc_id_flag);
......@@ -4058,9 +4055,16 @@ void ulsch_scheduler_pre_ue_select_fairRR(
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
format_flag = 2;
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),
if (mac_eNB_get_rrc_status(module_idP, rnti) == RRC_HO_EXECUTION) {
aggregation = 4;
if(get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0)>4)
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
}else {
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),
UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],
format0);
}
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
cc_id_flag[CC_id] = 1;
continue;
......@@ -4156,9 +4160,17 @@ void ulsch_scheduler_pre_ue_select_fairRR(
format_flag = 2;
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),
if (mac_eNB_get_rrc_status(module_idP, rnti) == RRC_HO_EXECUTION) {
aggregation = 4;
if(get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0)>4)
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
}else {
aggregation = get_aggregation(get_bw_index(module_idP, CC_id),
UE_info->UE_sched_ctrl[UE_id].dl_cqi[CC_id],
format0);
}
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
cc_id_flag[CC_id] = 1;
continue;
......@@ -4258,14 +4270,16 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
for ( ulsch_ue_num = 0; ulsch_ue_num < ulsch_ue_select[CC_id].ue_num; ulsch_ue_num++ ) {
UE_id = ulsch_ue_select[CC_id].list[ulsch_ue_num].UE_id;
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_MSG3) {
first_rb[CC_id] += 3;
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_PRACH) {
first_rb[CC_id] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb+ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
ue_num_temp--;
continue;
}
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_PRACH) {
first_rb[CC_id] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb+ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_MSG3) {
if(ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb >= first_rb[CC_id]){
first_rb[CC_id] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb+ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
}
ue_num_temp--;
continue;
}
......@@ -4546,14 +4560,29 @@ schedule_ulsch_fairRR(module_id_t module_idP, frame_t frameP,
cc = &mac->common_channels[CC_id];
frame_parms= &RC.eNB[module_idP][CC_id]->frame_parms;
//PRACH
if (is_prach_subframe(frame_parms,sched_frame,sched_subframe)==1) {
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].ue_priority = SCH_UL_PRACH;
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = get_prach_prb_offset(
frame_parms,
frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset,
0,//tdd_mapindex
frameP); //Nf --> shouldn't it be sched_frame ???
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].nb_rb = 6;
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].UE_id = -1;
ulsch_ue_select[CC_id].ue_num++;
}
// output of scheduling, the UE numbers in RBs, where it is in the code???
// check if RA (Msg3) is active in this subframeP, if so skip the PRBs used for Msg3
// Msg3 is using 1 PRB so we need to increase first_rb accordingly
// not sure about the break (can there be more than 1 active RA procedure?)
for (i=0; i<NB_RA_PROC_MAX; i++) {
if ((cc->ra[i].state == WAITMSG3) &&(cc->ra[i].Msg3_subframe == sched_subframe)) {
if ((cc->ra[i].state == WAITMSG3) &&
(cc->ra[i].Msg3_frame == sched_frame) &&
(cc->ra[i].Msg3_subframe == sched_subframe)) {
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].ue_priority = SCH_UL_MSG3;
#if 0
if (cc->tdd_Config == NULL) {
if(frame_parms->N_RB_UL == 25) {
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = 1;
......@@ -4579,27 +4608,16 @@ schedule_ulsch_fairRR(module_id_t module_idP, frame_t frameP,
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb+=1;
}
}
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].nb_rb = 3;
#endif
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = cc->ra[i].msg3_first_rb;
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].nb_rb = cc->ra[i].msg3_nb_rb;
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].UE_id = -1;
ulsch_ue_select[CC_id].ue_num++;
break;
//break;
}
}
//PRACH
if (is_prach_subframe(frame_parms,sched_frame,sched_subframe)==1) {
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].ue_priority = SCH_UL_PRACH;
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].start_rb = get_prach_prb_offset(
frame_parms,
frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset,
0,//tdd_mapindex
frameP); //Nf --> shouldn't it be sched_frame ???
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].nb_rb = 6;
ulsch_ue_select[CC_id].list[ulsch_ue_select[CC_id].ue_num].UE_id = -1;
ulsch_ue_select[CC_id].ue_num++;
}
}
schedule_ulsch_rnti_fairRR(module_idP, frameP, subframeP, sched_subframe,ulsch_ue_select);
......@@ -4732,18 +4750,19 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
}
}
//MSG3
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_MSG3) {
first_rb[CC_id] += 3;
continue;
}
//PRACH
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_PRACH) {
first_rb[CC_id] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb+ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
continue;
}
//MSG3
if (ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_MSG3) {
if(ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb >= first_rb[CC_id]){
first_rb[CC_id] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb+ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
}
continue;
}
UE_template = &UE_info->UE_template[CC_id][UE_id];
UE_sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
harq_pid = subframe2harqpid(cc,sched_frame,sched_subframeP);
......
......@@ -4741,8 +4741,8 @@ extract_harq(module_id_t mod_idP,
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
}else{
if(sched_ctl->round[CC_idP][harq_pid][TB1] == 8){
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
fill_nfapi_rnti_release(mod_idP, ra[ra_i].rnti);
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
LOG_E(MAC,"CRNTI Reconfiguration NACK round reach max release UE %x\n",ra[ra_i].rnti);
}
}
......@@ -4838,8 +4838,8 @@ extract_harq(module_id_t mod_idP,
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
}else{
if(sched_ctl->round[CC_idP][harq_pid][select_tb] == 8){
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
fill_nfapi_rnti_release(mod_idP, ra[ra_i].rnti);
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
LOG_E(MAC,"CRNTI Reconfiguration NACK round reach max release UE %x\n",ra[ra_i].rnti);
}
}
......
......@@ -313,7 +313,7 @@ rx_sdu(const module_id_t enb_mod_idP,
RA_id,
ul_cqi);
first_rb = ra->msg3_first_rb;
ra->msg3_wait_time = 0;
if (sduP == NULL) { // we've got an error on Msg3
LOG_D(MAC, "[eNB %d] CC_id %d,frame %d subframe %d RA %d ULSCH in error in round %d/%d rnti %x\n",
enb_mod_idP,
......@@ -357,6 +357,7 @@ rx_sdu(const module_id_t enb_mod_idP,
&ra->Msg3_subframe);
// prepare handling of retransmission
add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP);
ra->msg3_wait_time = 1;
}
}
......@@ -465,7 +466,6 @@ rx_sdu(const module_id_t enb_mod_idP,
old_rnti,
old_UE_id);
UE_id = old_UE_id;
current_rnti = old_rnti;
/* Clear timer */
UE_scheduling_control = &UE_info->UE_sched_ctrl[UE_id];
UE_template_ptr = &UE_info->UE_template[CC_idP][UE_id];
......@@ -489,6 +489,7 @@ rx_sdu(const module_id_t enb_mod_idP,
CC_idP,
frameP,
current_rnti);
current_rnti = old_rnti;
} else {
/* TODO: if the UE did random access (followed by a MAC uplink with
* CRNTI) because none of its scheduling request was granted, then
......
......@@ -1156,6 +1156,8 @@ typedef struct {
uint8_t msg3_cqireq;
/// Round of Msg3 HARQ
uint8_t msg3_round;
uint8_t msg3_wait_time;
/// TBS used for Msg4
int msg4_TBsize;
/// MCS used for Msg4
......
......@@ -271,7 +271,8 @@ unsigned short fill_rar(const module_id_t module_idP,
const frame_t frameP,
uint8_t *const dlsch_buffer,
const uint16_t N_RB_UL,
const uint8_t input_buffer_length);
const uint8_t input_buffer_length,
uint8_t msg3_ra_flag);
unsigned short fill_rar_br(eNB_MAC_INST *eNB,
int CC_id,
......
......@@ -27,7 +27,7 @@
* @ingroup _mac
*/
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "mac.h"
#include "mac_proto.h"
#include "mac_extern.h"
......@@ -54,7 +54,8 @@ fill_rar(const module_id_t module_idP,
const frame_t frameP,
uint8_t *const dlsch_buffer,
const uint16_t N_RB_UL,
const uint8_t input_buffer_length)
const uint8_t input_buffer_length,
uint8_t msg3_ra_flag)
//------------------------------------------------------------------------------
{
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
......@@ -75,6 +76,7 @@ fill_rar(const module_id_t module_idP,
rar[1] = (uint8_t) (ra->timing_offset << 4) & 0xf0; // 4 LSBs of timing advance
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
if(msg3_ra_flag == 0){
if(N_RB_UL == 25) {
ra->msg3_first_rb = 1;
} else {
......@@ -84,6 +86,16 @@ fill_rar(const module_id_t module_idP,
ra->msg3_first_rb = 2;
}
}
}else{
LTE_DL_FRAME_PARMS *frame_parms ;
frame_parms= &RC.eNB[module_idP][CC_id]->frame_parms;
ra->msg3_first_rb = 6+get_prach_prb_offset(
frame_parms,
frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset,
0,//tdd_mapindex
frameP);
}
if(cc->tdd_Config){
if(cc->tdd_Config->subframeAssignment==2){
......
......@@ -1603,7 +1603,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
/* Activate reject timer, if RRCComplete not received after 10 frames, reject UE */
RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
/* Reject UE after 10 frames, LTE_RRCConnectionReestablishmentReject is triggered */
RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 100;
RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 1000;
} else {
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishment without UE_id(MAC) rnti %x\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
......@@ -7677,6 +7677,7 @@ rrc_eNB_generate_RRCConnectionSetup(
/* init timers */
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
}
}
void setup_ngran_CU(eNB_RRC_INST *rrc) {
......@@ -10231,7 +10232,11 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
/* in the target eNB */
}else{
if(ue_context_p->ue_context.handover_info->state == HO_FORWARDING){
if((ue_context_p->ue_context.handover_info->state == HO_COMPLETE)
|| (ue_context_p->ue_context.handover_info->state == HO_FORWARDING)
|| (ue_context_p->ue_context.handover_info->state == HO_CONFIGURED)
|| (ue_context_p->ue_context.handover_info->state == HO_END_MARKER)
|| (ue_context_p->ue_context.handover_info->state == HO_FORWARDING_COMPLETE)){
ue_context_p->ue_context.handover_info->state = HO_RELEASE;
}else{
free(ue_context_p->ue_context.handover_info);
......
......@@ -185,13 +185,13 @@ void rrc_eNB_send_GTPV1U_ENB_DELETE_TUNNEL_REQ(
MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_GTPU_ENB, NULL, 0,
"0 GTPV1U_ENB_DELETE_TUNNEL_REQ rnti %x ",
ue_context_pP->ue_context.eNB_ue_s1ap_id);
rb_id_t gtp_ebi;
MessageDef *msg = itti_alloc_new_message(TASK_RRC_ENB, GTPV1U_ENB_DELETE_TUNNEL_REQ);
memset(&GTPV1U_ENB_DELETE_TUNNEL_REQ(msg), 0, sizeof(GTPV1U_ENB_DELETE_TUNNEL_REQ(msg)));
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg).rnti = ue_context_pP->ue_context.rnti;
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg).num_erab = ue_context_pP->ue_context.nb_of_e_rabs;
for (int e_rab = 0; e_rab < ue_context_pP->ue_context.nb_of_e_rabs; e_rab++) {
const rb_id_t gtp_ebi = ue_context_pP->ue_context.enb_gtp_ebi[e_rab];
gtp_ebi = ue_context_pP->ue_context.enb_gtp_ebi[e_rab];
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg).eps_bearer_id[e_rab] = gtp_ebi;
}
itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(enb_mod_idP), msg);
......
......@@ -917,7 +917,7 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
ue_initial_id,
eNB_ue_s1ap_id);
itti_send_msg_to_task (TASK_S1AP, instance, msg_fail_p);
free(S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer);
//free(S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer);
return (-1);
} else {
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0);
......
......@@ -1108,7 +1108,7 @@ void init_eNB_proc(int inst) {
//pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, &proc_rxtx[0] );
//pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, eNB_thread_rxtx, &proc_rxtx[1] );
pthread_create( &L1_proc->pthread, attr0, L1_thread, L1_proc );
pthread_create( &L1_proc_tx->pthread, attr1, L1_thread, L1_proc_tx);
//pthread_create( &L1_proc_tx->pthread, attr1, L1_thread, L1_proc_tx);
}
if (NFAPI_MODE!=NFAPI_MODE_VNF) {
......
......@@ -249,12 +249,12 @@ void exit_function(const char *file, const char *function, const int line, const
if (s != NULL) {
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
}
oai_exit = 1;
if(log_mem_initflag) {
close_log_mem();
}
oai_exit = 1;
if (RC.ru == NULL)
exit(-1); // likely init not completed, prevent crash or hang, exit now...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment