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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24887 )
Change subject: separate 'interference-meas level-bounds' cfg and used
......................................................................
separate 'interference-meas level-bounds' cfg and used
The VTY defun already indicates BSC_VTY_ATTR_RESTART_ABIS_OML_LINK
correctly, but so far we would immediately start using the new values
internally, and wrongly interpret interference levels. Fix that.
Have bts->interf_meas_params twice: interf_meas_params_cfg for the VTY
configured values, and interf_meas_params_used for the values that the
BTS actually knows about, after they were sent via OML.
In a running BSC, when changing the interference level boundaries on the
telnet VTY, the BTS is not immediately told about the change. That would
require a BTS restart. Hence store the cfg values separately in
interf_meas_params_cfg. For comparing/printing interference levels in a
running BTS, only employ the values that were actually sent via OML and
placed in interf_meas_params_used.
Related: SYS#5313
Change-Id: Iad8cf4151ff7f86dc0549158ed5d91d788d40b1f
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bsc_vty.c
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
M src/osmo-bsc/nm_bts_fsm.c
M tests/handover/handover_test.c
7 files changed, 28 insertions(+), 21 deletions(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 992c9bb..9ec9364 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -552,8 +552,10 @@
/* Maximum BCCH carrier power reduction */
uint8_t c0_max_power_red_db;
- /* Interference Measurement Parameters */
- struct gsm_interf_meas_params interf_meas_params;
+ /* Interference Measurement Parameters, as read from VTY */
+ struct gsm_interf_meas_params interf_meas_params_cfg;
+ /* Interference Measurement Parameters, as last sent via OML */
+ struct gsm_interf_meas_params interf_meas_params_used;
/* We will ignore CHAN RQD with access delay greater than rach_max_delay */
uint8_t rach_max_delay;
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 42d77b3..9b6429d 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1523,14 +1523,14 @@
/* Store the actual received index */
lchan->interf_band = interf_band;
/* Clamp the index to 5 before accessing array of interference band bounds */
- interf_band = OSMO_MIN(interf_band, ARRAY_SIZE(bts->interf_meas_params.bounds_dbm)-1);
+ interf_band = OSMO_MIN(interf_band, ARRAY_SIZE(bts->interf_meas_params_used.bounds_dbm)-1);
/* FIXME: when testing with ip.access nanoBTS, we observe a value range of 1..6. According to spec, it
* seems like values 0..5 are intended: 3GPP TS 48.058 9.3.21 Resource Information says:
* "The Interf Band field (bits 6-8) indicates in binary the interference level expressed as one of five
* possible interference level bands as defined by O&M."
* and 3GPP TS 52.021 9.4.25 "Interference level Boundaries" (OML) defines values 0, X1, X2, X3, X4, X5.
* If nanoBTS sends 6, the above code clamps it to 5, so that we lose one band in accuracy. */
- lchan->interf_dbm = -((int16_t)bts->interf_meas_params.bounds_dbm[interf_band]);
+ lchan->interf_dbm = -((int16_t)bts->interf_meas_params_used.bounds_dbm[interf_band]);
}
return 0;
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 97dd615..1eeda3b 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -1276,22 +1276,22 @@
|| bts->repeated_acch_policy.dl_facch_cmd)
vty_out(vty, " repeat rxqual %u%s", bts->repeated_acch_policy.rxqual, VTY_NEWLINE);
- if (bts->interf_meas_params.avg_period != interf_meas_params_def.avg_period) {
+ if (bts->interf_meas_params_cfg.avg_period != interf_meas_params_def.avg_period) {
vty_out(vty, " interference-meas avg-period %u%s",
- bts->interf_meas_params.avg_period,
+ bts->interf_meas_params_cfg.avg_period,
VTY_NEWLINE);
}
- if (memcmp(bts->interf_meas_params.bounds_dbm,
+ if (memcmp(bts->interf_meas_params_cfg.bounds_dbm,
interf_meas_params_def.bounds_dbm,
sizeof(interf_meas_params_def.bounds_dbm))) {
vty_out(vty, " interference-meas level-bounds "
"%d %d %d %d %d %d%s",
- -1 * bts->interf_meas_params.bounds_dbm[0],
- -1 * bts->interf_meas_params.bounds_dbm[1],
- -1 * bts->interf_meas_params.bounds_dbm[2],
- -1 * bts->interf_meas_params.bounds_dbm[3],
- -1 * bts->interf_meas_params.bounds_dbm[4],
- -1 * bts->interf_meas_params.bounds_dbm[5],
+ -1 * bts->interf_meas_params_cfg.bounds_dbm[0],
+ -1 * bts->interf_meas_params_cfg.bounds_dbm[1],
+ -1 * bts->interf_meas_params_cfg.bounds_dbm[2],
+ -1 * bts->interf_meas_params_cfg.bounds_dbm[3],
+ -1 * bts->interf_meas_params_cfg.bounds_dbm[4],
+ -1 * bts->interf_meas_params_cfg.bounds_dbm[5],
VTY_NEWLINE);
}
@@ -5040,7 +5040,7 @@
{
struct gsm_bts *bts = vty->index;
- bts->interf_meas_params.avg_period = atoi(argv[0]);
+ bts->interf_meas_params_cfg.avg_period = atoi(argv[0]);
return CMD_SUCCESS;
}
@@ -5062,11 +5062,10 @@
struct gsm_bts *bts = vty->index;
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(bts->interf_meas_params.bounds_dbm); i++) {
- bts->interf_meas_params.bounds_dbm[i] = abs(atoi(argv[i]));
+ for (i = 0; i < ARRAY_SIZE(bts->interf_meas_params_cfg.bounds_dbm); i++) {
+ bts->interf_meas_params_cfg.bounds_dbm[i] = abs(atoi(argv[i]));
/* TODO: ensure ascending (or descending?) order */
}
-
return CMD_SUCCESS;
}
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index cf3a6b8..d03f092 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -358,7 +358,7 @@
bts->bs_power_ctrl.dir = GSM_PWR_CTRL_DIR_DL;
/* Interference Measurement Parameters (defaults) */
- bts->interf_meas_params = interf_meas_params_def;
+ bts->interf_meas_params_cfg = interf_meas_params_def;
bts->rach_max_delay = 63;
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
index ed3a802..aac0ddf 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -37,10 +37,10 @@
/* Interference level Boundaries: 0 .. X5 (3GPP TS 52.021, section 9.4.25) */
msgb_tv_fixed_put(msgb, NM_ATT_INTERF_BOUND,
- sizeof(bts->interf_meas_params.bounds_dbm),
- &bts->interf_meas_params.bounds_dbm[0]);
+ sizeof(bts->interf_meas_params_cfg.bounds_dbm),
+ &bts->interf_meas_params_cfg.bounds_dbm[0]);
/* Intave: Interference Averaging period (3GPP TS 52.021, section 9.4.24) */
- msgb_tv_put(msgb, NM_ATT_INTAVE_PARAM, bts->interf_meas_params.avg_period);
+ msgb_tv_put(msgb, NM_ATT_INTAVE_PARAM, bts->interf_meas_params_cfg.avg_period);
rlt = gsm_bts_get_radio_link_timeout(bts);
if (rlt == -1) {
diff --git a/src/osmo-bsc/nm_bts_fsm.c b/src/osmo-bsc/nm_bts_fsm.c
index 329d911..eda74fd 100644
--- a/src/osmo-bsc/nm_bts_fsm.c
+++ b/src/osmo-bsc/nm_bts_fsm.c
@@ -116,6 +116,9 @@
abis_nm_chg_adm_state(bts, NM_OC_BTS,
bts->bts_nr, 0xff, 0xff,
NM_STATE_UNLOCKED);
+ /* Message containing BTS attributes, including the interference band bounds, was ACKed by the BTS.
+ * Store the sent bounds as the ones being used for logging and comparing intereference levels. */
+ bts->interf_meas_params_used = bts->interf_meas_params_cfg;
}
if (allow_opstart && state->administrative == NM_STATE_UNLOCKED &&
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 331726a..315fc10 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1118,6 +1118,9 @@
uint8_t *res_info_len;
VTY_ECHO();
+ /* In this test suite, always act as if the interf_meas_params_cfg were already sent to the BTS via OML */
+ bts->interf_meas_params_used = bts->interf_meas_params_cfg;
+
argv += 2;
argc -= 2;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24887
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Iad8cf4151ff7f86dc0549158ed5d91d788d40b1f
Gerrit-Change-Number: 24887
Gerrit-PatchSet: 6
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20210716/f6a55640/attachment.htm>