Merge branch 'NR_RRC_processing_timer' into Dedicated-BWPs
# Conflicts: # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c # openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c # openair2/RRC/NR/L2_nr_interface.c # openair2/RRC/NR/rrc_gNB.c # targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf # targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
This commit is contained in:
@@ -827,9 +827,9 @@ int main(int argc, char **argv)
|
|||||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||||
|
|
||||||
// common configuration
|
// common configuration
|
||||||
rrc_mac_config_req_gNB(0,0, pdsch_AntennaPorts, n_tx, 0, 6, scc, NULL, NULL, 0, 0, NULL);
|
rrc_mac_config_req_gNB(0,0, pdsch_AntennaPorts, n_tx, 0, 6, scc, NULL, NULL, 0, 0, NULL, 0);
|
||||||
// UE dedicated configuration
|
// UE dedicated configuration
|
||||||
rrc_mac_config_req_gNB(0,0, pdsch_AntennaPorts, n_tx, 0, 6, scc, NULL, NULL, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
rrc_mac_config_req_gNB(0,0, pdsch_AntennaPorts, n_tx, 0, 6, scc, NULL, NULL, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup, 0);
|
||||||
// reset preprocessor to the one of DLSIM after it has been set during
|
// reset preprocessor to the one of DLSIM after it has been set during
|
||||||
// rrc_mac_config_req_gNB
|
// rrc_mac_config_req_gNB
|
||||||
gNB_mac->pre_processor_dl = nr_dlsim_preprocessor;
|
gNB_mac->pre_processor_dl = nr_dlsim_preprocessor;
|
||||||
|
|||||||
@@ -751,9 +751,9 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||||
// common configuration
|
// common configuration
|
||||||
rrc_mac_config_req_gNB(0,0, conf.pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib, rrc.carrier.siblock1, 0, 0, NULL);
|
rrc_mac_config_req_gNB(0,0, conf.pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib, rrc.carrier.siblock1, 0, 0, NULL, 0);
|
||||||
// UE dedicated configuration
|
// UE dedicated configuration
|
||||||
rrc_mac_config_req_gNB(0,0, conf.pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib, rrc.carrier.siblock1, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
rrc_mac_config_req_gNB(0,0, conf.pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib, rrc.carrier.siblock1, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup, 0);
|
||||||
frame_parms->nb_antennas_tx = n_tx;
|
frame_parms->nb_antennas_tx = n_tx;
|
||||||
frame_parms->nb_antennas_rx = n_rx;
|
frame_parms->nb_antennas_rx = n_rx;
|
||||||
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
|
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
|
||||||
|
|||||||
@@ -2114,8 +2114,8 @@ void configure_gnb_du_mac(int inst) {
|
|||||||
NULL,
|
NULL,
|
||||||
0,
|
0,
|
||||||
0, // rnti
|
0, // rnti
|
||||||
(NR_CellGroupConfig_t *)NULL
|
NULL,
|
||||||
);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -203,7 +203,4 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
|
|||||||
const frame_t frameP,
|
const frame_t frameP,
|
||||||
const sub_frame_t subframeP,
|
const sub_frame_t subframeP,
|
||||||
const rnti_t rntiP);
|
const rnti_t rntiP);
|
||||||
|
|
||||||
void nr_mac_gNB_enable_rrc_processing_timer_req(const module_id_t Mod_instP, const rnti_t rntiP);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -449,10 +449,6 @@ void config_common(int Mod_idP, int ssb_SubcarrierOffset, rrc_pdsch_AntennaPorts
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_rrc_mac_schedule_ue_enabled(module_id_t module_id, rnti_t rnti, bool schedule_enabled) {
|
|
||||||
const int UE_id = find_nr_UE_id(module_id,rnti);
|
|
||||||
RC.nrmac[module_id]->UE_info.UE_sched_ctrl[UE_id].schedule_enabled = schedule_enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||||
int ssb_SubcarrierOffset,
|
int ssb_SubcarrierOffset,
|
||||||
@@ -465,7 +461,23 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
|||||||
NR_BCCH_DL_SCH_Message_t *sib1,
|
NR_BCCH_DL_SCH_Message_t *sib1,
|
||||||
int add_ue,
|
int add_ue,
|
||||||
uint32_t rnti,
|
uint32_t rnti,
|
||||||
NR_CellGroupConfig_t *CellGroup) {
|
NR_CellGroupConfig_t *CellGroup,
|
||||||
|
uint32_t rrc_reconfiguration_delay) {
|
||||||
|
|
||||||
|
if (scc && rrc_reconfiguration_delay > 0) {
|
||||||
|
const int UE_id = find_nr_UE_id(Mod_idP,rnti);
|
||||||
|
if (UE_id >= 0) {
|
||||||
|
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
|
||||||
|
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||||
|
if (sched_ctrl->rrc_processing_timer == 0) {
|
||||||
|
const uint16_t sf_ahead = (uint16_t) ceil((float)6/(0x01<<(*scc->ssbSubcarrierSpacing)));
|
||||||
|
const uint16_t sl_ahead = sf_ahead * (0x01<<(*scc->ssbSubcarrierSpacing));
|
||||||
|
sched_ctrl->rrc_processing_timer = (rrc_reconfiguration_delay << (*scc->ssbSubcarrierSpacing)) + sl_ahead;
|
||||||
|
LOG_I(NR_MAC, "Activating RRC processing timer for UE %d\n", UE_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (scc != NULL ) {
|
if (scc != NULL ) {
|
||||||
AssertFatal((scc->ssb_PositionsInBurst->present > 0) && (scc->ssb_PositionsInBurst->present < 4), "SSB Bitmap type %d is not valid\n",scc->ssb_PositionsInBurst->present);
|
AssertFatal((scc->ssb_PositionsInBurst->present > 0) && (scc->ssb_PositionsInBurst->present < 4), "SSB Bitmap type %d is not valid\n",scc->ssb_PositionsInBurst->present);
|
||||||
@@ -695,6 +707,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
|||||||
sched_ctrl->maxL = 2;
|
sched_ctrl->maxL = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -346,8 +346,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
|||||||
LOG_I(NR_MAC,"Frame.Slot %d.%d\n%s\n",frame,slot,stats_output);
|
LOG_I(NR_MAC,"Frame.Slot %d.%d\n%s\n",frame,slot,stats_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This schedules the BWP switching
|
// This updates the timers running at MAC layer
|
||||||
schedule_nr_bwp_switch(module_idP, frame, slot);
|
nr_mac_update_timers(module_idP, frame, slot);
|
||||||
|
|
||||||
// This schedules MIB
|
// This schedules MIB
|
||||||
schedule_nr_mib(module_idP, frame, slot);
|
schedule_nr_mib(module_idP, frame, slot);
|
||||||
|
|||||||
@@ -1988,9 +1988,12 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pause scheduling according to:
|
// Pause scheduling according to:
|
||||||
|
const NR_SIB1_t *sib1 = RC.nrmac[module_id]->common_channels[0].sib1 ? RC.nrmac[module_id]->common_channels[0].sib1->message.choice.c1->choice.systemInformationBlockType1 : NULL;
|
||||||
|
NR_BWP_t *genericParameters = get_dl_bwp_genericParameters(sched_ctrl->active_bwp,
|
||||||
|
RC.nrmac[module_id]->common_channels[0].ServingCellConfigCommon,
|
||||||
|
sib1);
|
||||||
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
|
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
|
||||||
sched_ctrl->schedule_enabled = false;
|
sched_ctrl->rrc_processing_timer = (10 << genericParameters->subcarrierSpacing); // RRCSetup 10 ms
|
||||||
nr_mac_gNB_enable_rrc_processing_timer_req(module_id, ra->rnti);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) RA Procedure failed at Msg4!\n", UE_id, ra->rnti);
|
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) RA Procedure failed at Msg4!\n", UE_id, ra->rnti);
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
|
|||||||
const uint16_t rnti = UE_info->rnti[UE_id];
|
const uint16_t rnti = UE_info->rnti[UE_id];
|
||||||
LOG_D(NR_MAC, "In %s: UE %d/%x: LCID %d\n", __FUNCTION__, UE_id, rnti, lcid);
|
LOG_D(NR_MAC, "In %s: UE %d/%x: LCID %d\n", __FUNCTION__, UE_id, rnti, lcid);
|
||||||
|
|
||||||
if(lcid == DL_SCH_LCID_DTCH && sched_ctrl->schedule_enabled == false) {
|
if (lcid == DL_SCH_LCID_DTCH && sched_ctrl->rrc_processing_timer > 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,7 +498,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
|
|||||||
sched_ctrl->rlc_status[lcid] = mac_rlc_status_ind(module_id,
|
sched_ctrl->rlc_status[lcid] = mac_rlc_status_ind(module_id,
|
||||||
rnti,
|
rnti,
|
||||||
module_id,
|
module_id,
|
||||||
frame,
|
frame,
|
||||||
slot,
|
slot,
|
||||||
ENB_FLAG_YES,
|
ENB_FLAG_YES,
|
||||||
MBMS_FLAG_NO,
|
MBMS_FLAG_NO,
|
||||||
@@ -1056,6 +1056,22 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id)
|
|||||||
return nr_fr1_dlsch_preprocessor;
|
return nr_fr1_dlsch_preprocessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nr_mac_update_timers(module_id_t module_id,
|
||||||
|
frame_t frame,
|
||||||
|
sub_frame_t slot) {
|
||||||
|
NR_UE_info_t *UE_info = &RC.nrmac[module_id]->UE_info;
|
||||||
|
const NR_list_t *UE_list = &UE_info->list;
|
||||||
|
for (int UE_id = UE_list->head; UE_id >= 0; UE_id = UE_list->next[UE_id]) {
|
||||||
|
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||||
|
if (sched_ctrl->rrc_processing_timer > 0) {
|
||||||
|
sched_ctrl->rrc_processing_timer--;
|
||||||
|
if (sched_ctrl->rrc_processing_timer == 0) {
|
||||||
|
LOG_I(NR_MAC, "(%d.%d) De-activating RRC processing timer for UE %d\n", frame, slot, UE_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void nr_schedule_ue_spec(module_id_t module_id,
|
void nr_schedule_ue_spec(module_id_t module_id,
|
||||||
frame_t frame,
|
frame_t frame,
|
||||||
sub_frame_t slot) {
|
sub_frame_t slot) {
|
||||||
|
|||||||
@@ -2312,7 +2312,6 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
|
|||||||
sched_ctrl->pucch_consecutive_dtx_cnt = 0;
|
sched_ctrl->pucch_consecutive_dtx_cnt = 0;
|
||||||
sched_ctrl->pusch_consecutive_dtx_cnt = 0;
|
sched_ctrl->pusch_consecutive_dtx_cnt = 0;
|
||||||
sched_ctrl->ul_failure = 0;
|
sched_ctrl->ul_failure = 0;
|
||||||
sched_ctrl->schedule_enabled = true;
|
|
||||||
|
|
||||||
sched_ctrl->sched_srs.frame = -1;
|
sched_ctrl->sched_srs.frame = -1;
|
||||||
sched_ctrl->sched_srs.slot = -1;
|
sched_ctrl->sched_srs.slot = -1;
|
||||||
|
|||||||
@@ -1252,7 +1252,7 @@ void pf_ul(module_id_t module_id,
|
|||||||
const bool do_sched = nr_UE_is_to_be_scheduled(module_id, 0, UE_id, sched_pusch->frame, sched_pusch->slot);
|
const bool do_sched = nr_UE_is_to_be_scheduled(module_id, 0, UE_id, sched_pusch->frame, sched_pusch->slot);
|
||||||
|
|
||||||
LOG_D(NR_MAC,"pf_ul: do_sched UE %d => %s\n",UE_id,do_sched ? "yes" : "no");
|
LOG_D(NR_MAC,"pf_ul: do_sched UE %d => %s\n",UE_id,do_sched ? "yes" : "no");
|
||||||
if ( (B == 0 && !do_sched) || (sched_ctrl->schedule_enabled == false) ) {
|
if ((B == 0 && !do_sched) || (sched_ctrl->rrc_processing_timer > 0)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ void config_common(int Mod_idP,
|
|||||||
int pusch_AntennaPorts,
|
int pusch_AntennaPorts,
|
||||||
NR_ServingCellConfigCommon_t *scc);
|
NR_ServingCellConfigCommon_t *scc);
|
||||||
|
|
||||||
void nr_rrc_mac_schedule_ue_enabled(module_id_t module_id, rnti_t rnti, bool schedule_enabled);
|
|
||||||
|
|
||||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||||
int ssb_SubcarrierOffset,
|
int ssb_SubcarrierOffset,
|
||||||
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts,
|
rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts,
|
||||||
@@ -59,13 +57,18 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
|||||||
NR_BCCH_DL_SCH_Message_t *sib1,
|
NR_BCCH_DL_SCH_Message_t *sib1,
|
||||||
int add_ue,
|
int add_ue,
|
||||||
uint32_t rnti,
|
uint32_t rnti,
|
||||||
NR_CellGroupConfig_t *CellGroup);
|
NR_CellGroupConfig_t *CellGroup,
|
||||||
|
uint32_t rrc_reconfiguration_delay);
|
||||||
|
|
||||||
void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
void clear_nr_nfapi_information(gNB_MAC_INST * gNB,
|
||||||
int CC_idP,
|
int CC_idP,
|
||||||
frame_t frameP,
|
frame_t frameP,
|
||||||
sub_frame_t subframeP);
|
sub_frame_t subframeP);
|
||||||
|
|
||||||
|
void nr_mac_update_timers(module_id_t module_id,
|
||||||
|
frame_t frame,
|
||||||
|
sub_frame_t slot);
|
||||||
|
|
||||||
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||||
frame_t frame_rxP, sub_frame_t slot_rxP);
|
frame_t frame_rxP, sub_frame_t slot_rxP);
|
||||||
|
|
||||||
|
|||||||
@@ -667,12 +667,13 @@ typedef struct {
|
|||||||
/// UL HARQ processes that await retransmission
|
/// UL HARQ processes that await retransmission
|
||||||
NR_list_t retrans_ul_harq;
|
NR_list_t retrans_ul_harq;
|
||||||
NR_UE_mac_ce_ctrl_t UE_mac_ce_ctrl;// MAC CE related information
|
NR_UE_mac_ce_ctrl_t UE_mac_ce_ctrl;// MAC CE related information
|
||||||
/// Flag to indicate if MAC scheduling is enabled or disabled by RRC (e.g. during RRC processing time)
|
|
||||||
bool schedule_enabled;
|
|
||||||
/// number of active DL LCs
|
/// number of active DL LCs
|
||||||
uint8_t dl_lc_num;
|
uint8_t dl_lc_num;
|
||||||
/// order in which DLSCH scheduler should allocate LCs
|
/// order in which DLSCH scheduler should allocate LCs
|
||||||
uint8_t dl_lc_ids[NR_MAX_NUM_LCID];
|
uint8_t dl_lc_ids[NR_MAX_NUM_LCID];
|
||||||
|
|
||||||
|
/// Timer for RRC processing procedures
|
||||||
|
uint32_t rrc_processing_timer;
|
||||||
} NR_UE_sched_ctrl_t;
|
} NR_UE_sched_ctrl_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -408,20 +408,3 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
|
|||||||
LOG_W(RRC,"Frame %d, Subframe %d: UL failure reset: UE %x unknown \n",frameP,subframeP,rntiP);
|
LOG_W(RRC,"Frame %d, Subframe %d: UL failure reset: UE %x unknown \n",frameP,subframeP,rntiP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_mac_gNB_enable_rrc_processing_timer_req(const module_id_t Mod_instP, const rnti_t rntiP) {
|
|
||||||
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
|
|
||||||
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[Mod_instP], rntiP);
|
|
||||||
if (ue_context_p != NULL) {
|
|
||||||
ue_context_p->ue_context.nr_rrc_processing_timer = 1;
|
|
||||||
uint32_t delay_ms = NR_RRC_PROCESSING_DELAY_MS;
|
|
||||||
if (ue_context_p->ue_context.masterCellGroup &&
|
|
||||||
ue_context_p->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated &&
|
|
||||||
ue_context_p->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList) {
|
|
||||||
delay_ms += NR_RRC_BWP_SWITCH_DELAY_MS;
|
|
||||||
}
|
|
||||||
ue_context_p->ue_context.nr_rrc_processing_delay = delay_ms;
|
|
||||||
} else {
|
|
||||||
LOG_E(NR_RRC,"%s: Unknown RNTI 0x%04x\n", __FUNCTION__, rntiP);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -96,9 +96,6 @@ typedef struct nr_uid_linear_allocator_s {
|
|||||||
#define PROTOCOL_NR_RRC_CTXT_FMT PROTOCOL_CTXT_FMT
|
#define PROTOCOL_NR_RRC_CTXT_FMT PROTOCOL_CTXT_FMT
|
||||||
#define PROTOCOL_NR_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_NR_CTXT_ARGS(CTXT_Pp)
|
#define PROTOCOL_NR_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_NR_CTXT_ARGS(CTXT_Pp)
|
||||||
|
|
||||||
// Delay to take in consideration for sl_ahead value
|
|
||||||
#define TX_SL_AHEAD_DELAY 3
|
|
||||||
|
|
||||||
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
|
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
|
||||||
#define NR_RRC_PROCESSING_DELAY_MS 10
|
#define NR_RRC_PROCESSING_DELAY_MS 10
|
||||||
#define NR_RRC_BWP_SWITCH_DELAY_MS 6
|
#define NR_RRC_BWP_SWITCH_DELAY_MS 6
|
||||||
@@ -380,8 +377,6 @@ typedef struct gNB_RRC_UE_s {
|
|||||||
//GTPV1 F1-U TUNNELS
|
//GTPV1 F1-U TUNNELS
|
||||||
uint32_t incoming_teid[S1AP_MAX_E_RAB];
|
uint32_t incoming_teid[S1AP_MAX_E_RAB];
|
||||||
|
|
||||||
uint32_t nr_rrc_processing_timer;
|
|
||||||
uint32_t nr_rrc_processing_delay;
|
|
||||||
uint32_t ul_failure_timer;
|
uint32_t ul_failure_timer;
|
||||||
uint32_t ue_release_timer;
|
uint32_t ue_release_timer;
|
||||||
uint32_t ue_release_timer_thres;
|
uint32_t ue_release_timer_thres;
|
||||||
|
|||||||
+78
-49
@@ -140,16 +140,6 @@ void openair_nr_rrc_on(const protocol_ctxt_t *const ctxt_pP) {
|
|||||||
RC.nrrrc[ctxt_pP->module_id]->carrier.Srb0.Active = 1;
|
RC.nrrrc[ctxt_pP->module_id]->carrier.Srb0.Active = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void enable_nr_rrc_processing_timer(module_id_t module_id,
|
|
||||||
rrc_gNB_ue_context_t *ue_context_pP,
|
|
||||||
uint32_t delay_ms) {
|
|
||||||
if (NODE_IS_DU(RC.nrrrc[module_id]->node_type) || NODE_IS_MONOLITHIC(RC.nrrrc[module_id]->node_type)) {
|
|
||||||
ue_context_pP->ue_context.nr_rrc_processing_timer = 1;
|
|
||||||
ue_context_pP->ue_context.nr_rrc_processing_delay = delay_ms;
|
|
||||||
nr_rrc_mac_schedule_ue_enabled(module_id, ue_context_pP->ue_context.rnti, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
///---------------------------------------------------------------------------------------------------------------///
|
///---------------------------------------------------------------------------------------------------------------///
|
||||||
///---------------------------------------------------------------------------------------------------------------///
|
///---------------------------------------------------------------------------------------------------------------///
|
||||||
|
|
||||||
@@ -186,7 +176,8 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
|
|||||||
rrc->carrier.siblock1,
|
rrc->carrier.siblock1,
|
||||||
0,
|
0,
|
||||||
0, // WIP hardcoded rnti
|
0, // WIP hardcoded rnti
|
||||||
NULL);
|
NULL,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set flag to indicate that cell information is configured. This is required
|
/* set flag to indicate that cell information is configured. This is required
|
||||||
@@ -296,7 +287,8 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
|
|||||||
NULL,
|
NULL,
|
||||||
0,
|
0,
|
||||||
ue_context_pP->ue_context.rnti,
|
ue_context_pP->ue_context.rnti,
|
||||||
cgc);
|
cgc,
|
||||||
|
0);
|
||||||
|
|
||||||
nr_rrc_rlc_config_asn1_req(ctxt_pP,
|
nr_rrc_rlc_config_asn1_req(ctxt_pP,
|
||||||
ue_context_pP->ue_context.SRB_configList,
|
ue_context_pP->ue_context.SRB_configList,
|
||||||
@@ -492,7 +484,8 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
|
|||||||
rrc_instance_p->carrier.siblock1,
|
rrc_instance_p->carrier.siblock1,
|
||||||
0,
|
0,
|
||||||
ue_context_pP->ue_context.rnti,
|
ue_context_pP->ue_context.rnti,
|
||||||
NULL);
|
NULL,
|
||||||
|
0);
|
||||||
|
|
||||||
LOG_I(NR_RRC,
|
LOG_I(NR_RRC,
|
||||||
PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)\n",
|
PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)\n",
|
||||||
@@ -744,19 +737,24 @@ rrc_gNB_generate_defaultRRCReconfiguration(
|
|||||||
NULL,
|
NULL,
|
||||||
ue_p->masterCellGroup);
|
ue_p->masterCellGroup);
|
||||||
|
|
||||||
uint32_t delay_ms = TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS;
|
|
||||||
if (ue_p->masterCellGroup &&
|
|
||||||
ue_p->masterCellGroup->spCellConfig &&
|
|
||||||
ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated &&
|
|
||||||
ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList) {
|
|
||||||
delay_ms += NR_RRC_BWP_SWITCH_DELAY_MS;
|
|
||||||
}
|
|
||||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, delay_ms);
|
|
||||||
|
|
||||||
free(ue_context_pP->ue_context.nas_pdu.buffer);
|
free(ue_context_pP->ue_context.nas_pdu.buffer);
|
||||||
|
|
||||||
LOG_DUMPMSG(NR_RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Reconfiguration\n");
|
LOG_DUMPMSG(NR_RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Reconfiguration\n");
|
||||||
|
|
||||||
|
rrc_mac_config_req_gNB(ctxt_pP->module_id,
|
||||||
|
0,
|
||||||
|
rrc->configuration.pdsch_AntennaPorts,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
rrc->carrier.servingcellconfigcommon,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
ue_context_pP->ue_context.rnti,
|
||||||
|
NULL,
|
||||||
|
NR_RRC_PROCESSING_DELAY_MS);
|
||||||
|
|
||||||
/* Free all NAS PDUs */
|
/* Free all NAS PDUs */
|
||||||
for (int i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
for (int i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
||||||
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
||||||
@@ -1021,17 +1019,21 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
|
|||||||
&rrc->configuration,
|
&rrc->configuration,
|
||||||
NULL,
|
NULL,
|
||||||
cellGroupConfig);
|
cellGroupConfig);
|
||||||
|
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Reconfiguration\n");
|
||||||
|
|
||||||
uint32_t delay_ms = TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS;
|
rrc_mac_config_req_gNB(ctxt_pP->module_id,
|
||||||
if (cellGroupConfig &&
|
0,
|
||||||
cellGroupConfig->spCellConfig &&
|
rrc->configuration.pdsch_AntennaPorts,
|
||||||
cellGroupConfig->spCellConfig->spCellConfigDedicated &&
|
0,
|
||||||
cellGroupConfig->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList) {
|
0,
|
||||||
delay_ms += NR_RRC_BWP_SWITCH_DELAY_MS;
|
0,
|
||||||
}
|
rrc->carrier.servingcellconfigcommon,
|
||||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, delay_ms);
|
NULL,
|
||||||
|
NULL,
|
||||||
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
|
0,
|
||||||
|
ue_context_pP->ue_context.rnti,
|
||||||
|
NULL,
|
||||||
|
NR_RRC_PROCESSING_DELAY_MS);
|
||||||
|
|
||||||
/* Free all NAS PDUs */
|
/* Free all NAS PDUs */
|
||||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
||||||
@@ -1204,11 +1206,22 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS);
|
|
||||||
|
|
||||||
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n");
|
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n");
|
||||||
|
|
||||||
|
rrc_mac_config_req_gNB(ctxt_pP->module_id,
|
||||||
|
0,
|
||||||
|
RC.nrrrc[ctxt_pP->module_id]->configuration.pdsch_AntennaPorts,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
ue_context_pP->ue_context.rnti,
|
||||||
|
NULL,
|
||||||
|
NR_RRC_PROCESSING_DELAY_MS);
|
||||||
|
|
||||||
/* Free all NAS PDUs */
|
/* Free all NAS PDUs */
|
||||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) {
|
for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) {
|
||||||
if (ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer != NULL) {
|
if (ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer != NULL) {
|
||||||
@@ -1309,12 +1322,24 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
|
|||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS);
|
|
||||||
|
|
||||||
ue_context_pP->ue_context.pdu_session_release_command_flag = 1;
|
ue_context_pP->ue_context.pdu_session_release_command_flag = 1;
|
||||||
|
|
||||||
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
|
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
|
||||||
|
|
||||||
|
rrc_mac_config_req_gNB(ctxt_pP->module_id,
|
||||||
|
0,
|
||||||
|
RC.nrrrc[ctxt_pP->module_id]->configuration.pdsch_AntennaPorts,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
ue_context_pP->ue_context.rnti,
|
||||||
|
NULL,
|
||||||
|
NR_RRC_PROCESSING_DELAY_MS);
|
||||||
|
|
||||||
/* Free all NAS PDUs */
|
/* Free all NAS PDUs */
|
||||||
if (nas_length > 0) {
|
if (nas_length > 0) {
|
||||||
/* Free the NAS PDU buffer and invalidate it */
|
/* Free the NAS PDU buffer and invalidate it */
|
||||||
@@ -1422,7 +1447,8 @@ rrc_gNB_process_RRCReconfigurationComplete(
|
|||||||
NULL,
|
NULL,
|
||||||
0,
|
0,
|
||||||
ue_context_pP->ue_context.rnti,
|
ue_context_pP->ue_context.rnti,
|
||||||
ue_context_pP->ue_context.masterCellGroup);
|
ue_context_pP->ue_context.masterCellGroup,
|
||||||
|
0);
|
||||||
LOG_D(NR_RRC,"Configuring RLC DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti);
|
LOG_D(NR_RRC,"Configuring RLC DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti);
|
||||||
nr_rrc_rlc_config_asn1_req(ctxt_pP,
|
nr_rrc_rlc_config_asn1_req(ctxt_pP,
|
||||||
SRB_configList, // NULL,
|
SRB_configList, // NULL,
|
||||||
@@ -1863,10 +1889,22 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS);
|
|
||||||
|
|
||||||
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
|
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n");
|
||||||
|
|
||||||
|
rrc_mac_config_req_gNB(ctxt_pP->module_id,
|
||||||
|
0,
|
||||||
|
RC.nrrrc[ctxt_pP->module_id]->configuration.pdsch_AntennaPorts,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
0,
|
||||||
|
ue_context_pP->ue_context.rnti,
|
||||||
|
NULL,
|
||||||
|
NR_RRC_PROCESSING_DELAY_MS);
|
||||||
|
|
||||||
/* Free all NAS PDUs */
|
/* Free all NAS PDUs */
|
||||||
for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) {
|
||||||
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) {
|
||||||
@@ -3525,15 +3563,6 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
|||||||
get_ul_mimo_layers(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr));
|
get_ul_mimo_layers(RC.nrrrc[0],ue_context_p->ue_context.UE_Capability_nr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ue_context_p->ue_context.nr_rrc_processing_timer > 0) {
|
|
||||||
ue_context_p->ue_context.nr_rrc_processing_timer++;
|
|
||||||
if (ue_context_p->ue_context.nr_rrc_processing_timer > ue_context_p->ue_context.nr_rrc_processing_delay) {
|
|
||||||
ue_context_p->ue_context.nr_rrc_processing_timer = 0;
|
|
||||||
nr_rrc_mac_schedule_ue_enabled(ctxt_pP->module_id, ue_context_p->ue_context.rnti, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ue_context_p->ue_context.ul_failure_timer > 0) {
|
if (ue_context_p->ue_context.ul_failure_timer > 0) {
|
||||||
ue_context_p->ue_context.ul_failure_timer++;
|
ue_context_p->ue_context.ul_failure_timer++;
|
||||||
|
|
||||||
|
|||||||
@@ -359,7 +359,8 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
|||||||
NULL,
|
NULL,
|
||||||
1, // add_ue flag
|
1, // add_ue flag
|
||||||
ue_context_p->ue_id_rnti,
|
ue_context_p->ue_id_rnti,
|
||||||
ue_context_p->ue_context.secondaryCellGroup);
|
ue_context_p->ue_context.secondaryCellGroup,
|
||||||
|
0);
|
||||||
} else {
|
} else {
|
||||||
rrc_mac_config_req_gNB(rrc->module_id,
|
rrc_mac_config_req_gNB(rrc->module_id,
|
||||||
rrc->configuration.ssb_SubcarrierOffset,
|
rrc->configuration.ssb_SubcarrierOffset,
|
||||||
@@ -372,7 +373,8 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
|||||||
NULL,
|
NULL,
|
||||||
1, // add_ue flag
|
1, // add_ue flag
|
||||||
ue_context_p->ue_id_rnti,
|
ue_context_p->ue_id_rnti,
|
||||||
ue_context_p->ue_context.secondaryCellGroup);
|
ue_context_p->ue_context.secondaryCellGroup,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m == NULL){
|
if(m == NULL){
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ gNBs =
|
|||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
pusch_AntennaPorts = 1;
|
pusch_AntennaPorts = 1;
|
||||||
min_rxtxtime = 6;
|
min_rxtxtime = 6;
|
||||||
sib1_tda = 0;
|
|
||||||
|
|
||||||
pdcch_ConfigSIB1 = (
|
pdcch_ConfigSIB1 = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
min_rxtxtime = 6;
|
min_rxtxtime = 6;
|
||||||
sib1_tda = 0;
|
|
||||||
|
|
||||||
pdcch_ConfigSIB1 = (
|
pdcch_ConfigSIB1 = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ gNBs =
|
|||||||
////////// Physical parameters:
|
////////// Physical parameters:
|
||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
sib1_tda = 0;
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
#spCellConfigCommon
|
#spCellConfigCommon
|
||||||
|
|||||||
@@ -34,8 +34,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
min_rxtxtime = 6;
|
min_rxtxtime = 6;
|
||||||
sib1_tda = 0;
|
do_SRS = 1;
|
||||||
do_SRS = 0;
|
|
||||||
|
|
||||||
pdcch_ConfigSIB1 = (
|
pdcch_ConfigSIB1 = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ gNBs =
|
|||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
pusch_AntennaPorts = 1;
|
pusch_AntennaPorts = 1;
|
||||||
min_rxtxtime = 6;
|
min_rxtxtime = 6;
|
||||||
sib1_tda = 0;
|
|
||||||
|
|
||||||
pdcch_ConfigSIB1 = (
|
pdcch_ConfigSIB1 = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,8 +35,7 @@ gNBs =
|
|||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts_N1 = 2;
|
pdsch_AntennaPorts_N1 = 2;
|
||||||
pusch_AntennaPorts = 2;
|
pusch_AntennaPorts = 2;
|
||||||
sib1_tda = 0;
|
do_SRS = 1;
|
||||||
do_SRS = 0;
|
|
||||||
ul_prbblacklist = "51,52,53,54"
|
ul_prbblacklist = "51,52,53,54"
|
||||||
|
|
||||||
pdcch_ConfigSIB1 = (
|
pdcch_ConfigSIB1 = (
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
min_rxtxtime = 6;
|
min_rxtxtime = 6;
|
||||||
sib1_tda = 0;
|
|
||||||
|
|
||||||
pdcch_ConfigSIB1 = (
|
pdcch_ConfigSIB1 = (
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user