Change in osmo-bts[master]: scheduler: Improve logging about prim being out of range

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
Tue Jun 16 13:41:31 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18856 )

Change subject: scheduler: Improve logging about prim being out of range
......................................................................

scheduler: Improve logging about prim being out of range

Change-Id: Ie7ea210fee1f59ece3abe171b64cdc04670c344b
---
M src/common/scheduler.c
1 file changed, 7 insertions(+), 5 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved



diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index e55b3a4..e1e7c95 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -635,7 +635,7 @@
 {
 	struct msgb *msg, *msg2;
 	struct osmo_phsap_prim *l1sap;
-	uint32_t prim_fn;
+	uint32_t prim_fn, l1sap_fn;
 	uint8_t chan_nr, link_id;
 	struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
 
@@ -655,22 +655,24 @@
 		case PRIM_PH_DATA:
 			chan_nr = l1sap->u.data.chan_nr;
 			link_id = l1sap->u.data.link_id;
-			prim_fn = ((l1sap->u.data.fn + GSM_HYPERFRAME - fn) % GSM_HYPERFRAME);
+			l1sap_fn = l1sap->u.data.fn;
 			break;
 		case PRIM_TCH:
 			chan_nr = l1sap->u.tch.chan_nr;
 			link_id = 0;
-			prim_fn = ((l1sap->u.tch.fn + GSM_HYPERFRAME - fn) % GSM_HYPERFRAME);
+			l1sap_fn = l1sap->u.tch.fn;
 			break;
 		default:
 			goto wrong_type;
 		}
+		prim_fn = ((l1sap_fn + GSM_HYPERFRAME - fn) % GSM_HYPERFRAME);
 		if (prim_fn > 100) {
 			LOGL1S(DL1P, LOGL_NOTICE, l1t, tn, chan, fn,
-			     "Prim %u is out of range (100), or channel %s with "
+			     "Prim %u is out of range (%u vs exp %u), or channel %s with "
 			     "type %s is already disabled. If this happens in "
 			     "conjunction with PCU, increase 'rts-advance' by 5.\n",
-			     prim_fn, get_lchan_by_chan_nr(l1t->trx, chan_nr)->name,
+			     prim_fn, l1sap_fn, fn,
+			     get_lchan_by_chan_nr(l1t->trx, chan_nr)->name,
 			     trx_chan_desc[chan].name);
 			/* unlink and free message */
 			llist_del(&msg->list);

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie7ea210fee1f59ece3abe171b64cdc04670c344b
Gerrit-Change-Number: 18856
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200616/581bc3c4/attachment.htm>


More information about the gerrit-log mailing list