refactor: improve SDAP entity add/update flow management

This commit refactors the SDAP entity QoS flow to DRB mapping functionality
to improve code organization and enhance maintainability.

Key changes:
- Split nr_sdap_qfi2drb_map_update into focused functions:
  * nr_sdap_add_qos_flows_to_drb: handles QFI addition to DRB
  * nr_sdap_rm_qos_flows_from_drb: handles QFI removal from DRB
  * nr_sdap_ue_control_pdu_config: handles UE control PDU generation
- Consolidate add/modify logic into reusable nr_sdap_addmod_entity function
- Remove entity existence checking and updating from new_nr_sdap_entity:
  this function should only add SDAP entities
- Improve function separation of concerns: do SDAP entity add or update
  separately and improve modularity by splitting operations in self
  contained functions
- At SDAP creation, do only add of QFI to DRB mapping
- rename new_nr_sdap_entity to nr_sdap_add_entity for function naming consinstency
This commit is contained in:
Guido Casati
2025-10-24 11:55:25 +02:00
parent 04a1acf376
commit 27be4e26a9
5 changed files with 61 additions and 69 deletions
+1 -1
View File
@@ -177,7 +177,7 @@ static void rrc_nsa_add_drb(const int ue_id,
sdap.drb_id = drb->drb_Identity;
sdap.defaultDRB = true;
// add SDAP entity (terminated at gNB, since it's EPC)
new_nr_sdap_entity(GNB_FLAG_YES, ue_id, sdap);
nr_sdap_addmod_entity(GNB_FLAG_YES, ue_id, sdap);
// add PDCP entity
nr_pdcp_add_drb(GNB_FLAG_YES, ue_id, drb->pdcp_Config, &sdap, sp);
}
+1 -1
View File
@@ -619,7 +619,7 @@ static void rrc_ue_add_bearer(const int ue_id, const NR_DRB_ToAddMod_t *drb, con
sdap = nr_sdap_get_config(GNB_FLAG_NO, drb->cnAssociation->choice.sdap_Config, drb->drb_Identity);
}
// add SDAP entity
new_nr_sdap_entity(GNB_FLAG_NO, ue_id, sdap);
nr_sdap_addmod_entity(GNB_FLAG_NO, ue_id, sdap);
// add PDCP entity
nr_pdcp_add_drb(GNB_FLAG_NO, ue_id, drb->pdcp_Config, &sdap, sp);
}