Change in osmo-pcu[master]: sched: energy saving: Avoid Tx dummy blocks on empty PDCH TS

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Aug 25 14:51:11 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25242 )


Change subject: sched: energy saving: Avoid Tx dummy blocks on empty PDCH TS
......................................................................

sched: energy saving: Avoid Tx dummy blocks on empty PDCH TS

Related: SYS#4919
Related: OS#4772
Change-Id: I8d66dd5e838748611e7b77b504fc86295f02c019
---
M src/gprs_rlcmac_sched.cpp
1 file changed, 23 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/42/25242/1

diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 5427e52..ff5e6bb 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -485,12 +485,29 @@
 		gsmtap_cat = tx_is_egprs ? PCU_GSMTAP_C_DL_DATA_EGPRS :
 					   PCU_GSMTAP_C_DL_DATA_GPRS;
 	}
-	/* Prio 3: send dummy contol message */
-	else if ((msg = sched_dummy())) {
-		/* increase counter */
-		gsmtap_cat = PCU_GSMTAP_C_DL_DUMMY;
-	} else {
-		return -ENOMEM;
+	/* Prio 3: send dummy control message if need to poll or USF */
+	else {
+		/* If there's no TBF attached to this PDCH, we can early skip 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 in general, for instance
+		 * because temporary 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);
+		if (trx != 0 && num_tbfs == 0)
+			return 0;
+		if ((msg = sched_dummy())) {
+			/* increase counter */
+			gsmtap_cat = PCU_GSMTAP_C_DL_DUMMY;
+		} else {
+			return -ENOMEM;
+		}
 	}
 
 	if (tx_is_egprs && pdch->has_gprs_only_tbf_attached()) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25242
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I8d66dd5e838748611e7b77b504fc86295f02c019
Gerrit-Change-Number: 25242
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210825/8fb230bb/attachment.htm>


More information about the gerrit-log mailing list