Change in osmo-bts[master]: preserve lchan-specific SI overrides on SACCH FILL

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Jul 25 18:43:05 UTC 2018


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

Change subject: preserve lchan-specific SI overrides on SACCH FILL
......................................................................

preserve lchan-specific SI overrides on SACCH FILL

During SACCH FILL processing, update lchan SI values only
for lchans which follow BTS-global default values, keeping
lchan-specific overrides in place.

Change-Id: I515bbd9983fa894507386b241863a9aa4d279497
Fixes: eee7247ebe0d0a54a54b53b739bdd434dfceb511
Related: OS#3173
---
M include/osmo-bts/gsm_data_shared.h
M src/common/rsl.c
2 files changed, 12 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h
index e15abfe..baa0145 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -240,6 +240,8 @@
 	struct {
 		/* bitmask of all SI that are present/valid in si_buf */
 		uint32_t valid;
+		/* bitmask of all SI that do not mirror the BTS-global SI values */
+		uint32_t overridden;
 		uint32_t last;
 		/* buffers where we put the pre-computed SI:
 		   SI2Q_MAX_NUM is the max number of SI2quater messages (see 3GPP TS 44.018) */
diff --git a/src/common/rsl.c b/src/common/rsl.c
index e28f313..a24c444 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -567,14 +567,14 @@
 
 		lapdm_ui_prefix_bts(bts, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len);
 
-		/* Propagate SI change to all lchans. */
+		/* Propagate SI change to all lchans which adhere to BTS-global default. */
 		llist_for_each_entry(t, &bts->trx_list, list) {
 			int i, j;
 			for (i = 0; i < ARRAY_SIZE(t->ts); i++) {
 				struct gsm_bts_trx_ts *ts = &t->ts[i];
 				for (j = 0; j < ARRAY_SIZE(ts->lchan); j++) {
 					struct gsm_lchan *lchan = &ts->lchan[j];
-					if (lchan->state == LCHAN_S_NONE)
+					if (lchan->state == LCHAN_S_NONE || (lchan->si.overridden & (1 << osmo_si)))
 						continue;
 					lapdm_ui_prefix_lchan(lchan, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len);
 				}
@@ -588,14 +588,14 @@
 
 		bts->si_valid &= ~(1 << osmo_si);
 
-		/* Propagate SI change to all lchans. */
+		/* Propagate SI change to all lchans which adhere to BTS-global default. */
 		llist_for_each_entry(t, &bts->trx_list, list) {
 			int i, j;
 			for (i = 0; i < ARRAY_SIZE(t->ts); i++) {
 				struct gsm_bts_trx_ts *ts = &t->ts[i];
 				for (j = 0; j < ARRAY_SIZE(ts->lchan); j++) {
 					struct gsm_lchan *lchan = &ts->lchan[j];
-					if (lchan->state == LCHAN_S_NONE)
+					if (lchan->state == LCHAN_S_NONE || (lchan->si.overridden & (1 << osmo_si)))
 						continue;
 					lchan->si.valid &= ~(1 << osmo_si);
 				}
@@ -1567,6 +1567,7 @@
 {
 	struct abis_rsl_dchan_hdr *dch = msgb_l2(msg);
 	struct gsm_lchan *lchan = msg->lchan;
+	struct gsm_bts *bts = lchan->ts->trx->bts;
 	struct tlv_parsed tp;
 	uint8_t rsl_si, osmo_si;
 
@@ -1593,7 +1594,12 @@
 	}
 	if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) {
 		uint16_t len = TLVP_LEN(&tp, RSL_IE_L3_INFO);
+
 		lapdm_ui_prefix_lchan(lchan, TLVP_VAL(&tp, RSL_IE_L3_INFO), osmo_si, len);
+		if (memcmp(GSM_BTS_SI(bts, osmo_si), TLVP_VAL(&tp, RSL_IE_L3_INFO), sizeof(sysinfo_buf_t) != 0))
+			lchan->si.overridden |= (1 << osmo_si);
+		else
+			lchan->si.overridden &= ~(1 << osmo_si);
 
 		LOGP(DRSL, LOGL_INFO, "%s Rx RSL SACCH FILLING (SI%s)\n",
 			gsm_lchan_name(lchan),

-- 
To view, visit https://gerrit.osmocom.org/10156
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: I515bbd9983fa894507386b241863a9aa4d279497
Gerrit-Change-Number: 10156
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180725/29840eca/attachment.htm>


More information about the gerrit-log mailing list