dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/35151?usp=email )
Change subject: gprs_rlcmac_sched: rewrite logic around idle block skip ......................................................................
gprs_rlcmac_sched: rewrite logic around idle block skip
The logic that decides whether to generate idle / dummy blocks directly at the PCU or leave the work to the TRX implementation of that specific BTS has a confusing appeareance.
(This is a follow up patch to change I7a08d8cc670fa14f7206ffffdbc22351f3668a17)
Related: OS#6191 Change-Id: Iadb62748b18605bf158169b317f880352bc0a5a6 --- M src/gprs_rlcmac_sched.cpp 1 file changed, 36 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/51/35151/1
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 12b9e50..a56fcb3 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -474,22 +474,26 @@ } /* Prio 3: send dummy control message if need to poll or USF */ else { - /* If there's no TBF attached to this PDCH, we can submit an empty - * data_req since there's nothing to transmit nor to poll/USF. This - * way we help BTS energy saving (on TRX!=C0) by sending nothing - * instead of a dummy block. The early return is done here and - * not at the start of the function because the condition below - * (num_tbfs==0) may not be enough, because temporary dummy TBFs - * created to send Imm Ass Rej (see handle_tbf_reject()) don't - * have a TFI assigned and hence are not attached to the PDCH - * TS, so they don't show up in the count below. - */ - const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF) - + pdch->num_tbfs(GPRS_RLCMAC_UL_TBF); - bool skip_idle = (num_tbfs == 0); + bool skip_idle;
- if (bts->gen_idle_blocks) - skip_idle = skip_idle && trx != 0; + if (bts->gen_idle_blocks) { + /* Always generate all idle blocks since the TRX of this BTS does + * not generate idle blocks by itself. */ + skip_idle = false; + } else {/* Only skip if no one is listening on this PDCH: + * If there's no TBF attached to this PDCH, we can submit an empty + * data_req since there's nothing to transmit nor to poll/USF. This + * way we help BTS energy saving (on TRX!=C0) by sending nothing + * instead of a dummy block. The early return is done here and + * not at the start of the function because the condition below + * (num_tbfs==0) may not be enough, because temporary dummy TBFs + * created to send Imm Ass Rej (see handle_tbf_reject()) don't + * have a TFI assigned and hence are not attached to the PDCH + * TS, so they don't show up in the count below. */ + const unsigned num_tbfs = pdch->num_tbfs(GPRS_RLCMAC_DL_TBF) + + pdch->num_tbfs(GPRS_RLCMAC_UL_TBF); + skip_idle = (num_tbfs == 0); + }
if (!skip_idle && (msg = sched_dummy())) { /* increase counter */