QoS handling: add GBR QoS flow information decoding from NGAP QoS Flow Setup Request List

Implement GBR (Guaranteed Bit Rate) QoS flow information extraction from NGAP.
This enables handling in CU of GBR QoS flows
(e.g., voice, video) that require guaranteed and maximum bit rates.

Changes:
- Define qos_bitrate_t structure to encapsulate GFBR and MFBR
- Define gbr_qos_flow_information_t structure for GBR QoS parameters
- Add optional gbr_qos_flow_information field to pdusession_level_qos_parameter_t
- Extract GBR information from NGAP_QosFlowLevelQosParameters in fill_qos()
- Add NGAP_GBR-QosInformation.h include to ngap_msg_includes.h

GBR information is optional in NGAP and is only present for GBR flows
(5QI < 5 for NonDynamic5QI, or Dynamic5QI flows with GBR characteristics).
Bit rates are in kbps.

This commit is a refactoring of commit 398ae02ab9 from !2836

Co-authored-by: Sriharsha Korada <sriharsha.korada@iis.fraunhofer.de>

Signed-off-by: Guido Casati <guido.casati@openairinterface.org>
This commit is contained in:
Guido Casati
2025-11-08 00:04:52 +01:00
committed by Raymond Knopp
parent 16055e7939
commit f2151bf2c9
3 changed files with 36 additions and 0 deletions

View File

@@ -131,6 +131,26 @@ typedef struct {
qos_per_t per;
} dynamic_5qi_t;
/* Bit Rate (kbps) - 3GPP TS 38.413 */
typedef struct qos_bitrate_s {
// Guaranteed Flow Bit Rate (GFBR) (kbps)
uint64_t guaranteedFlowBitRate;
// Maximum Flow Bit Rate (MFBR) (kbps)
uint64_t maximumFlowBitRate;
} qos_bitrate_t;
/* GBR QoS Flow Information - 3GPP TS 23.501 §5.7.1.2, TS 38.413 §9.3.1.19
* Present only for GBR QoS flows (5QI < 5 for NonDynamic5QI, or Dynamic5QI with GBR).
* For GBR QoS Flow only, the QoS profile SHALL include for DL and UL:
* - Guaranteed Flow Bit Rate (GFBR)
* - Maximum Flow Bit Rate (MFBR) */
typedef struct gbr_qos_flow_information_s {
// Downlink bit rates (kbps)
qos_bitrate_t dl;
// Uplink bit rates (kbps)
qos_bitrate_t ul;
} gbr_qos_flow_information_t;
typedef struct pdusession_level_qos_parameter_s {
uint8_t qfi;
// QoS Characteristics
@@ -141,6 +161,8 @@ typedef struct pdusession_level_qos_parameter_s {
} qos_characteristics;
// NG-RAN Allocation and Retention Priority
qos_arp_t arp;
/* GBR QoS Flow Information (optional - only for GBR flows) */
gbr_qos_flow_information_t *gbr_qos_flow_information;
} pdusession_level_qos_parameter_t;
#endif

View File

@@ -233,6 +233,19 @@ pdusession_level_qos_parameter_t fill_qos(uint8_t qfi, const NGAP_QosFlowLevelQo
out.arp.pre_emp_capability = arp->pre_emptionCapability;
out.arp.pre_emp_vulnerability = arp->pre_emptionVulnerability;
// Extract GBR QoS Flow Information (optional - only for GBR flows)
if (params->gBR_QosInformation != NULL) {
const NGAP_GBR_QosInformation_t *gBR = params->gBR_QosInformation;
out.gbr_qos_flow_information = calloc_or_fail(1, sizeof(*out.gbr_qos_flow_information));
gbr_qos_flow_information_t *gbr_info = out.gbr_qos_flow_information;
// Extract bit rates (NGAP_BitRate_t is INTEGER_t, requires conversion function)
asn_INTEGER2ulong(&gBR->guaranteedFlowBitRateDL, &gbr_info->dl.guaranteedFlowBitRate);
asn_INTEGER2ulong(&gBR->maximumFlowBitRateDL, &gbr_info->dl.maximumFlowBitRate);
asn_INTEGER2ulong(&gBR->guaranteedFlowBitRateUL, &gbr_info->ul.guaranteedFlowBitRate);
asn_INTEGER2ulong(&gBR->maximumFlowBitRateUL, &gbr_info->ul.maximumFlowBitRate);
}
return out;
}

View File

@@ -15,6 +15,7 @@
#include "NGAP_AllowedNSSAI-Item.h"
#include "NGAP_AssociatedQosFlowItem.h"
#include "NGAP_BroadcastPLMNItem.h"
#include "NGAP_GBR-QosInformation.h"
#include "NGAP_GlobalGNB-ID.h"
#include "NGAP_GTPTunnel.h"
#include "NGAP_InitiatingMessage.h"