Commit 2270cd4c authored by Robert Schmidt's avatar Robert Schmidt

RLF handled after SRB retx failure

parent 45546102
......@@ -168,6 +168,9 @@ nr_bler_struct nr_bler_data[NR_NUM_MCS];
static void init_bler_table(char*);
// to be removed
void nr_mac_trigger_ul_failure(int rnti) { abort(); }
/*---------------------BMC: timespec helpers -----------------------------*/
struct timespec min_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
......
......@@ -1937,7 +1937,7 @@ static void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, s
LOG_A(NR_MAC, "(UE RNTI 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", ra->rnti);
} else {
LOG_I(NR_MAC, "%4d.%2d UE %04x: RA Procedure failed at Msg4!\n", frame, slot, ra->rnti);
nr_mac_trigger_ul_failure(sched_ctrl, UE->current_DL_BWP.scs);
nr_mac_trigger_ul_failure(UE->rnti);
}
// Pause scheduling according to:
......
......@@ -3064,14 +3064,21 @@ bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti)
return sched_ctrl->release_timer == 0;
}
void nr_mac_trigger_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing)
void nr_mac_trigger_ul_failure(int rnti)
{
NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[0]->UE_info, rnti);
if (UE == NULL) {
LOG_E(NR_MAC, "could not find UE RNTI %04x\n", rnti);
return;
}
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
if (sched_ctrl->ul_failure) {
/* already running */
return;
}
sched_ctrl->ul_failure = true;
// 30 seconds till triggering release request
NR_SubcarrierSpacing_t subcarrier_spacing = UE->current_DL_BWP.scs;
sched_ctrl->ul_failure_timer = 30000 << subcarrier_spacing;
}
......
......@@ -680,7 +680,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
"UE %04x: Detected UL Failure on PUSCH after %d PUSCH DTX, stopping scheduling\n",
UE->rnti,
UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt);
nr_mac_trigger_ul_failure(&UE->UE_sched_ctrl, UE->current_UL_BWP.scs);
nr_mac_trigger_ul_failure(UE->rnti);
}
}
} else if(sduP) {
......
......@@ -442,7 +442,7 @@ void nr_mac_trigger_release_timer(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierS
bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti);
void nr_mac_release_ue(gNB_MAC_INST *mac, int rnti);
void nr_mac_trigger_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing);
void nr_mac_trigger_ul_failure(int rnti);
void nr_mac_reset_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl);
void nr_mac_check_ul_failure(const gNB_MAC_INST *nrmac, int rnti, NR_UE_sched_ctrl_t *sched_ctrl);
......
......@@ -569,6 +569,7 @@ rb_found:
#endif
}
extern void nr_mac_trigger_ul_failure(int rnti);
static void max_retx_reached(void *_ue, nr_rlc_entity_t *entity)
{
nr_rlc_ue_t *ue = _ue;
......@@ -615,15 +616,7 @@ rb_found:
if (!is_enb)
return;
#if 0
msg = itti_alloc_new_message(TASK_RLC_ENB, RLC_SDU_INDICATION);
RLC_SDU_INDICATION(msg).rnti = ue->rnti;
RLC_SDU_INDICATION(msg).is_successful = 0;
RLC_SDU_INDICATION(msg).srb_id = rb_id;
RLC_SDU_INDICATION(msg).message_id = -1;
/* TODO: accept more than 1 instance? here we send to instance id 0 */
itti_send_msg_to_task(TASK_RRC_ENB, 0, msg);
#endif
nr_mac_trigger_ul_failure(ue->rnti);
}
void nr_rlc_reestablish_entity(int rnti, int lc_id)
......
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