Commit 82e323ee authored by francescomani's avatar francescomani Committed by Jaroslava Fiedlerova

using instance to identify PDCP at UE

parent 1b9f6745
...@@ -1001,7 +1001,7 @@ void init_NR_UE(int nb_inst, char *uecap_file, char *reconfig_file, char *rbconf ...@@ -1001,7 +1001,7 @@ void init_NR_UE(int nb_inst, char *uecap_file, char *reconfig_file, char *rbconf
// set up PDCP, RLC, MAC // set up PDCP, RLC, MAC
nr_pdcp_layer_init(false); nr_pdcp_layer_init(false);
nr_pdcp_add_drbs(ENB_FLAG_NO, mac_inst->crnti, rbconfig->drb_ToAddModList, 0, NULL, NULL); nr_pdcp_add_drbs(ENB_FLAG_NO, inst, rbconfig->drb_ToAddModList, 0, NULL, NULL);
nr_rlc_add_drb(mac_inst->crnti, rbconfig->drb_ToAddModList->list.array[0]->drb_Identity, rlc_rbconfig); nr_rlc_add_drb(mac_inst->crnti, rbconfig->drb_ToAddModList->list.array[0]->drb_Identity, rlc_rbconfig);
struct NR_CellGroupConfig__rlc_BearerToAddModList rlc_toadd_list; struct NR_CellGroupConfig__rlc_BearerToAddModList rlc_toadd_list;
rlc_toadd_list.list.count = 1; rlc_toadd_list.list.count = 1;
......
...@@ -765,7 +765,7 @@ void deliver_pdu_srb_rlc(void *deliver_pdu_data, ue_id_t ue_id, int srb_id, ...@@ -765,7 +765,7 @@ void deliver_pdu_srb_rlc(void *deliver_pdu_data, ue_id_t ue_id, int srb_id,
} }
void add_srb(int is_gnb, void add_srb(int is_gnb,
ue_id_t rntiMaybeUEid, ue_id_t UEid,
struct NR_SRB_ToAddMod *s, struct NR_SRB_ToAddMod *s,
int ciphering_algorithm, int ciphering_algorithm,
int integrity_algorithm, int integrity_algorithm,
...@@ -781,9 +781,9 @@ void add_srb(int is_gnb, ...@@ -781,9 +781,9 @@ void add_srb(int is_gnb,
t_Reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering); t_Reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
nr_pdcp_manager_lock(nr_pdcp_ue_manager); nr_pdcp_manager_lock(nr_pdcp_ue_manager);
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rntiMaybeUEid); ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, UEid);
if (nr_pdcp_get_rb(ue, srb_id, true) != NULL) { if (nr_pdcp_get_rb(ue, srb_id, true) != NULL) {
LOG_E(PDCP, "warning SRB %d already exist for UE ID/RNTI %ld, do nothing\n", srb_id, rntiMaybeUEid); LOG_E(PDCP, "warning SRB %d already exist for UE ID %ld, do nothing\n", srb_id, UEid);
} else { } else {
pdcp_srb = new_nr_pdcp_entity(NR_PDCP_SRB, is_gnb, srb_id, pdcp_srb = new_nr_pdcp_entity(NR_PDCP_SRB, is_gnb, srb_id,
0, false, false, // sdap parameters 0, false, false, // sdap parameters
...@@ -795,13 +795,13 @@ void add_srb(int is_gnb, ...@@ -795,13 +795,13 @@ void add_srb(int is_gnb,
integrity_key); integrity_key);
nr_pdcp_ue_add_srb_pdcp_entity(ue, srb_id, pdcp_srb); nr_pdcp_ue_add_srb_pdcp_entity(ue, srb_id, pdcp_srb);
LOG_D(PDCP, "%s:%d:%s: added srb %d to UE ID/RNTI %ld\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rntiMaybeUEid); LOG_D(PDCP, "added srb %d to UE ID %ld\n", srb_id, UEid);
} }
nr_pdcp_manager_unlock(nr_pdcp_ue_manager); nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
} }
void add_drb(int is_gnb, void add_drb(int is_gnb,
ue_id_t rntiMaybeUEid, ue_id_t UEid,
struct NR_DRB_ToAddMod *s, struct NR_DRB_ToAddMod *s,
int ciphering_algorithm, int ciphering_algorithm,
int integrity_algorithm, int integrity_algorithm,
...@@ -877,9 +877,9 @@ void add_drb(int is_gnb, ...@@ -877,9 +877,9 @@ void add_drb(int is_gnb,
nr_pdcp_manager_lock(nr_pdcp_ue_manager); nr_pdcp_manager_lock(nr_pdcp_ue_manager);
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rntiMaybeUEid); ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, UEid);
if (nr_pdcp_get_rb(ue, drb_id, false) != NULL) { if (nr_pdcp_get_rb(ue, drb_id, false) != NULL) {
LOG_W(PDCP, "warning DRB %d already exist for UE ID/RNTI %ld, do nothing\n", drb_id, rntiMaybeUEid); LOG_W(PDCP, "warning DRB %d already exist for UE ID %ld, do nothing\n", drb_id, UEid);
} else { } else {
pdcp_drb = new_nr_pdcp_entity(NR_PDCP_DRB_AM, is_gnb, drb_id, pdusession_id, pdcp_drb = new_nr_pdcp_entity(NR_PDCP_DRB_AM, is_gnb, drb_id, pdusession_id,
has_sdap_rx, has_sdap_tx, deliver_sdu_drb, ue, has_sdap_rx, has_sdap_tx, deliver_sdu_drb, ue,
...@@ -893,9 +893,9 @@ void add_drb(int is_gnb, ...@@ -893,9 +893,9 @@ void add_drb(int is_gnb,
has_integrity ? integrity_key : NULL); has_integrity ? integrity_key : NULL);
nr_pdcp_ue_add_drb_pdcp_entity(ue, drb_id, pdcp_drb); nr_pdcp_ue_add_drb_pdcp_entity(ue, drb_id, pdcp_drb);
LOG_D(PDCP, "%s:%d:%s: added drb %d to UE ID/RNTI %ld\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rntiMaybeUEid); LOG_D(PDCP, "added drb %d to UE ID %ld\n", drb_id, UEid);
new_nr_sdap_entity(is_gnb, has_sdap_rx, has_sdap_tx, rntiMaybeUEid, pdusession_id, is_sdap_DefaultDRB, drb_id, mappedQFIs2Add, mappedQFIs2AddCount); new_nr_sdap_entity(is_gnb, has_sdap_rx, has_sdap_tx, UEid, pdusession_id, is_sdap_DefaultDRB, drb_id, mappedQFIs2Add, mappedQFIs2AddCount);
} }
nr_pdcp_manager_unlock(nr_pdcp_ue_manager); nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
} }
......
This diff is collapsed.
...@@ -206,6 +206,8 @@ typedef struct rrcPerNB { ...@@ -206,6 +206,8 @@ typedef struct rrcPerNB {
} rrcPerNB_t; } rrcPerNB_t;
typedef struct NR_UE_RRC_INST_s { typedef struct NR_UE_RRC_INST_s {
instance_t ue_id;
rrcPerNB_t perNB[NB_CNX_UE]; rrcPerNB_t perNB[NB_CNX_UE];
char *uecap_file; char *uecap_file;
......
...@@ -404,7 +404,15 @@ void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity, rb_id_t p ...@@ -404,7 +404,15 @@ void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity, rb_id_t p
} }
} }
nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb, bool has_sdap_rx, bool has_sdap_tx, ue_id_t ue_id, int pdusession_id, bool is_defaultDRB, uint8_t drb_identity, NR_QFI_t *mapped_qfi_2_add, uint8_t mappedQFIs2AddCount) nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb,
bool has_sdap_rx,
bool has_sdap_tx,
ue_id_t ue_id,
int pdusession_id,
bool is_defaultDRB,
uint8_t drb_identity,
NR_QFI_t *mapped_qfi_2_add,
uint8_t mappedQFIs2AddCount)
{ {
if (nr_sdap_get_entity(ue_id, pdusession_id)) { if (nr_sdap_get_entity(ue_id, pdusession_id)) {
LOG_E(SDAP, "SDAP Entity for UE already exists with RNTI/UE ID: %lu and PDU SESSION ID: %d\n", ue_id, pdusession_id); LOG_E(SDAP, "SDAP Entity for UE already exists with RNTI/UE ID: %lu and PDU SESSION ID: %d\n", ue_id, pdusession_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment