diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 290c367687..638e79e3c9 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -47,7 +47,6 @@ #include "utils.h" #include -#include "LAYER2/RLC/rlc.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" #include "RRC/NR_UE/L2_interface_ue.h" @@ -1269,8 +1268,7 @@ static void nr_update_rlc_buffers_status(NR_UE_MAC_INST_t *mac, frame_t frameP, nr_lcordered_info_t *lc_info = mac->lc_ordered_list.array[i]; int lcid = lc_info->lcid; NR_LC_SCHEDULING_INFO *lc_sched_info = get_scheduling_info_from_lcid(mac, lcid); - mac_rlc_status_resp_t rlc_status = - mac_rlc_status_ind(mac->ue_id, mac->ue_id, gNB_index, frameP, slotP, ENB_FLAG_NO, MBMS_FLAG_NO, lcid, 0, 0); + mac_rlc_status_resp_t rlc_status = nr_mac_rlc_status_ind(mac->ue_id, frameP, lcid); if (rlc_status.bytes_in_buffer > 0) { LOG_D(NR_MAC, diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 14a70ebc41..147b8abc6c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -42,7 +42,6 @@ /* rlc */ #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" -#include "openair2/LAYER2/RLC/rlc.h" #include @@ -1880,12 +1879,12 @@ static void nr_generate_Msg4_MsgB(module_id_t module_idP, logical_chan_id_t lcid = DL_SCH_LCID_CCCH; if (current_harq_pid < 0) { // Check for data on SRB0 (RRCSetup) - mac_rlc_status_resp_t srb_status = mac_rlc_status_ind(module_idP, ra->rnti, module_idP, frameP, slotP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0, 0); + mac_rlc_status_resp_t srb_status = nr_mac_rlc_status_ind(ra->rnti, frameP, lcid); if (srb_status.bytes_in_buffer == 0) { lcid = DL_SCH_LCID_DCCH; // Check for data on SRB1 (RRCReestablishment, RRCReconfiguration) - srb_status = mac_rlc_status_ind(module_idP, ra->rnti, module_idP, frameP, slotP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0, 0); + srb_status = nr_mac_rlc_status_ind(ra->rnti, frameP, lcid); } // Need to wait until data for Msg4 is ready diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 25c196ee3f..2a5b979f5a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -35,7 +35,6 @@ #include "NR_MAC_gNB/nr_mac_gNB.h" #include "LAYER2/NR_MAC_gNB/mac_proto.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" -#include "LAYER2/RLC/rlc.h" /*TAG*/ #include "NR_TAG-Id.h" @@ -339,16 +338,7 @@ static void nr_store_dlsch_buffer(module_id_t module_id, frame_t frame, slot_t s if (lcid == DL_SCH_LCID_DTCH && nr_timer_is_active(&sched_ctrl->transm_interrupt)) continue; start_meas(&RC.nrmac[module_id]->rlc_status_ind); - sched_ctrl->rlc_status[lcid] = mac_rlc_status_ind(module_id, - rnti, - module_id, - frame, - slot, - ENB_FLAG_YES, - MBMS_FLAG_NO, - lcid, - 0, - 0); + sched_ctrl->rlc_status[lcid] = nr_mac_rlc_status_ind(rnti, frame, lcid); stop_meas(&RC.nrmac[module_id]->rlc_status_ind); if (sched_ctrl->rlc_status[lcid].bytes_in_buffer == 0) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 36b9a5fd39..55d9738938 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -33,7 +33,7 @@ #include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" #include "executables/nr-softmodem.h" #include "LAYER2/NR_MAC_COMMON/nr_mac.h" -#include "LAYER2/RLC/rlc.h" +#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" #include "executables/softmodem-common.h" #include "common/utils/nr/nr_common.h" @@ -129,16 +129,7 @@ void nr_preprocessor_phytest(module_id_t module_id, frame_t frame, slot_t slot) const uint16_t rnti = UE->rnti; /* update sched_ctrl->num_total_bytes so that postprocessor schedules data, * if available */ - sched_ctrl->rlc_status[lcid] = mac_rlc_status_ind(module_id, - rnti, - module_id, - frame, - slot, - ENB_FLAG_YES, - MBMS_FLAG_NO, - lcid, - 0, - 0); + sched_ctrl->rlc_status[lcid] = nr_mac_rlc_status_ind(rnti, frame, lcid); sched_ctrl->num_total_bytes += sched_ctrl->rlc_status[lcid].bytes_in_buffer; int CCEIndex = get_cce_index(mac, diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index 2c04004de2..932175e03a 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -225,16 +225,7 @@ tbs_size_t nr_mac_rlc_data_req(const module_id_t module_idP, return ret; } -mac_rlc_status_resp_t mac_rlc_status_ind(const module_id_t module_idP, - const uint16_t ue_id, - const eNB_index_t eNB_index, - const frame_t frameP, - const sub_frame_t subframeP, - const eNB_flag_t enb_flagP, - const MBMS_flag_t MBMS_flagP, - const logical_chan_id_t channel_idP, - const uint32_t sourceL2Id, - const uint32_t destinationL2Id) +mac_rlc_status_resp_t nr_mac_rlc_status_ind(const uint16_t ue_id, const frame_t frame, const logical_chan_id_t channel_idP) { mac_rlc_status_resp_t ret; @@ -250,12 +241,10 @@ mac_rlc_status_resp_t mac_rlc_status_ind(const module_id_t module_idP, * more than enough. */ // Fix me: temproary reduction meanwhile cpu cost of this computation is optimized - buf_stat = rb->buffer_status(rb, 1000*1000); - ret.bytes_in_buffer = buf_stat.status_size - + buf_stat.retx_size - + buf_stat.tx_size; + buf_stat = rb->buffer_status(rb, 1000 * 1000); + ret.bytes_in_buffer = buf_stat.status_size + buf_stat.retx_size + buf_stat.tx_size; } else { - if (!(frameP%128) || channel_idP == 0) //to suppress this warning message + if (!(frame % 128) || channel_idP == 0) //to suppress this warning message LOG_W(RLC, "Radio Bearer (channel ID %d) is NULL for UE %d\n", channel_idP, ue_id); ret.bytes_in_buffer = 0; } diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h index 19746209f2..bebea37c22 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h @@ -53,6 +53,7 @@ tbs_size_t nr_mac_rlc_data_req(const module_id_t module_idP, const logical_chan_id_t channel_idP, const tb_size_t tb_sizeP, char *buffer_pP); +mac_rlc_status_resp_t nr_mac_rlc_status_ind(const uint16_t ue_id, const frame_t frame, const logical_chan_id_t channel_idP); void nr_rlc_add_srb(int ue_id, int srb_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);