Set NSSAI config in MAC
Each active LCID at MAC is configured with NSSAI that is sent from AMF with PDU session setup request
This commit is contained in:
@@ -222,6 +222,17 @@ static NR_CellGroupConfig_t *clone_CellGroupConfig(const NR_CellGroupConfig_t *o
|
|||||||
return cloned;
|
return cloned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_nssaiConfig(const int drb_len, const f1ap_drb_to_be_setup_t *req_drbs, NR_UE_sched_ctrl_t *sched_ctrl)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < drb_len; i++) {
|
||||||
|
const f1ap_drb_to_be_setup_t *drb = &req_drbs[i];
|
||||||
|
|
||||||
|
long lcid = drb->drb_id + 3; /* LCID is DRB + 3 */
|
||||||
|
sched_ctrl->dl_lc_nssai[lcid] = drb->nssai;
|
||||||
|
LOG_I(NR_MAC, "Setting NSSAI sst: %d, sd: %d for DRB: %ld\n", drb->nssai.sst, drb->nssai.sd, drb->drb_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
||||||
{
|
{
|
||||||
gNB_MAC_INST *mac = RC.nrmac[0];
|
gNB_MAC_INST *mac = RC.nrmac[0];
|
||||||
@@ -288,6 +299,9 @@ void ue_context_setup_request(const f1ap_ue_context_setup_t *req)
|
|||||||
/* TODO: need to apply after UE context reconfiguration confirmed? */
|
/* TODO: need to apply after UE context reconfiguration confirmed? */
|
||||||
nr_mac_prepare_cellgroup_update(mac, UE, new_CellGroup);
|
nr_mac_prepare_cellgroup_update(mac, UE, new_CellGroup);
|
||||||
|
|
||||||
|
/* Set NSSAI config in MAC for each active DRB */
|
||||||
|
set_nssaiConfig(req->drbs_to_be_setup_length, req->drbs_to_be_setup, &UE->UE_sched_ctrl);
|
||||||
|
|
||||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||||
|
|
||||||
/* some sanity checks, since we use the same type for request and response */
|
/* some sanity checks, since we use the same type for request and response */
|
||||||
@@ -384,6 +398,9 @@ void ue_context_modification_request(const f1ap_ue_context_modif_req_t *req)
|
|||||||
resp.du_to_cu_rrc_information->cellGroupConfig_length = (enc_rval.encoded + 7) >> 3;
|
resp.du_to_cu_rrc_information->cellGroupConfig_length = (enc_rval.encoded + 7) >> 3;
|
||||||
|
|
||||||
nr_mac_prepare_cellgroup_update(mac, UE, new_CellGroup);
|
nr_mac_prepare_cellgroup_update(mac, UE, new_CellGroup);
|
||||||
|
|
||||||
|
/* Set NSSAI config in MAC for each active DRB */
|
||||||
|
set_nssaiConfig(req->drbs_to_be_setup_length, req->drbs_to_be_setup, &UE->UE_sched_ctrl);
|
||||||
} else {
|
} else {
|
||||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, new_CellGroup); // we actually don't need it
|
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, new_CellGroup); // we actually don't need it
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -639,6 +639,7 @@ typedef struct {
|
|||||||
|
|
||||||
/// sri, ul_ri and tpmi based on SRS
|
/// sri, ul_ri and tpmi based on SRS
|
||||||
nr_srs_feedback_t srs_feedback;
|
nr_srs_feedback_t srs_feedback;
|
||||||
|
nssai_t dl_lc_nssai[NR_MAX_NUM_LCID];
|
||||||
} NR_UE_sched_ctrl_t;
|
} NR_UE_sched_ctrl_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -2346,7 +2346,7 @@ void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp
|
|||||||
/* Instruction towards the DU for DRB configuration and tunnel creation */
|
/* Instruction towards the DU for DRB configuration and tunnel creation */
|
||||||
int nb_drb = resp->pduSession[0].numDRBSetup;
|
int nb_drb = resp->pduSession[0].numDRBSetup;
|
||||||
f1ap_drb_to_be_setup_t drbs[nb_drb];
|
f1ap_drb_to_be_setup_t drbs[nb_drb];
|
||||||
rrc_pdu_session_param_t *RRC_pduSession = find_pduSession(UE, e1ap_resp->pduSession[0].id, false);
|
rrc_pdu_session_param_t *RRC_pduSession = find_pduSession(UE, resp->pduSession[0].id, false);
|
||||||
DevAssert(RRC_pduSession);
|
DevAssert(RRC_pduSession);
|
||||||
for (int i = 0; i < nb_drb; i++) {
|
for (int i = 0; i < nb_drb; i++) {
|
||||||
drbs[i].drb_id = resp->pduSession[0].DRBnGRanList[i].id;
|
drbs[i].drb_id = resp->pduSession[0].DRBnGRanList[i].id;
|
||||||
|
|||||||
Reference in New Issue
Block a user