Commit 4510041a authored by luis_pereira87's avatar luis_pereira87

Fix RRC processing time to match RRC ticks (at 1 ms) and add implementation...

Fix RRC processing time to match RRC ticks (at 1 ms) and add implementation for RRCSetup processing time
parent daf3fb0e
...@@ -203,4 +203,6 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP, ...@@ -203,4 +203,6 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
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
...@@ -1942,6 +1942,11 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram ...@@ -1942,6 +1942,11 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
LOG_A(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti); LOG_A(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti);
UE_info->active[UE_id] = true; UE_info->active[UE_id] = true;
UE_info->Msg4_ACKed[UE_id] = true; UE_info->Msg4_ACKed[UE_id] = true;
// Pause scheduling according to:
// 3GPP TS 38.331 Section 12 Table 12.1-1: UE performance requirements for RRC procedures for UEs
sched_ctrl->schedule_enabled = false;
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);
......
...@@ -391,4 +391,15 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP, ...@@ -391,4 +391,15 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP,
} else { } else {
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;
ue_context_p->ue_context.nr_rrc_processing_delay = NR_RRC_PROCESSING_DELAY_MS;
} else {
LOG_D(RRC,"%s: Unknown RNTI 0x%04x\n", __FUNCTION__, rntiP);
}
} }
\ No newline at end of file
...@@ -96,6 +96,9 @@ typedef struct nr_uid_linear_allocator_s { ...@@ -96,6 +96,9 @@ 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
......
...@@ -142,10 +142,9 @@ void openair_nr_rrc_on(const protocol_ctxt_t *const ctxt_pP) { ...@@ -142,10 +142,9 @@ void openair_nr_rrc_on(const protocol_ctxt_t *const ctxt_pP) {
void enable_nr_rrc_processing_timer(module_id_t module_id, void enable_nr_rrc_processing_timer(module_id_t module_id,
rrc_gNB_ue_context_t *ue_context_pP, rrc_gNB_ue_context_t *ue_context_pP,
NR_SubcarrierSpacing_t subcarrierSpacing,
uint32_t delay_ms) { uint32_t delay_ms) {
ue_context_pP->ue_context.nr_rrc_processing_timer = 1; ue_context_pP->ue_context.nr_rrc_processing_timer = 1;
ue_context_pP->ue_context.nr_rrc_processing_delay = delay_ms << subcarrierSpacing; 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); nr_rrc_mac_schedule_ue_enabled(module_id, ue_context_pP->ue_context.rnti, false);
} }
...@@ -353,11 +352,6 @@ rrc_gNB_generate_RRCSetup( ...@@ -353,11 +352,6 @@ rrc_gNB_generate_RRCSetup(
masterCellGroup_from_DU, masterCellGroup_from_DU,
scc,&rrc->carrier); scc,&rrc->carrier);
enable_nr_rrc_processing_timer(ctxt_pP->module_id,
ue_context_pP,
rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
NR_RRC_PROCESSING_DELAY_MS);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, LOG_DUMPMSG(NR_RRC, DEBUG_RRC,
(char *)(ue_p->Srb0.Tx_buffer.Payload), (char *)(ue_p->Srb0.Tx_buffer.Payload),
ue_p->Srb0.Tx_buffer.payload_size, ue_p->Srb0.Tx_buffer.payload_size,
...@@ -468,11 +462,6 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest( ...@@ -468,11 +462,6 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
NULL, NULL,
scc,&rrc_instance_p->carrier); scc,&rrc_instance_p->carrier);
enable_nr_rrc_processing_timer(ctxt_pP->module_id,
ue_context_pP,
rrc_instance_p->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
NR_RRC_PROCESSING_DELAY_MS);
LOG_DUMPMSG(NR_RRC, DEBUG_RRC, LOG_DUMPMSG(NR_RRC, DEBUG_RRC,
(char *)(ue_p->Srb0.Tx_buffer.Payload), (char *)(ue_p->Srb0.Tx_buffer.Payload),
ue_p->Srb0.Tx_buffer.payload_size, ue_p->Srb0.Tx_buffer.payload_size,
...@@ -743,10 +732,7 @@ rrc_gNB_generate_defaultRRCReconfiguration( ...@@ -743,10 +732,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
NULL, NULL,
ue_p->masterCellGroup); ue_p->masterCellGroup);
enable_nr_rrc_processing_timer(ctxt_pP->module_id, enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS);
ue_context_pP,
rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
NR_RRC_PROCESSING_DELAY_MS);
free(ue_context_pP->ue_context.nas_pdu.buffer); free(ue_context_pP->ue_context.nas_pdu.buffer);
...@@ -1011,10 +997,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( ...@@ -1011,10 +997,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
NULL, NULL,
cellGroupConfig); cellGroupConfig);
enable_nr_rrc_processing_timer(ctxt_pP->module_id, enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS);
ue_context_pP,
rrc->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
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");
...@@ -1189,10 +1172,7 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( ...@@ -1189,10 +1172,7 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
NULL, NULL,
NULL); NULL);
enable_nr_rrc_processing_timer(ctxt_pP->module_id, enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS);
ue_context_pP,
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
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");
...@@ -1295,10 +1275,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( ...@@ -1295,10 +1275,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
NULL, NULL,
NULL); NULL);
enable_nr_rrc_processing_timer(ctxt_pP->module_id, enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS);
ue_context_pP,
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
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;
...@@ -1850,10 +1827,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete( ...@@ -1850,10 +1827,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
NULL, NULL,
NULL); NULL);
enable_nr_rrc_processing_timer(ctxt_pP->module_id, enable_nr_rrc_processing_timer(ctxt_pP->module_id, ue_context_pP, TX_SL_AHEAD_DELAY + NR_RRC_PROCESSING_DELAY_MS);
ue_context_pP,
RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
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");
...@@ -3475,7 +3449,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { ...@@ -3475,7 +3449,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
if (ue_context_p->ue_context.nr_rrc_processing_timer > 0) { if (ue_context_p->ue_context.nr_rrc_processing_timer > 0) {
ue_context_p->ue_context.nr_rrc_processing_timer++; 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) { 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; 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); nr_rrc_mac_schedule_ue_enabled(ctxt_pP->module_id, ue_context_p->ue_context.rnti, true);
} }
......
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