Change in libosmocore[master]: si2quater: fix budget calculation for multiple EARFCNs

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
Mon Dec 14 16:20:50 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21710 )


Change subject: si2quater: fix budget calculation for multiple EARFCNs
......................................................................

si2quater: fix budget calculation for multiple EARFCNs

In rest_octets.c append_earfcn(), the unconditional bits added are 40, not 25.
Removing only 25 bits from the budget resulted in malformed SI2quater starting
with 4 configured EARFCNs, by adding more EARFCNs than fit in 20 bits.

These malformed SI2quater were also expected in gsm0408_test.c. Update the
expected SI2quater to what is being generated now. This patch passes the ttcn3
testing added in I45382f88686ca60e68569e93569fc4cfb63a0e0d, which provides some
confidence that the coding expected in gsm0408_test.c is now correct.

This commit is a cherry-pick of osmo-bsc.git 6589f7c3a8dfdaaf66dda3afa6bbb1118ec825f9

Change-Id: Icc1ece39ad162d09720e104c5cbc12b07d6771a8
Related: OS#4652
---
M src/gsm/gsm48_rest_octets.c
1 file changed, 9 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/21710/1

diff --git a/src/gsm/gsm48_rest_octets.c b/src/gsm/gsm48_rest_octets.c
index 84b7589..5c7d77a 100644
--- a/src/gsm/gsm48_rest_octets.c
+++ b/src/gsm/gsm48_rest_octets.c
@@ -165,7 +165,7 @@
 {
 	bool appended;
 	unsigned int old = bv->cur_bit; /* save current position to make rollback possible */
-	int rem = budget - 25;
+	int rem = ((int)budget) - 40;
 	if (rem <= 0)
 		return;
 
@@ -193,6 +193,8 @@
 	/* Priority and E-UTRAN Parameters Description */
 	bitvec_set_bit(bv, 1);
 
+	/* budget: 10 bits used above */
+
 	/* Serving Cell Priority Parameters Descr. is Present,
 	* see also: 3GPP TS 44.018, Table 10.5.2.33b.1 */
 	bitvec_set_bit(bv, 1);
@@ -212,6 +214,8 @@
 	/* T_Reselection */
 	bitvec_set_uint(bv, 0, 2);
 
+	/* budget: 26 bits used above */
+
 	/* No 3G Priority Parameters Description */
 	bitvec_set_bit(bv, 0);
 	/* E-UTRAN Parameters Description */
@@ -235,12 +239,16 @@
 	/* Repeated E-UTRAN Neighbour Cells */
 	bitvec_set_bit(bv, 1);
 
+	/* budget: 34 bits used above */
+
 	appended = append_eutran_neib_cell(bv, e, e_offset, rem);
 	if (!appended) { /* appending is impossible within current budget: rollback */
 		bv->cur_bit = old;
 		return;
 	}
 
+	/* budget: further 6 bits used below, totalling 40 bits */
+
 	/* stop bit - end of Repeated E-UTRAN Neighbour Cells sequence: */
 	bitvec_set_bit(bv, 0);
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icc1ece39ad162d09720e104c5cbc12b07d6771a8
Gerrit-Change-Number: 21710
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/20201214/503d50d7/attachment.htm>


More information about the gerrit-log mailing list