Change in osmo-bts[master]: l1sap: add logging for ACCH repetition

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/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Feb 12 20:13:27 UTC 2021


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/22888 )


Change subject: l1sap: add logging for ACCH repetition
......................................................................

l1sap: add logging for ACCH repetition

At the moment osmo-bts is not looging much ACCH repetition related
information. This makes testing ACCH repetition difficult. Lets add some
debug output that informs the user when ACCH repetition is turned on or
off. Also log when a repetition candidate is stored or when a channel is
repeated.

Change-Id: I59d11fd03be3d29fb8a4279d9945b03006764c0e
Related: SYS#5114
---
M src/common/l1sap.c
1 file changed, 44 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/88/22888/1

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 025982a..05c4f08 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -935,10 +935,12 @@
 		/* Re-use stored FACCH message buffer from SLOT #0 for repetition. */
 		msg = lchan->tch.rep_facch[0].msg;
 		lchan->tch.rep_facch[0].msg = NULL;
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: repeating FACCH channel\n");
 	} else if (lchan->tch.rep_facch[1].msg && GSM_TDMA_FN_SUB(fn, lchan->tch.rep_facch[1].fn) >= 8) {
 		/* Re-use stored FACCH message buffer from SLOT #1 for repetition. */
 		msg = lchan->tch.rep_facch[1].msg;
 		lchan->tch.rep_facch[1].msg = NULL;
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: repeating FACCH channel\n");
 	} else {
 		/* Fetch new FACCH from queue ... */
 		if (lapdm_phsap_dequeue_prim(le, &pp) < 0)
@@ -957,9 +959,11 @@
 		if (lchan->tch.rep_facch[0].msg == NULL) {
 			lchan->tch.rep_facch[0].msg = msgb_copy(msg, "rep_facch_0");
 			lchan->tch.rep_facch[0].fn = fn;
+			LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: stored repetition candidate\n");
 		} else if (lchan->tch.rep_facch[1].msg == NULL) {
 			lchan->tch.rep_facch[1].msg = msgb_copy(msg, "rep_facch_1");
 			lchan->tch.rep_facch[1].fn = fn;
+			LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: stored repetition candidate\n");
 		} else {
 			/* By definition 3GPP TS 05.02 does not allow more than two (for TCH/H only one) FACCH blocks
 			 * to be transmitted simultaniously. */
@@ -987,12 +991,19 @@
 	if (!lchan->repeated_acch_capability.dl_facch_cmd
 	    && !lchan->repeated_acch_capability.dl_facch_all) {
 		lchan->repeated_dl_facch_active = false;
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: disabled by BSC\n");
 		return;
 	}
 
+	if (lchan->repeated_dl_facch_active)
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: active\n");
+	else
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: inactive\n");
+
 	/* Threshold disabled (always on) */
 	if (lchan->repeated_acch_capability.rxqual == 0) {
 		lchan->repeated_dl_facch_active = true;
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: no threshold => DL-FACCH repetition active\n");
 		return;
 	}
 
@@ -1000,6 +1011,7 @@
 	 * (repeated SACCH requested) then it makes sense to enable
 	 * FACCH repetition too. */
 	if ((lchan->meas.l1_info[0] >> 1) & 1) {
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: MS requests DL-SACCH repetition => DL-FACCH repetition also active\n");
 		lchan->repeated_dl_facch_active = true;
 		return;
 	}
@@ -1029,10 +1041,15 @@
 	else
 		rxqual = meas_res->rxqual_full;
 
-	if (rxqual >= upper)
+	if (rxqual >= upper) {
 		lchan->repeated_dl_facch_active = true;
-	else if (rxqual <= lower)
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: rxqual (%u) >= upper rxqual threshold (%u) => DL-FACCH repetition active\n",
+			  rxqual, upper);
+	} else if (rxqual <= lower) {
 		lchan->repeated_dl_facch_active = false;
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-FACCH repetition: rxqual (%u) <= lower rxqual threshold (%u) => DL-FACCH repetition inactive\n",
+			  rxqual, lower);
+	}
 
 }
 
@@ -1043,6 +1060,11 @@
 	struct msgb *msg;
 	uint8_t sapi;
 
+	if ((lchan->meas.l1_info[0] >> 1) & 1)
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-SACCH repetition: MS requests DL-SACCH repetition (SRR=1)\n");
+	else
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-SACCH repetition: MS does not request DL-SACCH repetition (SRR=0)\n");
+
 	/* Note: When the MS disables SACCH repetition, we still must collect
 	 * possible candidates in order to have one ready in case the MS enables
 	 * SACCH repetition. */
@@ -1058,6 +1080,7 @@
 			lchan->rep_sacch = NULL;
 			p[0] = lchan->rep_sacch_l1_hdr[0];
 			p[1] = lchan->rep_sacch_l1_hdr[1];
+			LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-SACCH repetition: repeating SACCH channel\n");
 			return msg;
 		}
 	}
@@ -1065,6 +1088,7 @@
 	/* Fetch new repetition candidate from queue */
 	if (lapdm_phsap_dequeue_prim(le, &pp) < 0)
 		return NULL;
+
 	msg = pp.oph.msg;
 	sapi = (msg->data[0] >> 2) & 0x07;
 
@@ -1074,6 +1098,7 @@
 		lchan->rep_sacch = msgb_copy(msg, "rep_sacch");
 		lchan->rep_sacch_l1_hdr[0] = p[0];
 		lchan->rep_sacch_l1_hdr[1] = p[1];
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-SACCH repetition: stored repetition candidate\n");
 	}
 
 	return msg;
@@ -1164,8 +1189,10 @@
 			le = &lchan->lapdm_ch.lapdm_acch;
 			if (lchan->repeated_acch_capability.dl_sacch)
 				pp_msg = lapdm_phsap_dequeue_msg_sacch(lchan, le, p);
-			else
+			else {
+				LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "DL-SACCH repetition: disabled by BSC\n");
 				pp_msg = lapdm_phsap_dequeue_msg(le);
+			}
 		} else {
 			if (lchan->ts->trx->bts->dtxd)
 				dtxd_facch = true;
@@ -1438,12 +1465,19 @@
 	 * reason, we must be sure that UL-SACCH repetition is disabled. */
 	if (!lchan->repeated_acch_capability.ul_sacch) {
 		lchan->repeated_ul_sacch_active = false;
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "UL-SACCH repetition: disabled by BSC\n");
 		return;
 	}
 
+	if (lchan->repeated_dl_facch_active)
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "UL-SACCH repetition: active\n");
+	else
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "UL-SACCH repetition: inactive\n");
+
 	/* Threshold disabled (repetition is always on) */
 	if (lchan->repeated_acch_capability.rxqual == 0) {
 		lchan->repeated_ul_sacch_active = true;
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "UL-SACCH repetition: no threshold => UL-SACCH repetition active\n");
 		return;
 	}
 
@@ -1461,10 +1495,15 @@
 	lower = ber10k_by_rxqual_lower[lchan->repeated_acch_capability.rxqual];
 
 	/* If upper/rxqual == 0, then repeated UL-SACCH is always on */
-	if (ber10k >= upper)
+	if (ber10k >= upper) {
 		lchan->repeated_ul_sacch_active = true;
-	else if (ber10k <= lower)
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "UL-SACCH repetition: ber10k (%u) >= upper ber10k threshold (%u) => UL-SACCH repetition active\n",
+			  ber10k, upper);
+	} else if (ber10k <= lower) {
 		lchan->repeated_ul_sacch_active = false;
+		LOGPLCHAN(lchan, DL1C, LOGL_DEBUG, "UL-SACCH repetition: ber10k (%u) <= upper ber10k threshold (%u) => UL-SACCH repetition inactive\n",
+			  ber10k, lower);
+	}
 }
 
 /* DATA received from bts model */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I59d11fd03be3d29fb8a4279d9945b03006764c0e
Gerrit-Change-Number: 22888
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210212/f0b913e5/attachment.htm>


More information about the gerrit-log mailing list