Commit 9dfd9468 authored by Haruki NAOI's avatar Haruki NAOI

Fix: T-CRNT dose not release when Msg3 dose not reach VNF.

(cherry picked from commit 9856e937c8ea6c1584d9c8917f2ca72cec8bc896)
parent 11090635
...@@ -742,6 +742,23 @@ void update_ue_timers(module_id_t module_idP,frame_t frameP, sub_frame_t subfram ...@@ -742,6 +742,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_cycle[MAX_NUM_CCs];
uint8_t volte_ul_buffersize[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++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
volte_ul_cycle[CC_id] = eNB->volte_ul_cycle[CC_id]; volte_ul_cycle[CC_id] = eNB->volte_ul_cycle[CC_id];
if (volte_ul_cycle[CC_id] != 0){ if (volte_ul_cycle[CC_id] != 0){
......
...@@ -535,8 +535,8 @@ void generate_Msg2(module_id_t module_idP, ...@@ -535,8 +535,8 @@ void generate_Msg2(module_id_t module_idP,
if (!CCE_allocation_infeasible(module_idP, CC_idP, 0, subframeP, 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)) { dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, ra->RA_rnti)) {
LOG_D(MAC, LOG_D(MAC,
"Frame %d: Subframe %d : Adding common DCI for RA_RNTI %x\n", "Frame %d: Subframe %d : Adding common DCI for RA_RNTI %x rnti %x\n",
frameP, subframeP, ra->RA_rnti); frameP, subframeP, ra->RA_rnti, ra->rnti);
dl_req_body->number_dci++; dl_req_body->number_dci++;
dl_req_body->number_pdu++; dl_req_body->number_pdu++;
dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu]; dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu];
...@@ -587,6 +587,7 @@ void generate_Msg2(module_id_t module_idP, ...@@ -587,6 +587,7 @@ void generate_Msg2(module_id_t module_idP,
fill_rar(module_idP, CC_idP, ra, frameP, cc[CC_idP].RAR_pdu.payload, N_RB_DL, 7); fill_rar(module_idP, CC_idP, ra, frameP, cc[CC_idP].RAR_pdu.payload, N_RB_DL, 7);
add_msg3(module_idP, CC_idP, ra, frameP, subframeP); add_msg3(module_idP, CC_idP, ra, frameP, subframeP);
ra->state = WAITMSG3; 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); 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(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), T_INT(CC_idP), T_INT(ra->RA_rnti), T_INT(frameP),
...@@ -1536,6 +1537,7 @@ initiate_ra_proc(module_id_t module_idP, ...@@ -1536,6 +1537,7 @@ initiate_ra_proc(module_id_t module_idP,
ra[i].Msg4_delay_cnt=0; ra[i].Msg4_delay_cnt=0;
ra[i].timing_offset = timing_offset; ra[i].timing_offset = timing_offset;
ra[i].preamble_subframe = subframeP; ra[i].preamble_subframe = subframeP;
ra[i].msg3_wait_time = 0;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
ra[i].rach_resource_type = rach_resource_type; ra[i].rach_resource_type = rach_resource_type;
ra[i].msg2_mpdcch_repetition_cnt = 0; ra[i].msg2_mpdcch_repetition_cnt = 0;
......
...@@ -4773,8 +4773,8 @@ extract_harq(module_id_t mod_idP, ...@@ -4773,8 +4773,8 @@ extract_harq(module_id_t mod_idP,
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti); cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
}else{ }else{
if(sched_ctl->round[CC_idP][harq_pid][TB1] == 8){ 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); 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); LOG_E(MAC,"CRNTI Reconfiguration NACK round reach max release UE %x\n",ra[ra_i].rnti);
} }
} }
...@@ -4870,8 +4870,8 @@ extract_harq(module_id_t mod_idP, ...@@ -4870,8 +4870,8 @@ extract_harq(module_id_t mod_idP,
cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti); cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
}else{ }else{
if(sched_ctl->round[CC_idP][harq_pid][select_tb] == 8){ 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); 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); LOG_E(MAC,"CRNTI Reconfiguration NACK round reach max release UE %x\n",ra[ra_i].rnti);
} }
} }
......
...@@ -324,7 +324,7 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -324,7 +324,7 @@ rx_sdu(const module_id_t enb_mod_idP,
RA_id, RA_id,
ul_cqi); ul_cqi);
first_rb = ra->msg3_first_rb; first_rb = ra->msg3_first_rb;
ra->msg3_wait_time = 0;
if (sduP == NULL) { // we've got an error on Msg3 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", 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, enb_mod_idP,
...@@ -365,6 +365,7 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -365,6 +365,7 @@ rx_sdu(const module_id_t enb_mod_idP,
&ra->Msg3_subframe); &ra->Msg3_subframe);
// prepare handling of retransmission // prepare handling of retransmission
add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP); add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP);
ra->msg3_wait_time = 1;
} }
/* TODO: program NACK for PHICH? */ /* TODO: program NACK for PHICH? */
......
...@@ -1165,6 +1165,8 @@ typedef struct { ...@@ -1165,6 +1165,8 @@ typedef struct {
uint8_t msg3_cqireq; uint8_t msg3_cqireq;
/// Round of Msg3 HARQ /// Round of Msg3 HARQ
uint8_t msg3_round; uint8_t msg3_round;
uint8_t msg3_wait_time;
/// TBS used for Msg4 /// TBS used for Msg4
int msg4_TBsize; int msg4_TBsize;
/// MCS used for Msg4 /// MCS used for Msg4
......
...@@ -7640,7 +7640,7 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -7640,7 +7640,7 @@ rrc_eNB_generate_RRCConnectionSetup(
} }
} }
} }
}
break; break;
default : default :
LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type); LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type);
...@@ -7669,7 +7669,7 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -7669,7 +7669,7 @@ rrc_eNB_generate_RRCConnectionSetup(
/* init timers */ /* init timers */
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0; ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
}
} }
void setup_ngran_CU(eNB_RRC_INST *rrc) { void setup_ngran_CU(eNB_RRC_INST *rrc) {
......
...@@ -188,13 +188,13 @@ void rrc_eNB_send_GTPV1U_ENB_DELETE_TUNNEL_REQ( ...@@ -188,13 +188,13 @@ void rrc_eNB_send_GTPV1U_ENB_DELETE_TUNNEL_REQ(
MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_GTPU_ENB, NULL, 0, MSC_LOG_TX_MESSAGE(MSC_RRC_ENB, MSC_GTPU_ENB, NULL, 0,
"0 GTPV1U_ENB_DELETE_TUNNEL_REQ rnti %x ", "0 GTPV1U_ENB_DELETE_TUNNEL_REQ rnti %x ",
ue_context_pP->ue_context.eNB_ue_s1ap_id); 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); 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))); 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).rnti = ue_context_pP->ue_context.rnti;
GTPV1U_ENB_DELETE_TUNNEL_REQ(msg).num_erab = ue_context_pP->ue_context.nb_of_e_rabs; 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++) { 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; 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); itti_send_msg_to_task(TASK_GTPV1_U, ENB_MODULE_ID_TO_INSTANCE(enb_mod_idP), msg);
......
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