Commit 08b80710 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/NR_RLC_UE_ID' into integration_2024_w13

parents 0edb81dc e77a1468
...@@ -715,7 +715,7 @@ void dl_rrc_message_transfer(const f1ap_dl_rrc_message_t *dl_rrc) ...@@ -715,7 +715,7 @@ void dl_rrc_message_transfer(const f1ap_dl_rrc_message_t *dl_rrc)
mac_remove_nr_ue(mac, *dl_rrc->old_gNB_DU_ue_id); mac_remove_nr_ue(mac, *dl_rrc->old_gNB_DU_ue_id);
pthread_mutex_unlock(&mac->sched_lock); pthread_mutex_unlock(&mac->sched_lock);
nr_rlc_remove_ue(dl_rrc->gNB_DU_ue_id); nr_rlc_remove_ue(dl_rrc->gNB_DU_ue_id);
nr_rlc_update_rnti(*dl_rrc->old_gNB_DU_ue_id, dl_rrc->gNB_DU_ue_id); nr_rlc_update_id(*dl_rrc->old_gNB_DU_ue_id, dl_rrc->gNB_DU_ue_id);
instance_t f1inst = get_f1_gtp_instance(); instance_t f1inst = get_f1_gtp_instance();
if (f1inst >= 0) // we actually use F1-U if (f1inst >= 0) // we actually use F1-U
gtpv1u_update_ue_id(f1inst, *dl_rrc->old_gNB_DU_ue_id, dl_rrc->gNB_DU_ue_id); gtpv1u_update_ue_id(f1inst, *dl_rrc->old_gNB_DU_ue_id, dl_rrc->gNB_DU_ue_id);
......
This diff is collapsed.
...@@ -41,37 +41,29 @@ ...@@ -41,37 +41,29 @@
struct NR_RLC_Config; struct NR_RLC_Config;
struct NR_LogicalChannelConfig; struct NR_LogicalChannelConfig;
void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig); void nr_rlc_add_srb(int ue_id, int srb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig);
void nr_rlc_add_drb(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig); void nr_rlc_add_drb(int ue_id, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig);
void nr_rlc_reestablish_entity(int rnti, int lc_id);
logical_chan_id_t nr_rlc_get_lcid_from_rb(int ue_id, bool is_srb, int rb_id); logical_chan_id_t nr_rlc_get_lcid_from_rb(int ue_id, bool is_srb, int rb_id);
void nr_rlc_remove_ue(int rnti); void nr_rlc_reestablish_entity(int ue_id, int lc_id);
bool nr_rlc_update_rnti(int from_rnti, int to_rnti); void nr_rlc_remove_ue(int ue_id);
bool nr_rlc_update_id(int from_id, int to_id);
/* test function for CI to trigger reestablishments */ /* test function for CI to trigger reestablishments */
void nr_rlc_test_trigger_reestablishment(int rnti); void nr_rlc_test_trigger_reestablishment(int ue_id);
void nr_rlc_release_entity(int rnti, logical_chan_id_t channel_id); void nr_rlc_release_entity(int ue_id, logical_chan_id_t channel_id);
void nr_rlc_reconfigure_entity(int rnti, int lc_id, NR_RLC_Config_t *rlc_Config); void nr_rlc_reconfigure_entity(int ue_id, int lc_id, NR_RLC_Config_t *rlc_Config);
int nr_rlc_get_available_tx_space( int nr_rlc_get_available_tx_space(const int ue_id, const logical_chan_id_t channel_idP);
const rnti_t rntiP,
const logical_chan_id_t channel_idP);
void nr_rlc_activate_avg_time_to_tx( void nr_rlc_activate_avg_time_to_tx(const int ue_id, const logical_chan_id_t channel_id, const bool is_on);
const rnti_t rnti,
const logical_chan_id_t channel_id,
const bool is_on);
void nr_rlc_srb_recv_sdu(const int rnti, const logical_chan_id_t channel_id, unsigned char *buf, int size); void nr_rlc_srb_recv_sdu(const int ue_id, const logical_chan_id_t channel_id, unsigned char *buf, int size);
void nr_rlc_activate_srb0(int rnti, void *data, void nr_rlc_activate_srb0(int ue_id,
void (*send_initial_ul_rrc_message)( void *data,
int rnti, void (*send_initial_ul_rrc_message)(int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *data));
const uint8_t *sdu,
sdu_size_t sdu_len,
void *data));
bool nr_rlc_get_statistics(int rnti, int srb_flag, int rb_id, nr_rlc_statistics_t *out); bool nr_rlc_get_statistics(int ue_id, int srb_flag, int rb_id, nr_rlc_statistics_t *out);
...@@ -75,17 +75,17 @@ void nr_rlc_manager_unlock(nr_rlc_ue_manager_t *_m) ...@@ -75,17 +75,17 @@ void nr_rlc_manager_unlock(nr_rlc_ue_manager_t *_m)
} }
/* must be called with lock acquired */ /* must be called with lock acquired */
nr_rlc_ue_t *nr_rlc_manager_get_ue(nr_rlc_ue_manager_t *_m, int rnti) nr_rlc_ue_t *nr_rlc_manager_get_ue(nr_rlc_ue_manager_t *_m, int ue_id)
{ {
/* TODO: optimze */ /* TODO: optimze */
nr_rlc_ue_manager_internal_t *m = _m; nr_rlc_ue_manager_internal_t *m = _m;
int i; int i;
for (i = 0; i < m->ue_count; i++) for (i = 0; i < m->ue_count; i++)
if (m->ue_list[i]->rnti == rnti) if (m->ue_list[i]->ue_id == ue_id)
return m->ue_list[i]; return m->ue_list[i];
LOG_D(RLC, "%s:%d:%s: new UE with RNTI 0x%x\n", __FILE__, __LINE__, __FUNCTION__, rnti); LOG_D(RLC, "New UE with ID %d\n", ue_id);
m->ue_count++; m->ue_count++;
m->ue_list = realloc(m->ue_list, sizeof(nr_rlc_ue_t *) * m->ue_count); m->ue_list = realloc(m->ue_list, sizeof(nr_rlc_ue_t *) * m->ue_count);
...@@ -99,13 +99,13 @@ nr_rlc_ue_t *nr_rlc_manager_get_ue(nr_rlc_ue_manager_t *_m, int rnti) ...@@ -99,13 +99,13 @@ nr_rlc_ue_t *nr_rlc_manager_get_ue(nr_rlc_ue_manager_t *_m, int rnti)
exit(1); exit(1);
} }
m->ue_list[m->ue_count-1]->rnti = rnti; m->ue_list[m->ue_count-1]->ue_id = ue_id;
return m->ue_list[m->ue_count-1]; return m->ue_list[m->ue_count-1];
} }
/* must be called with lock acquired */ /* must be called with lock acquired */
void nr_rlc_manager_remove_ue(nr_rlc_ue_manager_t *_m, int rnti) void nr_rlc_manager_remove_ue(nr_rlc_ue_manager_t *_m, int ue_id)
{ {
nr_rlc_ue_manager_internal_t *m = _m; nr_rlc_ue_manager_internal_t *m = _m;
nr_rlc_ue_t *ue; nr_rlc_ue_t *ue;
...@@ -113,13 +113,11 @@ void nr_rlc_manager_remove_ue(nr_rlc_ue_manager_t *_m, int rnti) ...@@ -113,13 +113,11 @@ void nr_rlc_manager_remove_ue(nr_rlc_ue_manager_t *_m, int rnti)
int j; int j;
for (i = 0; i < m->ue_count; i++) for (i = 0; i < m->ue_count; i++)
if (m->ue_list[i]->rnti == rnti) if (m->ue_list[i]->ue_id == ue_id)
break; break;
if (i == m->ue_count) { if (i == m->ue_count) {
LOG_W(RLC, "%s:%d:%s: warning: ue %x not found\n", LOG_W(RLC, "Warning: ue %d not found\n", ue_id);
__FILE__, __LINE__, __FUNCTION__,
rnti);
return; return;
} }
......
...@@ -38,8 +38,7 @@ typedef struct nr_rlc_rb_t { ...@@ -38,8 +38,7 @@ typedef struct nr_rlc_rb_t {
} nr_rlc_rb_t; } nr_rlc_rb_t;
typedef struct nr_rlc_ue_t { typedef struct nr_rlc_ue_t {
int rnti; int ue_id;
ue_id_t ue_id;
nr_rlc_entity_t *srb0; nr_rlc_entity_t *srb0;
nr_rlc_entity_t *srb[3]; nr_rlc_entity_t *srb[3];
nr_rlc_entity_t *drb[MAX_DRBS_PER_UE]; nr_rlc_entity_t *drb[MAX_DRBS_PER_UE];
...@@ -57,8 +56,8 @@ int nr_rlc_manager_get_enb_flag(nr_rlc_ue_manager_t *m); ...@@ -57,8 +56,8 @@ int nr_rlc_manager_get_enb_flag(nr_rlc_ue_manager_t *m);
void nr_rlc_manager_lock(nr_rlc_ue_manager_t *m); void nr_rlc_manager_lock(nr_rlc_ue_manager_t *m);
void nr_rlc_manager_unlock(nr_rlc_ue_manager_t *m); void nr_rlc_manager_unlock(nr_rlc_ue_manager_t *m);
nr_rlc_ue_t *nr_rlc_manager_get_ue(nr_rlc_ue_manager_t *m, int rnti); nr_rlc_ue_t *nr_rlc_manager_get_ue(nr_rlc_ue_manager_t *m, int ue_id);
void nr_rlc_manager_remove_ue(nr_rlc_ue_manager_t *m, int rnti); void nr_rlc_manager_remove_ue(nr_rlc_ue_manager_t *m, int ue_id);
/***********************************************************************/ /***********************************************************************/
/* ue functions */ /* ue functions */
......
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