Save NSSAI params from AMF
The NSSAI of PDU sessions coming from AMF are stored in RRC to be sent to lower layers
This commit is contained in:
@@ -59,10 +59,7 @@ typedef struct PLMN_ID_s {
|
||||
int mnc_digit_length;
|
||||
} PLMN_ID_t;
|
||||
|
||||
typedef struct e1ap_nssai_t {
|
||||
uint8_t sst;
|
||||
uint32_t sd; // optional: "No SD" is 0xffffff, see 23.003 Sec 28.4.2
|
||||
} e1ap_nssai_t;
|
||||
typedef nssai_t e1ap_nssai_t;
|
||||
|
||||
typedef struct e1ap_net_config_t {
|
||||
net_ip_address_t CUUP_e1_ip_address;
|
||||
|
||||
@@ -194,6 +194,11 @@ typedef enum ngap_rrc_establishment_cause_e {
|
||||
NGAP_RRC_CAUSE_LAST
|
||||
} ngap_rrc_establishment_cause_t;
|
||||
|
||||
typedef struct nssai_s {
|
||||
uint8_t sst;
|
||||
uint32_t sd;
|
||||
} nssai_t;
|
||||
|
||||
typedef struct pdusession_level_qos_parameter_s {
|
||||
uint8_t qfi;
|
||||
uint64_t fiveQI;
|
||||
@@ -210,12 +215,6 @@ typedef struct ngap_guami_s {
|
||||
uint8_t amf_pointer;
|
||||
} ngap_guami_t;
|
||||
|
||||
typedef struct ngap_allowed_NSSAI_s{
|
||||
uint8_t sST;
|
||||
uint8_t sD_flag;
|
||||
uint8_t sD[3];
|
||||
}ngap_allowed_NSSAI_t;
|
||||
|
||||
typedef struct fiveg_s_tmsi_s {
|
||||
uint16_t amf_set_id;
|
||||
uint8_t amf_pointer;
|
||||
@@ -282,6 +281,7 @@ typedef struct pdusession_s {
|
||||
transport_layer_addr_t gNB_addr_N3;
|
||||
uint32_t UPF_teid_N3;
|
||||
transport_layer_addr_t UPF_addr_N3;
|
||||
nssai_t nssai;
|
||||
} pdusession_t;
|
||||
|
||||
typedef enum pdusession_qosflow_mapping_ind_e{
|
||||
@@ -452,8 +452,8 @@ typedef struct ngap_register_gnb_req_s {
|
||||
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t num_plmn;
|
||||
|
||||
uint16_t num_nssai[PLMN_LIST_MAX_SIZE];
|
||||
ngap_allowed_NSSAI_t s_nssai[PLMN_LIST_MAX_SIZE][8];
|
||||
uint16_t num_nssai[PLMN_LIST_MAX_SIZE];
|
||||
nssai_t s_nssai[PLMN_LIST_MAX_SIZE][8];
|
||||
|
||||
/* Default Paging DRX of the gNB as defined in TS 38.304 */
|
||||
ngap_paging_drx_t default_drx;
|
||||
@@ -601,7 +601,7 @@ typedef struct ngap_initial_context_setup_req_s {
|
||||
|
||||
/* allowed nssai */
|
||||
uint8_t nb_allowed_nssais;
|
||||
ngap_allowed_NSSAI_t allowed_nssai[8];
|
||||
nssai_t allowed_nssai[8];
|
||||
|
||||
/* Security algorithms */
|
||||
ngap_security_capabilities_t security_capabilities;
|
||||
@@ -662,7 +662,7 @@ typedef struct ngap_pdusession_setup_req_s {
|
||||
|
||||
/* S-NSSAI */
|
||||
// Fixme: illogical, nssai is part of each pdu session
|
||||
ngap_allowed_NSSAI_t allowed_nssai[8];
|
||||
nssai_t allowed_nssai[8];
|
||||
|
||||
/* Number of pdusession to be setup in the list */
|
||||
uint8_t nb_pdusessions_tosetup;
|
||||
|
||||
@@ -1761,16 +1761,11 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
|
||||
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).num_nssai[l] = SNSSAIParamList.numelt;
|
||||
for (int s = 0; s < SNSSAIParamList.numelt; ++s) {
|
||||
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).s_nssai[l][s].sST = *SNSSAIParamList.paramarray[s][GNB_SLICE_SERVICE_TYPE_IDX].uptr;
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).s_nssai[l][s].sD_flag = 0;
|
||||
if(SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr != 0 // SD is optional
|
||||
&& *SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr != 0xffffff) { // 0xffffff is "no SD", see 23.003 Sec 28.4.2
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).s_nssai[l][s].sD_flag = 1;
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).s_nssai[l][s].sD[0] = (*SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr & 0xFF0000) >> 16;
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).s_nssai[l][s].sD[1] = (*SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr & 0x00FF00) >> 8;
|
||||
NGAP_REGISTER_GNB_REQ (msg_p).s_nssai[l][s].sD[2] = (*SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr & 0x0000FF);
|
||||
}
|
||||
NGAP_REGISTER_GNB_REQ(msg_p).s_nssai[l][s].sst = *SNSSAIParamList.paramarray[s][GNB_SLICE_SERVICE_TYPE_IDX].uptr;
|
||||
// SD is optional
|
||||
// 0xffffff is "no SD", see 23.003 Sec 28.4.2
|
||||
NGAP_REGISTER_GNB_REQ(msg_p).s_nssai[l][s].sd =
|
||||
(*SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr & 0xffffff);
|
||||
}
|
||||
}
|
||||
sprintf(aprefix,"%s.[%i]",GNB_CONFIG_STRING_GNB_LIST,k);
|
||||
|
||||
@@ -766,11 +766,12 @@ void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t ins
|
||||
for (int i = 0; i < msg->nb_pdusessions_tosetup; i++) {
|
||||
rrc_pdu_session_param_t *pduSession = find_pduSession(UE, msg->pdusession_setup_params[i].pdusession_id, true);
|
||||
pdusession_t *session = &pduSession->param;
|
||||
LOG_I(NR_RRC, "Adding pdusession %d, total nb of sessions %d\n", session->pdusession_id, UE->nb_of_pdusessions);
|
||||
session->pdusession_id = msg->pdusession_setup_params[i].pdusession_id;
|
||||
LOG_I(NR_RRC, "Adding pdusession %d, total nb of sessions %d\n", session->pdusession_id, UE->nb_of_pdusessions);
|
||||
session->pdu_session_type = msg->pdusession_setup_params[i].pdu_session_type;
|
||||
session->nas_pdu = msg->pdusession_setup_params[i].nas_pdu;
|
||||
session->pdusessionTransfer = msg->pdusession_setup_params[i].pdusessionTransfer;
|
||||
session->nssai = msg->pdusession_setup_params[i].nssai;
|
||||
decodePDUSessionResourceSetup(session);
|
||||
bearer_req.gNB_cu_cp_ue_id = msg->gNB_ue_ngap_id;
|
||||
bearer_req.cipheringAlgorithm = UE->ciphering_algorithm;
|
||||
@@ -781,11 +782,9 @@ void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t ins
|
||||
pdu_session_to_setup_t *pdu = bearer_req.pduSession + bearer_req.numPDUSessions;
|
||||
bearer_req.numPDUSessions++;
|
||||
pdu->sessionId = session->pdusession_id;
|
||||
ngap_allowed_NSSAI_t *nssai = &msg->allowed_nssai[i];
|
||||
pdu->nssai.sst = nssai->sST;
|
||||
pdu->nssai.sd = 0xffffff;
|
||||
if (nssai->sD_flag)
|
||||
pdu->nssai.sd = nssai->sD[0] << 16 | nssai->sD[1] << 8 | nssai->sD[2];
|
||||
nssai_t *nssai = &msg->allowed_nssai[i];
|
||||
pdu->nssai.sst = nssai->sst;
|
||||
pdu->nssai.sd = nssai->sd;
|
||||
if (cuup_nssai.sst == 0)
|
||||
cuup_nssai = pdu->nssai; /* for CU-UP selection below */
|
||||
pdu->integrityProtectionIndication = rrc->security.do_drb_integrity ? E1AP_IntegrityProtectionIndication_required : E1AP_IntegrityProtectionIndication_not_needed;
|
||||
|
||||
Reference in New Issue
Block a user