Commit eeaa5a99 authored by Robert Schmidt's avatar Robert Schmidt

RLC: _req() accepts max TB size, _ind() not

Previously, the various rlc_*_ind() functions had a parameter to enable
the MAC to specify the max TB size that a subsequent call to the
corresponding rlc_*_req() (!) function would return. This patch removes
this parameter from the rlc_*_ind() functions and makes the parameter
working that is already in the rlc_*_req() functions.
parent 5c153ca0
...@@ -180,7 +180,7 @@ rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logi ...@@ -180,7 +180,7 @@ rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logi
rnti_t rnti = flexran_get_mac_ue_crnti(mod_id, ue_id); rnti_t rnti = flexran_get_mac_ue_crnti(mod_id, ue_id);
frame_t frame = flexran_get_current_frame(mod_id); frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id); sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0,0, 0 mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0, 0
); );
return rlc_status.bytes_in_buffer; return rlc_status.bytes_in_buffer;
} }
...@@ -191,7 +191,7 @@ rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, lo ...@@ -191,7 +191,7 @@ rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, lo
rnti_t rnti = flexran_get_mac_ue_crnti(mod_id,ue_id); rnti_t rnti = flexran_get_mac_ue_crnti(mod_id,ue_id);
frame_t frame = flexran_get_current_frame(mod_id); frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id); sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0,0, 0 mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0, 0
); );
return rlc_status.pdus_in_buffer; return rlc_status.pdus_in_buffer;
} }
...@@ -202,7 +202,7 @@ frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann ...@@ -202,7 +202,7 @@ frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann
rnti_t rnti = flexran_get_mac_ue_crnti(mod_id,ue_id); rnti_t rnti = flexran_get_mac_ue_crnti(mod_id,ue_id);
frame_t frame = flexran_get_current_frame(mod_id); frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id); sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0,0, 0 mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0, 0
); );
return rlc_status.head_sdu_creation_time; return rlc_status.head_sdu_creation_time;
} }
......
...@@ -1010,7 +1010,6 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1010,7 +1010,6 @@ schedule_ue_spec(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH, DCCH,
TBS - ta_len - header_length_total - sdu_length_total - 3,
0, 0,
0 0
); );
...@@ -1030,7 +1029,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1030,7 +1029,7 @@ schedule_ue_spec(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH, DCCH,
TBS, //not used TBS - ta_len - header_length_total - sdu_length_total - 3,
(char *)&dlsch_buffer[0], (char *)&dlsch_buffer[0],
0, 0,
0 0
...@@ -1084,7 +1083,6 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1084,7 +1083,6 @@ schedule_ue_spec(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH + 1, DCCH + 1,
TBS - ta_len - header_length_total - sdu_length_total - 3,
0, 0,
0 0
); );
...@@ -1101,7 +1099,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1101,7 +1099,7 @@ schedule_ue_spec(module_id_t module_idP,
frameP, frameP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, DCCH + 1, MBMS_FLAG_NO, DCCH + 1,
TBS, //not used TBS - ta_len - header_length_total - sdu_length_total - 3,
(char *) &dlsch_buffer[sdu_length_total], (char *) &dlsch_buffer[sdu_length_total],
0, 0,
0 0
...@@ -1159,7 +1157,8 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1159,7 +1157,8 @@ schedule_ue_spec(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0 0,
0
); );
if (rlc_status.bytes_in_buffer > 0) { if (rlc_status.bytes_in_buffer > 0) {
...@@ -1176,7 +1175,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1176,7 +1175,7 @@ schedule_ue_spec(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS, //not used TBS - ta_len - header_length_total - sdu_length_total - 3,
(char *) &dlsch_buffer[sdu_length_total], (char *) &dlsch_buffer[sdu_length_total],
0, 0,
0 0
...@@ -1799,7 +1798,6 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1799,7 +1798,6 @@ schedule_ue_spec_br(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH, DCCH,
(TBS-ta_len-header_len_dcch),
0, 0,
0); // transport block set size 0); // transport block set size
sdu_lengths[0] = 0; sdu_lengths[0] = 0;
...@@ -1817,7 +1815,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1817,7 +1815,7 @@ schedule_ue_spec_br(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH, DCCH,
TBS, //not used TBS-ta_len-header_len_dcch,
(char *)&dlsch_buffer[0], (char *)&dlsch_buffer[0],
0, 0,
0); 0);
...@@ -1855,7 +1853,6 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1855,7 +1853,6 @@ schedule_ue_spec_br(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH + 1, DCCH + 1,
(TBS-ta_len-header_len_dcch-sdu_length_total),
0, 0,
0); // transport block set size less allocations for timing advance and DCCH SDU 0); // transport block set size less allocations for timing advance and DCCH SDU
sdu_lengths[num_sdus] = 0; sdu_lengths[num_sdus] = 0;
...@@ -1873,7 +1870,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1873,7 +1870,7 @@ schedule_ue_spec_br(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
DCCH+1, DCCH+1,
TBS, //not used TBS-ta_len-header_len_dcch-sdu_length_total,
(char *)&dlsch_buffer[sdu_length_total], (char *)&dlsch_buffer[sdu_length_total],
0, 0,
0); 0);
...@@ -1920,7 +1917,6 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1920,7 +1917,6 @@ schedule_ue_spec_br(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch,
0, 0,
0); 0);
...@@ -1951,7 +1947,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1951,7 +1947,7 @@ schedule_ue_spec_br(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS, //not used TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch,
(char *) &dlsch_buffer[sdu_length_total], (char *) &dlsch_buffer[sdu_length_total],
0, 0,
0); 0);
......
...@@ -134,7 +134,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP, ...@@ -134,7 +134,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
for (lc_id = DCCH; lc_id <= DTCH; lc_id++) { for (lc_id = DCCH; lc_id <= DTCH; lc_id++) {
rlc_status = rlc_status =
mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP,
ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0,0, 0 ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0, 0
); );
UE_template.dl_buffer_total += rlc_status.bytes_in_buffer; //storing the total dlsch buffer UE_template.dl_buffer_total += rlc_status.bytes_in_buffer; //storing the total dlsch buffer
} }
...@@ -1572,7 +1572,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1572,7 +1572,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
header_len_dcch = 2; // 2 bytes DCCH SDU subheader header_len_dcch = 2; // 2 bytes DCCH SDU subheader
if (TBS - ta_len - header_len_dcch > 0) { if (TBS - ta_len - header_len_dcch > 0) {
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, (TBS - ta_len - header_len_dcch),0, 0); // transport block set size rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, 0, 0); // transport block set size
sdu_lengths[0] = 0; sdu_lengths[0] = 0;
if (rlc_status.bytes_in_buffer > 0) { // There is DCCH to transmit if (rlc_status.bytes_in_buffer > 0) { // There is DCCH to transmit
...@@ -1580,7 +1580,8 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1580,7 +1580,8 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
"[eNB %d] SFN/SF %d.%d, DL-DCCH->DLSCH CC_id %d, Requesting %d bytes from RLC (RRC message)\n", "[eNB %d] SFN/SF %d.%d, DL-DCCH->DLSCH CC_id %d, Requesting %d bytes from RLC (RRC message)\n",
module_idP, frameP, subframeP, CC_id, module_idP, frameP, subframeP, CC_id,
TBS - header_len_dcch); TBS - header_len_dcch);
sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, TBS, //not used sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
TBS - ta_len - header_len_dcch,
(char *) &dlsch_buffer[0],0, 0 (char *) &dlsch_buffer[0],0, 0
); );
...@@ -1674,7 +1675,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1674,7 +1675,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
// check for DCCH1 and update header information (assume 2 byte sub-header) // check for DCCH1 and update header information (assume 2 byte sub-header)
if (TBS - ta_len - header_len_dcch - sdu_length_total > 0) { if (TBS - ta_len - header_len_dcch - sdu_length_total > 0) {
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, (TBS - ta_len - header_len_dcch - sdu_length_total),0, 0 rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, 0, 0
); // transport block set size less allocations for timing advance and ); // transport block set size less allocations for timing advance and
// DCCH SDU // DCCH SDU
sdu_lengths[num_sdus] = 0; sdu_lengths[num_sdus] = 0;
...@@ -1684,7 +1685,8 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1684,7 +1685,8 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
"[eNB %d], Frame %d, DCCH1->DLSCH, CC_id %d, Requesting %d bytes from RLC (RRC message)\n", "[eNB %d], Frame %d, DCCH1->DLSCH, CC_id %d, Requesting %d bytes from RLC (RRC message)\n",
module_idP, frameP, CC_id, module_idP, frameP, CC_id,
TBS - header_len_dcch - sdu_length_total); TBS - header_len_dcch - sdu_length_total);
sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, TBS, //not used sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
TBS - ta_len - header_len_dcch - sdu_length_total,
(char *) &dlsch_buffer[sdu_length_total],0, 0 (char *) &dlsch_buffer[sdu_length_total],0, 0
); );
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP), T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
...@@ -1737,7 +1739,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1737,7 +1739,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch, 0, 0 0, 0
); );
if (rlc_status.bytes_in_buffer > 0) { if (rlc_status.bytes_in_buffer > 0) {
...@@ -1754,7 +1756,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -1754,7 +1756,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS, //not used TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch,
(char *)&dlsch_buffer[sdu_length_total], 0, 0 (char *)&dlsch_buffer[sdu_length_total], 0, 0
); );
T(T_ENB_MAC_UE_DL_SDU, T(T_ENB_MAC_UE_DL_SDU,
......
...@@ -718,9 +718,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -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, module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9, cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9,
//MTCH, //MTCH,
TBS - header_len_mcch - header_len_msi - 0, 0
sdu_length_total - header_len_mtch
,0, 0
); );
bytes_in_buffer = rlc_status.bytes_in_buffer; 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, ...@@ -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 - TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch, header_len_mtch, rlc_status.bytes_in_buffer); 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 *) (char *)
&mch_buffer[sdu_length_total] &mch_buffer[sdu_length_total]
,0, ,0,
...@@ -1558,9 +1557,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, ...@@ -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, module_idP, ENB_FLAG_YES, MBMS_FLAG_YES,
cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9, cc->mbms_SessionList[0]->list.array[0]->logicalChannelIdentity_r9,
//MTCH, //MTCH,
TBS - header_len_mcch - header_len_msi - 0, 0
sdu_length_total - header_len_mtch
,0, 0
); );
bytes_in_buffer = rlc_status.bytes_in_buffer; 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, ...@@ -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 - TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch, header_len_mtch, rlc_status.bytes_in_buffer); 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 *) (char *)
&mch_buffer[sdu_length_total] &mch_buffer[sdu_length_total]
,0, ,0,
......
...@@ -87,7 +87,6 @@ store_dlsch_buffer(module_id_t Mod_id, ...@@ -87,7 +87,6 @@ store_dlsch_buffer(module_id_t Mod_id,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
0, 0,
0,
0 0
); );
UE_template->dl_buffer_info[lcid] = rlc_status.bytes_in_buffer; UE_template->dl_buffer_info[lcid] = rlc_status.bytes_in_buffer;
......
...@@ -390,7 +390,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id, ...@@ -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, LOG_USEDINLOG_VAR(mac_rlc_status_resp_t,rlc_status)=mac_rlc_status_ind(module_idP,
UE_mac_inst[module_idP].crnti, UE_mac_inst[module_idP].crnti,
eNB_indexP, frameP, subframeP, 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) 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, ...@@ -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, module_idP, frameP, rlc_status.bytes_in_buffer,
dcch_header_len); 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, (char *) &ulsch_buff[0],0,
0 0
); );
......
...@@ -2809,7 +2809,6 @@ update_bsr(module_id_t module_idP, frame_t frameP, ...@@ -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, 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, lcid,
0xFFFF, //TBS is not used in RLC at this step, set a special value for debug
0, 0 0, 0
); );
lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer; 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_ ...@@ -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++) { for (int j = 0; j < ue->numCommFlows; j++) {
if ((ue->sourceL2Id > 0) && (ue->destinationList[j] >0) ) { 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, 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) { 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); 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, ...@@ -562,7 +562,6 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS_bytes - ta_len - header_length_total - sdu_length_total - 3,
0, 0,
0); 0);
...@@ -579,7 +578,7 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP, ...@@ -579,7 +578,7 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
TBS_bytes, TBS_bytes - ta_len - header_length_total - sdu_length_total - 3,
(char *)&mac_sdus[sdu_length_total], (char *)&mac_sdus[sdu_length_total],
0, 0,
0); 0);
......
...@@ -459,7 +459,6 @@ struct mac_status_resp ...@@ -459,7 +459,6 @@ struct mac_status_resp
rlc_am_mac_status_indication ( rlc_am_mac_status_indication (
const protocol_ctxt_t *const ctxt_pP, const protocol_ctxt_t *const ctxt_pP,
void *const rlc_pP, void *const rlc_pP,
const uint16_t tb_sizeP,
struct mac_status_ind tx_statusP, struct mac_status_ind tx_statusP,
const eNB_flag_t enb_flagP) { const eNB_flag_t enb_flagP) {
struct mac_status_resp status_resp; struct mac_status_resp status_resp;
...@@ -491,10 +490,6 @@ rlc_am_mac_status_indication ( ...@@ -491,10 +490,6 @@ rlc_am_mac_status_indication (
rlc->last_absolute_subframe_status_indication = PROTOCOL_CTXT_TIME_MILLI_SECONDS(ctxt_pP); 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); 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 // For eNB scheduler : Add Max RLC header size for new PDU
...@@ -549,8 +544,7 @@ rlc_am_mac_status_indication ( ...@@ -549,8 +544,7 @@ rlc_am_mac_status_indication (
NULL,0, NULL,0,
MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS-IND %u", MSC_AS_TIME_FMT" "PROTOCOL_RLC_AM_MSC_FMT" STATUS-IND %u",
MSC_AS_TIME_ARGS(ctxt_pP), MSC_AS_TIME_ARGS(ctxt_pP),
PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc), PROTOCOL_RLC_AM_MSC_ARGS(ctxt_pP, rlc));
tb_sizeP);
MSC_LOG_TX_MESSAGE( 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_RLC_ENB:MSC_RLC_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_MAC_ENB:MSC_MAC_UE, (ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_MAC_ENB:MSC_MAC_UE,
...@@ -565,26 +559,14 @@ rlc_am_mac_status_indication ( ...@@ -565,26 +559,14 @@ rlc_am_mac_status_indication (
} }
if (LOG_DEBUGFLAG(DEBUG_RLC)) { if (LOG_DEBUGFLAG(DEBUG_RLC)) {
if (tb_sizeP > 0) { LOG_UI(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) -> %d bytes\n",
LOG_UI(RLC, PROTOCOL_RLC_AM_CTXT_FMT" MAC_STATUS_INDICATION (DATA) %d bytes -> %d bytes\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc), PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc),
tb_sizeP,
status_resp.buffer_occupancy_in_bytes); status_resp.buffer_occupancy_in_bytes);
} }
}
return status_resp; 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 struct mac_data_req
rlc_am_mac_data_request ( rlc_am_mac_data_request (
......
...@@ -255,23 +255,15 @@ rlc_am_get_pdus ( ...@@ -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); 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. * \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] ctxt_pP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer. * \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] tx_statusP Transmission status given by MAC on previous MAC transmission of the PDU.
* \param[in] enb_flagP eNB or UE flag indication. * \param[in] enb_flagP eNB or UE flag indication.
* \return The maximum number of bytes that can be served by RLC instance to MAC. * \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); 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 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);
/*! \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) /*! \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. * \brief Gives PDUs to lower layer MAC.
......
...@@ -151,13 +151,10 @@ struct mac_status_resp ...@@ -151,13 +151,10 @@ struct mac_status_resp
rlc_tm_mac_status_indication ( rlc_tm_mac_status_indication (
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
void * const rlc_pP, void * const rlc_pP,
const tb_size_t tb_sizeP,
struct mac_status_ind tx_statusP) struct mac_status_ind tx_statusP)
{ {
struct mac_status_resp status_resp; 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_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.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; status_resp.rlc_info.rlc_protocol_state = ((rlc_tm_entity_t *) rlc_pP)->protocol_state;
......
...@@ -88,11 +88,10 @@ void rlc_tm_rx ( ...@@ -88,11 +88,10 @@ void rlc_tm_rx (
struct mac_data_ind data_indP); 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. * \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] ctxtP Running context.
* \param[in] rlcP RLC TM protocol instance pointer. * \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. * \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. * \return The maximum number of bytes that can be served by RLC instance to MAC.
*/ */
...@@ -100,7 +99,6 @@ struct mac_status_resp ...@@ -100,7 +99,6 @@ struct mac_status_resp
rlc_tm_mac_status_indication ( rlc_tm_mac_status_indication (
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
void * const rlc_pP, void * const rlc_pP,
const tb_size_t tb_sizeP,
struct mac_status_ind tx_statusP); struct mac_status_ind tx_statusP);
......
...@@ -370,7 +370,7 @@ rlc_um_rx (const protocol_ctxt_t *const ctxt_pP, void *argP, struct mac_data_ind ...@@ -370,7 +370,7 @@ rlc_um_rx (const protocol_ctxt_t *const ctxt_pP, void *argP, struct mac_data_ind
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct mac_status_resp struct mac_status_resp
rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP) { rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP) {
struct mac_status_resp status_resp; struct mac_status_resp status_resp;
uint16_t sdu_size = 0; uint16_t sdu_size = 0;
uint16_t sdu_remaining_size = 0; uint16_t sdu_remaining_size = 0;
...@@ -386,7 +386,6 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP ...@@ -386,7 +386,6 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP
if (rlc_pP) { if (rlc_pP) {
status_resp.rlc_info.rlc_protocol_state = rlc_p->protocol_state; status_resp.rlc_info.rlc_protocol_state = rlc_p->protocol_state;
rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_p); rlc_um_check_timer_dar_time_out(ctxt_pP, rlc_p);
rlc_p->nb_bytes_requested_by_mac = tbs_sizeP;
status_resp.buffer_occupancy_in_bytes = rlc_um_get_buffer_occupancy (rlc_p); status_resp.buffer_occupancy_in_bytes = rlc_um_get_buffer_occupancy (rlc_p);
if ((status_resp.buffer_occupancy_in_bytes > 0) && ((mb_p = list_get_head(&rlc_p->input_sdus)) != NULL)) { if ((status_resp.buffer_occupancy_in_bytes > 0) && ((mb_p = list_get_head(&rlc_p->input_sdus)) != NULL)) {
...@@ -416,9 +415,8 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP ...@@ -416,9 +415,8 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP
if (LOG_DEBUGFLAG(DEBUG_RLC)) { if (LOG_DEBUGFLAG(DEBUG_RLC)) {
if (( rlc_p->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) { if (( rlc_p->rb_id > 0) && (status_resp.buffer_occupancy_in_bytes > 0)) {
LOG_UI(RLC, PROTOCOL_RLC_UM_CTXT_FMT"MAC_STATUS_INDICATION (DATA) %d bytes requested -> %d bytes available\n", LOG_UI(RLC, PROTOCOL_RLC_UM_CTXT_FMT"MAC_STATUS_INDICATION (DATA) -> %d bytes available\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p), PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_p),
tbs_sizeP,
status_resp.buffer_occupancy_in_bytes); status_resp.buffer_occupancy_in_bytes);
if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) { if ((tx_statusP.tx_status == MAC_TX_STATUS_SUCCESSFUL) && (tx_statusP.no_pdu)) {
...@@ -441,15 +439,6 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP ...@@ -441,15 +439,6 @@ rlc_um_mac_status_indication (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP
return status_resp; return status_resp;
} }
//-----------------------------------------------------------------------------
void
rlc_um_set_nb_bytes_requested_by_mac (
void *rlc_pP,
const tb_size_t tb_sizeP
) {
((rlc_um_entity_t *) rlc_pP)->nb_bytes_requested_by_mac = tb_sizeP;
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct mac_data_req struct mac_data_req
rlc_um_mac_data_request (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP,const eNB_flag_t enb_flagP) { rlc_um_mac_data_request (const protocol_ctxt_t *const ctxt_pP, void *rlc_pP,const eNB_flag_t enb_flagP) {
......
...@@ -160,27 +160,15 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP); ...@@ -160,27 +160,15 @@ rlc_um_get_pdus (const protocol_ctxt_t* const ctxt_pP, void *argP);
*/ */
void void
rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP); rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind data_indP);
/*! \fn struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP) /*! \fn struct mac_status_resp rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP, 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. * \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] ctxt_pP Running context.
* \param[in] rlc_pP RLC UM protocol instance pointer. * \param[in] rlc_pP RLC UM 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] 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. * \return The maximum number of bytes that can be served by RLC instance to MAC.
*/ */
struct mac_status_resp struct mac_status_resp
rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, uint16_t tbs_sizeP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP); rlc_um_mac_status_indication (const protocol_ctxt_t* const ctxt_pP, void *rlc_pP, struct mac_status_ind tx_statusP,const eNB_flag_t enb_flagP);
/*! \fn void rlc_um_set_nb_bytes_requested_by_mac (rlc_um_entity_t * const rlc_pP, const tb_size_t tb_sizeP)
* \brief Set available TBS size for MAC Tx.
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] tb_sizeP remaining TBS in bytes.
*/
void
rlc_um_set_nb_bytes_requested_by_mac (
void * rlc_pP,
const tb_size_t tb_sizeP
);
/*! \fn struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,const eNB_flag_t enb_flagP) /*! \fn struct mac_data_req rlc_um_mac_data_request (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP,const eNB_flag_t enb_flagP)
* \brief Gives PDUs to lower layer MAC. * \brief Gives PDUs to lower layer MAC.
......
...@@ -391,7 +391,7 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r ...@@ -391,7 +391,7 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r
* \param [in] eNB_flagP Flag to indicate eNB (1) or UE (0) * \param [in] eNB_flagP Flag to indicate eNB (1) or UE (0)
* \param [in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0) * \param [in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
* \param [in] rb_idP Radio bearer identifier. * \param [in] rb_idP Radio bearer identifier.
* \param [in] tb_sizeP Available Tx TBS in bytes. For UE only. * \param [in] tb_sizeP Requested Tx TBS in bytes.
* \param [in,out] bufferP Memory area to fill with the bytes requested by MAC. * \param [in,out] bufferP Memory area to fill with the bytes requested by MAC.
* \return A status about the processing, OK or error code. * \return A status about the processing, OK or error code.
*/ */
...@@ -416,7 +416,7 @@ tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, con ...@@ -416,7 +416,7 @@ tbs_size_t mac_rlc_data_req (const module_id_t, const rnti_t, con
void mac_rlc_data_ind (const module_id_t, const rnti_t, const eNB_index_t,const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, char *, tb_size_t, num_tb_t, void mac_rlc_data_ind (const module_id_t, const rnti_t, const eNB_index_t,const frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, char *, tb_size_t, num_tb_t,
crc_t * ); crc_t * );
/*! \fn mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const sub_frame_t subframeP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP, tb_size_t tb_sizeP) /*! \fn mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t mod_idP, const rnti_t rntiP, const frame_t frameP, const sub_frame_t subframeP, const eNB_flag_t eNB_flagP, const MBMS_flag_t MBMS_flagP, logical_chan_id_t rb_idP)
* \brief Interface with MAC layer, request and set the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier. * \brief Interface with MAC layer, request and set the number of bytes scheduled for transmission by the RLC instance corresponding to the radio bearer identifier.
* \param[in] mod_idP Virtualized module identifier. * \param[in] mod_idP Virtualized module identifier.
* \param[in] rntiP UE identifier. * \param[in] rntiP UE identifier.
...@@ -425,10 +425,9 @@ void mac_rlc_data_ind (const module_id_t, const rnti_t, con ...@@ -425,10 +425,9 @@ void mac_rlc_data_ind (const module_id_t, const rnti_t, con
* \param[in] eNB_flagP Flag to indicate eNB operation (1 true, 0 false) * \param[in] eNB_flagP Flag to indicate eNB operation (1 true, 0 false)
* \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0) * \param[in] MBMS_flagP Flag to indicate whether this is the MBMS service (1) or not (0)
* \param[in] rb_idP Radio bearer identifier. * \param[in] rb_idP Radio bearer identifier.
* \param[in] tb_sizeP Size of a transport block set in bytes.
* \return The maximum number of bytes that the RLC instance can send in the next transmission sequence. * \return The maximum number of bytes that the RLC instance can send in the next transmission sequence.
*/ */
mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t, tb_size_t mac_rlc_status_resp_t mac_rlc_status_ind (const module_id_t, const rnti_t, const eNB_index_t, const frame_t, const sub_frame_t, const eNB_flag_t, const MBMS_flag_t, logical_chan_id_t
,const uint32_t sourceL2Id ,const uint32_t sourceL2Id
,const uint32_t destinationL2Id ,const uint32_t destinationL2Id
); );
......
...@@ -191,20 +191,19 @@ tbs_size_t mac_rlc_data_req( ...@@ -191,20 +191,19 @@ tbs_size_t mac_rlc_data_req(
case RLC_MODE_AM: case RLC_MODE_AM:
rlc_am_mui.rrc_mui_num = 0; rlc_am_mui.rrc_mui_num = 0;
if (!enb_flagP) rlc_am_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.am,tb_sizeP); ((rlc_am_entity_t *) &rlc_union_p->rlc.am)->nb_bytes_requested_by_mac = tb_sizeP;
data_request = rlc_am_mac_data_request(&ctxt, &rlc_union_p->rlc.am,enb_flagP); data_request = rlc_am_mac_data_request(&ctxt, &rlc_union_p->rlc.am,enb_flagP);
ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data); ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
break; break;
case RLC_MODE_UM: case RLC_MODE_UM:
if (!enb_flagP) rlc_um_set_nb_bytes_requested_by_mac(&rlc_union_p->rlc.um,tb_sizeP); ((rlc_um_entity_t *) &rlc_union_p->rlc.um)->nb_bytes_requested_by_mac = tb_sizeP;
data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP); data_request = rlc_um_mac_data_request(&ctxt, &rlc_union_p->rlc.um,enb_flagP);
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data); ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
break; break;
case RLC_MODE_TM: case RLC_MODE_TM:
((rlc_tm_entity_t *) &rlc_union_p->rlc.tm)->rlc_pdu_size = tb_sizeP;
data_request = rlc_tm_mac_data_request(&ctxt, &rlc_union_p->rlc.tm); data_request = rlc_tm_mac_data_request(&ctxt, &rlc_union_p->rlc.tm);
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data); ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
break; break;
...@@ -317,7 +316,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -317,7 +316,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
const eNB_flag_t enb_flagP, const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP, const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP, const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP,
const uint32_t sourceL2Id, const uint32_t sourceL2Id,
const uint32_t destinationL2Id const uint32_t destinationL2Id
) { ) {
...@@ -370,7 +368,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -370,7 +368,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
break; break;
case RLC_MODE_AM: case RLC_MODE_AM:
status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tb_sizeP, tx_status,enb_flagP); status_resp = rlc_am_mac_status_indication(&ctxt, &rlc_union_p->rlc.am, tx_status,enb_flagP);
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes; mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time; mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send; mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
...@@ -379,7 +377,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -379,7 +377,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
break; break;
case RLC_MODE_UM: case RLC_MODE_UM:
status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tb_sizeP, tx_status, enb_flagP); status_resp = rlc_um_mac_status_indication(&ctxt, &rlc_union_p->rlc.um, tx_status, enb_flagP);
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes; mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus; mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time; mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
...@@ -389,7 +387,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -389,7 +387,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
break; break;
case RLC_MODE_TM: case RLC_MODE_TM:
status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tb_sizeP, tx_status); status_resp = rlc_tm_mac_status_indication(&ctxt, &rlc_union_p->rlc.tm, tx_status);
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes; mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus; mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
// return mac_rlc_status_resp; // return mac_rlc_status_resp;
......
...@@ -152,7 +152,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -152,7 +152,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
const eNB_flag_t enb_flagP, const eNB_flag_t enb_flagP,
const MBMS_flag_t MBMS_flagP, const MBMS_flag_t MBMS_flagP,
const logical_chan_id_t channel_idP, const logical_chan_id_t channel_idP,
const tb_size_t tb_sizeP,
const uint32_t sourceL2Id, const uint32_t sourceL2Id,
const uint32_t destinationL2Id const uint32_t destinationL2Id
) )
...@@ -189,7 +188,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind( ...@@ -189,7 +188,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
ret.bytes_in_buffer = buf_stat.status_size ret.bytes_in_buffer = buf_stat.status_size
+ buf_stat.retx_size + buf_stat.retx_size
+ buf_stat.tx_size; + buf_stat.tx_size;
ue->saved_status_ind_tb_size[channel_idP - 1] = tb_sizeP;
} else { } else {
ret.bytes_in_buffer = 0; ret.bytes_in_buffer = 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