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
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){
......
......@@ -535,8 +535,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];
......@@ -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);
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),
......@@ -1536,6 +1537,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;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
ra[i].rach_resource_type = rach_resource_type;
ra[i].msg2_mpdcch_repetition_cnt = 0;
......
......@@ -4773,8 +4773,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);
}
}
......@@ -4870,8 +4870,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);
}
}
......
......@@ -324,7 +324,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,
......@@ -365,6 +365,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;
}
/* TODO: program NACK for PHICH? */
......
......@@ -1165,6 +1165,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
......
......@@ -7640,7 +7640,7 @@ rrc_eNB_generate_RRCConnectionSetup(
}
}
}
}
break;
default :
LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type);
......@@ -7669,7 +7669,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) {
......
......@@ -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,
"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);
......
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