NR specific mac_rlc_status_ind function

This commit is contained in:
francescomani
2025-04-01 11:46:58 +02:00
parent 5a1d7a75dc
commit bdb3555825
6 changed files with 11 additions and 43 deletions
+1 -3
View File
@@ -47,7 +47,6 @@
#include "utils.h"
#include <executables/softmodem-common.h>
#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,
@@ -42,7 +42,6 @@
/* rlc */
#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h"
#include "openair2/LAYER2/RLC/rlc.h"
#include <executables/softmodem-common.h>
@@ -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
@@ -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)
@@ -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,
+4 -15
View File
@@ -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;
}
+1
View File
@@ -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);