Change in osmo-bsc[master]: update neighbor ARFCNs on startup and config changes

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

neels gerrit-no-reply at lists.osmocom.org
Sun Apr 18 14:26:35 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/23785 )


Change subject: update neighbor ARFCNs on startup and config changes
......................................................................

update neighbor ARFCNs on startup and config changes

The effects of the neighbor configuration depend on the LAC, Cell
Identity, ARFCN, BSIC configuration of neighbor cells. Make sure that
the neighbor ARFCN list in the System Information is updated.

This may seem rather aggressive: updating the SI of all BTS if only one
config item changed. But indeed even modifying one config item of one
BTS may cause a change in the neighbor relations that many other BTS may
have to the changed BTS. For example, if many BTS configure a
'neighbor lac-ci 42 23', and this cell's config changes to LAC 43, all
of those other BTS need to update their neighbor ARFCNs.

Also update the system information even before the BTS are connected and
started up. The main benefit here is that the VTY 'show bts N' command
then already lists the correct neighbor ARFCNs.

In gsm_bts_trx_set_system_infos(), make sure that the updated SI is only
sent to TRXes that are actually usable, otherwise abis_rsl_sendmsg()
spams the log with complaints that a message's dst == NULL.

The desire to have the ARFCNs listed in the VTY before starting up BTSes
came during analysis for Ifb54d9a91e9bca032c721f12c873c6216733e7b1,
which fixes a bug that is now much easier to verify being fixed.

Change-Id: I2222e029fc225152e124ed1e8887f1ffd4a107ef
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bsc_init.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts_trx.c
M src/osmo-bsc/neighbor_ident_vty.c
M src/osmo-bsc/osmo_bsc_main.c
6 files changed, 45 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/23785/1

diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index bcc215d..5aaf6d5 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -671,6 +671,7 @@
 int bts_count_free_ts(struct gsm_bts *bts, enum gsm_phys_chan_config pchan);
 
 int gsm_bts_set_system_infos(struct gsm_bts *bts);
+int gsm_net_set_system_infos();
 
 int gsm_bts_model_register(struct gsm_bts_model *model);
 struct gsm_bts_model *bts_model_find(enum gsm_bts_type type);
diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c
index b572f27..dedbd96 100644
--- a/src/osmo-bsc/bsc_init.c
+++ b/src/osmo-bsc/bsc_init.c
@@ -168,3 +168,15 @@
 
 	return bts;
 }
+
+int gsm_net_set_system_infos()
+{
+	struct gsm_bts *bts;
+	int ret = 0;
+	llist_for_each_entry(bts, &bsc_gsmnet->bts_list, list) {
+		int rc = gsm_bts_set_system_infos(bts);
+		if (rc)
+			ret = rc;
+	}
+	return ret;
+}
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 1d29f1b..6991e03 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -2447,6 +2447,11 @@
 	}
 	bts->cell_identity = ci;
 
+	/* Changing the CI of a BTS may affect the neighbor relations between cells, when other cells indicate a
+	 * neighbor cell by CI. Update the neighbors list in System Information. */
+	if (vty->type != VTY_FILE)
+		gsm_net_set_system_infos();
+
 	return CMD_SUCCESS;
 }
 
@@ -2473,6 +2478,11 @@
 
 	bts->location_area_code = lac;
 
+	/* Changing the LAC of a BTS may affect the neighbor relations between cells, when other cells indicate a
+	 * neighbor cell by LAC. Update the neighbors list in System Information. */
+	if (vty->type != VTY_FILE)
+		gsm_net_set_system_infos();
+
 	return CMD_SUCCESS;
 }
 
@@ -2503,6 +2513,9 @@
 	}
 	bts->bsic = bsic;
 
+	if (vty->type != VTY_FILE)
+		gsm_net_set_system_infos();
+
 	return CMD_SUCCESS;
 }
 
@@ -5346,7 +5359,9 @@
 		return CMD_WARNING;
 	}
 
-	/* FIXME: patch ARFCN into SYSTEM INFORMATION */
+	if (vty->type != VTY_FILE)
+		gsm_net_set_system_infos();
+
 	/* FIXME: use OML layer to update the ARFCN */
 	/* FIXME: use RSL layer to update SYSTEM INFORMATION */
 
diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c
index 6d98929..b8096ac 100644
--- a/src/osmo-bsc/bts_trx.c
+++ b/src/osmo-bsc/bts_trx.c
@@ -429,6 +429,10 @@
 
 	/* Third, we send the selected SI via RSL */
 
+	/* If the BTS is not up and running yet, don't send anything. */
+	if (!trx_is_usable(trx))
+		return 0;
+
 	for (n = 0; n < n_si; n++) {
 		i = gen_si[n];
 		/* 3GPP TS 08.58 §8.5.1 BCCH INFORMATION. If we don't currently
diff --git a/src/osmo-bsc/neighbor_ident_vty.c b/src/osmo-bsc/neighbor_ident_vty.c
index b9160ec..12aca9d 100644
--- a/src/osmo-bsc/neighbor_ident_vty.c
+++ b/src/osmo-bsc/neighbor_ident_vty.c
@@ -183,6 +183,10 @@
 	neighbor = talloc_zero(bts, struct neighbor);
 	*neighbor = *n;
 	llist_add_tail(&neighbor->entry, &bts->neighbors);
+
+	if (vty->type != VTY_FILE)
+		gsm_bts_set_system_infos(bts);
+
 	return CMD_SUCCESS;
 }
 
@@ -213,6 +217,10 @@
 
 		llist_del(&neighbor->entry);
 		talloc_free(neighbor);
+
+		if (vty->type != VTY_FILE)
+			gsm_bts_set_system_infos(bts);
+
 		return CMD_SUCCESS;
 	}
 
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 3069cc0..fd41b74 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -942,6 +942,10 @@
 		exit(1);
 	}
 
+	/* Make the 'show bts' information list the neighbor ARFCNs by updating the
+	 * system_information.si_common.neigh_list. */
+	gsm_net_set_system_infos();
+
 	/* start control interface after reading config for
 	 * ctrl_vty_get_bind_addr() */
 	bsc_gsmnet->ctrl = bsc_controlif_setup(bsc_gsmnet,

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2222e029fc225152e124ed1e8887f1ffd4a107ef
Gerrit-Change-Number: 23785
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210418/dd8a74b7/attachment.htm>


More information about the gerrit-log mailing list