mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
NGAP: refactor PDU Session Resource Modify struct definition
This commit refactors the PDU Session Resource Modify Response message structures to improve naming, documentation, and compliance with 3GPP TS 38.413 9.2.1.6. Changes in NGAP: - Rename qos_flow_tobe_modified_t to qos_flow_addmod_response_item_t to better reflect its purpose as a QoS Flow Add or Modify Response Item IE (as per specs) - Add mandatory AMF UE NGAP ID field to ngap_pdusession_modify_resp_t structure - Optimize field types: change nb_of_pdusessions and nb_of_pdusessions_failed from uint16_t to uint8_t (NGAP_MAX_PDU_SESSION limit) (ref 3GPP TS 38.413, 9.2.1.6) - Update PDU Session Modify Response encoder to use amf_ue_ngap_id from the message structure (pdusession_modify_resp_p->amf_ue_ngap_id) instead of retrieving it from UE context (ue_context_p->amf_ue_ngap_id) - Add comprehensive comments with 3GPP TS 38.413 section references throughout Changes in RRC/NGAP: - Populate amf_ue_ngap_id field in PDU Session Modify Response message from UE context - Update type reference to qos_flow_addmod_response_item_t
This commit is contained in:
@@ -226,18 +226,21 @@ typedef struct pdusession_setup_s {
|
||||
pdusession_associate_qosflow_t associated_qos_flows[MAX_QOS_FLOWS];
|
||||
} pdusession_setup_t;
|
||||
|
||||
/* QoS Flow Add or Modify Response Item (3GPP TS 38.413 9.2.1.6) */
|
||||
typedef struct qos_flow_tobe_modified_s {
|
||||
uint8_t qfi; // 0~63
|
||||
} qos_flow_tobe_modified_t;
|
||||
// QoS Flow Identifier
|
||||
uint8_t qfi;
|
||||
} qos_flow_addmod_response_item_t;
|
||||
|
||||
/* PDU Session Resource Modify Response Item (3GPP TS 38.413 9.2.1.6) */
|
||||
typedef struct pdusession_modify_s {
|
||||
/* Unique pdusession_id for the UE. */
|
||||
// PDU Session ID
|
||||
uint8_t pdusession_id;
|
||||
|
||||
/* PDU Session Resource Modify Response Transfer */
|
||||
// QoS Flow Add or Modify Response List
|
||||
uint8_t nb_of_qos_flow;
|
||||
|
||||
// qos_flow_add_or_modify
|
||||
qos_flow_tobe_modified_t qos[MAX_QOS_FLOWS];
|
||||
qos_flow_addmod_response_item_t qos[MAX_QOS_FLOWS];
|
||||
} pdusession_modify_t;
|
||||
|
||||
/* Cause (9.3.1.2 of 3GPP TS 38.413) */
|
||||
@@ -889,17 +892,17 @@ typedef struct ngap_pdusession_modify_req_s {
|
||||
pdusession_resource_item_t pdusession[NGAP_MAX_PDU_SESSION];
|
||||
} ngap_pdusession_modify_req_t;
|
||||
|
||||
/* 9.2.1.6 of 3GPP TS 38.413 */
|
||||
typedef struct ngap_pdusession_modify_resp_s {
|
||||
// RAN UE NGAP ID
|
||||
uint32_t gNB_ue_ngap_id;
|
||||
|
||||
/* Number of pdusession modify-ed in the list */
|
||||
// AMF UE NGAP ID
|
||||
uint64_t amf_ue_ngap_id;
|
||||
// PDU Session Resource Modify Response List (0..256)
|
||||
uint16_t nb_of_pdusessions;
|
||||
/* list of pdusession modify-ed by RRC layers */
|
||||
pdusession_modify_t pdusessions[NGAP_MAX_PDU_SESSION];
|
||||
|
||||
/* Number of pdusession failed to be modify in list */
|
||||
// PDU Session Resource Failed to Modify List (0..256)
|
||||
uint16_t nb_of_pdusessions_failed;
|
||||
/* list of pdusessions that failed to be modify */
|
||||
pdusession_failed_t pdusessions_failed[NGAP_MAX_PDU_SESSION];
|
||||
} ngap_pdusession_modify_resp_t;
|
||||
|
||||
|
||||
@@ -993,6 +993,7 @@ int rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE
|
||||
LOG_I(NR_RRC, "send message NGAP_PDUSESSION_MODIFY_RESP \n");
|
||||
|
||||
resp->gNB_ue_ngap_id = UE->rrc_ue_id;
|
||||
resp->amf_ue_ngap_id = UE->amf_ue_ngap_id;
|
||||
|
||||
FOR_EACH_SEQ_ARR(rrc_pdu_session_param_t *, session, &UE->pduSessions) {
|
||||
if (xid != session->xid) {
|
||||
@@ -1015,7 +1016,7 @@ int rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP(gNB_RRC_INST *rrc, gNB_RRC_UE_t *UE
|
||||
p->pdusession_id = session->param.pdusession_id;
|
||||
FOR_EACH_SEQ_ARR(nr_rrc_qos_t *, qos_session, &session->param.qos) {
|
||||
DevAssert(p->nb_of_qos_flow < MAX_QOS_FLOWS);
|
||||
qos_flow_tobe_modified_t *q = &p->qos[p->nb_of_qos_flow++];
|
||||
qos_flow_addmod_response_item_t *q = &p->qos[p->nb_of_qos_flow++];
|
||||
q->qfi = qos_session->qos.qfi;
|
||||
}
|
||||
LOG_I(NR_RRC,
|
||||
|
||||
@@ -1084,7 +1084,7 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance, ngap_pdusession_modify_
|
||||
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
|
||||
ie->criticality = NGAP_Criticality_ignore;
|
||||
ie->value.present = NGAP_PDUSessionResourceModifyResponseIEs__value_PR_AMF_UE_NGAP_ID;
|
||||
asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id);
|
||||
asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, pdusession_modify_resp_p->amf_ue_ngap_id);
|
||||
asn1cSeqAdd(&out->protocolIEs.list, ie);
|
||||
}
|
||||
/* mandatory */
|
||||
|
||||
Reference in New Issue
Block a user