F1: encode CGC in UE Context Modification Response upon GNB-DU Configuration Query

Apply CGC encoding through GNB-DU Configuration Query. This applies to the
pdu session release path (rrc_gNB_send_f1_drb_release_request) and E1 bearer
mod / DRB add+release path (rrc_gNB_generate_UeContextModificationRequest).

This is necessary to implement 3GPP TS 38.473 requirement for
gNB-DU Configuration Query IE in UE Context Modification Request:

"If the GNB-DU Configuration Query IE is contained in the UE CONTEXT
MODIFICATION REQUEST message, gNB-DU shall include the CellGroupConfig
IE in the DU To CU RRC Information IE in the UE CONTEXT MODIFICATION
RESPONSE message."

i.e.: The DU sends the CGC only when this IE is enabled in the REQ
message from the CU. The only other scenario according to the same
specs is when the Full Configuration IE is present. Outside of these
two cases, CGC shall not be sent.
This commit is contained in:
Guido Casati
2026-01-29 10:17:42 +01:00
parent b74cd9c612
commit 50de6bd8fb
2 changed files with 11 additions and 1 deletions
@@ -821,7 +821,9 @@ void ue_context_modification_request(const f1ap_ue_context_mod_req_t *req)
update_cellGroupConfig(new_CellGroup, UE->uid, UE->capability, &mac->radio_config, scc);
}
if (req->srbs_len > 0 || req->drbs_len > 0 || req->drbs_rel_len > 0 || ue_cap != NULL) {
// 3GPP TS 38.473 Clause 8.3.4: If gNB-DU Configuration Query is present, include CellGroupConfig
if (req->gNB_DU_Configuration_Query != NULL && *req->gNB_DU_Configuration_Query) {
LOG_I(NR_MAC, "UE %04x: gNB-DU Configuration Query received, will include CellGroupConfig in response\n", UE->rnti);
resp.du_to_cu_rrc_info = calloc_or_fail(1, sizeof(du_to_cu_rrc_information_t));
resp.du_to_cu_rrc_info->cell_group_config = encode_cellgroup_config(new_CellGroup);
+8
View File
@@ -1027,6 +1027,10 @@ static void rrc_gNB_send_f1_drb_release_request(gNB_RRC_INST *rrc, gNB_RRC_UE_t
req.drbs_rel_len = n_drb_to_release;
memcpy(req.drbs_rel, drb_to_release, n_drb_to_release * sizeof(int));
// Request CellGroupConfig from DU in the response
req.gNB_DU_Configuration_Query = calloc_or_fail(1, sizeof(*req.gNB_DU_Configuration_Query));
*req.gNB_DU_Configuration_Query = true;
/* send UE Context Modification to DU without attaching any RRC container */
rrc->mac_rrc.ue_context_modification_request(ue_data.du_assoc_id, &req);
LOG_I(NR_RRC, "UE %d: send F1 UE Context Modification Request with DRB release (%d DRBs)\n", ue_p->rrc_ue_id, req.drbs_rel_len);
@@ -3662,6 +3666,10 @@ void rrc_gNB_generate_UeContextModificationRequest(const gNB_RRC_INST *rrc,
.drbs_rel = (f1ap_drb_to_release_t *)rel_drbs,
.cu_to_du_rrc_info = cu2du,
};
// Request CellGroupConfig from DU in the response
ue_context_modif_req.gNB_DU_Configuration_Query = calloc_or_fail(1, sizeof(*ue_context_modif_req.gNB_DU_Configuration_Query));
*ue_context_modif_req.gNB_DU_Configuration_Query = true;
rrc->mac_rrc.ue_context_modification_request(ue_data.du_assoc_id, &ue_context_modif_req);
// avoid attempt to release rel_drbs
ue_context_modif_req.drbs_rel_len = 0;