Commit 8ffe5b49 authored by Robert Schmidt's avatar Robert Schmidt

Rename UE_list_t to UE_info_t, UE_list_t separate struct

UE_list_t is now used as a separate list. It can be e.g. used in the
scheduler to mark groups of users. The original UE_list_t is renamed to
UE_info_t to reflect that it is a container for information about UEs.
parent 7c924563
...@@ -182,7 +182,7 @@ void phy_scope_gNB(FD_phy_scope_gnb *form, ...@@ -182,7 +182,7 @@ void phy_scope_gNB(FD_phy_scope_gnb *form,
int Qm = 2; int Qm = 2;
/* /*
if (!RC.nrmac[0]->UE_list.active[UE_id]) if (!RC.nrmac[0]->UE_info.active[UE_id])
return; return;
// choose max MCS to compute coded_bits_per_codeword // choose max MCS to compute coded_bits_per_codeword
......
...@@ -640,6 +640,10 @@ uci_procedures(PHY_VARS_eNB *eNB, ...@@ -640,6 +640,10 @@ uci_procedures(PHY_VARS_eNB *eNB,
uci = &(eNB->uci_vars[i]); uci = &(eNB->uci_vars[i]);
if ((uci->active == 1) && (uci->frame == frame) && (uci->subframe == subframe)) { if ((uci->active == 1) && (uci->frame == frame) && (uci->subframe == subframe)) {
if (uci->ue_id > MAX_MOBILES_PER_ENB) {
LOG_W(PHY, "UCI for UE %d and/or but is not active in MAC\n", uci->ue_id);
continue;
}
LOG_D(PHY,"Frame %d, subframe %d: Running uci procedures (type %d) for %d \n", LOG_D(PHY,"Frame %d, subframe %d: Running uci procedures (type %d) for %d \n",
frame, frame,
subframe, subframe,
...@@ -1239,11 +1243,11 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { ...@@ -1239,11 +1243,11 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
print_CQI(ulsch_harq->o,ulsch_harq->uci_format,0,fp->N_RB_DL); print_CQI(ulsch_harq->o,ulsch_harq->uci_format,0,fp->N_RB_DL);
#endif #endif
fill_ulsch_cqi_indication(eNB,frame,subframe,ulsch_harq,ulsch->rnti); fill_ulsch_cqi_indication(eNB,frame,subframe,ulsch_harq,ulsch->rnti);
RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe)); RC.mac[eNB->Mod_id]->UE_info.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe));
} else { } else {
if(RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag & (1 << subframe) ) { if(RC.mac[eNB->Mod_id]->UE_info.UE_sched_ctrl[i].cqi_req_flag & (1 << subframe) ) {
RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe)); RC.mac[eNB->Mod_id]->UE_info.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe));
RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_timer=30; RC.mac[eNB->Mod_id]->UE_info.UE_sched_ctrl[i].cqi_req_timer=30;
LOG_D(PHY,"Frame %d,Subframe %d, We're supposed to get a cqi here. Set cqi_req_timer to 30.\n",frame,subframe); LOG_D(PHY,"Frame %d,Subframe %d, We're supposed to get a cqi here. Set cqi_req_timer to 30.\n",frame,subframe);
} }
} }
......
...@@ -939,7 +939,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ...@@ -939,7 +939,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
if (RC.mac && RC.mac[mod_id] && RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid == 1) { if (RC.mac && RC.mac[mod_id] && RC.mac[mod_id]->UE_info.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid == 1) {
available_harq[i] = j; available_harq[i] = j;
break; break;
} }
...@@ -977,13 +977,13 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle ...@@ -977,13 +977,13 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
dl_info[i]->harq_process_id = available_harq[UE_id]; dl_info[i]->harq_process_id = available_harq[UE_id];
if (RC.mac && RC.mac[mod_id]) if (RC.mac && RC.mac[mod_id])
RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id, UE_id)][UE_id].harq_pid = 0; RC.mac[mod_id]->UE_info.eNB_UE_stats[UE_PCCID(mod_id, UE_id)][UE_id].harq_pid = 0;
dl_info[i]->has_harq_process_id = 1; dl_info[i]->has_harq_process_id = 1;
/* Fill in the status of the HARQ process (2 TBs)*/ /* Fill in the status of the HARQ process (2 TBs)*/
dl_info[i]->n_harq_status = 2; dl_info[i]->n_harq_status = 2;
dl_info[i]->harq_status = malloc(sizeof(uint32_t) * dl_info[i]->n_harq_status); dl_info[i]->harq_status = malloc(sizeof(uint32_t) * dl_info[i]->n_harq_status);
for (j = 0; j < dl_info[i]->n_harq_status; j++) { for (j = 0; j < dl_info[i]->n_harq_status; j++) {
dl_info[i]->harq_status[j] = RC.mac[mod_id]->UE_list.UE_sched_ctrl[UE_id].round[UE_PCCID(mod_id, UE_id)][j]; dl_info[i]->harq_status[j] = RC.mac[mod_id]->UE_info.UE_sched_ctrl[UE_id].round[UE_PCCID(mod_id, UE_id)][j];
// TODO: This should be different per TB // TODO: This should be different per TB
} }
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d and harq %d (round %d)\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10, dl_info[i]->harq_process_id, dl_info[i]->harq_status[0]); // LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d and harq %d (round %d)\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10, dl_info[i]->harq_process_id, dl_info[i]->harq_status[0]);
...@@ -1357,7 +1357,7 @@ void flexran_agent_init_mac_agent(mid_t mod_id) { ...@@ -1357,7 +1357,7 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
if (RC.mac && RC.mac[mod_id]) if (RC.mac && RC.mac[mod_id])
RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid = 0; RC.mac[mod_id]->UE_info.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid = 0;
} }
} }
} }
......
This diff is collapsed.
...@@ -697,7 +697,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -697,7 +697,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
break; break;
} }
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[instance]->UE_list.UE_sched_ctrl[UE_id_mac]); UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[instance]->UE_info.UE_sched_ctrl[UE_id_mac]);
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) { if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE; UE_scheduling_control->cdrx_waiting_ack = FALSE;
......
...@@ -633,9 +633,9 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -633,9 +633,9 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
int UE_out_of_sync = 0; int UE_out_of_sync = 0;
for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) { for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
if (RC.mac[instance]->UE_list.active[n] == TRUE if (RC.mac[instance]->UE_info.active[n] == TRUE
&& rnti == UE_RNTI(instance, n)) { && rnti == UE_RNTI(instance, n)) {
UE_out_of_sync = RC.mac[instance]->UE_list.UE_sched_ctrl[n].ul_out_of_sync; UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
break; break;
} }
} }
......
...@@ -782,7 +782,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -782,7 +782,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
int i; int i;
int UE_id = -1; int UE_id = -1;
eNB_MAC_INST *eNB = RC.mac[Mod_idP]; eNB_MAC_INST *eNB = RC.mac[Mod_idP];
UE_list_t *UE_list= &eNB->UE_list; UE_info_t *UE_info= &eNB->UE_info;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
LOG_D(MAC, "RC.mac:%p mib:%p\n", RC.mac, mib); LOG_D(MAC, "RC.mac:%p mib:%p\n", RC.mac, mib);
...@@ -892,9 +892,9 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -892,9 +892,9 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
} }
if (logicalChannelConfig) { if (logicalChannelConfig) {
UE_list->UE_template[CC_idP][UE_id].lcgidmap[logicalChannelIdentity] = *logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup; UE_info->UE_template[CC_idP][UE_id].lcgidmap[logicalChannelIdentity] = *logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup;
UE_list->UE_template[CC_idP][UE_id].lcgidpriority[logicalChannelIdentity] = logicalChannelConfig->ul_SpecificParameters->priority; UE_info->UE_template[CC_idP][UE_id].lcgidpriority[logicalChannelIdentity] = logicalChannelConfig->ul_SpecificParameters->priority;
} else UE_list->UE_template[CC_idP][UE_id].lcgidmap[logicalChannelIdentity] = 0; } else UE_info->UE_template[CC_idP][UE_id].lcgidmap[logicalChannelIdentity] = 0;
} }
if (physicalConfigDedicated != NULL) { if (physicalConfigDedicated != NULL) {
...@@ -905,7 +905,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -905,7 +905,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
return(-1); return(-1);
} }
UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated = physicalConfigDedicated; UE_info->UE_template[CC_idP][UE_id].physicalConfigDedicated = physicalConfigDedicated;
LOG_I(MAC,"Added physicalConfigDedicated %p for %d.%d\n",physicalConfigDedicated,CC_idP,UE_id); LOG_I(MAC,"Added physicalConfigDedicated %p for %d.%d\n",physicalConfigDedicated,CC_idP,UE_id);
} }
...@@ -1048,15 +1048,11 @@ void eNB_Config_Local_DRX(instance_t Mod_id, ...@@ -1048,15 +1048,11 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
rrc_mac_drx_config_req_t *rrc_mac_drx_config_req) rrc_mac_drx_config_req_t *rrc_mac_drx_config_req)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
UE_list_t *UE_list_mac = NULL; UE_info_t *UE_info_mac = &RC.mac[Mod_id]->UE_info;
UE_sched_ctrl_t *UE_scheduling_control = NULL; UE_sched_ctrl_t *UE_scheduling_control = NULL;
int UE_id = -1;
rnti_t rnti = rrc_mac_drx_config_req->rnti;
LTE_DRX_Config_t *const drx_Configuration = rrc_mac_drx_config_req->drx_Configuration; LTE_DRX_Config_t *const drx_Configuration = rrc_mac_drx_config_req->drx_Configuration;
rnti_t rnti = rrc_mac_drx_config_req->rnti;
UE_list_mac = &(RC.mac[Mod_id]->UE_list); int UE_id = find_UE_id(Mod_id, rnti);
UE_id = find_UE_id(Mod_id, rnti);
/* Check UE_id */ /* Check UE_id */
if (UE_id == -1) { if (UE_id == -1) {
...@@ -1065,7 +1061,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id, ...@@ -1065,7 +1061,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
} }
/* Get struct to modify */ /* Get struct to modify */
UE_scheduling_control = &(UE_list_mac->UE_sched_ctrl[UE_id]); UE_scheduling_control = &(UE_info_mac->UE_sched_ctrl[UE_id]);
UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when no error UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when no error
/* Check drx_Configuration */ /* Check drx_Configuration */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -133,13 +133,13 @@ schedule_ue_spec_phy_test( ...@@ -133,13 +133,13 @@ schedule_ue_spec_phy_test(
/* /*
LOG_D(MAC,"CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n", LOG_D(MAC,"CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n",
CC_id, frameP,subframeP,UE_id, CC_id, frameP,subframeP,UE_id,
rnti,harq_pid,UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]); rnti,harq_pid,UE_info->UE_template[CC_id][UE_id].oldNDI[harq_pid]);
UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]=1-UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]; UE_info->UE_template[CC_id][UE_id].oldNDI[harq_pid]=1-UE_info->UE_template[CC_id][UE_id].oldNDI[harq_pid];
UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs; UE_info->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs;
UE_list->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0; UE_info->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n"); AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n"); AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
*/ */
fill_nfapi_dlsch_config(eNB, fill_nfapi_dlsch_config(eNB,
dl_req, dl_req,
...@@ -170,7 +170,7 @@ schedule_ue_spec_phy_test( ...@@ -170,7 +170,7 @@ schedule_ue_spec_phy_test(
(frameP*10)+subframeP, (frameP*10)+subframeP,
TBS, TBS,
eNB->pdu_index[CC_id], eNB->pdu_index[CC_id],
eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]); eNB->UE_info.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]);
} else { } else {
LOG_W(MAC,"[eNB_scheduler_phytest] DCI allocation infeasible!\n"); LOG_W(MAC,"[eNB_scheduler_phytest] DCI allocation infeasible!\n");
} }
...@@ -192,7 +192,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -192,7 +192,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
int N_RB_UL; int N_RB_UL;
eNB_MAC_INST *mac = RC.mac[module_idP]; eNB_MAC_INST *mac = RC.mac[module_idP];
COMMON_channels_t *cc = &mac->common_channels[0]; COMMON_channels_t *cc = &mac->common_channels[0];
UE_list_t *UE_list=&mac->UE_list; UE_info_t *UE_info=&mac->UE_info;
UE_TEMPLATE *UE_template; UE_TEMPLATE *UE_template;
UE_sched_ctrl_t *UE_sched_ctrl; UE_sched_ctrl_t *UE_sched_ctrl;
int sched_frame=frameP; int sched_frame=frameP;
...@@ -231,8 +231,8 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -231,8 +231,8 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
first_rb[CC_id] = 1; first_rb[CC_id] = 1;
// loop over all active UEs // loop over all active UEs
// if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel // if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
UE_template = &UE_list->UE_template[CC_id][UE_id]; UE_template = &UE_info->UE_template[CC_id][UE_id];
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id]; UE_sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe); harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid]; RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
//power control //power control
...@@ -242,15 +242,15 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -242,15 +242,15 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
// new transmission // new transmission
ndi = 1-UE_template->oldNDI_UL[harq_pid]; ndi = 1-UE_template->oldNDI_UL[harq_pid];
UE_template->oldNDI_UL[harq_pid]=ndi; UE_template->oldNDI_UL[harq_pid]=ndi;
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr; UE_info->eNB_UE_stats[CC_id][UE_id].snr = snr;
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr; UE_info->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = mcs; UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = mcs;
UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs; UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
// buffer_occupancy = UE_template->ul_total_buffer; // buffer_occupancy = UE_template->ul_total_buffer;
UE_template->TBS_UL[harq_pid] = get_TBS_UL(mcs,nb_rb); UE_template->TBS_UL[harq_pid] = get_TBS_UL(mcs,nb_rb);
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += nb_rb; UE_info->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += nb_rb;
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb); UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
// buffer_occupancy -= TBS; // buffer_occupancy -= TBS;
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB) // bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
//store for possible retransmission //store for possible retransmission
......
This diff is collapsed.
...@@ -1129,7 +1129,15 @@ typedef struct { ...@@ -1129,7 +1129,15 @@ typedef struct {
uint8_t sb_size; uint8_t sb_size;
uint8_t nb_active_sb; uint8_t nb_active_sb;
} SBMAP_CONF; } SBMAP_CONF;
/*! \brief UE list used by eNB to order UEs/CC for scheduling*/
/*! \brief UE_list_t is a "list" of users within UE_info_t. Especial useful in
* the scheduler and to keep "classes" of users. */
typedef struct {
int head;
int next[MAX_MOBILES_PER_ENB];
} UE_list_t;
/*! \brief UE info used by eNB to order UEs/CC for scheduling*/
typedef struct { typedef struct {
DLSCH_PDU DLSCH_pdu[NFAPI_CC_MAX][2][MAX_MOBILES_PER_ENB]; DLSCH_PDU DLSCH_pdu[NFAPI_CC_MAX][2][MAX_MOBILES_PER_ENB];
...@@ -1151,11 +1159,7 @@ typedef struct { ...@@ -1151,11 +1159,7 @@ typedef struct {
eNB_UE_STATS eNB_UE_stats[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]; eNB_UE_STATS eNB_UE_stats[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
/// scheduling control info /// scheduling control info
UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_ENB]; UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_ENB];
int next[MAX_MOBILES_PER_ENB]; UE_list_t list;
int head;
int next_ul[MAX_MOBILES_PER_ENB];
int head_ul;
int avail;
int num_UEs; int num_UEs;
boolean_t active[MAX_MOBILES_PER_ENB]; boolean_t active[MAX_MOBILES_PER_ENB];
...@@ -1163,7 +1167,7 @@ typedef struct { ...@@ -1163,7 +1167,7 @@ typedef struct {
uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM]; uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM];
uint16_t first_rb_offset[NFAPI_CC_MAX][MAX_NUM_SLICES]; uint16_t first_rb_offset[NFAPI_CC_MAX][MAX_NUM_SLICES];
int assoc_ul_slice_idx[MAX_MOBILES_PER_ENB]; int assoc_ul_slice_idx[MAX_MOBILES_PER_ENB];
} UE_list_t; } UE_info_t;
/*! \brief deleting control information*/ /*! \brief deleting control information*/
typedef struct { typedef struct {
...@@ -1395,7 +1399,7 @@ typedef struct eNB_MAC_INST_s { ...@@ -1395,7 +1399,7 @@ typedef struct eNB_MAC_INST_s {
nfapi_ue_release_request_t UE_release_req; nfapi_ue_release_request_t UE_release_req;
/// UL handle /// UL handle
uint32_t ul_handle; uint32_t ul_handle;
UE_list_t UE_list; UE_info_t UE_info;
/// slice-related configuration /// slice-related configuration
slice_info_t slice_info; slice_info_t slice_info;
......
...@@ -193,7 +193,7 @@ void add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP, ...@@ -193,7 +193,7 @@ void add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
//main.c //main.c
void init_UE_list(UE_list_t *UE_list); void init_UE_info(UE_info_t *UE_info);
void init_slice_info(slice_info_t *sli); void init_slice_info(slice_info_t *sli);
...@@ -448,7 +448,7 @@ boolean_t CCE_allocation_infeasible(int module_idP, ...@@ -448,7 +448,7 @@ boolean_t CCE_allocation_infeasible(int module_idP,
void set_ue_dai(sub_frame_t subframeP, void set_ue_dai(sub_frame_t subframeP,
int UE_id, int UE_id,
uint8_t CC_id, uint8_t tdd_config, UE_list_t *UE_list); uint8_t CC_id, uint8_t tdd_config, UE_info_t *UE_info);
uint8_t frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP); uint8_t frame_subframe2_dl_harq_pid(LTE_TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
/** \brief First stage of PCH Scheduling. Gets a PCH SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs). /** \brief First stage of PCH Scheduling. Gets a PCH SDU from RRC if available and computes the MCS required to transport it as a function of the SDU length. It assumes a length less than or equal to 64 bytes (MCS 6, 3 PRBs).
...@@ -685,10 +685,11 @@ int rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP); ...@@ -685,10 +685,11 @@ int rrc_mac_remove_ue(module_id_t Mod_id, rnti_t rntiP);
void store_dlsch_buffer(module_id_t Mod_id, frame_t frameP, sub_frame_t subframeP); void store_dlsch_buffer(module_id_t Mod_id, frame_t frameP, sub_frame_t subframeP);
void assign_rbs_required(module_id_t Mod_id, int CC_id, uint16_t nb_rbs_required[MAX_MOBILES_PER_ENB]); void assign_rbs_required(module_id_t Mod_id, int CC_id, uint16_t nb_rbs_required[MAX_MOBILES_PER_ENB]);
int prev(UE_list_t *listP, int nodeP, int ul_flag); int prev(UE_list_t *listP, int nodeP);
void add_ue_list(UE_list_t *listP, int UE_id, int ul_flag); void add_ue_list(UE_list_t *listP, int UE_id);
void dump_ue_list(UE_list_t *listP, int ul_flag); int remove_ue_list(UE_list_t *listP, int UE_id);
int UE_num_active_CC(UE_list_t *listP, int ue_idP); void dump_ue_list(UE_list_t *listP);
int UE_num_active_CC(UE_info_t *listP, int ue_idP);
int UE_PCCID(module_id_t mod_idP, int ue_idP); int UE_PCCID(module_id_t mod_idP, int ue_idP);
rnti_t UE_RNTI(module_id_t mod_idP, int ue_idP); rnti_t UE_RNTI(module_id_t mod_idP, int ue_idP);
......
...@@ -43,23 +43,19 @@ ...@@ -43,23 +43,19 @@
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
void init_UE_list(UE_list_t *UE_list) void init_UE_info(UE_info_t *UE_info)
{ {
int list_el; int list_el;
UE_list->num_UEs = 0; UE_info->num_UEs = 0;
UE_list->head = -1; UE_info->list.head = -1;
UE_list->head_ul = -1; for (list_el = 0; list_el < MAX_MOBILES_PER_ENB; list_el++)
UE_list->avail = 0; UE_info->list.next[list_el] = -1;
for (list_el = 0; list_el < MAX_MOBILES_PER_ENB; list_el++) { memset(UE_info->DLSCH_pdu, 0, sizeof(UE_info->DLSCH_pdu));
UE_list->next[list_el] = -1; memset(UE_info->UE_template, 0, sizeof(UE_info->UE_template));
UE_list->next_ul[list_el] = -1; memset(UE_info->eNB_UE_stats, 0, sizeof(UE_info->eNB_UE_stats));
} memset(UE_info->UE_sched_ctrl, 0, sizeof(UE_info->UE_sched_ctrl));
memset(UE_list->DLSCH_pdu, 0, sizeof(UE_list->DLSCH_pdu)); memset(UE_info->active, 0, sizeof(UE_info->active));
memset(UE_list->UE_template, 0, sizeof(UE_list->UE_template)); memset(UE_info->assoc_ul_slice_idx, 0, sizeof(UE_info->assoc_ul_slice_idx));
memset(UE_list->eNB_UE_stats, 0, sizeof(UE_list->eNB_UE_stats));
memset(UE_list->UE_sched_ctrl, 0, sizeof(UE_list->UE_sched_ctrl));
memset(UE_list->active, 0, sizeof(UE_list->active));
memset(UE_list->assoc_ul_slice_idx, 0, sizeof(UE_list->assoc_ul_slice_idx));
} }
void init_slice_info(slice_info_t *sli) void init_slice_info(slice_info_t *sli)
...@@ -134,7 +130,7 @@ void mac_top_init_eNB(void) ...@@ -134,7 +130,7 @@ void mac_top_init_eNB(void)
mac[i]->if_inst = IF_Module_init(i); mac[i]->if_inst = IF_Module_init(i);
init_UE_list(&mac[i]->UE_list); init_UE_info(&mac[i]->UE_info);
init_slice_info(&mac[i]->slice_info); init_slice_info(&mac[i]->slice_info);
} }
...@@ -160,12 +156,12 @@ void mac_init_cell_params(int Mod_idP, int CC_idP) ...@@ -160,12 +156,12 @@ void mac_init_cell_params(int Mod_idP, int CC_idP)
memset(&RC.mac[Mod_idP]->eNB_stats, 0, sizeof(eNB_STATS)); memset(&RC.mac[Mod_idP]->eNB_stats, 0, sizeof(eNB_STATS));
UE_template = UE_template =
(UE_TEMPLATE *) & RC.mac[Mod_idP]->UE_list.UE_template[CC_idP][0]; (UE_TEMPLATE *) & RC.mac[Mod_idP]->UE_info.UE_template[CC_idP][0];
for (j = 0; j < MAX_MOBILES_PER_ENB; j++) { for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
UE_template[j].rnti = 0; UE_template[j].rnti = 0;
// initiallize the eNB to UE statistics // initiallize the eNB to UE statistics
memset(&RC.mac[Mod_idP]->UE_list.eNB_UE_stats[CC_idP][j], 0, memset(&RC.mac[Mod_idP]->UE_info.eNB_UE_stats[CC_idP][j], 0,
sizeof(eNB_UE_STATS)); sizeof(eNB_UE_STATS));
} }
...@@ -260,4 +256,4 @@ void *mac_enb_task(void *arg) ...@@ -260,4 +256,4 @@ void *mac_enb_task(void *arg)
} // end while } // end while
return NULL; return NULL;
} }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -656,7 +656,7 @@ rrc_eNB_get_next_transaction_identifier( ...@@ -656,7 +656,7 @@ rrc_eNB_get_next_transaction_identifier(
// AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB index invalid (%d/%d)!", enb_mod_idP, NB_eNB_INST); // AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB index invalid (%d/%d)!", enb_mod_idP, NB_eNB_INST);
// //
// for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { // for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
// if (RC.rrc[enb_mod_idP]->Info.UE_list[i] == UE_identity) { // if (RC.rrc[enb_mod_idP]->Info.UE_info[i] == UE_identity) {
// // UE_identity already registered // // UE_identity already registered
// reg = TRUE; // reg = TRUE;
// break; // break;
...@@ -1476,9 +1476,9 @@ rrc_eNB_generate_RRCConnectionReestablishment( ...@@ -1476,9 +1476,9 @@ rrc_eNB_generate_RRCConnectionReestablishment(
if (UE_id != -1) { if (UE_id != -1) {
/* Activate reject timer, if RRCComplete not received after 10 frames, reject UE */ /* Activate reject timer, if RRCComplete not received after 10 frames, reject UE */
RC.mac[module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1; RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
/* Reject UE after 10 frames, LTE_RRCConnectionReestablishmentReject is triggered */ /* Reject UE after 10 frames, LTE_RRCConnectionReestablishmentReject is triggered */
RC.mac[module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 100; RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 100;
} else { } else {
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishment without UE_id(MAC) rnti %x\n", LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishment without UE_id(MAC) rnti %x\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
...@@ -2086,8 +2086,8 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject( ...@@ -2086,8 +2086,8 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
if(UE_id != -1) { if(UE_id != -1) {
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 20; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 20;
} else { } else {
LOG_E(RRC, LOG_E(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishmentReject without UE_id(MAC) rnti %x\n", PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishmentReject without UE_id(MAC) rnti %x\n",
...@@ -6168,7 +6168,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -6168,7 +6168,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
return; return;
} }
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[module_id]->UE_list.UE_sched_ctrl[UE_id_mac]); UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id_mac]);
if (UE_scheduling_control->cdrx_waiting_ack == TRUE) { if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
UE_scheduling_control->cdrx_waiting_ack = FALSE; UE_scheduling_control->cdrx_waiting_ack = FALSE;
...@@ -6831,12 +6831,12 @@ rrc_eNB_decode_ccch( ...@@ -6831,12 +6831,12 @@ rrc_eNB_decode_ccch(
break; break;
} }
if((RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) && if((RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) &&
(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)) { (RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)) {
LOG_E(RRC, LOG_E(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the c-rnti UE\n", PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the c-rnti UE\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000;
rrc_eNB_previous_SRB2(ue_context_p); rrc_eNB_previous_SRB2(ue_context_p);
ue_context_p->ue_context.ue_reestablishment_timer = 0; ue_context_p->ue_context.ue_reestablishment_timer = 0;
} }
...@@ -6862,12 +6862,12 @@ rrc_eNB_decode_ccch( ...@@ -6862,12 +6862,12 @@ rrc_eNB_decode_ccch(
break; break;
} }
if((RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) && if((RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer > 0) &&
(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)) { (RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres > 20)) {
LOG_E(RRC, LOG_E(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the Previous UE\n", PROTOCOL_RRC_CTXT_UE_FMT" RCConnectionReestablishmentComplete(Previous) don't receive, delete the Previous UE\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1000;
rrc_eNB_previous_SRB2(ue_context_p); rrc_eNB_previous_SRB2(ue_context_p);
ue_context_p->ue_context.ue_reestablishment_timer = 0; ue_context_p->ue_context.ue_reestablishment_timer = 0;
} }
...@@ -7439,12 +7439,12 @@ rrc_eNB_decode_dcch( ...@@ -7439,12 +7439,12 @@ rrc_eNB_decode_dcch(
AssertFatal(!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type), AssertFatal(!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type),
"CU cannot decode DCCH: no access to RC.mac[]\n"); "CU cannot decode DCCH: no access to RC.mac[]\n");
if(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1) { if(RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1) {
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
dedicated_DRB = 2; dedicated_DRB = 2;
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
} }
} else if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION) { } else if (ue_context_p->ue_context.Status == RRC_HO_EXECUTION) {
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti); int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
...@@ -7459,7 +7459,7 @@ rrc_eNB_decode_dcch( ...@@ -7459,7 +7459,7 @@ rrc_eNB_decode_dcch(
flexran_agent_handover = 1; flexran_agent_handover = 1;
RC.rrc[ctxt_pP->module_id]->Nb_ue++; RC.rrc[ctxt_pP->module_id]->Nb_ue++;
dedicated_DRB = 3; dedicated_DRB = 3;
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
ue_context_p->ue_context.Status = RRC_RECONFIGURED; ue_context_p->ue_context.Status = RRC_RECONFIGURED;
if(ue_context_p->ue_context.handover_info) { if(ue_context_p->ue_context.handover_info) {
...@@ -7637,7 +7637,7 @@ rrc_eNB_decode_dcch( ...@@ -7637,7 +7637,7 @@ rrc_eNB_decode_dcch(
break; break;
} }
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0;
ue_context_p->ue_context.reestablishment_xid = -1; ue_context_p->ue_context.reestablishment_xid = -1;
if (ul_dcch_msg->message.choice.c1.choice.rrcConnectionReestablishmentComplete.criticalExtensions.present == if (ul_dcch_msg->message.choice.c1.choice.rrcConnectionReestablishmentComplete.criticalExtensions.present ==
......
...@@ -60,11 +60,11 @@ uint8_t rrc_find_free_ue_index(uint8_t Mod_id) { ...@@ -60,11 +60,11 @@ uint8_t rrc_find_free_ue_index(uint8_t Mod_id) {
uint16_t i; uint16_t i;
for(i=1; i<=NB_CNX_CH; i++) for(i=1; i<=NB_CNX_CH; i++)
if ( (CH_rrc_inst[Mod_id].Info.UE_list[i][0] == 0) && if ( (CH_rrc_inst[Mod_id].Info.UE_info[i][0] == 0) &&
(CH_rrc_inst[Mod_id].Info.UE_list[i][1] == 0) && (CH_rrc_inst[Mod_id].Info.UE_info[i][1] == 0) &&
(CH_rrc_inst[Mod_id].Info.UE_list[i][2] == 0) && (CH_rrc_inst[Mod_id].Info.UE_info[i][2] == 0) &&
(CH_rrc_inst[Mod_id].Info.UE_list[i][3] == 0) && (CH_rrc_inst[Mod_id].Info.UE_info[i][3] == 0) &&
(CH_rrc_inst[Mod_id].Info.UE_list[i][4] == 0)) { (CH_rrc_inst[Mod_id].Info.UE_info[i][4] == 0)) {
return i; return i;
} }
...@@ -78,7 +78,7 @@ unsigned short rrc_find_ue_index(unsigned char Mod_id, L2_ID Mac_id) { ...@@ -78,7 +78,7 @@ unsigned short rrc_find_ue_index(unsigned char Mod_id, L2_ID Mac_id) {
unsigned char i; unsigned char i;
/* /*
for(i=0;i<=NB_CNX_CH;i++) for(i=0;i<=NB_CNX_CH;i++)
if( bcmp(Mac_id.L2_id,CH_rrc_inst[Mod_id].Info.UE_list[i].L2_id,sizeof(L2_ID))==0) if( bcmp(Mac_id.L2_id,CH_rrc_inst[Mod_id].Info.UE_info[i].L2_id,sizeof(L2_ID))==0)
return i; return i;
return i; return i;
*/ */
...@@ -167,7 +167,7 @@ unsigned char rrc_is_mobile_already_associated(uint8_t Mod_id, L2_ID Mac_id) { ...@@ -167,7 +167,7 @@ unsigned char rrc_is_mobile_already_associated(uint8_t Mod_id, L2_ID Mac_id) {
/* /*
unsigned char i; unsigned char i;
for(i=0;i<NB_CNX_CH;i++) for(i=0;i<NB_CNX_CH;i++)
if( bcmp(Mac_id.L2_id,CH_rrc_inst[Mod_id].Info.UE_list[i].L2_id,sizeof(L2_ID))==0) if( bcmp(Mac_id.L2_id,CH_rrc_inst[Mod_id].Info.UE_info[i].L2_id,sizeof(L2_ID))==0)
return 1; return 1;
return 0; return 0;
*/ */
......
...@@ -235,10 +235,10 @@ static inline int rxtx(PHY_VARS_eNB *eNB, ...@@ -235,10 +235,10 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use; new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use;
dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use; dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use;
// L2-emulator can work only one eNB. // L2-emulator can work only one eNB.
// memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX); // memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
// memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX); // memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
memcpy(&pre_scd_eNB_UE_stats,&RC.mac[0]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX); memcpy(&pre_scd_eNB_UE_stats,&RC.mac[0]->UE_info.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
memcpy(&pre_scd_activeUE, &RC.mac[0]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX); memcpy(&pre_scd_activeUE, &RC.mac[0]->UE_info.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
AssertFatal((ret= pthread_mutex_lock(&ru->proc.mutex_pre_scd))==0,"[eNB] error locking proc mutex for eNB pre scd, return %d\n",ret); AssertFatal((ret= pthread_mutex_lock(&ru->proc.mutex_pre_scd))==0,"[eNB] error locking proc mutex for eNB pre scd, return %d\n",ret);
ru->proc.instance_pre_scd++; ru->proc.instance_pre_scd++;
......
...@@ -1866,8 +1866,8 @@ static void *ru_thread( void *param ) { ...@@ -1866,8 +1866,8 @@ static void *ru_thread( void *param ) {
#if defined(PRE_SCD_THREAD) #if defined(PRE_SCD_THREAD)
new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use; new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use;
dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use; dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use;
memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX); memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX); memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
AssertFatal((ret=pthread_mutex_lock(&ru->proc.mutex_pre_scd))==0,"[eNB] error locking proc mutex for eNB pre scd\n"); AssertFatal((ret=pthread_mutex_lock(&ru->proc.mutex_pre_scd))==0,"[eNB] error locking proc mutex for eNB pre scd\n");
ru->proc.instance_pre_scd++; ru->proc.instance_pre_scd++;
......
...@@ -435,7 +435,7 @@ int restart_L1L2(module_id_t enb_id) { ...@@ -435,7 +435,7 @@ int restart_L1L2(module_id_t enb_id) {
set_function_spec_param(RC.ru[enb_id]); set_function_spec_param(RC.ru[enb_id]);
/* reset the list of connected UEs in the MAC, since in this process with /* reset the list of connected UEs in the MAC, since in this process with
* loose all UEs (have to reconnect) */ * loose all UEs (have to reconnect) */
init_UE_list(&RC.mac[enb_id]->UE_list); init_UE_info(&RC.mac[enb_id]->UE_info);
LOG_I(ENB_APP, "attempting to create ITTI tasks\n"); LOG_I(ENB_APP, "attempting to create ITTI tasks\n");
if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) { if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) {
......
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