new name for UE list
This commit is contained in:
committed by
Robert Schmidt
parent
a337354588
commit
a7c199cabf
@@ -47,7 +47,7 @@
|
||||
static int get_single_ue_rnti_mac(void)
|
||||
{
|
||||
NR_UE_info_t *ue = NULL;
|
||||
UE_iterator(RC.nrmac[0]->UE_info.list, it) {
|
||||
UE_iterator(RC.nrmac[0]->UE_info.connected_ue_list, it) {
|
||||
if (it && ue)
|
||||
return -1;
|
||||
if (it)
|
||||
|
||||
@@ -123,7 +123,7 @@ static int get_stats(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
static b_t last_total[MAX_MOBILES_PER_GNB] = {0}; // TODO: hash table?
|
||||
ue_stat_t ue_stat[MAX_MOBILES_PER_GNB] = {0};
|
||||
int num_ues = 0;
|
||||
UE_iterator((NR_UE_info_t **)mac->UE_info.list, it) {
|
||||
UE_iterator((NR_UE_info_t **)mac->UE_info.connected_ue_list, it) {
|
||||
nr_rlc_statistics_t rlc = {0};
|
||||
nr_rlc_get_statistics(it->rnti, srb_flag, rb_id, &rlc);
|
||||
b_t *lt = &last_total[num_ues];
|
||||
@@ -369,7 +369,7 @@ static int stop_modem(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
* scheduler, which has many PUCCH structures filled with expected frame/slot
|
||||
* combinations that won't happen. */
|
||||
const gNB_MAC_INST *mac = RC.nrmac[0];
|
||||
UE_iterator((NR_UE_info_t **)mac->UE_info.list, it) {
|
||||
UE_iterator((NR_UE_info_t **)mac->UE_info.connected_ue_list, it) {
|
||||
nr_mac_trigger_ul_failure(&it->UE_sched_ctrl, 1);
|
||||
}
|
||||
usleep(50000);
|
||||
|
||||
@@ -184,8 +184,8 @@ int g_mcsIndex = -1, g_mcsTableIdx = 0, g_rbStart = -1, g_rbSize = -1, g_nrOfLay
|
||||
|
||||
void nr_dlsim_preprocessor(module_id_t module_id, frame_t frame, slot_t slot)
|
||||
{
|
||||
NR_UE_info_t *UE_info = RC.nrmac[module_id]->UE_info.list[0];
|
||||
AssertFatal(RC.nrmac[module_id]->UE_info.list[1]==NULL, "can have only a single UE\n");
|
||||
NR_UE_info_t *UE_info = RC.nrmac[module_id]->UE_info.connected_ue_list[0];
|
||||
AssertFatal(RC.nrmac[module_id]->UE_info.connected_ue_list[1] == NULL, "can have only a single UE\n");
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl;
|
||||
NR_UE_DL_BWP_t *current_BWP = &UE_info->current_DL_BWP;
|
||||
NR_ServingCellConfigCommon_t *scc = RC.nrmac[0]->common_channels[0].ServingCellConfigCommon;
|
||||
@@ -802,7 +802,7 @@ printf("%d\n", slot);
|
||||
gNB_mac->pre_processor_dl = nr_dlsim_preprocessor;
|
||||
phy_init_nr_gNB(gNB);
|
||||
N_RB_DL = gNB->frame_parms.N_RB_DL;
|
||||
NR_UE_info_t *UE_info = RC.nrmac[0]->UE_info.list[0];
|
||||
NR_UE_info_t *UE_info = RC.nrmac[0]->UE_info.connected_ue_list[0];
|
||||
|
||||
configure_UE_BWP(RC.nrmac[0], scc, &UE_info->UE_sched_ctrl, NULL, UE_info, -1, -1);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ bool read_mac_sm(void* data)
|
||||
|
||||
NR_UEs_t *UE_info = &RC.nrmac[mod_id]->UE_info;
|
||||
size_t num_ues = 0;
|
||||
UE_iterator(UE_info->list, ue) {
|
||||
UE_iterator(UE_info->connected_ue_list, ue) {
|
||||
if (ue)
|
||||
num_ues += 1;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ bool read_mac_sm(void* data)
|
||||
}
|
||||
|
||||
size_t i = 0; //TODO
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
const NR_UE_sched_ctrl_t* sched_ctrl = &UE->UE_sched_ctrl;
|
||||
mac_ue_stats_impl_t* rd = &mac->msg.ue_stats[i];
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ uint32_t num_act_rb(NR_UEs_t* const UE_info)
|
||||
assert(UE_info!= NULL);
|
||||
|
||||
uint32_t act_rb = 0;
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
uint16_t const rnti = UE->rnti;
|
||||
for(int rb_id = 1; rb_id < 6; ++rb_id ){
|
||||
nr_rlc_statistics_t rlc = {0};
|
||||
@@ -55,7 +55,7 @@ void active_avg_to_tx(NR_UEs_t* const UE_info)
|
||||
{
|
||||
assert(UE_info!= NULL);
|
||||
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
uint16_t const rnti = UE->rnti;
|
||||
for(int rb_id = 1; rb_id < 6; ++rb_id ){
|
||||
nr_rlc_statistics_t rlc = {0};
|
||||
@@ -91,7 +91,7 @@ bool read_rlc_sm(void* data)
|
||||
rlc->msg.tstamp = time_now_us();
|
||||
|
||||
uint32_t i = 0;
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
uint16_t const rnti = UE->rnti;
|
||||
//for every LC ID
|
||||
for(int rb_id = 1; rb_id < 6; ++rb_id ){
|
||||
|
||||
@@ -282,7 +282,7 @@ static arr_ue_id_t filter_ues_by_s_nssai_in_du_or_monolithic(const test_info_lst
|
||||
const ngran_node_t node_type = get_e2_node_type();
|
||||
|
||||
// Take MAC info
|
||||
UE_iterator (RC.nrmac[0]->UE_info.list, ue) {
|
||||
UE_iterator(RC.nrmac[0]->UE_info.connected_ue_list, ue) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &ue->UE_sched_ctrl;
|
||||
// UE matches if any of its DRBs matches
|
||||
for (size_t l = 0; l < seq_arr_size(&sched_ctrl->lc_config); ++l) {
|
||||
|
||||
@@ -522,7 +522,7 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, slot_t slotP)
|
||||
}
|
||||
if (scc->uplinkConfigCommon->initialUplinkBWP->ext1
|
||||
&& scc->uplinkConfigCommon->initialUplinkBWP->ext1->msgA_ConfigCommon_r16) {
|
||||
if (gNB->UE_info.list[0] == NULL)
|
||||
if (gNB->UE_info.connected_ue_list[0] == NULL)
|
||||
schedule_nr_MsgA_pusch(scc->uplinkConfigCommon,
|
||||
gNB,
|
||||
module_idP,
|
||||
|
||||
@@ -323,7 +323,7 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
|
||||
|
||||
static void nr_store_dlsch_buffer(module_id_t module_id, frame_t frame, slot_t slot)
|
||||
{
|
||||
UE_iterator(RC.nrmac[module_id]->UE_info.list, UE) {
|
||||
UE_iterator(RC.nrmac[module_id]->UE_info.connected_ue_list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
sched_ctrl->num_total_bytes = 0;
|
||||
sched_ctrl->dl_pdus_total = 0;
|
||||
@@ -865,7 +865,7 @@ static void nr_dlsch_preprocessor(module_id_t module_id, frame_t frame, slot_t s
|
||||
gNB_MAC_INST *mac = RC.nrmac[module_id];
|
||||
NR_UEs_t *UE_info = &mac->UE_info;
|
||||
|
||||
if (UE_info->list[0] == NULL)
|
||||
if (UE_info->connected_ue_list[0] == NULL)
|
||||
return;
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon;
|
||||
@@ -885,7 +885,7 @@ static void nr_dlsch_preprocessor(module_id_t module_id, frame_t frame, slot_t s
|
||||
max_sched_ues = min(max_sched_ues, MAX_DCI_CORESET);
|
||||
|
||||
/* proportional fair scheduling algorithm */
|
||||
pf_dl(module_id, frame, slot, UE_info->list, max_sched_ues, num_beams, n_rb_sched);
|
||||
pf_dl(module_id, frame, slot, UE_info->connected_ue_list, max_sched_ues, num_beams, n_rb_sched);
|
||||
}
|
||||
|
||||
nr_pp_impl_dl nr_init_dlsch_preprocessor(int CC_id) {
|
||||
@@ -940,7 +940,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
|
||||
const NR_BWP_t *initialDL = &scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters;
|
||||
gNB_mac->mac_stats.total_prb_aggregate += NRRIV2BW(initialDL->locationAndBandwidth, MAX_BWP_SIZE);
|
||||
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_UE_DL_BWP_t *current_BWP = &UE->current_DL_BWP;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ void nr_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slot)
|
||||
int slot_period = slot % mac->frame_structure.numb_slots_period;
|
||||
if (!is_xlsch_in_slot(dlsch_slot_bitmap, slot_period))
|
||||
return;
|
||||
NR_UE_info_t *UE = mac->UE_info.list[0];
|
||||
NR_UE_info_t *UE = mac->UE_info.connected_ue_list[0];
|
||||
NR_ServingCellConfigCommon_t *scc = mac->common_channels[0].ServingCellConfigCommon;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP;
|
||||
@@ -214,9 +214,9 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slo
|
||||
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
|
||||
NR_COMMON_channels_t *cc = nr_mac->common_channels;
|
||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
NR_UE_info_t *UE = nr_mac->UE_info.list[0];
|
||||
NR_UE_info_t *UE = nr_mac->UE_info.connected_ue_list[0];
|
||||
|
||||
AssertFatal(nr_mac->UE_info.list[1] == NULL,
|
||||
AssertFatal(nr_mac->UE_info.connected_ue_list[1] == NULL,
|
||||
"cannot handle more than one UE\n");
|
||||
if (UE == NULL)
|
||||
return false;
|
||||
|
||||
@@ -2061,7 +2061,7 @@ void remove_front_nr_list(NR_list_t *listP)
|
||||
NR_UE_info_t *find_nr_UE(NR_UEs_t *UEs, rnti_t rntiP)
|
||||
{
|
||||
|
||||
UE_iterator(UEs->list, UE) {
|
||||
UE_iterator(UEs->connected_ue_list, UE) {
|
||||
if (UE->rnti == rntiP) {
|
||||
LOG_D(NR_MAC,"Search and found rnti: %04x\n", rntiP);
|
||||
return UE;
|
||||
@@ -2508,7 +2508,7 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
|
||||
NR_ServingCellConfigCommon_t *scc = nr_mac->common_channels[0].ServingCellConfigCommon;
|
||||
NR_UEs_t *UE_info = &nr_mac->UE_info;
|
||||
LOG_I(NR_MAC, "Adding new UE context with RNTI 0x%04x\n", rntiP);
|
||||
dump_nr_list(UE_info->list);
|
||||
dump_nr_list(UE_info->connected_ue_list);
|
||||
|
||||
// We will attach at the end, to mitigate race conditions
|
||||
// This is not good, but we will fix it progressively
|
||||
@@ -2563,8 +2563,8 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
|
||||
NR_SCHED_LOCK(&UE_info->mutex);
|
||||
int i;
|
||||
for(i=0; i<MAX_MOBILES_PER_GNB; i++) {
|
||||
if (UE_info->list[i] == NULL) {
|
||||
UE_info->list[i] = UE;
|
||||
if (UE_info->connected_ue_list[i] == NULL) {
|
||||
UE_info->connected_ue_list[i] = UE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2577,7 +2577,7 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf
|
||||
NR_SCHED_UNLOCK(&UE_info->mutex);
|
||||
|
||||
LOG_D(NR_MAC, "Add NR rnti %x\n", rntiP);
|
||||
dump_nr_list(UE_info->list);
|
||||
dump_nr_list(UE_info->connected_ue_list);
|
||||
return (UE);
|
||||
}
|
||||
|
||||
@@ -2686,7 +2686,7 @@ void mac_remove_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rnti)
|
||||
|
||||
NR_UEs_t *UE_info = &nr_mac->UE_info;
|
||||
NR_SCHED_LOCK(&UE_info->mutex);
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
if (UE->rnti==rnti)
|
||||
break;
|
||||
}
|
||||
@@ -2698,11 +2698,11 @@ void mac_remove_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rnti)
|
||||
}
|
||||
|
||||
NR_UE_info_t * newUEs[MAX_MOBILES_PER_GNB+1]={0};
|
||||
int newListIdx=0;
|
||||
for (int i=0; i<MAX_MOBILES_PER_GNB; i++)
|
||||
if(UE_info->list[i] && UE_info->list[i]->rnti != rnti)
|
||||
newUEs[newListIdx++]=UE_info->list[i];
|
||||
memcpy(UE_info->list, newUEs, sizeof(UE_info->list));
|
||||
int newListIdx = 0;
|
||||
for (int i = 0; i < MAX_MOBILES_PER_GNB; i++)
|
||||
if(UE_info->connected_ue_list[i] && UE_info->connected_ue_list[i]->rnti != rnti)
|
||||
newUEs[newListIdx++] = UE_info->connected_ue_list[i];
|
||||
memcpy(UE_info->connected_ue_list, newUEs, sizeof(UE_info->connected_ue_list));
|
||||
NR_SCHED_UNLOCK(&UE_info->mutex);
|
||||
|
||||
const int CC_id = 0;
|
||||
@@ -2799,7 +2799,7 @@ void nr_csirs_scheduling(int Mod_idP, frame_t frame, slot_t slot, nfapi_nr_dl_tt
|
||||
|
||||
UE_info->sched_csirs = 0;
|
||||
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP;
|
||||
|
||||
// CSI-RS is common to all UEs in a given BWP
|
||||
@@ -3161,7 +3161,7 @@ void nr_mac_update_timers(module_id_t module_id, frame_t frame, slot_t slot)
|
||||
NR_SCHED_ENSURE_LOCKED(&mac->sched_lock);
|
||||
|
||||
NR_UEs_t *UE_info = &mac->UE_info;
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
|
||||
if (nr_mac_check_release(sched_ctrl, UE->rnti)) {
|
||||
|
||||
@@ -521,7 +521,7 @@ void nr_schedule_srs(int module_id, frame_t frame, int slot)
|
||||
|
||||
NR_UEs_t *UE_info = &nrmac->UE_info;
|
||||
|
||||
UE_iterator(UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
const int CC_id = 0;
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP;
|
||||
|
||||
@@ -179,7 +179,7 @@ void nr_schedule_pucch(gNB_MAC_INST *nrmac, frame_t frameP, slot_t slotP)
|
||||
if (!is_ul_slot(slotP, &nrmac->frame_structure))
|
||||
return;
|
||||
|
||||
UE_iterator(nrmac->UE_info.list, UE) {
|
||||
UE_iterator(nrmac->UE_info.connected_ue_list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
const int pucch_index = get_pucch_index(frameP, slotP, &nrmac->frame_structure, sched_ctrl->sched_pucch_size);
|
||||
NR_sched_pucch_t *curr_pucch = &UE->UE_sched_ctrl.sched_pucch[pucch_index];
|
||||
@@ -217,7 +217,7 @@ void nr_csi_meas_reporting(int Mod_idP,frame_t frame, slot_t slot)
|
||||
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
|
||||
NR_SCHED_ENSURE_LOCKED(&nrmac->sched_lock);
|
||||
|
||||
UE_iterator(nrmac->UE_info.list, UE ) {
|
||||
UE_iterator(nrmac->UE_info.connected_ue_list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
|
||||
const int n_slots_frame = nrmac->frame_structure.numb_slots_frame;
|
||||
@@ -1219,7 +1219,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, slot_t slot)
|
||||
if (!is_ul_slot(slot, &nrmac->frame_structure))
|
||||
return;
|
||||
const int CC_id = 0;
|
||||
UE_iterator(nrmac->UE_info.list, UE) {
|
||||
UE_iterator(nrmac->UE_info.connected_ue_list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP;
|
||||
const int n_slots_frame = nrmac->frame_structure.numb_slots_frame;
|
||||
|
||||
@@ -56,7 +56,7 @@ int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot)
|
||||
}
|
||||
|
||||
// Avoid slots with the SRS
|
||||
UE_iterator(nrmac->UE_info.list, UE) {
|
||||
UE_iterator(nrmac->UE_info.connected_ue_list, UE) {
|
||||
NR_sched_srs_t sched_srs = UE->UE_sched_ctrl.sched_srs;
|
||||
if(sched_srs.srs_scheduled && sched_srs.frame == frame && sched_srs.slot == slot)
|
||||
return 1;
|
||||
@@ -2279,7 +2279,7 @@ static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, slot_t s
|
||||
{
|
||||
gNB_MAC_INST *nr_mac = RC.nrmac[module_id];
|
||||
// no UEs
|
||||
if (nr_mac->UE_info.list[0] == NULL)
|
||||
if (nr_mac->UE_info.connected_ue_list[0] == NULL)
|
||||
return false;
|
||||
|
||||
NR_COMMON_channels_t *cc = nr_mac->common_channels;
|
||||
@@ -2308,7 +2308,7 @@ static bool nr_ulsch_preprocessor(module_id_t module_id, frame_t frame, slot_t s
|
||||
max_sched_ues = min(max_sched_ues, MAX_DCI_CORESET);
|
||||
|
||||
/* proportional fair scheduling algorithm */
|
||||
pf_ul(module_id, frame, slot, sched_frame, sched_slot, nr_mac->UE_info.list, max_sched_ues, num_beams, len);
|
||||
pf_ul(module_id, frame, slot, sched_frame, sched_slot, nr_mac->UE_info.connected_ue_list, max_sched_ues, num_beams, len);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2369,7 +2369,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, slot_t slot, nfapi_
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = nr_mac->common_channels[0].ServingCellConfigCommon;
|
||||
NR_UEs_t *UE_info = &nr_mac->UE_info;
|
||||
UE_iterator( UE_info->list, UE) {
|
||||
UE_iterator(UE_info->connected_ue_list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
if (sched_ctrl->ul_failure && !get_softmodem_params()->phy_test)
|
||||
continue;
|
||||
|
||||
@@ -105,7 +105,7 @@ void du_clear_all_ue_states()
|
||||
gNB_MAC_INST *mac = RC.nrmac[0];
|
||||
NR_SCHED_LOCK(&mac->sched_lock);
|
||||
|
||||
NR_UE_info_t *UE = *mac->UE_info.list;
|
||||
NR_UE_info_t *UE = *mac->UE_info.connected_ue_list;
|
||||
|
||||
instance_t f1inst = get_f1_gtp_instance();
|
||||
|
||||
@@ -116,7 +116,7 @@ void du_clear_all_ue_states()
|
||||
if (du_exists_f1_ue_data(rnti))
|
||||
du_remove_f1_ue_data(rnti);
|
||||
newGtpuDeleteAllTunnels(f1inst, rnti);
|
||||
UE = *mac->UE_info.list;
|
||||
UE = *mac->UE_info.connected_ue_list;
|
||||
}
|
||||
NR_SCHED_UNLOCK(&mac->sched_lock);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void *nrmac_stats_thread(void *arg) {
|
||||
}
|
||||
|
||||
void clear_mac_stats(gNB_MAC_INST *gNB) {
|
||||
UE_iterator(gNB->UE_info.list, UE) {
|
||||
UE_iterator(gNB->UE_info.connected_ue_list, UE) {
|
||||
memset(&UE->mac_stats,0,sizeof(UE->mac_stats));
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
|
||||
NR_SCHED_ENSURE_LOCKED(&gNB->sched_lock);
|
||||
|
||||
NR_SCHED_LOCK(&gNB->UE_info.mutex);
|
||||
UE_iterator(gNB->UE_info.list, UE) {
|
||||
UE_iterator(gNB->UE_info.connected_ue_list, UE) {
|
||||
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
|
||||
NR_mac_stats_t *stats = &UE->mac_stats;
|
||||
const int avg_rsrp = stats->num_rsrp_meas > 0 ? stats->cumul_rsrp / stats->num_rsrp_meas : 0;
|
||||
@@ -359,9 +359,9 @@ void mac_top_destroy_gNB(gNB_MAC_INST *mac)
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_ServingCellConfig, cc->pre_ServingCellConfig);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_ServingCellConfigCommon, cc->ServingCellConfigCommon);
|
||||
NR_UEs_t *UE_info = &mac->UE_info;
|
||||
for (int i = 0; i < sizeofArray(UE_info->list); ++i)
|
||||
if (UE_info->list[i])
|
||||
delete_nr_ue_data(UE_info->list[i], cc, &UE_info->uid_allocator);
|
||||
for (int i = 0; i < sizeofArray(UE_info->connected_ue_list); ++i)
|
||||
if (UE_info->connected_ue_list[i])
|
||||
delete_nr_ue_data(UE_info->connected_ue_list[i], cc, &UE_info->uid_allocator);
|
||||
}
|
||||
|
||||
void nr_mac_send_f1_setup_req(void)
|
||||
|
||||
@@ -781,7 +781,7 @@ typedef struct {
|
||||
/// scheduling control info
|
||||
// last element always NULL
|
||||
pthread_mutex_t mutex;
|
||||
NR_UE_info_t *list[MAX_MOBILES_PER_GNB+1];
|
||||
NR_UE_info_t *connected_ue_list[MAX_MOBILES_PER_GNB + 1];
|
||||
// bitmap of CSI-RS already scheduled in current slot
|
||||
int sched_csirs;
|
||||
uid_allocator_t uid_allocator;
|
||||
|
||||
Reference in New Issue
Block a user