Rename primary RRC UE ID gNB_ue_ngap_id to rrc_ue_id
The RRC uses gNB_ue_ngap_id as its primary ID; the following commits will introduce the usage of the (F1) gNB CU UE ID. This commits renames the gNB_ue_ngap_id to rrc_ue_id to better reflect its usage as the RRC's primary UE ID. It will be used as the NGAP and F1 (CU) UE IDs.
This commit is contained in:
@@ -966,7 +966,7 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
|
||||
|
||||
if (ue_context_p) {
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_CU_F1, 0, NGAP_UE_CONTEXT_RELEASE_COMPLETE);
|
||||
NGAP_UE_CONTEXT_RELEASE_COMPLETE(msg).gNB_ue_ngap_id = ue_context_p->ue_context.gNB_ue_ngap_id;
|
||||
NGAP_UE_CONTEXT_RELEASE_COMPLETE(msg).gNB_ue_ngap_id = ue_context_p->ue_context.rrc_ue_id;
|
||||
itti_send_msg_to_task(TASK_NGAP, instance, msg);
|
||||
rrc_gNB_remove_ue_context(RC.nrrrc[instance], ue_context_p);
|
||||
} else {
|
||||
|
||||
@@ -783,7 +783,7 @@ int16_t do_RRCReconfiguration(
|
||||
}
|
||||
|
||||
if(cellGroupConfig!=NULL){
|
||||
update_cellGroupConfig(cellGroupConfig, ue_context_pP->ue_context.gNB_ue_ngap_id, ue_context_pP ? ue_context_pP->ue_context.UE_Capability_nr : NULL, configuration);
|
||||
update_cellGroupConfig(cellGroupConfig, ue_context_pP->ue_context.rrc_ue_id, ue_context_pP ? ue_context_pP->ue_context.UE_Capability_nr : NULL, configuration);
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
|
||||
NULL,
|
||||
|
||||
@@ -283,7 +283,7 @@ typedef struct gNB_RRC_UE_s {
|
||||
/* Information from UE RRCReestablishmentRequest */
|
||||
NR_ReestablishmentCause_t reestablishment_cause;
|
||||
|
||||
uint32_t gNB_ue_ngap_id;
|
||||
uint32_t rrc_ue_id;
|
||||
uint64_t amf_ue_ngap_id;
|
||||
nr_rrc_guami_t ue_guami;
|
||||
|
||||
|
||||
@@ -1321,7 +1321,7 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx
|
||||
|
||||
/* Update RNTI in ue_context */
|
||||
LOG_I(NR_RRC, "RRC Reestablishment - Updating UEid from %04x to %lx\n", ue_p->rnti, ctxt_pP->rntiMaybeUEid);
|
||||
rrc_gNB_update_ue_context_rnti(ctxt_pP->rntiMaybeUEid, RC.nrrrc[ctxt_pP->module_id], ue_p->gNB_ue_ngap_id);
|
||||
rrc_gNB_update_ue_context_rnti(ctxt_pP->rntiMaybeUEid, RC.nrrrc[ctxt_pP->module_id], ue_p->rrc_ue_id);
|
||||
|
||||
gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id];
|
||||
NR_CellGroupConfig_t *cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t));
|
||||
@@ -2295,7 +2295,7 @@ static void rrc_CU_process_ue_context_release_complete(MessageDef *msg_p)
|
||||
|
||||
nr_pdcp_remove_UE(UE->rnti);
|
||||
newGtpuDeleteAllTunnels(instance, UE->rnti);
|
||||
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE(instance, UE->gNB_ue_ngap_id);
|
||||
rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE(instance, UE->rrc_ue_id);
|
||||
LOG_I(NR_RRC, "removed UE %04x \n", UE->rnti);
|
||||
rrc_gNB_remove_ue_context(rrc, ue_context_p);
|
||||
}
|
||||
@@ -2311,7 +2311,7 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, i
|
||||
if (resp->drbs_to_be_setup_length > 0) {
|
||||
e1ap_bearer_setup_req_t req = {0};
|
||||
req.numPDUSessionsMod = UE->nb_of_pdusessions;
|
||||
req.gNB_cu_cp_ue_id = UE->gNB_ue_ngap_id;
|
||||
req.gNB_cu_cp_ue_id = UE->rrc_ue_id;
|
||||
req.rnti = UE->rnti;
|
||||
for (int i = 0; i < req.numPDUSessionsMod; i++) {
|
||||
req.pduSessionMod[i].numDRB2Modify = resp->drbs_to_be_setup_length;
|
||||
|
||||
@@ -182,7 +182,7 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
|
||||
ngap_nas_first_req_t *req = &NGAP_NAS_FIRST_REQ(message_p);
|
||||
memset(req, 0, sizeof(*req));
|
||||
|
||||
req->gNB_ue_ngap_id = UE->gNB_ue_ngap_id;
|
||||
req->gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
|
||||
/* Assume that cause is coded in the same way in RRC and NGap, just check that the value is in NGap range */
|
||||
AssertFatal(UE->establishment_cause < NGAP_RRC_CAUSE_LAST, "Establishment cause invalid (%jd/%d) for gNB %d!", UE->establishment_cause, NGAP_RRC_CAUSE_LAST, ctxt_pP->module_id);
|
||||
@@ -436,7 +436,7 @@ void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(const protocol_ctxt_t *const c
|
||||
ngap_initial_context_setup_resp_t *resp = &NGAP_INITIAL_CONTEXT_SETUP_RESP(msg_p);
|
||||
gNB_RRC_UE_t *UE = &ue_context_pP->ue_context;
|
||||
|
||||
resp->gNB_ue_ngap_id = UE->gNB_ue_ngap_id;
|
||||
resp->gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
|
||||
for (int pdusession = 0; pdusession < UE->nb_of_pdusessions; pdusession++) {
|
||||
rrc_pdu_session_param_t *session = &UE->pduSession[pdusession];
|
||||
@@ -641,7 +641,7 @@ rrc_gNB_send_NGAP_UPLINK_NAS(
|
||||
pdu_length = ulInformationTransfer->criticalExtensions.choice.ulInformationTransfer->dedicatedNAS_Message->size;
|
||||
pdu_buffer = ulInformationTransfer->criticalExtensions.choice.ulInformationTransfer->dedicatedNAS_Message->buf;
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_UPLINK_NAS);
|
||||
NGAP_UPLINK_NAS(msg_p).gNB_ue_ngap_id = UE->gNB_ue_ngap_id;
|
||||
NGAP_UPLINK_NAS(msg_p).gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
NGAP_UPLINK_NAS (msg_p).nas_pdu.length = pdu_length;
|
||||
NGAP_UPLINK_NAS (msg_p).nas_pdu.buffer = pdu_buffer;
|
||||
// extract_imsi(NGAP_UPLINK_NAS (msg_p).nas_pdu.buffer,
|
||||
@@ -668,7 +668,7 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_SETUP_RESP);
|
||||
ngap_pdusession_setup_resp_t *resp = &NGAP_PDUSESSION_SETUP_RESP(msg_p);
|
||||
gNB_RRC_UE_t *UE = &ue_context_pP->ue_context;
|
||||
resp->gNB_ue_ngap_id = UE->gNB_ue_ngap_id;
|
||||
resp->gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
|
||||
for (int pdusession = 0; pdusession < UE->nb_of_pdusessions; pdusession++) {
|
||||
rrc_pdu_session_param_t *session = &UE->pduSession[pdusession];
|
||||
@@ -745,7 +745,7 @@ void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t ins
|
||||
return ;
|
||||
}
|
||||
|
||||
UE->gNB_ue_ngap_id = msg->gNB_ue_ngap_id;
|
||||
UE->rrc_ue_id = msg->gNB_ue_ngap_id;
|
||||
UE->amf_ue_ngap_id = msg->amf_ue_ngap_id;
|
||||
e1ap_bearer_setup_req_t bearer_req = {0};
|
||||
|
||||
@@ -1009,7 +1009,7 @@ rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP(
|
||||
ngap_pdusession_modify_resp_t *resp = &NGAP_PDUSESSION_MODIFY_RESP(msg_p);
|
||||
LOG_I(NR_RRC, "send message NGAP_PDUSESSION_MODIFY_RESP \n");
|
||||
|
||||
resp->gNB_ue_ngap_id = UE->gNB_ue_ngap_id;
|
||||
resp->gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
|
||||
for (int i = 0; i < UE->nb_of_pdusessions; i++) {
|
||||
if (xid != UE->pduSession[i].xid) {
|
||||
@@ -1087,7 +1087,7 @@ void rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ(const module_id_t gnb_mod_idP, con
|
||||
MessageDef *msg = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_REQ);
|
||||
ngap_ue_release_req_t *req = &NGAP_UE_CONTEXT_RELEASE_REQ(msg);
|
||||
memset(req, 0, sizeof(*req));
|
||||
req->gNB_ue_ngap_id = UE->gNB_ue_ngap_id;
|
||||
req->gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
req->cause = causeP;
|
||||
req->cause_value = cause_valueP;
|
||||
for (int i = 0; i < UE->nb_of_pdusessions; i++) {
|
||||
@@ -1202,7 +1202,7 @@ void rrc_gNB_send_NGAP_UE_CAPABILITIES_IND(const protocol_ctxt_t *const ctxt_pP,
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_UE_CAPABILITIES_IND);
|
||||
ngap_ue_cap_info_ind_t *ind = &NGAP_UE_CAPABILITIES_IND(msg_p);
|
||||
memset(ind, 0, sizeof(*ind));
|
||||
ind->gNB_ue_ngap_id = UE->gNB_ue_ngap_id;
|
||||
ind->gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
ind->ue_radio_cap.length = encoded;
|
||||
ind->ue_radio_cap.buffer = buf2;
|
||||
itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p);
|
||||
@@ -1224,7 +1224,7 @@ rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(
|
||||
msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_RELEASE_RESPONSE);
|
||||
ngap_pdusession_release_resp_t *resp = &NGAP_PDUSESSION_RELEASE_RESPONSE(msg_p);
|
||||
memset(resp, 0, sizeof(*resp));
|
||||
resp->gNB_ue_ngap_id = UE->gNB_ue_ngap_id;
|
||||
resp->gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
|
||||
for (int i = 0; i < UE->nb_of_pdusessions; i++) {
|
||||
if (xid == UE->pduSession[i].xid) {
|
||||
@@ -1239,7 +1239,7 @@ rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(
|
||||
|
||||
resp->nb_of_pdusessions_released = pdu_sessions_released;
|
||||
resp->nb_of_pdusessions_failed = 0;
|
||||
LOG_I(NR_RRC, "NGAP PDUSESSION RELEASE RESPONSE: GNB_UE_NGAP_ID %u release_pdu_sessions %d\n", resp->gNB_ue_ngap_id, pdu_sessions_released);
|
||||
LOG_I(NR_RRC, "NGAP PDUSESSION RELEASE RESPONSE: rrc_ue_id %u release_pdu_sessions %d\n", resp->gNB_ue_ngap_id, pdu_sessions_released);
|
||||
itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p);
|
||||
}
|
||||
|
||||
@@ -1266,7 +1266,7 @@ int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(MessageDef *msg_p, instance_
|
||||
gNB_RRC_UE_t *UE = &ue_context_p->ue_context;
|
||||
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0);
|
||||
LOG_I(
|
||||
NR_RRC, "PDU Session Release Command: AMF_UE_NGAP_ID %lu GNB_UE_NGAP_ID %u release_pdusessions %d \n", cmd->amf_ue_ngap_id, gNB_ue_ngap_id, cmd->nb_pdusessions_torelease);
|
||||
NR_RRC, "PDU Session Release Command: AMF_UE_NGAP_ID %lu rrc_ue_id %u release_pdusessions %d \n", cmd->amf_ue_ngap_id, gNB_ue_ngap_id, cmd->nb_pdusessions_torelease);
|
||||
bool found = false;
|
||||
uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt.module_id);
|
||||
UE->xids[xid] = RRC_PDUSESSION_RELEASE;
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
int rrc_gNB_compare_ue_rnti_id(rrc_gNB_ue_context_t *c1_pP, rrc_gNB_ue_context_t *c2_pP)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
if (c1_pP->ue_context.gNB_ue_ngap_id > c2_pP->ue_context.gNB_ue_ngap_id) {
|
||||
if (c1_pP->ue_context.rrc_ue_id > c2_pP->ue_context.rrc_ue_id) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (c1_pP->ue_context.gNB_ue_ngap_id < c2_pP->ue_context.gNB_ue_ngap_id) {
|
||||
if (c1_pP->ue_context.rrc_ue_id < c2_pP->ue_context.rrc_ue_id) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -66,12 +66,12 @@ rrc_gNB_ue_context_t *rrc_gNB_allocate_new_ue_context(gNB_RRC_INST *rrc_instance
|
||||
LOG_E(NR_RRC, "Cannot allocate new ue context\n");
|
||||
return NULL;
|
||||
}
|
||||
new_p->ue_context.gNB_ue_ngap_id = uid_linear_allocator_new(&rrc_instance_pP->uid_allocator) + 1;
|
||||
new_p->ue_context.rrc_ue_id = uid_linear_allocator_new(&rrc_instance_pP->uid_allocator) + 1;
|
||||
|
||||
for(int i = 0; i < NB_RB_MAX; i++)
|
||||
new_p->ue_context.pduSession[i].xid = -1;
|
||||
|
||||
LOG_I(NR_RRC, "Returning new RRC UE context RRC ue id: %d\n", new_p->ue_context.gNB_ue_ngap_id);
|
||||
LOG_I(NR_RRC, "Returning new RRC UE context RRC ue id: %d\n", new_p->ue_context.rrc_ue_id);
|
||||
return(new_p);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ rrc_gNB_ue_context_t *rrc_gNB_get_ue_context(gNB_RRC_INST *rrc_instance_pP, ue_i
|
||||
{
|
||||
rrc_gNB_ue_context_t temp;
|
||||
/* gNB ue rrc id = 24 bits wide */
|
||||
temp.ue_context.gNB_ue_ngap_id = ue;
|
||||
temp.ue_context.rrc_ue_id = ue;
|
||||
return RB_FIND(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, &temp);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ void rrc_gNB_remove_ue_context(gNB_RRC_INST *rrc_instance_pP, rrc_gNB_ue_context
|
||||
}
|
||||
|
||||
RB_REMOVE(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP);
|
||||
uid_linear_allocator_free(&rrc_instance_pP->uid_allocator, ue_context_pP->ue_context.gNB_ue_ngap_id - 1);
|
||||
uid_linear_allocator_free(&rrc_instance_pP->uid_allocator, ue_context_pP->ue_context.rrc_ue_id - 1);
|
||||
rrc_gNB_free_mem_ue_context(ue_context_pP);
|
||||
LOG_I(NR_RRC, "Removed UE context\n");
|
||||
}
|
||||
@@ -153,11 +153,11 @@ rrc_gNB_ue_context_t *rrc_gNB_ue_context_5g_s_tmsi_exist(gNB_RRC_INST *rrc_insta
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void rrc_gNB_update_ue_context_rnti(rnti_t rnti, gNB_RRC_INST *rrc_instance_pP, uint32_t gNB_ue_ngap_id)
|
||||
void rrc_gNB_update_ue_context_rnti(rnti_t rnti, gNB_RRC_INST *rrc_instance_pP, uint32_t rrc_ue_id)
|
||||
{
|
||||
// rnti will need to be a fast access key, with indexing, today it is sequential search
|
||||
// This function will update the index when it will be made
|
||||
rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc_instance_pP, gNB_ue_ngap_id);
|
||||
rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc_instance_pP, rrc_ue_id);
|
||||
if (ue_context_p)
|
||||
ue_context_p->ue_context.rnti = rnti;
|
||||
else
|
||||
@@ -182,6 +182,6 @@ rrc_gNB_ue_context_t *rrc_gNB_create_ue_context(rnti_t rnti, gNB_RRC_INST *rrc_i
|
||||
ue_context_p->ue_context.rnti = rnti;
|
||||
ue_context_p->ue_context.random_ue_identity = ue_identityP;
|
||||
RB_INSERT(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_p);
|
||||
LOG_W(NR_RRC, " Created new UE context rnti: %04x, random ue id %lx, RRC ue id %u\n", rnti, ue_identityP, ue_context_p->ue_context.gNB_ue_ngap_id);
|
||||
LOG_W(NR_RRC, " Created new UE context rnti: %04x, random ue id %lx, RRC ue id %u\n", rnti, ue_identityP, ue_context_p->ue_context.rrc_ue_id);
|
||||
return ue_context_p;
|
||||
}
|
||||
|
||||
@@ -248,14 +248,13 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
|
||||
1,
|
||||
1,
|
||||
configuration,
|
||||
ue_context_p->ue_context.gNB_ue_ngap_id);
|
||||
ue_context_p->ue_context.rrc_ue_id);
|
||||
AssertFatal(UE->secondaryCellGroup != NULL, "out of memory\n");
|
||||
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, UE->secondaryCellGroup);
|
||||
|
||||
fill_default_reconfig(carrier->servingcellconfigcommon, scc, reconfig_ies, UE->secondaryCellGroup, UE->UE_Capability_nr, configuration, ue_context_p->ue_context.gNB_ue_ngap_id);
|
||||
fill_default_reconfig(carrier->servingcellconfigcommon, scc, reconfig_ies, UE->secondaryCellGroup, UE->UE_Capability_nr, configuration, ue_context_p->ue_context.rrc_ue_id);
|
||||
// the UE context is not yet inserted in the RRC UE manager
|
||||
// rrc_gNB_update_ue_context_rnti(UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, rrc,
|
||||
// UE->gNB_ue_ngap_id);
|
||||
// rrc_gNB_update_ue_context_rnti(UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, rrc, UE->rrc_ue_id);
|
||||
UE->rnti = UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity;
|
||||
NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config));
|
||||
memset((void *)CG_Config,0,sizeof(*CG_Config));
|
||||
|
||||
Reference in New Issue
Block a user