fixeria has uploaded this change for review.
common: reset lchan meas state in gsm_ts_release()
lchan->meas (including interf_meas_num and num_ul_meas) is normally
only reset by lchan_meas_reset() called from rsl_tx_chan_act_ack() on
RSL CHANNEL ACTIVATION. Idle logical channels are never RSL-activated,
so their measurement state is never reset via that path.
On an OML link re-establishment, osmo-bts does not exit: abis.c tears
down the signalling links, the bts_shutdown FSM powers down all TRXs,
and then waits for reconnect. The gsm_bts/trx/ts/lchan structures
remain in memory, so stale interf_meas_num survives the reconnect.
This is why we're seeing these ERRORs while running ttcn3-bts-test:
(bts=0,trx=2,ts=4,ss=6) Not enough room to store interference report (0dBm)
Add a lchan_meas_reset() call to gsm_ts_release(), which is called
from nm_channel_fsm's NOTINSTALLED on_enter after the TRX is confirmed
closed. This is exactly the right moment: the radio is fully stopped,
so no new samples arrive.
Change-Id: I18dc9d30417b0c5b2e579660d4a087d93445f956
AI-Assisted: yes (Claude)
---
M src/common/gsm_data.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/09/42909/1
diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c
index dad5587..5b50e5e 100644
--- a/src/common/gsm_data.c
+++ b/src/common/gsm_data.c
@@ -39,6 +39,7 @@
#include <osmo-bts/bts.h>
#include <osmo-bts/bts_trx.h>
#include <osmo-bts/logging.h>
+#include <osmo-bts/measurement.h>
struct osmo_tdef_group bts_tdef_groups[] = {
{ .name = "bts", .tdefs = bts_T_defs, .desc = "BTS process timers" },
@@ -336,6 +337,11 @@
for (ln = 0; ln < ARRAY_SIZE(ts->lchan); ln++) {
struct gsm_lchan *lchan = &ts->lchan[ln];
gsm_lchan_release(lchan, LCHAN_REL_ACT_OML);
+ /* Prevent stale interference/UL measurement samples from
+ * accumulating across an OML link re-establishment: idle lchans
+ * are never RSL-activated, so lchan_meas_reset() would otherwise
+ * not be called for them until the next RSL CHAN ACT. */
+ lchan_meas_reset(lchan);
}
ts->pchan = GSM_PCHAN_NONE;
/* Make sure pchan_is is reset, since PCU act_req to release it will be
To view, visit change 42909. To unsubscribe, or for help writing mail filters, visit settings.