bugfix: UE AMBR is optional
This was a problem with open5gs and more than one PDU session. The core network sets UE AMBR only once, leading to failure in the gNB for the second PDU session. (A proper handling of AMBR has to be develop at some point in the gNB.)
This commit is contained in:
@@ -561,6 +561,7 @@ typedef struct ngap_initial_context_setup_req_s {
|
|||||||
uint64_t amf_ue_ngap_id;
|
uint64_t amf_ue_ngap_id;
|
||||||
|
|
||||||
/* UE aggregate maximum bitrate */
|
/* UE aggregate maximum bitrate */
|
||||||
|
bool has_ue_ambr;
|
||||||
ngap_ambr_t ue_ambr;
|
ngap_ambr_t ue_ambr;
|
||||||
|
|
||||||
/* guami */
|
/* guami */
|
||||||
@@ -631,6 +632,7 @@ typedef struct ngap_pdusession_setup_req_s {
|
|||||||
pdusession_resource_item_t pdusession[NGAP_MAX_PDU_SESSION];
|
pdusession_resource_item_t pdusession[NGAP_MAX_PDU_SESSION];
|
||||||
|
|
||||||
/* UE Aggregated Max Bitrates */
|
/* UE Aggregated Max Bitrates */
|
||||||
|
bool has_ue_ambr;
|
||||||
ngap_ambr_t ueAggMaxBitRate;
|
ngap_ambr_t ueAggMaxBitRate;
|
||||||
|
|
||||||
} ngap_pdusession_setup_req_t;
|
} ngap_pdusession_setup_req_t;
|
||||||
|
|||||||
@@ -841,7 +841,9 @@ void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t ins
|
|||||||
for (int i = 0; i < msg->nb_pdusessions_tosetup; ++i)
|
for (int i = 0; i < msg->nb_pdusessions_tosetup; ++i)
|
||||||
cp_pdusession_resource_item_to_pdusession(&to_setup[i], &msg->pdusession[i]);
|
cp_pdusession_resource_item_to_pdusession(&to_setup[i], &msg->pdusession[i]);
|
||||||
|
|
||||||
if (!trigger_bearer_setup(rrc, UE, msg->nb_pdusessions_tosetup, to_setup, msg->ueAggMaxBitRate.br_dl)) {
|
uint64_t dl_ambr = msg->has_ue_ambr ? msg->ueAggMaxBitRate.br_dl : 0;
|
||||||
|
|
||||||
|
if (!trigger_bearer_setup(rrc, UE, msg->nb_pdusessions_tosetup, to_setup, dl_ambr)) {
|
||||||
// Reject PDU Session Resource setup if there's no CU-UP associated
|
// Reject PDU Session Resource setup if there's no CU-UP associated
|
||||||
LOG_W(NR_RRC, "UE %d: reject PDU Session Setup in PDU Session Resource Setup Response\n", UE->rrc_ue_id);
|
LOG_W(NR_RRC, "UE %d: reject PDU Session Setup in PDU Session Resource Setup Response\n", UE->rrc_ue_id);
|
||||||
ngap_cause_t cause = {.type = NGAP_CAUSE_RADIO_NETWORK, .value = NGAP_CAUSE_RADIO_NETWORK_RESOURCES_NOT_AVAILABLE_FOR_THE_SLICE};
|
ngap_cause_t cause = {.type = NGAP_CAUSE_RADIO_NETWORK, .value = NGAP_CAUSE_RADIO_NETWORK_RESOURCES_NOT_AVAILABLE_FOR_THE_SLICE};
|
||||||
|
|||||||
@@ -843,6 +843,7 @@ static int ngap_gNB_handle_initial_context_request(sctp_assoc_t assoc_id, uint32
|
|||||||
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_UEAggregateMaximumBitRate, false);
|
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_UEAggregateMaximumBitRate, false);
|
||||||
if (ie != NULL) {
|
if (ie != NULL) {
|
||||||
msg->ue_ambr = decode_ngap_UEAggregateMaximumBitRate(&ie->value.choice.UEAggregateMaximumBitRate);
|
msg->ue_ambr = decode_ngap_UEAggregateMaximumBitRate(&ie->value.choice.UEAggregateMaximumBitRate);
|
||||||
|
msg->has_ue_ambr = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* id-GUAMI */
|
/* id-GUAMI */
|
||||||
@@ -1022,8 +1023,11 @@ static int ngap_gNB_handle_pdusession_setup_request(sctp_assoc_t assoc_id, uint3
|
|||||||
|
|
||||||
/* UE Aggregated Maximum Bitrate */
|
/* UE Aggregated Maximum Bitrate */
|
||||||
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container,
|
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container,
|
||||||
NGAP_ProtocolIE_ID_id_UEAggregateMaximumBitRate, true);
|
NGAP_ProtocolIE_ID_id_UEAggregateMaximumBitRate, false);
|
||||||
msg->ueAggMaxBitRate = decode_ngap_UEAggregateMaximumBitRate(&ie->value.choice.UEAggregateMaximumBitRate);
|
if (ie != NULL) {
|
||||||
|
msg->ueAggMaxBitRate = decode_ngap_UEAggregateMaximumBitRate(&ie->value.choice.UEAggregateMaximumBitRate);
|
||||||
|
msg->has_ue_ambr = true;
|
||||||
|
}
|
||||||
|
|
||||||
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container,
|
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container,
|
||||||
NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListSUReq, true);
|
NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListSUReq, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user