mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
QoS handling: add Dynamic5QI QoS support/validation, split QoS characteristics by 5QI type
Model non-dynamic vs dynamic 5QI characteristics explicitly and propagate the new layout through NGAP decode and RRC bearer/QoS handling. Changes: - Define `non_dynamic_5qi_t`/`dynamic_5qi_t`, PER/PDB bounds, and embed a `qos_characteristics` union in `pdusession_level_qos_parameter_t` - Populate the new QoS structures in `fill_qos()`, including optional allocations for Dynamic 5QI `fiveQI` and NonDynamic `priorityLevelQos` - Map QoS params to F1AP with `nr_rrc_get_f1_qos_flow_param()` and add range validation for dynamic priority/PDB/PER and non-dynamic 5QI - Populate E1 QoS characteristics from the new layout and update QoS modify handling to manage optional pointer fields (`openair2/RRC/NR/rrc_gNB_NGAP.c`) - Derive a numeric 5QI via `get_qos_fiveqi()`, handle missing-5QI dynamic flows conservatively, and extend dedicated-DRB decisions to fall back to dynamic characteristics - Add a 5QI range assert in F1AP QoS encoding and extend bearer tests with a Dynamic 5QI flow Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
This commit is contained in:
@@ -190,12 +190,40 @@ pdusession_level_qos_parameter_t fill_qos(uint8_t qfi, const NGAP_QosFlowLevelQo
|
||||
AssertFatal(qosChar != NULL, "QoS characteristics are NULL\n");
|
||||
if (qosChar->present == NGAP_QosCharacteristics_PR_nonDynamic5QI) {
|
||||
AssertFatal(qosChar->choice.nonDynamic5QI != NULL, "nonDynamic5QI is NULL\n");
|
||||
const NGAP_NonDynamic5QIDescriptor_t *nonDyn = qosChar->choice.nonDynamic5QI;
|
||||
non_dynamic_5qi_t *out_non_dyn = &out.qos_characteristics.non_dynamic;
|
||||
out.fiveQI_type = NON_DYNAMIC;
|
||||
out.fiveQI = qosChar->choice.nonDynamic5QI->fiveQI;
|
||||
/** For NonDynamic5QI, fiveQI is mandatory and indicates standardized or pre-configured 5QI
|
||||
* (5G QoS characteristics are not signaled, they are derived from the 5QI value) */
|
||||
out_non_dyn->fiveQI = nonDyn->fiveQI;
|
||||
// Extract priorityLevelQos if present (optional for NonDynamic5QI)
|
||||
if (nonDyn->priorityLevelQos != NULL) {
|
||||
out_non_dyn->qos_priority = calloc_or_fail(1, sizeof(*out_non_dyn->qos_priority));
|
||||
*out_non_dyn->qos_priority = *nonDyn->priorityLevelQos;
|
||||
DevAssert(*out_non_dyn->qos_priority >= MIN_QOS_PRIORITY_LEVEL && *out_non_dyn->qos_priority <= MAX_QOS_PRIORITY_LEVEL);
|
||||
}
|
||||
} else if (qosChar->present == NGAP_QosCharacteristics_PR_dynamic5QI) {
|
||||
AssertFatal(qosChar->choice.dynamic5QI != NULL, "dynamic5QI is NULL\n");
|
||||
const NGAP_Dynamic5QIDescriptor_t *dyn = qosChar->choice.dynamic5QI;
|
||||
dynamic_5qi_t *out_dyn = &out.qos_characteristics.dynamic;
|
||||
out.fiveQI_type = DYNAMIC;
|
||||
out.fiveQI = *qosChar->choice.dynamic5QI->fiveQI;
|
||||
/** Extract fiveQI if present (optional for Dynamic5QI)
|
||||
* For Dynamic5QI, fiveQI is optional and indicates dynamically assigned 5QI
|
||||
* (5G QoS characteristics are signaled as part of the QoS profile) */
|
||||
if (dyn->fiveQI != NULL) {
|
||||
out_dyn->fiveQI = calloc_or_fail(1, sizeof(*out_dyn->fiveQI));
|
||||
*out_dyn->fiveQI = *dyn->fiveQI;
|
||||
}
|
||||
// Extract priorityLevelQos (mandatory)
|
||||
out_dyn->qos_priority = dyn->priorityLevelQos;
|
||||
DevAssert(out_dyn->qos_priority >= MIN_QOS_PRIORITY_LEVEL && out_dyn->qos_priority <= MAX_QOS_PRIORITY_LEVEL);
|
||||
/** Extract packetDelayBudget (mandatory)
|
||||
* Note: Per 3GPP TS 38.413 §9.3.1.18, this IE is ignored if Extended Packet Delay Budget
|
||||
* is present in iE_Extensions. Extended Packet Delay Budget parsing is not yet implemented. */
|
||||
out_dyn->packet_delay_budget = dyn->packetDelayBudget;
|
||||
// Extract packetErrorRate (mandatory)
|
||||
out_dyn->per.scalar = dyn->packetErrorRate.pERScalar;
|
||||
out_dyn->per.exponent = dyn->packetErrorRate.pERExponent;
|
||||
} else {
|
||||
AssertFatal(0, "Unsupported QoS Characteristics present value: %d\n", qosChar->present);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user