Add support for Initial context setup request carrying PDU Session resource setup list
-Apply patch from Fujitsu -Trigger dedicated RRC Reconfiguration with DRB and SRB2 configuration once the PDU session is established -Validation of control plane sequence with OAI CN and Nokia SA Box
This commit is contained in:
@@ -1030,6 +1030,12 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id,
|
||||
|
||||
/* Set the QOS informations */
|
||||
NGAP_INITIAL_CONTEXT_SETUP_REQ(message_p).pdusession_param[i].qos[qosIdx].qfi = (uint8_t)qosFlowItem_p->qosFlowIdentifier;
|
||||
if(qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.present == NGAP_QosCharacteristics_PR_nonDynamic5QI){
|
||||
if(qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.choice.nonDynamic5QI != NULL){
|
||||
NGAP_INITIAL_CONTEXT_SETUP_REQ(message_p).pdusession_param[i].qos[qosIdx].fiveQI =
|
||||
(uint64_t)qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.choice.nonDynamic5QI->fiveQI;
|
||||
}
|
||||
}
|
||||
|
||||
NGAP_INITIAL_CONTEXT_SETUP_REQ(message_p).pdusession_param[i].qos[qosIdx].allocation_retention_priority.priority_level =
|
||||
qosFlowItem_p->qosFlowLevelQosParameters.allocationAndRetentionPriority.priorityLevelARP;
|
||||
|
||||
@@ -656,6 +656,7 @@ int ngap_gNB_initial_ctxt_resp(
|
||||
NGAP_InitialContextSetupResponse_t *out;
|
||||
NGAP_InitialContextSetupResponseIEs_t *ie;
|
||||
uint8_t *buffer = NULL;
|
||||
uint8_t pdusessionTransfer_buffer[1000];
|
||||
uint32_t length;
|
||||
int i;
|
||||
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
|
||||
@@ -729,7 +730,8 @@ int ngap_gNB_initial_ctxt_resp(
|
||||
pdusessionTransfer_p = (NGAP_PDUSessionResourceSetupResponseTransfer_t *)calloc(1, sizeof(NGAP_PDUSessionResourceSetupResponseTransfer_t));
|
||||
|
||||
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel;
|
||||
|
||||
|
||||
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel = (NGAP_GTPTunnel_t *)calloc(1, sizeof(NGAP_GTPTunnel_t));
|
||||
GTP_TEID_TO_ASN1(initial_ctxt_resp_p->pdusessions[i].gtp_teid, &pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->gTP_TEID);
|
||||
|
||||
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf = malloc(initial_ctxt_resp_p->pdusessions[i].gNB_addr.length);
|
||||
@@ -757,17 +759,27 @@ int ngap_gNB_initial_ctxt_resp(
|
||||
ass_qos_item_p->qosFlowIdentifier = initial_ctxt_resp_p->pdusessions[i].associated_qos_flows[j].qfi;
|
||||
|
||||
/* qosFlowMappingIndication */
|
||||
if(initial_ctxt_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind != QOSFLOW_MAPPING_INDICATION_NON) {
|
||||
ass_qos_item_p->qosFlowMappingIndication = malloc(sizeof(*ass_qos_item_p->qosFlowMappingIndication));
|
||||
*ass_qos_item_p->qosFlowMappingIndication = initial_ctxt_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind;
|
||||
}
|
||||
//if(initial_ctxt_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind != QOSFLOW_MAPPING_INDICATION_NON) {
|
||||
// ass_qos_item_p->qosFlowMappingIndication = malloc(sizeof(*ass_qos_item_p->qosFlowMappingIndication));
|
||||
// *ass_qos_item_p->qosFlowMappingIndication = initial_ctxt_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind;
|
||||
// }
|
||||
ASN_SEQUENCE_ADD(&pdusessionTransfer_p->dLQosFlowPerTNLInformation.associatedQosFlowList.list, ass_qos_item_p);
|
||||
}
|
||||
|
||||
memset(&res, 0, sizeof(res));
|
||||
res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p);
|
||||
item->pDUSessionResourceSetupResponseTransfer.buf = res.buffer;
|
||||
item->pDUSessionResourceSetupResponseTransfer.size = res.result.encoded;
|
||||
//res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p);
|
||||
//item->pDUSessionResourceSetupResponseTransfer.buf = res.buffer;
|
||||
//item->pDUSessionResourceSetupResponseTransfer.size = res.result.encoded;
|
||||
|
||||
xer_fprint(stdout, &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p);
|
||||
memset(pdusessionTransfer_buffer, 0, 1000);
|
||||
asn_enc_rval_t enc_rval = aper_encode_to_buffer(&asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer,
|
||||
NULL,
|
||||
pdusessionTransfer_p,
|
||||
pdusessionTransfer_buffer,1000);
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded);
|
||||
item->pDUSessionResourceSetupResponseTransfer.buf = pdusessionTransfer_buffer;
|
||||
item->pDUSessionResourceSetupResponseTransfer.size = enc_rval.encoded;
|
||||
|
||||
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p);
|
||||
|
||||
@@ -846,6 +858,8 @@ int ngap_gNB_initial_ctxt_resp(
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
}
|
||||
|
||||
xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, &pdu);
|
||||
|
||||
if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) {
|
||||
NGAP_ERROR("Failed to encode InitialContextSetupResponse\n");
|
||||
/* Encode procedure has failed... */
|
||||
|
||||
Reference in New Issue
Block a user