Commit 10b48427 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/feature-4g-sched' into develop_integration_2020_w15_bis

parents d3672602 1372e022
......@@ -62,9 +62,7 @@
#include "PHY/phy_extern.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "RRC/LTE/rrc_extern.h"
#include "PHY_INTERFACE/phy_interface.h"
#include "common/utils/LOG/log_extern.h"
......
......@@ -72,9 +72,7 @@
#include "SCHED/sched_eNB.h"
#include "SCHED_NR/sched_nr.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/MAC/mac_proto.h"
#include "RRC/LTE/rrc_extern.h"
#include "PHY_INTERFACE/phy_interface.h"
......
......@@ -49,8 +49,6 @@
#include "PHY/phy_vars.h"
#include "SCHED/sched_common_vars.h"
#include "LAYER2/MAC/mac_vars.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
#include "RRC/LTE/rrc_vars.h"
#include "PHY_INTERFACE/phy_interface_vars.h"
#include "gnb_config.h"
......
......@@ -47,7 +47,6 @@
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "LAYER2/MAC/mac_vars.h"
#include "LAYER2/MAC/mac_proto.h"
#include "RRC/LTE/rrc_vars.h"
#include "PHY_INTERFACE/phy_interface_vars.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
......
......@@ -49,7 +49,6 @@ extern RAN_CONTEXT_t RC;
#include "fapi_stub.h"
//#include "fapi_l1.h"
#include "common/utils/LOG/log.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
......
......@@ -23,7 +23,6 @@
#include "PHY/defs_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/impl_defs_top.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
......
......@@ -94,6 +94,35 @@ unsigned char I_TBS2I_MCS(unsigned char I_TBS) {
return I_MCS;
}
uint16_t find_nb_rb_DL(uint8_t mcs, uint32_t bytes, uint16_t nb_rb_max, uint16_t rb_gran) {
if (bytes == 0 || mcs > 28 || nb_rb_max == 0)
return 0;
const uint32_t bits = bytes << 3;
const unsigned char I_TBS = get_I_TBS(mcs);
uint32_t TBS = TBStable[I_TBS][nb_rb_max - 1];
if (bits >= TBS) // is nb_rb_max too small?
return nb_rb_max;
TBS = TBStable[I_TBS][rb_gran - 1];
if (bits <= TBS) // is rb_gran RB enough?
return rb_gran;
nb_rb_max += nb_rb_max % rb_gran; // round up to full RBG
uint16_t hi = nb_rb_max/rb_gran - 1;
uint16_t lo = 0;
uint16_t p = (hi + lo) / 2;
for (; lo + 1 != hi; p = (hi + lo) / 2) {
const uint16_t rbi = (p + 1) * rb_gran - 1; // convert "RBG" -> RB
TBS = TBStable[I_TBS][rbi];
if (bits <= TBS) // need less RBs
hi = p;
else // need more RBs
lo = p;
}
return (hi + 1) * rb_gran;
}
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb) {
uint32_t TBS;
......
......@@ -60,6 +60,8 @@ unsigned char get_I_TBS_UL(unsigned char I_MCS);
@return Transport block size */
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb);
uint16_t find_nb_rb_DL(uint8_t mcs, uint32_t bytes, uint16_t nb_rb_max, uint16_t rb_gran);
/** \brief Compute Q (modulation order) based on uplink I_MCS. Implements table 7.1.7.1-1 from 36.213.
@param I_MCS
@param nb_rb
......
......@@ -38,7 +38,6 @@
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "common_lib.h"
#include "PHY/INIT/phy_init.h"
......
......@@ -23,7 +23,6 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include "PHY/impl_defs_top.h"
//#include "openair2/LAYER2/MAC/mac_proto.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
......
......@@ -182,7 +182,7 @@ void phy_scope_gNB(FD_phy_scope_gnb *form,
int Qm = 2;
/*
if (!RC.nrmac[0]->UE_list.active[UE_id])
if (!RC.nrmac[0]->UE_info.active[UE_id])
return;
// choose max MCS to compute coded_bits_per_codeword
......
......@@ -596,7 +596,8 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
uci->frame = frame;
uci->subframe = subframe;
uci->rnti = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti;
uci->ue_id = find_dlsch(ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
uci->ue_id = find_ulsch(ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
AssertFatal(uci->ue_id < MAX_MOBILES_PER_ENB, "illegal UE_id %d\n", uci->ue_id);
uci->type = SR;
uci->pucch_fmt = pucch_format1;
uci->num_antenna_ports = 1;
......@@ -622,7 +623,8 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
uci->frame = frame;
uci->subframe = subframe;
uci->rnti = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti;
uci->ue_id = find_dlsch(ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
uci->ue_id = find_ulsch(ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
AssertFatal(uci->ue_id < MAX_MOBILES_PER_ENB, "illegal UE_id %d\n", uci->ue_id);
uci->type = HARQ_SR;
uci->num_antenna_ports = 1;
uci->num_pucch_resources = 1;
......@@ -644,7 +646,8 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
uci->frame = frame;
uci->subframe = subframe;
uci->rnti = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti;
uci->ue_id = find_dlsch(ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
uci->ue_id = find_ulsch(ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE);
AssertFatal(uci->ue_id < MAX_MOBILES_PER_ENB, "illegal UE_id %d\n", uci->ue_id);
uci->type = HARQ;
uci->srs_active = srs_active;
uci->num_antenna_ports = ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel11.num_ant_ports;
......
......@@ -640,6 +640,10 @@ uci_procedures(PHY_VARS_eNB *eNB,
uci = &(eNB->uci_vars[i]);
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",
frame,
subframe,
......@@ -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);
#endif
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 {
if(RC.mac[eNB->Mod_id]->UE_list.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_list.UE_sched_ctrl[i].cqi_req_timer=30;
if(RC.mac[eNB->Mod_id]->UE_info.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_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);
}
}
......
......@@ -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 (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;
break;
}
......@@ -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];
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;
/* Fill in the status of the HARQ process (2 TBs)*/
dl_info[i]->n_harq_status = 2;
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++) {
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
}
// 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) {
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
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 = 0;
RC.mac[mod_id]->UE_info.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid = 0;
}
}
}
......
This diff is collapsed.
......@@ -37,7 +37,6 @@
#include "f1ap_cu_ue_context_management.h"
#include <string.h>
#include "openair2/LAYER2/MAC/mac_proto.h"
#include "rrc_extern.h"
#include "rrc_eNB_UE_context.h"
#include "rrc_eNB_S1AP.h"
......
......@@ -697,7 +697,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
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) {
UE_scheduling_control->cdrx_waiting_ack = FALSE;
......
......@@ -633,9 +633,9 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
int UE_out_of_sync = 0;
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)) {
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;
}
}
......
......@@ -782,7 +782,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
int i;
int UE_id = -1;
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);
LOG_D(MAC, "RC.mac:%p mib:%p\n", RC.mac, mib);
......@@ -882,6 +882,34 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
}
}
if (logicalChannelIdentity > 0) { // is SRB1,2 or DRB
if ((UE_id = find_UE_id(Mod_idP, rntiP)) < 0) {
LOG_E(MAC,"Configuration received for unknown UE (%x), shouldn't happen\n",rntiP);
return(-1);
}
int idx = -1;
UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
for (int i = 0; i < sched_ctrl->dl_lc_num; ++i) {
if (sched_ctrl->dl_lc_ids[i] == logicalChannelIdentity) {
/* TODO this might also mean we have to remove it, not clear */
idx = i;
break;
}
}
if (idx < 0) {
sched_ctrl->dl_lc_num++;
sched_ctrl->dl_lc_ids[sched_ctrl->dl_lc_num-1] = logicalChannelIdentity;
sched_ctrl->dl_lc_bytes[sched_ctrl->dl_lc_num-1] = 0;
LOG_I(MAC, "UE %d RNTI %x adding LC %ld idx %d to scheduling control (total %d)\n", UE_id, rntiP, logicalChannelIdentity, sched_ctrl->dl_lc_num-1, sched_ctrl->dl_lc_num);
if (logicalChannelIdentity == 1) { // if it is SRB1, add SRB2 directly because RRC does not indicate this separately
sched_ctrl->dl_lc_num++;
sched_ctrl->dl_lc_ids[sched_ctrl->dl_lc_num-1] = 2;
sched_ctrl->dl_lc_bytes[sched_ctrl->dl_lc_num-1] = 0;
LOG_I(MAC, "UE %d RNTI %x adding LC 2 idx %d to scheduling control (total %d)\n", UE_id, rntiP, sched_ctrl->dl_lc_num-1, sched_ctrl->dl_lc_num);
}
}
}
// SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup
if (logicalChannelConfig != NULL) { // check for eMTC specific things
UE_id = find_UE_id(Mod_idP, rntiP);
......@@ -892,9 +920,9 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
}
if (logicalChannelConfig) {
UE_list->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;
} else UE_list->UE_template[CC_idP][UE_id].lcgidmap[logicalChannelIdentity] = 0;
UE_info->UE_template[CC_idP][UE_id].lcgidmap[logicalChannelIdentity] = *logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup;
UE_info->UE_template[CC_idP][UE_id].lcgidpriority[logicalChannelIdentity] = logicalChannelConfig->ul_SpecificParameters->priority;
} else UE_info->UE_template[CC_idP][UE_id].lcgidmap[logicalChannelIdentity] = 0;
}
if (physicalConfigDedicated != NULL) {
......@@ -905,7 +933,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
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);
}
......@@ -1048,15 +1076,11 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
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;
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;
UE_list_mac = &(RC.mac[Mod_id]->UE_list);
UE_id = find_UE_id(Mod_id, rnti);
rnti_t rnti = rrc_mac_drx_config_req->rnti;
int UE_id = find_UE_id(Mod_id, rnti);
/* Check UE_id */
if (UE_id == -1) {
......@@ -1065,7 +1089,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
}
/* 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
/* Check drx_Configuration */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -85,6 +85,30 @@ void dlsch_scheduler_pre_ue_select_fairRR(
uint16_t nb_rbs_required[MAX_NUM_CCs][MAX_MOBILES_PER_ENB],
DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs]);
void dlsch_scheduler_pre_processor_reset_fairRR(
module_id_t module_idP,
frame_t frameP,
sub_frame_t subframeP,
int min_rb_unit[NFAPI_CC_MAX],
uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX],
uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]);
void assign_rbs_required_fairRR(
module_id_t Mod_id,
frame_t frameP,
sub_frame_t subframe,
uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB]);
void dlsch_scheduler_pre_processor_allocate_fairRR(
module_id_t Mod_id,
int UE_id,
uint8_t CC_id,
int N_RBG,
uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB],
uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX]);
void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
frame_t frameP,
sub_frame_t subframeP,
......
......@@ -718,9 +718,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9,
//MTCH,
TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch
,0, 0
0, 0
);
bytes_in_buffer = rlc_status.bytes_in_buffer;
......@@ -773,7 +771,8 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch, header_len_mtch, rlc_status.bytes_in_buffer);
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0/*0xfffd*/, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES,cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9, 0, //not used
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES,cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9,
TBS - header_len_mcch - header_len_msi - sdu_length_total - header_len_mtch,
(char *)
&mch_buffer[sdu_length_total]
,0,
......@@ -1558,9 +1557,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9,
//MTCH,
TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch
,0, 0
0, 0
);
bytes_in_buffer = rlc_status.bytes_in_buffer;
......@@ -1579,7 +1576,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch, header_len_mtch, rlc_status.bytes_in_buffer);
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0/*0xfffd*/, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES,cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9, 0, //not used
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES,cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9,
TBS - header_len_mcch - header_len_msi - sdu_length_total - header_len_mtch,
(char *)
&mch_buffer[sdu_length_total]
,0,
......
......@@ -133,16 +133,15 @@ 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",
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_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs;
UE_list->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_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
UE_info->UE_template[CC_id][UE_id].oldNDI[harq_pid]=1-UE_info->UE_template[CC_id][UE_id].oldNDI[harq_pid];
UE_info->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs;
UE_info->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
AssertFatal(UE_info->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated 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,
dl_req,
fill_nfapi_dlsch_config(&dl_req->dl_config_pdu_list[dl_req->number_pdu],
TBS,
eNB->pdu_index[CC_id],
rnti,
......@@ -166,11 +165,12 @@ schedule_ue_spec_phy_test(
0, //number of PRBs treated as one subband, not used here
0 // number of beamforming vectors, not used here
);
dl_req->number_pdu++;
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP*10)+subframeP,
TBS,
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 {
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
int N_RB_UL;
eNB_MAC_INST *mac = RC.mac[module_idP];
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_sched_ctrl_t *UE_sched_ctrl;
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
first_rb[CC_id] = 1;
// loop over all active UEs
// if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
UE_template = &UE_list->UE_template[CC_id][UE_id];
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
UE_template = &UE_info->UE_template[CC_id][UE_id];
UE_sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
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];
//power control
......@@ -242,15 +242,15 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
// new transmission
ndi = 1-UE_template->oldNDI_UL[harq_pid];
UE_template->oldNDI_UL[harq_pid]=ndi;
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
UE_list->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].snr = snr;
UE_info->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
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_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;
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_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].total_rbs_used_rx += nb_rb;
UE_info->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
// buffer_occupancy -= TBS;
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
//store for possible retransmission
......
This diff is collapsed.
......@@ -824,11 +824,16 @@ typedef struct {
uint16_t cshift[8]; // num_max_harq
/// Number of Allocated RBs by the ulsch preprocessor
uint8_t pre_allocated_nb_rb_ul[MAX_NUM_SLICES];
uint8_t pre_allocated_nb_rb_ul;
/// Start of Allocated RBs by the USLCH preprocessor
uint8_t pre_first_nb_rb_ul;
/// index of Allocated RBs by the ulsch preprocessor
int8_t pre_allocated_rb_table_index_ul;
/// index of allocated HI_DCI0
int pre_dci_ul_pdu_idx;
/// total allocated RBs
int8_t total_allocated_rbs;
......@@ -852,10 +857,10 @@ typedef struct {
// Logical channel info for link with RLC
/// LCGID mapping
/// LCGID mapping (UL)
long lcgidmap[11];
///UE logical channel priority
///UE logical channel priority (UL)
long lcgidpriority[11];
/// phr information
......@@ -913,31 +918,12 @@ typedef struct {
/*! \brief scheduling control information set through an API (not used)*/
typedef struct {
///UL transmission bandwidth in RBs
uint8_t ul_bandwidth[MAX_NUM_LCID];
///DL transmission bandwidth in RBs
uint8_t dl_bandwidth[MAX_NUM_LCID];
//To do GBR bearer
uint8_t min_ul_bandwidth[MAX_NUM_LCID];
uint8_t min_dl_bandwidth[MAX_NUM_LCID];
///aggregated bit rate of non-gbr bearer per UE
uint64_t ue_AggregatedMaximumBitrateDL;
///aggregated bit rate of non-gbr bearer per UE
uint64_t ue_AggregatedMaximumBitrateUL;
///CQI scheduling interval in subframes.
uint16_t cqiSchedInterval;
///Contention resolution timer used during random access
uint8_t mac_ContentionResolutionTimer;
uint16_t max_rbs_allowed_slice[NFAPI_CC_MAX][MAX_NUM_SLICES];
uint16_t max_rbs_allowed_slice_uplink[NFAPI_CC_MAX][MAX_NUM_SLICES];
uint8_t max_mcs[MAX_NUM_LCID];
uint16_t priority[MAX_NUM_LCID];
/// number of active DL LCs
uint8_t dl_lc_num;
/// order in which DLSCH scheduler should allocate LCs
uint8_t dl_lc_ids[MAX_NUM_LCID];
/// number of bytes to schedule for each LC
uint32_t dl_lc_bytes[MAX_NUM_LCID];
// resource scheduling information
......@@ -950,6 +936,7 @@ typedef struct {
uint8_t dl_pow_off[NFAPI_CC_MAX];
uint16_t pre_nb_available_rbs[NFAPI_CC_MAX];
unsigned char rballoc_sub_UE[NFAPI_CC_MAX][N_RBG_MAX];
int pre_dci_dl_pdu_idx;
uint16_t ta_timer;
int16_t ta_update;
uint16_t ul_consecutive_errors;
......@@ -1130,7 +1117,15 @@ typedef struct {
uint8_t sb_size;
uint8_t nb_active_sb;
} 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 {
DLSCH_PDU DLSCH_pdu[NFAPI_CC_MAX][2][MAX_MOBILES_PER_ENB];
......@@ -1152,21 +1147,13 @@ typedef struct {
eNB_UE_STATS eNB_UE_stats[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
/// scheduling control info
UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_ENB];
int next[MAX_MOBILES_PER_ENB];
int head;
int next_ul[MAX_MOBILES_PER_ENB];
int head_ul;
int avail;
UE_list_t list;
int num_UEs;
boolean_t active[MAX_MOBILES_PER_ENB];
/// Sorting criteria for the UE list in the MAC preprocessor
uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM];
uint16_t first_rb_offset[NFAPI_CC_MAX][MAX_NUM_SLICES];
int assoc_dl_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*/
typedef struct {
......@@ -1184,20 +1171,6 @@ typedef struct {
int tail_freelist; ///the tail position of the delete list
} UE_free_list_t;
/// Structure for saving the output of each pre_processor instance
typedef struct {
uint16_t nb_rbs_required[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
uint16_t nb_rbs_accounted[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
uint16_t nb_rbs_remaining[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX];
uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX];
uint32_t bytes_lcid[MAX_MOBILES_PER_ENB][MAX_NUM_LCID];
uint32_t wb_pmi[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
uint8_t mcs[NFAPI_CC_MAX][MAX_MOBILES_PER_ENB];
} pre_processor_results_t;
/**
* slice specific scheduler for the DL
*/
......@@ -1289,12 +1262,18 @@ typedef struct {
int n_ul;
slice_sched_conf_ul_t ul[MAX_NUM_SLICES];
pre_processor_results_t pre_processor_results[MAX_NUM_SLICES];
/// common rb allocation list between slices
uint8_t rballoc_sub[NFAPI_CC_MAX][N_RBG_MAX];
} slice_info_t;
/**
* describes contiguous RBs
*/
typedef struct {
int start;
int length;
} contig_rbs_t;
/*! \brief eNB common channels */
typedef struct {
int physCellId;
......@@ -1414,7 +1393,7 @@ typedef struct eNB_MAC_INST_s {
nfapi_ue_release_request_t UE_release_req;
/// UL handle
uint32_t ul_handle;
UE_list_t UE_list;
UE_info_t UE_info;
/// slice-related configuration
slice_info_t slice_info;
......
This diff is collapsed.
......@@ -43,26 +43,18 @@
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;
UE_list->num_UEs = 0;
UE_list->head = -1;
UE_list->head_ul = -1;
UE_list->avail = 0;
for (list_el = 0; list_el < MAX_MOBILES_PER_ENB - 1; list_el++) {
UE_list->next[list_el] = list_el + 1;
UE_list->next_ul[list_el] = list_el + 1;
}
UE_list->next[list_el] = -1;
UE_list->next_ul[list_el] = -1;
memset(UE_list->DLSCH_pdu, 0, sizeof(UE_list->DLSCH_pdu));
memset(UE_list->UE_template, 0, sizeof(UE_list->UE_template));
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_dl_slice_idx, 0, sizeof(UE_list->assoc_dl_slice_idx));
memset(UE_list->assoc_ul_slice_idx, 0, sizeof(UE_list->assoc_ul_slice_idx));
UE_info->num_UEs = 0;
UE_info->list.head = -1;
for (list_el = 0; list_el < MAX_MOBILES_PER_ENB; list_el++)
UE_info->list.next[list_el] = -1;
memset(UE_info->DLSCH_pdu, 0, sizeof(UE_info->DLSCH_pdu));
memset(UE_info->UE_template, 0, sizeof(UE_info->UE_template));
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_info->active, 0, sizeof(UE_info->active));
}
void init_slice_info(slice_info_t *sli)
......@@ -137,7 +129,7 @@ void mac_top_init_eNB(void)
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);
}
......@@ -163,12 +155,12 @@ void mac_init_cell_params(int Mod_idP, int CC_idP)
memset(&RC.mac[Mod_idP]->eNB_stats, 0, sizeof(eNB_STATS));
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++) {
UE_template[j].rnti = 0;
// 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));
}
......
This diff is collapsed.
......@@ -390,7 +390,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
LOG_USEDINLOG_VAR(mac_rlc_status_resp_t,rlc_status)=mac_rlc_status_ind(module_idP,
UE_mac_inst[module_idP].crnti,
eNB_indexP, frameP, subframeP,
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6,0, 0
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 0, 0
);
if (UE_mac_inst[module_idP].crnti_before_ho)
......@@ -406,7 +406,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
module_idP, frameP, rlc_status.bytes_in_buffer,
dcch_header_len);
sdu_lengths = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
sdu_lengths = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6,
(char *) &ulsch_buff[0],0,
0
);
......
......@@ -2809,7 +2809,6 @@ update_bsr(module_id_t module_idP, frame_t frameP,
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
lcid,
0xFFFF, //TBS is not used in RLC at this step, set a special value for debug
0, 0
);
lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer;
......@@ -3176,7 +3175,7 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
for (int j = 0; j < ue->numCommFlows; j++) {
if ((ue->sourceL2Id > 0) && (ue->destinationList[j] >0) ) {
rlc_status = mac_rlc_status_ind(module_idP, 0x1234,0,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
ue->SL_LCID[i], 0xFFFF, ue->sourceL2Id, ue->destinationList[j]);
ue->SL_LCID[i], ue->sourceL2Id, ue->destinationList[j]);
if (rlc_status.bytes_in_buffer > 2) {
LOG_I(MAC,"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer\n",frameP,subframeP,rlc_status.bytes_in_buffer);
......
......@@ -562,7 +562,6 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS_bytes - ta_len - header_length_total - sdu_length_total - 3,
0,
0);
......@@ -579,7 +578,7 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
TBS_bytes,
TBS_bytes - ta_len - header_length_total - sdu_length_total - 3,
(char *)&mac_sdus[sdu_length_total],
0,
0);
......
......@@ -459,7 +459,6 @@ struct mac_status_resp
rlc_am_mac_status_indication (
const protocol_ctxt_t *const ctxt_pP,
void *const rlc_pP,
const uint16_t tb_sizeP,
struct mac_status_ind tx_statusP,
const eNB_flag_t enb_flagP) {
struct mac_status_resp status_resp;
......@@ -491,10 +490,6 @@ rlc_am_mac_status_indication (
rlc->last_absolute_subframe_status_indication = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP);
if (tb_sizeP > 0) {
rlc->nb_bytes_requested_by_mac = tb_sizeP;
}
status_resp.buffer_occupancy_in_bytes = rlc_am_get_buffer_occupancy_in_bytes(ctxt_pP, rlc);
// For eNB scheduler : Add Max RLC header size for new PDU
......@@ -549,8 +544,7 @@ rlc_am_mac_status_indication (
NULL,0,
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS-IND %u",
MSC_AS_TIME_ARGS(ctxt_pP),
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc),
tb_sizeP);
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc));
MSC_LOG_TX_MESSAGE(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_MAC_ENB:MSC_MAC_UE,
......@@ -565,26 +559,14 @@ rlc_am_mac_status_indication (
}
if (LOG_DEBUGFLAG(DEBUG_RLC)) {
if (tb_sizeP > 0) {
LOG_UI(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes -> %d bytes\n",
LOG_UI(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) -> %d bytes\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc),
tb_sizeP,
status_resp.buffer_occupancy_in_bytes);
}
}
return status_resp;
}
//-----------------------------------------------------------------------------
void
rlc_am_set_nb_bytes_requested_by_mac (
void *const rlc_pP,
const tb_size_t tb_sizeP
) {
((rlc_am_entity_t *) rlc_pP)->nb_bytes_requested_by_mac = tb_sizeP;
}
//-----------------------------------------------------------------------------
struct mac_data_req
rlc_am_mac_data_request (
......
......@@ -255,23 +255,15 @@ rlc_am_get_pdus (
*/
void rlc_am_rx (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_data_ind);
/*! \fn struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP)
/*! \fn struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP,void * const rlc_pP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP)
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
* \param[in] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
* \param[in] enb_flagP eNB or UE flag indication.
* \return The maximum number of bytes that can be served by RLC instance to MAC.
*/
struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
/*! \fn void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP)
* \brief Set available TBS for RLC Tx just before am_mac_data_request. Used for UE only.
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] tb_sizeP Available Tx Transport Block size in bytes.
*/
void rlc_am_set_nb_bytes_requested_by_mac (void * const rlc_pP,const tb_size_t tb_sizeP);
struct mac_status_resp rlc_am_mac_status_indication (const protocol_ctxt_t* const ctxtP, void * const rlc_pP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
/*! \fn struct mac_data_req rlc_am_mac_data_request (const protocol_ctxt_t* const ctxtP,void * const rlc_pP,const eNB_flag_t enb_flagP)
* \brief Gives PDUs to lower layer MAC.
......
......@@ -151,13 +151,10 @@ struct mac_status_resp
rlc_tm_mac_status_indication (
const protocol_ctxt_t* const ctxt_pP,
void * const rlc_pP,
const tb_size_t tb_sizeP,
struct mac_status_ind tx_statusP)
{
struct mac_status_resp status_resp;
((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size = tb_sizeP;
status_resp.buffer_occupancy_in_bytes = ((rlc_tm_entity_t *) rlc_pP)->buffer_occupancy;
status_resp.buffer_occupancy_in_pdus = status_resp.buffer_occupancy_in_bytes / ((rlc_tm_entity_t *) rlc_pP)->rlc_pdu_size;
status_resp.rlc_info.rlc_protocol_state = ((rlc_tm_entity_t *) rlc_pP)->protocol_state;
......
......@@ -88,11 +88,10 @@ void rlc_tm_rx (
struct mac_data_ind data_indP);
/*! \fn struct mac_status_resp rlc_tm_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void * const rlcP, const uint16_t tbs_sizeP, struct mac_status_ind tx_statusP)
/*! \fn struct mac_status_resp rlc_tm_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void * const rlcP, struct mac_status_ind tx_statusP)
* \brief Request the maximum number of bytes that can be served by RLC instance to MAC and fix the amount of bytes requested by MAC for next RLC transmission.
* \param[in] ctxtP Running context.
* \param[in] rlcP RLC TM protocol instance pointer.
* \param[in] tbs_sizeP Number of bytes requested by MAC for next transmission.
* \param[in] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
* \return The maximum number of bytes that can be served by RLC instance to MAC.
*/
......@@ -100,7 +99,6 @@ struct mac_status_resp
rlc_tm_mac_status_indication (
const protocol_ctxt_t* const ctxt_pP,
void * const rlc_pP,
const tb_size_t tb_sizeP,
struct mac_status_ind tx_statusP);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -152,7 +152,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP,
const uint32_t sourceL2Id,
const uint32_t destinationL2Id
)
......@@ -189,7 +188,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
ret.bytes_in_buffer = buf_stat.status_size
+ buf_stat.retx_size
+ buf_stat.tx_size;
ue->saved_status_ind_tb_size[channel_idP - 1] = tb_sizeP;
} else {
ret.bytes_in_buffer = 0;
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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