From 6c6ce912b1005ee3e638937df5889720096e6584 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Thu, 9 Mar 2023 15:27:46 +0100 Subject: [PATCH] Introduce counters for reestablishment --- openair2/RRC/NR/nr_rrc_defs.h | 3 ++- openair2/RRC/NR/rrc_gNB.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h index bbc0ad07c7..c50bbbbe05 100644 --- a/openair2/RRC/NR/nr_rrc_defs.h +++ b/openair2/RRC/NR/nr_rrc_defs.h @@ -384,7 +384,8 @@ typedef struct gNB_RRC_UE_s { uint8_t established_pdu_sessions_flag; uint32_t ue_rrc_inactivity_timer; int8_t reestablishment_xid; - //------------------------------------------------------------------------------// + uint32_t ue_reestablishment_counter; + uint32_t ue_reconfiguration_after_reestablishment_counter; NR_CellGroupId_t cellGroupId; struct NR_SpCellConfig *spCellConfig; struct NR_CellGroupConfig__sCellToAddModList *sCellconfig; diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index c686bdb81b..ebf6c36bb8 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1246,6 +1246,7 @@ rrc_gNB_process_RRCReconfigurationComplete( for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { nr_reestablish_rnti_map_t *nr_reestablish_rnti_map = &(RC.nrrrc[ctxt_pP->module_id])->nr_reestablish_rnti_map[i]; if (nr_reestablish_rnti_map->ue_id == ctxt_pP->rntiMaybeUEid) { + ue_context_pP->ue_context.ue_reconfiguration_after_reestablishment_counter++; reestablish_ue_id = nr_reestablish_rnti_map[i].c_rnti; LOG_D(NR_RRC, "Removing reestablish_rnti_map[%d] UEid %lx, RNTI %04x\n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti); // clear current C-RNTI from map @@ -2682,6 +2683,8 @@ rrc_gNB_decode_dcch( gNB_MAC_INST *nrmac = RC.nrmac[ctxt_pP->module_id]; // WHAT A BEAUTIFULL RACE CONDITION !!! mac_remove_nr_ue(nrmac, reestablish_rnti); + + ue_context_p->ue_context.ue_reestablishment_counter++; } // ue_context_p->ue_context.ue_release_timer = 0;