SDAP release DRB
This commit is contained in:
committed by
Robert Schmidt
parent
ee287d62f4
commit
d24a3d1a98
@@ -1093,12 +1093,11 @@ void nr_pdcp_reconfigure_srb(ue_id_t ue_id, int srb_id, long t_Reordering)
|
|||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, long t_Reordering)
|
void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, NR_PDCP_Config_t *pdcp_config, NR_SDAP_Config_t *sdap_config)
|
||||||
{
|
{
|
||||||
/* The enabling/disabling of ciphering or integrity protection
|
// The enabling/disabling of ciphering or integrity protection
|
||||||
* can be changed only by releasing and adding the DRB
|
// can be changed only by releasing and adding the DRB
|
||||||
* (so not by reconfiguring).
|
// (so not by reconfiguring).
|
||||||
*/
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
nr_pdcp_ue_t *ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
nr_pdcp_ue_t *ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
||||||
nr_pdcp_entity_t *drb = nr_pdcp_get_rb(ue, drb_id, false);
|
nr_pdcp_entity_t *drb = nr_pdcp_get_rb(ue, drb_id, false);
|
||||||
@@ -1107,8 +1106,33 @@ void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, long t_Reordering)
|
|||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int decoded_t_reordering = decode_t_reordering(t_Reordering);
|
if (pdcp_config) {
|
||||||
drb->t_reordering = decoded_t_reordering;
|
if (pdcp_config->t_Reordering)
|
||||||
|
drb->t_reordering = decode_t_reordering(*pdcp_config->t_Reordering);
|
||||||
|
else
|
||||||
|
drb->t_reordering = -1;
|
||||||
|
struct NR_PDCP_Config__drb *drb_config = pdcp_config->drb;
|
||||||
|
if (drb_config) {
|
||||||
|
if (drb_config->discardTimer)
|
||||||
|
drb->discard_timer = decode_discard_timer(*drb_config->discardTimer);
|
||||||
|
bool size_set = false;
|
||||||
|
if (drb_config->pdcp_SN_SizeUL) {
|
||||||
|
drb->sn_size = decode_sn_size_ul(*drb_config->pdcp_SN_SizeUL);
|
||||||
|
size_set = true;
|
||||||
|
}
|
||||||
|
if (drb_config->pdcp_SN_SizeDL) {
|
||||||
|
int size = decode_sn_size_dl(*drb_config->pdcp_SN_SizeDL);
|
||||||
|
AssertFatal(!size_set || (size == drb->sn_size),
|
||||||
|
"SN sizes must be the same. dl=%d, ul=%d",
|
||||||
|
size, drb->sn_size);
|
||||||
|
drb->sn_size = size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sdap_config) {
|
||||||
|
// nr_reconfigure_sdap_entity
|
||||||
|
AssertFatal(false, "Function to reconfigure SDAP entity not implemented yet\n");
|
||||||
|
}
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1131,6 +1155,7 @@ void nr_pdcp_release_drb(ue_id_t ue_id, int drb_id)
|
|||||||
nr_pdcp_ue_t *ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
nr_pdcp_ue_t *ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
||||||
nr_pdcp_entity_t *drb = ue->drb[drb_id - 1];
|
nr_pdcp_entity_t *drb = ue->drb[drb_id - 1];
|
||||||
if (drb) {
|
if (drb) {
|
||||||
|
nr_sdap_release_drb(ue_id, drb_id, drb->pdusession_id);
|
||||||
drb->release_entity(drb);
|
drb->release_entity(drb);
|
||||||
drb->delete_entity(drb);
|
drb->delete_entity(drb);
|
||||||
ue->drb[drb_id - 1] = NULL;
|
ue->drb[drb_id - 1] = NULL;
|
||||||
|
|||||||
@@ -69,10 +69,11 @@ void nr_pdcp_reestablishment(ue_id_t ue_id, int rb_id, bool srb_flag);
|
|||||||
void nr_pdcp_suspend_srb(ue_id_t ue_id, int srb_id);
|
void nr_pdcp_suspend_srb(ue_id_t ue_id, int srb_id);
|
||||||
void nr_pdcp_suspend_drb(ue_id_t ue_id, int drb_id);
|
void nr_pdcp_suspend_drb(ue_id_t ue_id, int drb_id);
|
||||||
void nr_pdcp_reconfigure_srb(ue_id_t ue_id, int srb_id, long t_Reordering);
|
void nr_pdcp_reconfigure_srb(ue_id_t ue_id, int srb_id, long t_Reordering);
|
||||||
void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, long t_Reordering);
|
void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, NR_PDCP_Config_t *pdcp_config, NR_SDAP_Config_t *sdap_config);
|
||||||
void nr_pdcp_release_srb(ue_id_t ue_id, int srb_id);
|
void nr_pdcp_release_srb(ue_id_t ue_id, int srb_id);
|
||||||
void nr_pdcp_release_drb(ue_id_t ue_id, int drb_id);
|
void nr_pdcp_release_drb(ue_id_t ue_id, int drb_id);
|
||||||
|
|
||||||
|
|
||||||
void add_srb(int is_gnb,
|
void add_srb(int is_gnb,
|
||||||
ue_id_t rntiMaybeUEid,
|
ue_id_t rntiMaybeUEid,
|
||||||
struct NR_SRB_ToAddMod *s,
|
struct NR_SRB_ToAddMod *s,
|
||||||
|
|||||||
@@ -1256,8 +1256,9 @@ static void nr_rrc_ue_process_RadioBearerConfig(NR_UE_RRC_INST_t *ue_rrc,
|
|||||||
if (rrcNB->status_DRBs[DRB_id] == RB_ESTABLISHED) {
|
if (rrcNB->status_DRBs[DRB_id] == RB_ESTABLISHED) {
|
||||||
AssertFatal(drb->reestablishPDCP == NULL, "reestablishPDCP not yet implemented\n");
|
AssertFatal(drb->reestablishPDCP == NULL, "reestablishPDCP not yet implemented\n");
|
||||||
AssertFatal(drb->recoverPDCP == NULL, "recoverPDCP not yet implemented\n");
|
AssertFatal(drb->recoverPDCP == NULL, "recoverPDCP not yet implemented\n");
|
||||||
if (drb->pdcp_Config && drb->pdcp_Config->t_Reordering)
|
NR_SDAP_Config_t *sdap_Config = drb->cnAssociation ? drb->cnAssociation->choice.sdap_Config : NULL;
|
||||||
nr_pdcp_reconfigure_drb(rnti, DRB_id, *drb->pdcp_Config->t_Reordering);
|
if (drb->pdcp_Config || sdap_Config)
|
||||||
|
nr_pdcp_reconfigure_drb(rnti, DRB_id, drb->pdcp_Config, sdap_Config);
|
||||||
if (drb->cnAssociation)
|
if (drb->cnAssociation)
|
||||||
AssertFatal(drb->cnAssociation->choice.sdap_Config == NULL, "SDAP reconfiguration not yet implemented\n");
|
AssertFatal(drb->cnAssociation->choice.sdap_Config == NULL, "SDAP reconfiguration not yet implemented\n");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -468,6 +468,21 @@ nr_sdap_entity_t *nr_sdap_get_entity(ue_id_t ue_id, int pdusession_id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nr_sdap_release_drb(ue_id_t ue_id, int drb_id, int pdusession_id)
|
||||||
|
{
|
||||||
|
// remove all QoS flow to DRB mappings associated with the released DRB
|
||||||
|
nr_sdap_entity_t *sdap = nr_sdap_get_entity(ue_id, pdusession_id);
|
||||||
|
if (sdap) {
|
||||||
|
for (int i = 0; i < SDAP_MAX_QFI; i++) {
|
||||||
|
if (sdap->qfi2drb_table[i].drb_id == drb_id)
|
||||||
|
sdap->qfi2drb_table[i].drb_id = SDAP_NO_MAPPING_RULE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
LOG_E(SDAP, "Couldn't find a SDAP entity associated with PDU session ID %d\n",
|
||||||
|
pdusession_id);
|
||||||
|
}
|
||||||
|
|
||||||
bool nr_sdap_delete_entity(ue_id_t ue_id, int pdusession_id)
|
bool nr_sdap_delete_entity(ue_id_t ue_id, int pdusession_id)
|
||||||
{
|
{
|
||||||
nr_sdap_entity_t *entityPtr = sdap_info.sdap_entity_llist;
|
nr_sdap_entity_t *entityPtr = sdap_info.sdap_entity_llist;
|
||||||
|
|||||||
@@ -169,6 +169,8 @@ nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb, bool has_sdap_rx, bool has_sdap
|
|||||||
/* Entity Handling Related Functions */
|
/* Entity Handling Related Functions */
|
||||||
nr_sdap_entity_t *nr_sdap_get_entity(ue_id_t ue_id, int pdusession_id);
|
nr_sdap_entity_t *nr_sdap_get_entity(ue_id_t ue_id, int pdusession_id);
|
||||||
|
|
||||||
|
void nr_sdap_release_drb(ue_id_t ue_id, int drb_id, int pdusession_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Function to delete a single SDAP Entity based on the ue_id and pdusession_id.
|
* @brief Function to delete a single SDAP Entity based on the ue_id and pdusession_id.
|
||||||
* @note 1. SDAP entities may have the same ue_id.
|
* @note 1. SDAP entities may have the same ue_id.
|
||||||
|
|||||||
Reference in New Issue
Block a user