Added more checks when applying dci decisions in the dataplane, to reduce RLC request misses

This commit is contained in:
Xenofon Foukas
2016-03-16 11:48:18 +00:00
parent c2971d5176
commit ef22a539aa
@@ -182,41 +182,56 @@ void apply_ue_spec_scheduling_decisions(mid_t mod_id,
if (rlc_size > 0) { if (rlc_size > 0) {
rlc_status = mac_rlc_status_ind(mod_id, rlc_status = mac_rlc_status_ind(mod_id,
rnti, rnti,
mod_id, mod_id,
frame, frame,
ENB_FLAG_YES, ENB_FLAG_YES,
MBMS_FLAG_NO, MBMS_FLAG_NO,
lcid, lcid,
rlc_size); // transport block set size 0);
sdu_lengths[i] = 0; if (rlc_status.bytes_in_buffer > 0) {
LOG_D(MAC, "[TEST] RLC can give %d bytes for LCID %d during second call\n", rlc_status.bytes_in_buffer, lcid); rlc_status = mac_rlc_status_ind(mod_id,
rnti,
mod_id,
frame,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
rlc_size); // transport block set size
sdu_lengths[i] += mac_rlc_data_req(mod_id, sdu_lengths[i] = 0;
rnti,
mod_id,
frame,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
(char *)&dlsch_buffer[sdu_length_total]);
LOG_D(MAC,"[eNB %d][LCID %d] CC_id %d Got %d bytes from RLC\n",mod_id, lcid, CC_id, sdu_lengths[i]); LOG_D(MAC, "[TEST] RLC can give %d bytes for LCID %d during second call\n", rlc_status.bytes_in_buffer, lcid);
sdu_length_total += sdu_lengths[i];
sdu_lcids[i] = lcid;
UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid] += 1; if (rlc_status.bytes_in_buffer > 0) {
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[lcid] += sdu_lengths[i];
if (sdu_lengths[i] < 128) { sdu_lengths[i] += mac_rlc_data_req(mod_id,
header_len += 2; rnti,
} else { mod_id,
header_len += 3; frame,
ENB_FLAG_YES,
MBMS_FLAG_NO,
lcid,
(char *)&dlsch_buffer[sdu_length_total]);
LOG_D(MAC,"[eNB %d][LCID %d] CC_id %d Got %d bytes from RLC\n",mod_id, lcid, CC_id, sdu_lengths[i]);
sdu_length_total += sdu_lengths[i];
sdu_lcids[i] = lcid;
UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[lcid] += 1;
UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[lcid] += sdu_lengths[i];
if (sdu_lengths[i] < 128) {
header_len += 2;
} else {
header_len += 3;
}
num_sdus++;
}
} }
num_sdus++;
} }
} // SDU creation end } // SDU creation end
@@ -249,7 +264,7 @@ void apply_ue_spec_scheduling_decisions(mid_t mod_id,
ta_update = (ta_len > 0) ? ue_sched_ctl->ta_update : 0; ta_update = (ta_len > 0) ? ue_sched_ctl->ta_update : 0;
// If there is nothing to schedule, just leave // If there is nothing to schedule, just leave
if ((sdu_length_total + ta_len) < 0) { if ((sdu_length_total + ta_len) <= 0) {
return; return;
} }