Commit e0f6dfff authored by Robert Schmidt's avatar Robert Schmidt

RLF handled after SRB retx failure

parent 5c119f03
......@@ -2964,14 +2964,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;
}
......
......@@ -677,7 +677,7 @@ static void _nr_rx_sdu(const module_id_t gnb_mod_idP,
if (!get_softmodem_params()->phy_test && UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt >= pusch_failure_thres) {
LOG_W(NR_MAC,"Detected UL Failure on PUSCH after %d PUSCH DTX, stopping scheduling\n",
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 abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid);
void nr_mac_trigger_release_timer(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing);
bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, 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);
......
......@@ -571,6 +571,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;
......@@ -617,15 +618,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