Change in osmo-bts[master]: l1sap: Fix calculation of expired RACH slots in case of missing frame...

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun May 26 09:09:21 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/14160 )

Change subject: l1sap: Fix calculation of expired RACH slots in case of missing frame numbers
......................................................................

l1sap: Fix calculation of expired RACH slots in case of missing frame numbers

In case of a Combined CCCH (with SDCCH/4), the number of RACH slots
depends on the frame number.  So in case of lost/skipped frame numbers,
we cannot simply compute the value for the current fn and then multiply
it by the number of frame numbers expired.  Rather, we have to 'replay'
all missed frame numbers and individually determine how many RACH
slots happened in that frame.

Related: OS#3750
Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe
---
M src/common/l1sap.c
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Pau Espin Pedrol: Looks good to me, but someone else must approve



diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index d9ffdb8..52f2b33 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -493,6 +493,7 @@
 			       struct info_time_ind_param *info_time_ind)
 {
 	int frames_expired;
+	int i;
 
 	DEBUGPFN(DL1P, info_time_ind->fn, "Rx MPH_INFO time ind\n");
 
@@ -513,8 +514,10 @@
 
 	/* increment number of RACH slots that have passed by since the
 	 * last time indication */
-	bts->load.rach.total +=
-	    calc_exprd_rach_frames(bts, info_time_ind->fn) * frames_expired;
+	for (i = 0; i < frames_expired; i++) {
+		uint32_t fn = (info_time_ind->fn + GSM_HYPERFRAME - i) % GSM_HYPERFRAME;
+		bts->load.rach.total += calc_exprd_rach_frames(bts, fn);
+	}
 
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/14160
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If4f8d2ea55fc722c64c330cde09e833b67ee98fe
Gerrit-Change-Number: 14160
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190526/f081b0cd/attachment.html>


More information about the gerrit-log mailing list