Merge remote-tracking branch 'origin/gnb-du-config-cell-status' into integration_2025_w18 (!3416)

Signal gNB-DU config update CellStatus from DU to CU

Add the cell status to gNB-DU configuration update message, including
test. Use the gNB-DU configuration update to signal the cell status in
the stack.

This IE was not included in a previous refactoring round, but is at
least necessary to be decoded when interoperating with the OSC O-DU.
This commit is contained in:
Robert Schmidt
2025-05-05 22:37:21 +02:00
6 changed files with 115 additions and 23 deletions
+10 -4
View File
@@ -942,11 +942,17 @@ void prepare_du_configuration_update(gNB_MAC_INST *mac,
/* send gNB-DU configuration update to RRC */
f1ap_gnb_du_configuration_update_t update = {
.transaction_id = 1,
.num_cells_to_modify = 1,
.num_status = 1,
.status[0].plmn = info->plmn,
.status[0].nr_cellid = info->nr_cellid,
.status[0].service_state = F1AP_STATE_IN_SERVICE,
};
update.cell_to_modify[0].old_nr_cellid = info->nr_cellid;
update.cell_to_modify[0].info = *info;
update.cell_to_modify[0].sys_info = get_sys_info(mib, sib1, NULL);
if (mib && sib1) {
update.num_cells_to_modify = 1,
update.cell_to_modify[0].old_nr_cellid = info->nr_cellid;
update.cell_to_modify[0].info = *info;
update.cell_to_modify[0].sys_info = get_sys_info(mib, sib1, NULL);
}
mac->mac_rrc.gnb_du_configuration_update(&update);
}
@@ -168,18 +168,25 @@ void f1_setup_response(const f1ap_setup_resp_t *resp)
// we can configure other SIB only after having received the ones generated by CU
bool update = nr_mac_configure_other_sib(mac, cu_cell->num_SI, cu_cell->SI_msg);
/* only if we have to update SIB1, set mib and sib1 to non-NULL to indicate
* in du_config_update that it has changed (otherwise, gNB-DU config update
* indicates only cell status */
NR_BCCH_BCH_Message_t *mib = NULL;
NR_BCCH_DL_SCH_Message_t *sib1 = NULL;
if (update) {
f1ap_setup_req_t *sr = mac->f1_config.setup_req;
DevAssert(sr->num_cells_available == 1);
f1ap_served_cell_info_t *info = &sr->cell[0].info;
NR_COMMON_channels_t *cc = &mac->common_channels[0];
prepare_du_configuration_update(mac, info, cc->mib, cc->sib1);
mib = cc->mib;
sib1 = cc->sib1;
}
mac->f1_config.setup_resp = malloc(sizeof(*mac->f1_config.setup_resp));
AssertFatal(mac->f1_config.setup_resp != NULL, "out of memory\n");
// Copy F1AP message
*mac->f1_config.setup_resp = cp_f1ap_setup_response(resp);
f1ap_setup_req_t *sr = mac->f1_config.setup_req;
DevAssert(sr->num_cells_available == 1);
prepare_du_configuration_update(mac, &sr->cell[0].info, mib, sib1);
NR_SCHED_UNLOCK(&mac->sched_lock);
// NOTE: Before accepting any UEs, we should initialize the UE states.