From f934f4c4918cf75979bc0743294baf938370656d Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 1 Aug 2023 15:07:37 +0200 Subject: [PATCH] RRC processing frame instead of slot for timers --- executables/nr-ue.c | 3 ++- openair2/COMMON/rrc_messages_def.h | 2 +- openair2/COMMON/rrc_messages_types.h | 7 +++---- openair2/RRC/NR_UE/rrc_UE.c | 20 ++++++++++---------- openair2/RRC/NR_UE/rrc_proto.h | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 40a3d16753..33a9fb1d60 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -928,7 +928,8 @@ void *UE_thread(void *arg) timing_advance = UE->timing_advance; } - nr_ue_rrc_timer_trigger(UE->Mod_id, curMsg.proc.frame_tx, curMsg.proc.nr_slot_tx, curMsg.proc.gNB_id); + if (curMsg.proc.nr_slot_tx == 0) + nr_ue_rrc_timer_trigger(UE->Mod_id, curMsg.proc.frame_tx, curMsg.proc.gNB_id); // Start TX slot processing here. It runs in parallel with RX slot processing notifiedFIFO_elt_t *newElt = newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), curMsg.proc.nr_slot_tx, &txFifo, processSlotTX); diff --git a/openair2/COMMON/rrc_messages_def.h b/openair2/COMMON/rrc_messages_def.h index 12e6269da0..19a339db7c 100644 --- a/openair2/COMMON/rrc_messages_def.h +++ b/openair2/COMMON/rrc_messages_def.h @@ -79,7 +79,7 @@ MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, NasDlDataInd // eNB: realtime -> RRC messages MESSAGE_DEF(RRC_SUBFRAME_PROCESS, MESSAGE_PRIORITY_MED, RrcSubframeProcess, rrc_subframe_process) -MESSAGE_DEF(NRRRC_SLOT_PROCESS, MESSAGE_PRIORITY_MED, NRRrcSlotProcess, nr_rrc_slot_process) +MESSAGE_DEF(NRRRC_FRAME_PROCESS, MESSAGE_PRIORITY_MED, NRRrcFrameProcess, nr_rrc_frame_process) // eNB: RLC -> RRC messages MESSAGE_DEF(RLC_SDU_INDICATION, MESSAGE_PRIORITY_MED, RlcSduIndication, rlc_sdu_indication) diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 4914dd9068..6a29ee1ae7 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -88,7 +88,7 @@ #define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind #define RRC_SUBFRAME_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.rrc_subframe_process -#define NRRRC_SLOT_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_slot_process +#define NRRRC_FRAME_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_frame_process #define RLC_SDU_INDICATION(mSGpTR) (mSGpTR)->ittiMsg.rlc_sdu_indication #define NRDuDlReq(mSGpTR) (mSGpTR)->ittiMsg.nr_du_dl_req @@ -464,11 +464,10 @@ typedef struct rrc_subframe_process_s { int CC_id; } RrcSubframeProcess; -typedef struct nrrrc_slot_process_s { +typedef struct nrrrc_frame_process_s { int frame; - int slot; int gnb_id; -} NRRrcSlotProcess; +} NRRrcFrameProcess; // eNB: RLC -> RRC messages typedef struct rlc_sdu_indication_s { diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 892c48a734..cf5a205cfb 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2029,12 +2029,13 @@ void *rrc_nrue_task(void *args_p) handle_rlf_sync(tac, sync_msg); break; - case NRRRC_SLOT_PROCESS: - LOG_D(NR_RRC, "[UE %d] Received %s: frame %d slot %d\n", - ue_mod_id, ITTI_MSG_NAME (msg_p), NRRRC_SLOT_PROCESS (msg_p).frame, NRRRC_SLOT_PROCESS (msg_p).slot); + case NRRRC_FRAME_PROCESS: + LOG_D(NR_RRC, "[UE %d] Received %s: frame %d\n", + ue_mod_id, ITTI_MSG_NAME (msg_p), NRRRC_FRAME_PROCESS (msg_p).frame); + // increase the timers every 10ms (every new frame) NR_UE_Timers_Constants_t *timers = &NR_UE_rrc_inst[ue_mod_id].timers_and_constants; nr_rrc_handle_timers(timers); - NR_UE_RRC_SI_INFO *SInfo = &NR_UE_rrc_inst[ue_mod_id].SInfo[NRRRC_SLOT_PROCESS (msg_p).gnb_id]; + NR_UE_RRC_SI_INFO *SInfo = &NR_UE_rrc_inst[ue_mod_id].SInfo[NRRRC_FRAME_PROCESS (msg_p).gnb_id]; nr_rrc_SI_timers(SInfo); break; @@ -2528,13 +2529,12 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len) } } -void nr_ue_rrc_timer_trigger(int module_id, int frame, int slot, int gnb_id) +void nr_ue_rrc_timer_trigger(int module_id, int frame, int gnb_id) { MessageDef *message_p; - message_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NRRRC_SLOT_PROCESS); - NRRRC_SLOT_PROCESS(message_p).frame = frame; - NRRRC_SLOT_PROCESS(message_p).slot = slot; - NRRRC_SLOT_PROCESS(message_p).gnb_id = gnb_id; - LOG_D(NR_RRC, "RRC timer trigger: frame %d slot %d \n", frame, slot); + message_p = itti_alloc_new_message(TASK_RRC_NRUE, 0, NRRRC_FRAME_PROCESS); + NRRRC_FRAME_PROCESS(message_p).frame = frame; + NRRRC_FRAME_PROCESS(message_p).gnb_id = gnb_id; + LOG_D(NR_RRC, "RRC timer trigger: frame %d\n", frame); itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(module_id), message_p); } diff --git a/openair2/RRC/NR_UE/rrc_proto.h b/openair2/RRC/NR_UE/rrc_proto.h index d4bfe0e52d..55e025e0f1 100644 --- a/openair2/RRC/NR_UE/rrc_proto.h +++ b/openair2/RRC/NR_UE/rrc_proto.h @@ -161,7 +161,7 @@ int get_from_lte_ue_fd(); void nr_rrc_SI_timers(NR_UE_RRC_SI_INFO *SInfo); -void nr_ue_rrc_timer_trigger(int module_id, int frame, int slot, int gnb_id); +void nr_ue_rrc_timer_trigger(int module_id, int frame, int gnb_id); void configure_spcell(NR_UE_RRC_INST_t *rrc, NR_SpCellConfig_t *spcell_config); void reset_rlf_timers_and_constants(NR_UE_Timers_Constants_t *tac);