integration: cleanup
- remove spaces at the end of lines - remove useless dead code use: git show -p <this commit> -w to see it clearly
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
*/
|
||||
|
||||
/*! \file flexran_agent_mac.c
|
||||
* \brief FlexRAN agent message handler for MAC layer
|
||||
@@ -54,7 +54,7 @@ struct lfds700_ringbuffer_element *dl_mac_config_array[NUM_MAX_ENB];
|
||||
struct lfds700_ringbuffer_state ringbuffer_state[NUM_MAX_ENB];
|
||||
|
||||
|
||||
int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
const report_config_t *report_config,
|
||||
Protocol__FlexUeStatsReport **ue_report,
|
||||
Protocol__FlexCellStatsReport **cell_report) {
|
||||
@@ -68,7 +68,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
/* Allocate memory for list of UE reports */
|
||||
if (report_config->nr_ue > 0) {
|
||||
|
||||
|
||||
|
||||
for (i = 0; i < report_config->nr_ue; i++) {
|
||||
|
||||
|
||||
@@ -76,24 +76,24 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
/* Check flag for creation of buffer status report */
|
||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_BSR) {
|
||||
//TODO should be automated
|
||||
ue_report[i]->n_bsr = 4;
|
||||
ue_report[i]->n_bsr = 4;
|
||||
uint32_t *elem;
|
||||
elem = (uint32_t *) malloc(sizeof(uint32_t)*ue_report[i]->n_bsr);
|
||||
if (elem == NULL)
|
||||
goto error;
|
||||
for (j = 0; j < ue_report[i]->n_bsr; j++) {
|
||||
// NN: we need to know the cc_id here, consider the first one
|
||||
// NN: we need to know the cc_id here, consider the first one
|
||||
elem[j] = flexran_get_ue_bsr_ul_buffer_info (enb_id, i, j);
|
||||
}
|
||||
|
||||
|
||||
ue_report[i]->bsr = elem;
|
||||
}
|
||||
|
||||
|
||||
/* Check flag for creation of PHR report */
|
||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_PHR) {
|
||||
ue_report[i]->phr = flexran_get_ue_phr (enb_id, i); // eNB_UE_list->UE_template[UE_PCCID(enb_id,i)][i].phr_info;
|
||||
ue_report[i]->has_phr = 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Check flag for creation of RLC buffer status report */
|
||||
@@ -134,19 +134,19 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
if (ue_report[i]->n_rlc_report > 0)
|
||||
ue_report[i]->rlc_report = rlc_reports;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Check flag for creation of MAC CE buffer status report */
|
||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_CE_BS) {
|
||||
// TODO: Fill in the actual MAC CE buffer status report
|
||||
ue_report[i]->pending_mac_ces = (flexran_get_MAC_CE_bitmap_TA(enb_id,i,0) | (0 << 1) | (0 << 2) | (0 << 3)) & 15;
|
||||
ue_report[i]->pending_mac_ces = (flexran_get_MAC_CE_bitmap_TA(enb_id,i,0) | (0 << 1) | (0 << 2) | (0 << 3)) & 15;
|
||||
// Use as bitmap. Set one or more of the; /* Use as bitmap. Set one or more of the
|
||||
// PROTOCOL__FLEX_CE_TYPE__FLPCET_ values
|
||||
// found in stats_common.pb-c.h. See
|
||||
// flex_ce_type in FlexRAN specification
|
||||
// flex_ce_type in FlexRAN specification
|
||||
ue_report[i]->has_pending_mac_ces = 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Check flag for creation of DL CQI report */
|
||||
@@ -167,7 +167,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
Protocol__FlexDlCsi **csi_reports;
|
||||
csi_reports = malloc(sizeof(Protocol__FlexDlCsi *)*dl_report->n_csi_report);
|
||||
if (csi_reports == NULL)
|
||||
goto error;
|
||||
goto error;
|
||||
for (j = 0; j < dl_report->n_csi_report; j++) {
|
||||
|
||||
csi_reports[j] = malloc(sizeof(Protocol__FlexDlCsi));
|
||||
@@ -211,18 +211,18 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
if (csi11 == NULL)
|
||||
goto error;
|
||||
protocol__flex_csi_p11__init(csi11);
|
||||
|
||||
csi11->wb_cqi = malloc(sizeof(csi11->wb_cqi));
|
||||
|
||||
csi11->wb_cqi = malloc(sizeof(csi11->wb_cqi));
|
||||
csi11->n_wb_cqi = 1;
|
||||
csi11->wb_cqi[0] = flexran_get_ue_wcqi (enb_id, i);
|
||||
// According To spec 36.213
|
||||
|
||||
csi11->wb_cqi[0] = flexran_get_ue_wcqi (enb_id, i);
|
||||
// According To spec 36.213
|
||||
|
||||
if (flexran_get_antenna_ports(enb_id, j) == 2 && csi_reports[j]->ri == 1) {
|
||||
// TODO PMI
|
||||
csi11->wb_pmi = flexran_get_ue_wpmi(enb_id, i, 0);
|
||||
csi11->has_wb_pmi = 1;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
else if (flexran_get_antenna_ports(enb_id, j) == 2 && csi_reports[j]->ri == 2){
|
||||
// TODO PMI
|
||||
@@ -239,14 +239,14 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
}
|
||||
|
||||
csi11->has_wb_pmi = 0;
|
||||
csi11->has_wb_pmi = 0;
|
||||
|
||||
csi_reports[j]->p11csi = csi11;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else if(csi_reports[j]->report_case == PROTOCOL__FLEX_DL_CSI__REPORT_P20CSI){
|
||||
@@ -256,16 +256,16 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
if (csi20 == NULL)
|
||||
goto error;
|
||||
protocol__flex_csi_p20__init(csi20);
|
||||
|
||||
csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
|
||||
csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
csi20->has_wb_cqi = 1;
|
||||
|
||||
|
||||
|
||||
csi20->bandwidth_part_index = 1 ;//TODO
|
||||
csi20->has_bandwidth_part_index = 1;
|
||||
|
||||
csi20->sb_index = 1 ;//TODO
|
||||
csi20->has_sb_index = 1 ;
|
||||
csi20->has_sb_index = 1 ;
|
||||
|
||||
|
||||
csi_reports[j]->p20csi = csi20;
|
||||
@@ -280,20 +280,20 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
// if (csi21 == NULL)
|
||||
// goto error;
|
||||
// protocol__flex_csi_p21__init(csi21);
|
||||
|
||||
// csi21->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
|
||||
|
||||
|
||||
// csi21->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
|
||||
|
||||
// csi21->wb_pmi = flexran_get_ue_pmi(enb_id); //TDO inside
|
||||
// csi21->has_wb_pmi = 1;
|
||||
|
||||
// csi21->sb_cqi = 1; // TODO
|
||||
|
||||
// csi21->sb_cqi = 1; // TODO
|
||||
|
||||
// csi21->bandwidth_part_index = 1 ; //TDO inside
|
||||
// csi21->has_bandwidth_part_index = 1 ;
|
||||
// csi21->has_bandwidth_part_index = 1 ;
|
||||
|
||||
// csi21->sb_index = 1 ;//TODO
|
||||
// csi21->has_sb_index = 1 ;
|
||||
// csi21->has_sb_index = 1 ;
|
||||
|
||||
|
||||
// csi_reports[j]->p20csi = csi21;
|
||||
@@ -308,10 +308,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
// if (csi12 == NULL)
|
||||
// goto error;
|
||||
// protocol__flex_csi_a12__init(csi12);
|
||||
|
||||
// csi12->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
|
||||
// csi12->sb_pmi = 1 ; //TODO inside
|
||||
|
||||
// csi12->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
|
||||
// csi12->sb_pmi = 1 ; //TODO inside
|
||||
|
||||
// TODO continou
|
||||
}
|
||||
@@ -323,18 +323,18 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
// if (csi22 == NULL)
|
||||
// goto error;
|
||||
// protocol__flex_csi_a22__init(csi22);
|
||||
|
||||
// csi22->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
|
||||
// csi22->sb_cqi = 1 ; //TODO inside
|
||||
|
||||
// csi22->wb_pmi = flexran_get_ue_wcqi (enb_id, i);
|
||||
// csi22->has_wb_pmi = 1;
|
||||
|
||||
// csi22->sb_pmi = 1 ; //TODO inside
|
||||
// csi22->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
|
||||
// csi22->sb_cqi = 1 ; //TODO inside
|
||||
|
||||
// csi22->wb_pmi = flexran_get_ue_wcqi (enb_id, i);
|
||||
// csi22->has_wb_pmi = 1;
|
||||
|
||||
// csi22->sb_list = flexran_get_ue_wcqi (enb_id, i);
|
||||
// csi22->sb_pmi = 1 ; //TODO inside
|
||||
// csi22->has_wb_pmi = 1;
|
||||
|
||||
// csi22->sb_list = flexran_get_ue_wcqi (enb_id, i);
|
||||
|
||||
|
||||
}
|
||||
@@ -347,10 +347,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
// goto error;
|
||||
// protocol__flex_csi_a20__init(csi20);
|
||||
|
||||
// csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
// csi20->wb_cqi = flexran_get_ue_wcqi (enb_id, i);
|
||||
// csi20->has_wb_cqi = 1;
|
||||
|
||||
// csi20>sb_cqi = 1 ; //TODO inside
|
||||
// csi20>sb_cqi = 1 ; //TODO inside
|
||||
// csi20>has_sb_cqi = 1 ;
|
||||
|
||||
// csi20->sb_list = 1; // TODO inside
|
||||
@@ -371,7 +371,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
dl_report->csi_report = csi_reports;
|
||||
//Add the DL CQI report to the stats report
|
||||
ue_report[i]->dl_cqi_report = dl_report;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Check flag for creation of paging buffer status report */
|
||||
@@ -463,7 +463,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
//TODO: Set the servCellIndex for this report
|
||||
ul_report[j]->serv_cell_index = 0;
|
||||
ul_report[j]->has_serv_cell_index = 1;
|
||||
|
||||
|
||||
//Set the list of UL reports of this UE to the full UL report
|
||||
full_ul_report->cqi_meas = ul_report;
|
||||
|
||||
@@ -487,9 +487,9 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
}
|
||||
// Add full UL CQI report to the UE report
|
||||
ue_report[i]->ul_cqi_report = full_ul_report;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (report_config->ue_report_type[i].ue_report_flags & PROTOCOL__FLEX_UE_STATS_TYPE__FLUST_MAC_STATS) {
|
||||
|
||||
Protocol__FlexMacStats *macstats;
|
||||
@@ -497,7 +497,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
if (macstats == NULL)
|
||||
goto error;
|
||||
protocol__flex_mac_stats__init(macstats);
|
||||
|
||||
|
||||
|
||||
macstats->total_bytes_sdus_dl = flexran_get_total_size_dl_mac_sdus(mod_id, i, cc_id);
|
||||
macstats->has_total_bytes_sdus_dl = 1;
|
||||
@@ -508,7 +508,7 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
macstats->tbs_dl = flexran_get_TBS_dl(mod_id, i, cc_id);
|
||||
macstats->has_tbs_dl = 1;
|
||||
|
||||
macstats->tbs_ul = flexran_get_TBS_ul(mod_id, i, cc_id);
|
||||
macstats->tbs_ul = flexran_get_TBS_ul(mod_id, i, cc_id);
|
||||
macstats->has_tbs_ul = 1;
|
||||
|
||||
macstats->prb_retx_dl = flexran_get_num_prb_retx_dl_per_ue(mod_id, i, cc_id);
|
||||
@@ -556,16 +556,16 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
macstats->harq_round = flexran_get_harq_round(mod_id, cc_id, i);
|
||||
macstats->has_harq_round = 1;
|
||||
|
||||
Protocol__FlexMacSdusDl ** mac_sdus;
|
||||
Protocol__FlexMacSdusDl ** mac_sdus;
|
||||
mac_sdus = malloc(sizeof(Protocol__FlexMacSdusDl) * flexran_get_num_mac_sdu_tx(mod_id, i, cc_id));
|
||||
if (mac_sdus == NULL)
|
||||
goto error;
|
||||
|
||||
macstats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, i, cc_id);
|
||||
|
||||
macstats->n_mac_sdus_dl = flexran_get_num_mac_sdu_tx(mod_id, i, cc_id);
|
||||
|
||||
for (j = 0; j < macstats->n_mac_sdus_dl; j++){
|
||||
|
||||
|
||||
|
||||
mac_sdus[j] = malloc(sizeof(Protocol__FlexMacSdusDl));
|
||||
protocol__flex_mac_sdus_dl__init(mac_sdus[j]);
|
||||
|
||||
@@ -577,29 +577,29 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
macstats->mac_sdus_dl = mac_sdus;
|
||||
|
||||
|
||||
ue_report[i]->mac_stats = macstats;
|
||||
macstats->mac_sdus_dl = mac_sdus;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
ue_report[i]->mac_stats = macstats;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Allocate memory for list of cell reports */
|
||||
if (report_config->nr_cc > 0) {
|
||||
|
||||
|
||||
|
||||
|
||||
// Fill in the Cell reports
|
||||
for (i = 0; i < report_config->nr_cc; i++) {
|
||||
|
||||
@@ -627,10 +627,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
|
||||
cell_report[i]->noise_inter_report = ni_report;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -835,9 +835,9 @@ int flexran_agent_mac_destroy_sr_info(Protocol__FlexranMessage *msg) {
|
||||
int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) {
|
||||
Protocol__FlexHeader *header = NULL;
|
||||
int i, j, UE_id;
|
||||
|
||||
|
||||
int available_harq[NUMBER_OF_UE_MAX];
|
||||
|
||||
|
||||
const int xid = *((int *)params);
|
||||
|
||||
|
||||
@@ -859,12 +859,12 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
}
|
||||
|
||||
int ahead_of_time = 0;
|
||||
|
||||
|
||||
frame = (frame_t) flexran_get_current_system_frame_num(mod_id);
|
||||
subframe = (sub_frame_t) flexran_get_current_subframe(mod_id);
|
||||
|
||||
subframe = ((subframe + ahead_of_time) % 10);
|
||||
|
||||
|
||||
if (subframe < flexran_get_current_subframe(mod_id)) {
|
||||
frame = (frame + 1) % 1024;
|
||||
}
|
||||
@@ -887,7 +887,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// LOG_I(FLEXRAN_AGENT, "Sending subframe trigger for frame %d and subframe %d\n", flexran_get_current_frame(mod_id), (flexran_get_current_subframe(mod_id) + 1) % 10);
|
||||
|
||||
@@ -920,8 +920,8 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
// uint8_t harq_id;
|
||||
//uint8_t harq_status;
|
||||
// flexran_get_harq(mod_id, UE_PCCID(mod_id,i), i, frame, subframe, &harq_id, &harq_status);
|
||||
|
||||
|
||||
|
||||
|
||||
dl_info[i]->harq_process_id = available_harq[UE_id];
|
||||
if (RC.mac && RC.mac[mod_id])
|
||||
RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][UE_id].harq_pid = 0;
|
||||
@@ -1010,7 +1010,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
|
||||
for (i = 0; i < sf_trigger_msg->n_dl_info; i++) {
|
||||
free(sf_trigger_msg->dl_info[i]->harq_status);
|
||||
}
|
||||
free(sf_trigger_msg->dl_info);
|
||||
free(sf_trigger_msg->dl_info);
|
||||
free(sf_trigger_msg->ul_info);
|
||||
free(sf_trigger_msg);
|
||||
}
|
||||
@@ -1184,7 +1184,7 @@ int flexran_agent_mac_destroy_ul_config(Protocol__FlexranMessage *msg) {
|
||||
free(msg->ul_mac_config_msg->header);
|
||||
for (i = 0; i < msg->ul_mac_config_msg->n_ul_ue_data; i++) {
|
||||
// TODO uplink rlc ...
|
||||
// free(msg->ul_mac_config_msg->dl_ue_data[i]->ce_bitmap);
|
||||
// free(msg->ul_mac_config_msg->dl_ue_data[i]->ce_bitmap);
|
||||
// for (j = 0; j < msg->ul_mac_config_msg->ul_ue_data[i]->n_rlc_pdu; j++) {
|
||||
// for (k = 0; k < msg->ul_mac_config_msg->ul_ue_data[i]->rlc_pdu[j]->n_rlc_pdu_tb; k++) {
|
||||
// free(msg->ul_mac_config_msg->dl_ue_data[i]->rlc_pdu[j]->rlc_pdu_tb[k]);
|
||||
@@ -1202,7 +1202,7 @@ int flexran_agent_mac_destroy_ul_config(Protocol__FlexranMessage *msg) {
|
||||
// free(msg->ul_mac_config_msg->ul_ue_data[i]);
|
||||
}
|
||||
free(msg->ul_mac_config_msg->ul_ue_data);
|
||||
|
||||
|
||||
free(msg->ul_mac_config_msg);
|
||||
free(msg);
|
||||
|
||||
@@ -1216,10 +1216,10 @@ int flexran_agent_mac_destroy_ul_config(Protocol__FlexranMessage *msg) {
|
||||
void flexran_agent_get_pending_dl_mac_config(mid_t mod_id, Protocol__FlexranMessage **msg) {
|
||||
|
||||
struct lfds700_misc_prng_state ls;
|
||||
|
||||
|
||||
LFDS700_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE;
|
||||
lfds700_misc_prng_init(&ls);
|
||||
|
||||
|
||||
if (lfds700_ringbuffer_read(&ringbuffer_state[mod_id], NULL, (void **) msg, &ls) == 0) {
|
||||
*msg = NULL;
|
||||
}
|
||||
@@ -1230,10 +1230,10 @@ int flexran_agent_mac_handle_dl_mac_config(mid_t mod_id, const void *params, Pro
|
||||
struct lfds700_misc_prng_state ls;
|
||||
enum lfds700_misc_flag overwrite_occurred_flag;
|
||||
Protocol__FlexranMessage *overwritten_dl_config;
|
||||
|
||||
|
||||
LFDS700_MISC_MAKE_VALID_ON_CURRENT_LOGICAL_CORE_INITS_COMPLETED_BEFORE_NOW_ON_ANY_OTHER_LOGICAL_CORE;
|
||||
lfds700_misc_prng_init(&ls);
|
||||
|
||||
|
||||
lfds700_ringbuffer_write( &ringbuffer_state[mod_id],
|
||||
NULL,
|
||||
(void *) params,
|
||||
@@ -1347,7 +1347,7 @@ int flexran_agent_register_mac_xface(mid_t mod_id, AGENT_MAC_xface *xface) {
|
||||
xface->flexran_agent_send_sf_trigger = flexran_agent_send_sf_trigger;
|
||||
//xface->flexran_agent_send_update_mac_stats = flexran_agent_send_update_mac_stats;
|
||||
xface->flexran_agent_get_pending_dl_mac_config = flexran_agent_get_pending_dl_mac_config;
|
||||
|
||||
|
||||
xface->dl_scheduler_loaded_lib = NULL;
|
||||
xface->ul_scheduler_loaded_lib = NULL;
|
||||
mac_agent_registered[mod_id] = 1;
|
||||
|
||||
+38
-38
@@ -157,13 +157,13 @@
|
||||
|
||||
#define U_PLANE_INACTIVITY_VALUE 6000
|
||||
|
||||
/*
|
||||
* eNB part
|
||||
/*
|
||||
* eNB part
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* UE/ENB common part
|
||||
/*
|
||||
* UE/ENB common part
|
||||
*/
|
||||
/*!\brief MAC header of Random Access Response for Random access preamble identifier (RAPID) */
|
||||
typedef struct {
|
||||
@@ -448,20 +448,20 @@ typedef struct {
|
||||
} eNB_DLSCH_INFO;
|
||||
/*! \brief eNB overall statistics */
|
||||
typedef struct {
|
||||
/// num BCCH PDU per CC
|
||||
/// num BCCH PDU per CC
|
||||
uint32_t total_num_bcch_pdu;
|
||||
/// BCCH buffer size
|
||||
/// BCCH buffer size
|
||||
uint32_t bcch_buffer;
|
||||
/// total BCCH buffer size
|
||||
/// total BCCH buffer size
|
||||
uint32_t total_bcch_buffer;
|
||||
/// BCCH MCS
|
||||
uint32_t bcch_mcs;
|
||||
|
||||
/// num CCCH PDU per CC
|
||||
/// num CCCH PDU per CC
|
||||
uint32_t total_num_ccch_pdu;
|
||||
/// BCCH buffer size
|
||||
/// BCCH buffer size
|
||||
uint32_t ccch_buffer;
|
||||
/// total BCCH buffer size
|
||||
/// total BCCH buffer size
|
||||
uint32_t total_ccch_buffer;
|
||||
/// BCCH MCS
|
||||
uint32_t ccch_mcs;
|
||||
@@ -562,13 +562,13 @@ typedef struct {
|
||||
uint32_t num_retransmission;
|
||||
/// instantaneous tx throughput for each TTI
|
||||
// uint32_t tti_throughput[NB_RB_MAX];
|
||||
// Number of received MAC SDU
|
||||
// Number of received MAC SDU
|
||||
uint32_t num_mac_sdu_tx;
|
||||
// LCID related to SDU
|
||||
unsigned char lcid_sdu[NB_RB_MAX];
|
||||
// Length of SDU Got from LC DL
|
||||
uint32_t sdu_length_tx[NB_RB_MAX];
|
||||
|
||||
|
||||
|
||||
/// overall
|
||||
//
|
||||
@@ -614,7 +614,7 @@ typedef struct {
|
||||
|
||||
/// uplink transport block size
|
||||
uint32_t ulsch_TBS;
|
||||
|
||||
|
||||
uint32_t total_ulsch_TBS;
|
||||
|
||||
/// total rb used for a new uplink transmission
|
||||
@@ -625,9 +625,9 @@ typedef struct {
|
||||
uint32_t rbs_used_retx_rx;
|
||||
/// total rb used for a new uplink transmission
|
||||
uint32_t total_rbs_used_rx;
|
||||
/// normalized rx power
|
||||
/// normalized rx power
|
||||
int32_t normalized_rx_power;
|
||||
/// target rx power
|
||||
/// target rx power
|
||||
int32_t target_rx_power;
|
||||
|
||||
/// num rx pdu
|
||||
@@ -754,7 +754,7 @@ typedef struct {
|
||||
uint32_t dl_buffer_head_sdu_creation_time[MAX_NUM_LCID];
|
||||
/// maximum creation time of the downlink buffer head across all LCID
|
||||
uint32_t dl_buffer_head_sdu_creation_time_max;
|
||||
/// a flag indicating that the downlink head SDU is segmented
|
||||
/// a flag indicating that the downlink head SDU is segmented
|
||||
uint8_t dl_buffer_head_sdu_is_segmented[MAX_NUM_LCID];
|
||||
/// size of remaining size to send for the downlink head SDU
|
||||
uint32_t dl_buffer_head_sdu_remaining_size_to_send[MAX_NUM_LCID];
|
||||
@@ -949,21 +949,21 @@ typedef struct {
|
||||
/// Dedicated information for UEs
|
||||
struct PhysicalConfigDedicated
|
||||
*physicalConfigDedicated[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
/// DLSCH pdu
|
||||
/// DLSCH pdu
|
||||
DLSCH_PDU DLSCH_pdu[MAX_NUM_CCs][2][NUMBER_OF_UE_MAX];
|
||||
/// DCI template and MAC connection parameters for UEs
|
||||
UE_TEMPLATE UE_template[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
/// DCI template and MAC connection for RA processes
|
||||
int pCC_id[NUMBER_OF_UE_MAX];
|
||||
/// sorted downlink component carrier for the scheduler
|
||||
/// sorted downlink component carrier for the scheduler
|
||||
int ordered_CCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
/// number of downlink active component carrier
|
||||
/// number of downlink active component carrier
|
||||
int numactiveCCs[NUMBER_OF_UE_MAX];
|
||||
/// sorted uplink component carrier for the scheduler
|
||||
/// sorted uplink component carrier for the scheduler
|
||||
int ordered_ULCCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
/// number of uplink active component carrier
|
||||
/// number of uplink active component carrier
|
||||
int numactiveULCCs[NUMBER_OF_UE_MAX];
|
||||
/// number of downlink active component carrier
|
||||
/// number of downlink active component carrier
|
||||
uint8_t dl_CC_bitmap[NUMBER_OF_UE_MAX];
|
||||
/// eNB to UE statistics
|
||||
eNB_UE_STATS eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
@@ -1089,7 +1089,7 @@ typedef struct eNB_MAC_INST_s {
|
||||
nfapi_ul_config_request_t UL_req[MAX_NUM_CCs];
|
||||
/// NFAPI "Temporary" UL Config Request Structure, holds future UL_config requests
|
||||
nfapi_ul_config_request_t UL_req_tmp[MAX_NUM_CCs][10];
|
||||
/// Preallocated HI_DCI0 pdu list
|
||||
/// Preallocated HI_DCI0 pdu list
|
||||
nfapi_hi_dci0_request_pdu_t
|
||||
hi_dci0_pdu_list[MAX_NUM_CCs][MAX_NUM_HI_DCI0_PDU];
|
||||
/// NFAPI HI/DCI0 Config Request Structure
|
||||
@@ -1112,21 +1112,21 @@ typedef struct eNB_MAC_INST_s {
|
||||
/// eNB stats
|
||||
eNB_STATS eNB_stats[MAX_NUM_CCs];
|
||||
// MAC function execution peformance profiler
|
||||
/// processing time of eNB scheduler
|
||||
/// processing time of eNB scheduler
|
||||
time_stats_t eNB_scheduler;
|
||||
/// processing time of eNB scheduler for SI
|
||||
/// processing time of eNB scheduler for SI
|
||||
time_stats_t schedule_si;
|
||||
/// processing time of eNB scheduler for Random access
|
||||
time_stats_t schedule_ra;
|
||||
/// processing time of eNB ULSCH scheduler
|
||||
/// processing time of eNB ULSCH scheduler
|
||||
time_stats_t schedule_ulsch;
|
||||
/// processing time of eNB DCI generation
|
||||
time_stats_t fill_DLSCH_dci;
|
||||
/// processing time of eNB MAC preprocessor
|
||||
time_stats_t schedule_dlsch_preprocessor;
|
||||
/// processing time of eNB DLSCH scheduler
|
||||
/// processing time of eNB DLSCH scheduler
|
||||
time_stats_t schedule_dlsch; // include rlc_data_req + MAC header + preprocessor
|
||||
/// processing time of eNB MCH scheduler
|
||||
/// processing time of eNB MCH scheduler
|
||||
time_stats_t schedule_mch;
|
||||
/// processing time of eNB ULSCH reception
|
||||
time_stats_t rx_ulsch_sdu; // include rlc_data_ind
|
||||
@@ -1134,8 +1134,8 @@ typedef struct eNB_MAC_INST_s {
|
||||
time_stats_t schedule_pch;
|
||||
} eNB_MAC_INST;
|
||||
|
||||
/*
|
||||
* UE part
|
||||
/*
|
||||
* UE part
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
@@ -1329,24 +1329,24 @@ typedef struct {
|
||||
uint8_t msi_status; // could be an array if there are >1 MCH in one MBSFN area
|
||||
#endif
|
||||
//#ifdef CBA
|
||||
/// CBA RNTI for each group
|
||||
/// CBA RNTI for each group
|
||||
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
||||
/// last SFN for CBA channel access
|
||||
/// last SFN for CBA channel access
|
||||
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
|
||||
//#endif
|
||||
/// total UE scheduler processing time
|
||||
/// total UE scheduler processing time
|
||||
time_stats_t ue_scheduler; // total
|
||||
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
|
||||
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
|
||||
time_stats_t tx_ulsch_sdu;
|
||||
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
|
||||
time_stats_t rx_dlsch_sdu;
|
||||
/// UE query for MCH subframe processing time
|
||||
/// UE query for MCH subframe processing time
|
||||
time_stats_t ue_query_mch;
|
||||
/// UE MCH rx processing time
|
||||
/// UE MCH rx processing time
|
||||
time_stats_t rx_mch_sdu;
|
||||
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
||||
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
||||
time_stats_t rx_si;
|
||||
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
||||
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
||||
time_stats_t rx_p;
|
||||
} UE_MAC_INST;
|
||||
/*! \brief ID of the neighboring cells used for HO*/
|
||||
|
||||
@@ -744,7 +744,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
}
|
||||
}
|
||||
/* if (continue_flag != 1 */
|
||||
if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated
|
||||
if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated
|
||||
CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP,
|
||||
aggregation, rnti)) {
|
||||
LOG_D(MAC,
|
||||
@@ -929,7 +929,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdu++;
|
||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
|
||||
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
|
||||
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
|
||||
@@ -1116,7 +1116,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
TBS - ta_len - header_len_dcch -
|
||||
sdu_length_total - header_len_dtch);
|
||||
|
||||
if (TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch > 0) { // NN: > 2 ?
|
||||
if (TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch > 0) { // NN: > 2 ?
|
||||
rlc_status = mac_rlc_status_ind(module_idP,
|
||||
rnti,
|
||||
module_idP,
|
||||
@@ -1158,7 +1158,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid]
|
||||
+= 1;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].lcid_sdu[num_sdus] = lcid;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[lcid] = sdu_lengths[num_sdus];
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].sdu_length_tx[lcid] = sdu_lengths[num_sdus];
|
||||
UE_list->
|
||||
eNB_UE_stats[CC_id][UE_id].num_bytes_tx
|
||||
[lcid] += sdu_lengths[num_sdus];
|
||||
@@ -1180,7 +1180,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
}
|
||||
if (header_len_dtch == 0)
|
||||
header_len_dtch_last = 0;
|
||||
// there is at least one SDU
|
||||
// there is at least one SDU
|
||||
// if (num_sdus > 0 ){
|
||||
if ((sdu_length_total + header_len_dcch +
|
||||
header_len_dtch) > 0) {
|
||||
@@ -1193,7 +1193,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
if (header_len_dtch == 0) {
|
||||
header_len_dcch = (header_len_dcch > 0) ? 1 : 0; //header_len_dcch; // remove length field
|
||||
} else {
|
||||
header_len_dtch_last -= 1; // now use it to find how many bytes has to be removed for the last MAC SDU
|
||||
header_len_dtch_last -= 1; // now use it to find how many bytes has to be removed for the last MAC SDU
|
||||
header_len_dtch = (header_len_dtch > 0) ? header_len_dtch - header_len_dtch_last : header_len_dtch; // remove length field for the last SDU
|
||||
}
|
||||
|
||||
@@ -1413,10 +1413,10 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
tpc, tpc_accumulated,
|
||||
normalized_rx_power, target_rx_power);
|
||||
|
||||
} // Po_PUCCH has been updated
|
||||
} // Po_PUCCH has been updated
|
||||
else {
|
||||
tpc = 1; //0
|
||||
} // time to do TPC update
|
||||
} // time to do TPC update
|
||||
else {
|
||||
tpc = 1; //0
|
||||
}
|
||||
@@ -1515,7 +1515,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
|
||||
UE_list.DLSCH_pdu[CC_id][0][(unsigned char)
|
||||
UE_id].payload
|
||||
[0]);
|
||||
|
||||
|
||||
LOG_D(MAC,
|
||||
"Filled NFAPI configuration for DCI/DLSCH/TXREQ %d, new SDU\n",
|
||||
eNB->pdu_index[CC_id]);
|
||||
@@ -1695,9 +1695,9 @@ update_ul_dci(module_id_t module_idP,
|
||||
int i;
|
||||
|
||||
|
||||
if (cc->tdd_Config != NULL) { // TDD
|
||||
if (cc->tdd_Config != NULL) { // TDD
|
||||
for (i = 0;
|
||||
i <HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_dci;
|
||||
i <HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_dci;
|
||||
i++) {
|
||||
|
||||
if ((hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) &&
|
||||
|
||||
Reference in New Issue
Block a user