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/+/20401 )
Change subject: Introduce NM BTS FSM
......................................................................
Introduce NM BTS FSM
Change-Id: I7756a8ce90b6cc8a502b5665889a7987d7f749cb
---
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/nm_common_fsm.h
M include/osmocom/bsc/signal.h
M src/ipaccess/Makefile.am
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/abis_nm.c
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_ipaccess_nanobts.c
A src/osmo-bsc/nm_bts_fsm.c
M src/osmo-bsc/nm_common_fsm.c
M src/utils/Makefile.am
M tests/abis/Makefile.am
M tests/acc/Makefile.am
M tests/acc/acc_test.ok
M tests/bsc/Makefile.am
M tests/gsm0408/Makefile.am
M tests/handover/Makefile.am
M tests/nanobts_omlattr/Makefile.am
18 files changed, 489 insertions(+), 12 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 06348be..428fe87 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -395,6 +395,9 @@
struct gsm_bts *bts;
struct osmo_fsm_inst *fi;
bool opstart_sent;
+ bool adm_unlock_sent;
+ bool set_attr_sent;
+ bool set_attr_ack_received;
};
/* Ericsson OM2000 Managed Object */
diff --git a/include/osmocom/bsc/nm_common_fsm.h b/include/osmocom/bsc/nm_common_fsm.h
index a76c198..719d591 100644
--- a/include/osmocom/bsc/nm_common_fsm.h
+++ b/include/osmocom/bsc/nm_common_fsm.h
@@ -30,6 +30,7 @@
enum nm_fsm_events {
NM_EV_SW_ACT_REP,
NM_EV_STATE_CHG_REP,
+ NM_EV_SET_ATTR_ACK,
NM_EV_OPSTART_ACK,
NM_EV_OPSTART_NACK,
NM_EV_OML_DOWN,
@@ -44,3 +45,12 @@
NM_BTS_SM_ST_OP_ENABLED,
};
extern struct osmo_fsm nm_bts_sm_fsm;
+
+/* BTS */
+enum nm_bts_op_fsm_states {
+ NM_BTS_ST_OP_DISABLED_NOTINSTALLED,
+ NM_BTS_ST_OP_DISABLED_DEPENDENCY,
+ NM_BTS_ST_OP_DISABLED_OFFLINE,
+ NM_BTS_ST_OP_ENABLED,
+};
+extern struct osmo_fsm nm_bts_fsm;
diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h
index abda67e..4922ac8 100644
--- a/include/osmocom/bsc/signal.h
+++ b/include/osmocom/bsc/signal.h
@@ -75,6 +75,7 @@
S_NM_OPSTART_NACK, /* Received OPSTART NACK, arg is struct msgb *oml_msg */
S_NM_GET_ATTR_REP, /* Received Get Attributes Response, arg is struct msgb *oml_msg */
S_NM_SET_RADIO_ATTR_ACK, /* Received Set Radio Carrier Attributes Ack, arg is struct msgb *oml_msg */
+ S_NM_SET_BTS_ATTR_ACK, /* Received Set BTS Attributes Ack, arg is struct msgb *oml_msg */
};
/* SS_LCHAN signals */
diff --git a/src/ipaccess/Makefile.am b/src/ipaccess/Makefile.am
index 0e06caa..e49a778 100644
--- a/src/ipaccess/Makefile.am
+++ b/src/ipaccess/Makefile.am
@@ -56,6 +56,7 @@
$(top_builddir)/src/osmo-bsc/net_init.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(OSMO_LIBS) \
$(NULL)
@@ -68,9 +69,11 @@
$(top_builddir)/src/osmo-bsc/abis_nm.o \
$(top_builddir)/src/osmo-bsc/acc.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(OSMO_LIBS) \
$(NULL)
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index ffa39a0..4584b2c 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -78,6 +78,7 @@
net_init.c \
nm_common_fsm.c \
nm_bts_sm_fsm.c \
+ nm_bts_fsm.c \
gsm_08_08.c \
osmo_bsc_bssap.c \
osmo_bsc_ctrl.c \
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 511c4b3..54dfccb 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -842,6 +842,14 @@
return 0;
}
+static int abis_nm_rx_set_bts_attr_ack(struct msgb *mb)
+{
+ struct abis_om_fom_hdr *foh = msgb_l3(mb);
+ DEBUGPFOH(DNM, foh, "Set BTS Attributes ACK\n");
+ osmo_signal_dispatch(SS_NM, S_NM_SET_BTS_ATTR_ACK, mb);
+ return 0;
+}
+
bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts)
{
const struct gsm_bts_trx *trx;
@@ -978,7 +986,7 @@
osmo_signal_dispatch(SS_NM, S_NM_IPACC_RESTART_NACK, NULL);
break;
case NM_MT_SET_BTS_ATTR_ACK:
- DEBUGPFOH(DNM, foh, "Set BTS Attribute ACK\n");
+ abis_nm_rx_set_bts_attr_ack(mb);
break;
case NM_MT_GET_ATTR_RESP:
ret = abis_nm_rx_get_attr_resp(mb, gsm_bts_trx_num(bts, (foh)->obj_inst.trx_nr));
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index fe16412..3dd827e 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -153,6 +153,10 @@
osmo_fsm_inst_free(bts->site_mgr.mo.fi);
bts->site_mgr.mo.fi = NULL;
}
+ if (bts->mo.fi) {
+ osmo_fsm_inst_free(bts->mo.fi);
+ bts->mo.fi = NULL;
+ }
return 0;
}
@@ -183,6 +187,9 @@
osmo_fsm_inst_update_id_f(bts->site_mgr.mo.fi, "bts_sm");
gsm_mo_init(&bts->site_mgr.mo, bts, NM_OC_SITE_MANAGER, 0xff, 0xff, 0xff);
+ bts->mo.fi = osmo_fsm_inst_alloc(&nm_bts_fsm, bts, bts,
+ LOGL_INFO, NULL);
+ osmo_fsm_inst_update_id_f(bts->mo.fi, "bts%d", bts->nr);
gsm_mo_init(&bts->mo, bts, NM_OC_BTS, bts->nr, 0xff, 0xff);
for (i = 0; i < ARRAY_SIZE(bts->gprs.nsvc); i++) {
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 457448c..bb05236 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -143,7 +143,7 @@
/* S_NM_STATECHG_ADM is called after we call chg_adm_state() and would create
* endless loop */
- if (evt != S_NM_STATECHG_OPER)
+ if (obj_class != NM_OC_BTS && evt != S_NM_STATECHG_OPER)
return 0;
switch (obj_class) {
@@ -153,16 +153,7 @@
break;
case NM_OC_BTS:
bts = obj;
- if (new_state->availability == NM_AVSTATE_DEPENDENCY) {
- msgb = nanobts_attr_bts_get(bts);
- abis_nm_set_bts_attr(bts, msgb->data, msgb->len);
- msgb_free(msgb);
- abis_nm_chg_adm_state(bts, obj_class,
- bts->bts_nr, 0xff, 0xff,
- NM_STATE_UNLOCKED);
- abis_nm_opstart(bts, obj_class,
- bts->bts_nr, 0xff, 0xff);
- }
+ osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_STATE_CHG_REP, nsd);
break;
case NM_OC_CHANNEL:
ts = obj;
@@ -265,6 +256,9 @@
case NM_OC_SITE_MANAGER:
osmo_fsm_inst_dispatch(bts->site_mgr.mo.fi, NM_EV_SW_ACT_REP, NULL);
break;
+ case NM_OC_BTS:
+ osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_SW_ACT_REP, NULL);
+ break;
case NM_OC_BASEB_TRANSC:
if (!(trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr)))
return -EINVAL;
@@ -326,6 +320,9 @@
case NM_OC_SITE_MANAGER:
osmo_fsm_inst_dispatch(bts->site_mgr.mo.fi, NM_EV_OPSTART_ACK, NULL);
break;
+ case NM_OC_BTS:
+ osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_OPSTART_ACK, NULL);
+ break;
case NM_OC_CHANNEL:
nm_rx_opstart_ack_chan(oml_msg);
break;
@@ -343,11 +340,28 @@
case NM_OC_SITE_MANAGER:
osmo_fsm_inst_dispatch(bts->site_mgr.mo.fi, NM_EV_OPSTART_NACK, NULL);
break;
+ case NM_OC_BTS:
+ osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_OPSTART_ACK, NULL);
+ break;
default:
break;
}
}
+static void nm_rx_set_bts_attr_ack(struct msgb *oml_msg)
+{
+ struct abis_om_fom_hdr *foh = msgb_l3(oml_msg);
+ struct e1inp_sign_link *sign_link = oml_msg->dst;
+ struct gsm_bts *bts = sign_link->trx->bts;
+
+ if (foh->obj_class != NM_OC_BTS) {
+ LOG_BTS(bts, DNM, LOGL_ERROR, "Set BTS Attr Ack received on non BTS object!\n");
+ return;
+ }
+ osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_SET_ATTR_ACK, NULL);
+}
+
+
static void nm_rx_set_radio_attr_ack(struct msgb *oml_msg)
{
struct abis_om_fom_hdr *foh = msgb_l3(oml_msg);
@@ -382,6 +396,9 @@
case S_NM_OPSTART_NACK:
nm_rx_opstart_nack(signal_data);
return 0;
+ case S_NM_SET_BTS_ATTR_ACK:
+ nm_rx_set_bts_attr_ack(signal_data);
+ return 0;
case S_NM_SET_RADIO_ATTR_ACK:
nm_rx_set_radio_attr_ack(signal_data);
return 0;
@@ -467,6 +484,7 @@
ipaccess_drop_rsl(trx, "OML link drop");
osmo_fsm_inst_dispatch(bts->site_mgr.mo.fi, NM_EV_OML_DOWN, NULL);
+ osmo_fsm_inst_dispatch(bts->mo.fi, NM_EV_OML_DOWN, NULL);
gsm_bts_all_ts_dispatch(bts, TS_EV_OML_DOWN, NULL);
bts->ip_access.flags = 0;
diff --git a/src/osmo-bsc/nm_bts_fsm.c b/src/osmo-bsc/nm_bts_fsm.c
new file mode 100644
index 0000000..fa42351
--- /dev/null
+++ b/src/osmo-bsc/nm_bts_fsm.c
@@ -0,0 +1,353 @@
+/* NM BTS FSM */
+
+/* (C) 2020 by sysmocom - s.m.f.c. GmbH <info at sysmocom.de>
+ * Author: Pau Espin Pedrol <pespin at sysmocom.de>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <errno.h>
+#include <unistd.h>
+#include <inttypes.h>
+
+#include <osmocom/core/fsm.h>
+#include <osmocom/core/tdef.h>
+#include <osmocom/gsm/protocol/gsm_12_21.h>
+
+#include <osmocom/bsc/bts.h>
+#include <osmocom/bsc/signal.h>
+#include <osmocom/bsc/abis_nm.h>
+#include <osmocom/bsc/bts_ipaccess_nanobts_omlattr.h>
+#include <osmocom/bsc/nm_common_fsm.h>
+#include <osmocom/bsc/debug.h>
+
+#define X(s) (1 << (s))
+
+#define nm_bts_fsm_state_chg(fi, NEXT_STATE) \
+ osmo_fsm_inst_state_chg(fi, NEXT_STATE, 0, 0)
+
+//////////////////////////
+// FSM STATE ACTIONS
+//////////////////////////
+
+static void st_op_disabled_notinstalled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
+
+ bts->mo.set_attr_sent = false;
+ bts->mo.set_attr_ack_received = false;
+ bts->mo.adm_unlock_sent = false;
+ bts->mo.opstart_sent = false;
+}
+
+static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct nm_statechg_signal_data *nsd;
+ struct gsm_nm_state *new_state;
+
+ switch (event) {
+ case NM_EV_SW_ACT_REP:
+ break;
+ case NM_EV_STATE_CHG_REP:
+ nsd = (struct nm_statechg_signal_data *)data;
+ new_state = nsd->new_state;
+ if (new_state->operational == NM_OPSTATE_ENABLED) {
+ /*should not happen... */
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_ENABLED);
+ return;
+ }
+ switch (new_state->availability) { /* operational = DISABLED */
+ case NM_AVSTATE_DEPENDENCY:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_DEPENDENCY);
+ return;
+ case NM_AVSTATE_OFF_LINE:
+ case NM_AVSTATE_OK:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_OFFLINE);
+ return;
+ default:
+ return;
+ }
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static void configure_loop(struct gsm_bts *bts, struct gsm_nm_state *state, bool allow_opstart) {
+ struct msgb *msgb;
+
+ if (!bts->mo.set_attr_sent && !bts->mo.set_attr_ack_received) {
+ bts->mo.set_attr_sent = true;
+ msgb = nanobts_attr_bts_get(bts);
+ abis_nm_set_bts_attr(bts, msgb->data, msgb->len);
+ msgb_free(msgb);
+ }
+
+ if (state->administrative != NM_STATE_UNLOCKED && !bts->mo.adm_unlock_sent) {
+ bts->mo.adm_unlock_sent = true;
+ abis_nm_chg_adm_state(bts, NM_OC_BTS,
+ bts->bts_nr, 0xff, 0xff,
+ NM_STATE_UNLOCKED);
+ }
+
+ if (allow_opstart && state->administrative == NM_STATE_UNLOCKED &&
+ bts->mo.set_attr_ack_received) {
+ if (!bts->mo.opstart_sent) {
+ bts->mo.opstart_sent = true;
+ abis_nm_opstart(bts, NM_OC_BTS, bts->bts_nr, 0xff, 0xff);
+ }
+ }
+}
+
+static void st_op_disabled_dependency_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
+
+ /* nanoBTS is broken, doesn't follow TS 12.21. Opstart MUST be sent
+ during Dependency, so we simply move to OFFLINE state here to avoid
+ duplicating code */
+ if (bts->type == GSM_BTS_TYPE_NANOBTS) {
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_OFFLINE);
+ return;
+ }
+ configure_loop(bts, &bts->mo.nm_state, false);
+}
+
+static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
+ struct nm_statechg_signal_data *nsd;
+ struct gsm_nm_state *new_state;
+
+ switch (event) {
+ case NM_EV_SET_ATTR_ACK:
+ bts->mo.set_attr_ack_received = true;
+ bts->mo.set_attr_sent = false;
+ configure_loop(bts, &bts->mo.nm_state, false);
+ return;
+ case NM_EV_STATE_CHG_REP:
+ nsd = (struct nm_statechg_signal_data *)data;
+ new_state = nsd->new_state;
+ if (new_state->operational == NM_OPSTATE_ENABLED) {
+ /* should not happen... */
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_ENABLED);
+ return;
+ }
+ switch (new_state->availability) { /* operational = DISABLED */
+ case NM_AVSTATE_NOT_INSTALLED:
+ case NM_AVSTATE_POWER_OFF:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_NOTINSTALLED);
+ return;
+ case NM_AVSTATE_OFF_LINE:
+ case NM_AVSTATE_OK:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_OFFLINE);
+ return;
+ case NM_AVSTATE_DEPENDENCY:
+ configure_loop(bts, new_state, false);
+ return;
+ default:
+ return;
+ }
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static void st_op_disabled_offline_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
+
+ /* Warning: In here we may be acessing an state older than new_state
+ from prev (syncrhonous) FSM state */
+ configure_loop(bts, &bts->mo.nm_state, true);
+}
+
+static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
+ struct nm_statechg_signal_data *nsd;
+ struct gsm_nm_state *new_state;
+
+ switch (event) {
+ case NM_EV_SET_ATTR_ACK:
+ bts->mo.set_attr_ack_received = true;
+ bts->mo.set_attr_sent = false;
+ configure_loop(bts, &bts->mo.nm_state, true);
+ return;
+ case NM_EV_STATE_CHG_REP:
+ nsd = (struct nm_statechg_signal_data *)data;
+ new_state = nsd->new_state;
+ if (new_state->operational == NM_OPSTATE_ENABLED) {
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_ENABLED);
+ return;
+ }
+ switch (new_state->availability) { /* operational = DISABLED */
+ case NM_AVSTATE_NOT_INSTALLED:
+ case NM_AVSTATE_POWER_OFF:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_NOTINSTALLED);
+ return;
+ case NM_AVSTATE_DEPENDENCY:
+ /* There's no point in moving back to Dependency in nanoBTS, since it's broken
+ and it acts actually as if it was in Offline state */
+ if (bts->type != GSM_BTS_TYPE_NANOBTS) {
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_DEPENDENCY);
+ } else {
+ /* Moreover, in nanoBTS we need to check here for tx
+ Opstart since we may have gone Unlocked state
+ in this event, which means Opstart may be txed here. */
+ configure_loop(bts, new_state, true);
+ }
+ return;
+ case NM_AVSTATE_OFF_LINE:
+ case NM_AVSTATE_OK:
+ configure_loop(bts, new_state, true);
+ return;
+ default:
+ return;
+ }
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static void st_op_enabled_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
+{
+ struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
+
+ /* Reset state, we don't need it in this state and it will need to be
+ reused as soon as we move back to Disabled */
+ bts->mo.opstart_sent = false;
+ bts->mo.adm_unlock_sent = false;
+ bts->mo.set_attr_sent = false;
+ bts->mo.set_attr_ack_received = false;
+}
+
+static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct nm_statechg_signal_data *nsd;
+ struct gsm_nm_state *new_state;
+
+ switch (event) {
+ case NM_EV_STATE_CHG_REP:
+ nsd = (struct nm_statechg_signal_data *)data;
+ new_state = nsd->new_state;
+ if (new_state->operational == NM_OPSTATE_ENABLED)
+ return;
+ switch (new_state->availability) { /* operational = DISABLED */
+ case NM_AVSTATE_NOT_INSTALLED:
+ case NM_AVSTATE_POWER_OFF:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_NOTINSTALLED);
+ return;
+ case NM_AVSTATE_DEPENDENCY:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_DEPENDENCY);
+ return;
+ case NM_AVSTATE_OFF_LINE:
+ case NM_AVSTATE_OK:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_OFFLINE);
+ return;
+ default:
+ return;
+ }
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static void st_op_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
+{
+ struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
+
+ switch (event) {
+ case NM_EV_OPSTART_ACK:
+ case NM_EV_OPSTART_NACK:
+ /* TODO: if on state OFFLINE and rx NACK, try again? */
+ bts->mo.opstart_sent = false;
+ break;
+ case NM_EV_OML_DOWN:
+ nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_NOTINSTALLED);
+ break;
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
+static struct osmo_fsm_state nm_bts_fsm_states[] = {
+ [NM_BTS_ST_OP_DISABLED_NOTINSTALLED] = {
+ .in_event_mask =
+ X(NM_EV_SW_ACT_REP) |
+ X(NM_EV_STATE_CHG_REP),
+ .out_state_mask =
+ X(NM_BTS_ST_OP_DISABLED_DEPENDENCY) |
+ X(NM_BTS_ST_OP_DISABLED_OFFLINE) |
+ X(NM_BTS_ST_OP_ENABLED),
+ .name = "DISABLED_NOTINSTALLED",
+ .onenter = st_op_disabled_notinstalled_on_enter,
+ .action = st_op_disabled_notinstalled,
+ },
+ [NM_BTS_ST_OP_DISABLED_DEPENDENCY] = {
+ .in_event_mask =
+ X(NM_EV_STATE_CHG_REP) |
+ X(NM_EV_SET_ATTR_ACK),
+ .out_state_mask =
+ X(NM_BTS_ST_OP_DISABLED_NOTINSTALLED) |
+ X(NM_BTS_ST_OP_DISABLED_OFFLINE) |
+ X(NM_BTS_ST_OP_ENABLED),
+ .name = "DISABLED_DEPENDENCY",
+ .onenter = st_op_disabled_dependency_on_enter,
+ .action = st_op_disabled_dependency,
+ },
+ [NM_BTS_ST_OP_DISABLED_OFFLINE] = {
+ .in_event_mask =
+ X(NM_EV_STATE_CHG_REP) |
+ X(NM_EV_SET_ATTR_ACK),
+ .out_state_mask =
+ X(NM_BTS_ST_OP_DISABLED_NOTINSTALLED) |
+ X(NM_BTS_ST_OP_DISABLED_DEPENDENCY) |
+ X(NM_BTS_ST_OP_ENABLED),
+ .name = "DISABLED_OFFLINE",
+ .onenter = st_op_disabled_offline_on_enter,
+ .action = st_op_disabled_offline,
+ },
+ [NM_BTS_ST_OP_ENABLED] = {
+ .in_event_mask =
+ X(NM_EV_STATE_CHG_REP),
+ .out_state_mask =
+ X(NM_BTS_ST_OP_DISABLED_NOTINSTALLED) |
+ X(NM_BTS_ST_OP_DISABLED_DEPENDENCY) |
+ X(NM_BTS_ST_OP_DISABLED_OFFLINE),
+ .name = "ENABLED",
+ .onenter = st_op_enabled_on_enter,
+ .action = st_op_enabled,
+ },
+};
+
+struct osmo_fsm nm_bts_fsm = {
+ .name = "NM_BTS_OP",
+ .states = nm_bts_fsm_states,
+ .num_states = ARRAY_SIZE(nm_bts_fsm_states),
+ .allstate_event_mask =
+ X(NM_EV_OPSTART_ACK) |
+ X(NM_EV_OPSTART_NACK) |
+ X(NM_EV_OML_DOWN),
+ .allstate_action = st_op_allstate,
+ .event_names = nm_fsm_event_names,
+ .log_subsys = DNM,
+};
+
+static __attribute__((constructor)) void nm_bts_fsm_init(void)
+{
+ OSMO_ASSERT(osmo_fsm_register(&nm_bts_fsm) == 0);
+}
diff --git a/src/osmo-bsc/nm_common_fsm.c b/src/osmo-bsc/nm_common_fsm.c
index 9851f5d..f8aa779 100644
--- a/src/osmo-bsc/nm_common_fsm.c
+++ b/src/osmo-bsc/nm_common_fsm.c
@@ -25,6 +25,7 @@
const struct value_string nm_fsm_event_names[] = {
{ NM_EV_SW_ACT_REP, "SW_ACT_REP" },
{ NM_EV_STATE_CHG_REP, "STATE_CHG_REP" },
+ { NM_EV_SET_ATTR_ACK, "SET_ATTR_ACK" },
{ NM_EV_OPSTART_ACK, "OPSTART_ACK" },
{ NM_EV_OPSTART_NACK, "OPSTART_NACK" },
{ NM_EV_OML_DOWN, "OML_DOWN" },
diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
index 30de5b4..4d9ebaa 100644
--- a/src/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -52,11 +52,13 @@
$(top_builddir)/src/osmo-bsc/bts.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/bts_siemens_bs11.o \
+ $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/e1_config.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
@@ -125,10 +127,12 @@
$(top_builddir)/src/osmo-bsc/abis_nm.o \
$(top_builddir)/src/osmo-bsc/acc.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
diff --git a/tests/abis/Makefile.am b/tests/abis/Makefile.am
index 55a1339..a40bdfd 100644
--- a/tests/abis/Makefile.am
+++ b/tests/abis/Makefile.am
@@ -28,11 +28,13 @@
$(top_builddir)/src/osmo-bsc/abis_nm.o \
$(top_builddir)/src/osmo-bsc/acc.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOGSM_LIBS) \
diff --git a/tests/acc/Makefile.am b/tests/acc/Makefile.am
index 460d473..176d018 100644
--- a/tests/acc/Makefile.am
+++ b/tests/acc/Makefile.am
@@ -28,11 +28,13 @@
$(top_builddir)/src/osmo-bsc/abis_nm.o \
$(top_builddir)/src/osmo-bsc/acc.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOABIS_LIBS) \
$(LIBOSMOGSM_LIBS) \
diff --git a/tests/acc/acc_test.ok b/tests/acc/acc_test.ok
index 1428e40..636dba8 100644
--- a/tests/acc/acc_test.ok
+++ b/tests/acc/acc_test.ok
@@ -1,5 +1,6 @@
===test_acc_mgr_no_ramp===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_no_ramp()
do_allowed_len_adm_loop(1)
@@ -107,9 +108,11 @@
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
pcu_info_update(): t2=0x00 t3=0x00, allowed: 0 1 2 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_no_ramp()
===test_acc_mgr_manual_ramp===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_manual_ramp()
do_allowed_len_ramp_loop(1)
@@ -347,9 +350,11 @@
(bts=0) ACC: New ACC allowed subset 0x24c (active_len=4, ramp_len=4, adm_len=4, perm_len=4, rotation=off)
pcu_info_update(): t2=0x01 t3=0xb3, allowed: 2 3 6 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_manual_ramp()
===test_acc_mgr_rotate(true, 1)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
*** Barring one ACC ***
@@ -418,9 +423,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=10, adm_len=1, perm_len=9, rotation=on)
pcu_info_update(): t2=0x03 t3=0xfd, allowed: 1
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 1)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x200 (active_len=1, ramp_len=10, adm_len=1, perm_len=10, rotation=on)
@@ -486,9 +493,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x100 -> 0x200 (active_len=1, ramp_len=10, adm_len=1, perm_len=10, rotation=on)
pcu_info_update(): t2=0x01 t3=0xff, allowed: 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 2)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
*** Barring one ACC ***
@@ -557,9 +566,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x101 -> 0x003 (active_len=2, ramp_len=10, adm_len=2, perm_len=9, rotation=on)
pcu_info_update(): t2=0x03 t3=0xfc, allowed: 0 1
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 2)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x300 (active_len=2, ramp_len=10, adm_len=2, perm_len=10, rotation=on)
@@ -625,9 +636,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x180 -> 0x300 (active_len=2, ramp_len=10, adm_len=2, perm_len=10, rotation=on)
pcu_info_update(): t2=0x00 t3=0xff, allowed: 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 3)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
*** Barring one ACC ***
@@ -696,9 +709,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x181 -> 0x103 (active_len=3, ramp_len=10, adm_len=3, perm_len=9, rotation=on)
pcu_info_update(): t2=0x02 t3=0xfc, allowed: 0 1 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 3)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x380 (active_len=3, ramp_len=10, adm_len=3, perm_len=10, rotation=on)
@@ -764,9 +779,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1c0 -> 0x380 (active_len=3, ramp_len=10, adm_len=3, perm_len=10, rotation=on)
pcu_info_update(): t2=0x00 t3=0x7f, allowed: 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 4)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
*** Barring one ACC ***
@@ -835,9 +852,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x183 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on)
pcu_info_update(): t2=0x02 t3=0x7c, allowed: 0 1 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 4)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3c0 (active_len=4, ramp_len=10, adm_len=4, perm_len=10, rotation=on)
@@ -903,9 +922,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1e0 -> 0x3c0 (active_len=4, ramp_len=10, adm_len=4, perm_len=10, rotation=on)
pcu_info_update(): t2=0x00 t3=0x3f, allowed: 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 5)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
*** Barring one ACC ***
@@ -974,9 +995,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1e1 -> 0x1c3 (active_len=5, ramp_len=10, adm_len=5, perm_len=9, rotation=on)
pcu_info_update(): t2=0x02 t3=0x3c, allowed: 0 1 6 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 5)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3e0 (active_len=5, ramp_len=10, adm_len=5, perm_len=10, rotation=on)
@@ -1042,9 +1065,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1f0 -> 0x3e0 (active_len=5, ramp_len=10, adm_len=5, perm_len=10, rotation=on)
pcu_info_update(): t2=0x00 t3=0x1f, allowed: 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 6)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
*** Barring one ACC ***
@@ -1113,9 +1138,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1f1 -> 0x1e3 (active_len=6, ramp_len=10, adm_len=6, perm_len=9, rotation=on)
pcu_info_update(): t2=0x02 t3=0x1c, allowed: 0 1 5 6 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 6)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3f0 (active_len=6, ramp_len=10, adm_len=6, perm_len=10, rotation=on)
@@ -1181,9 +1208,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1f8 -> 0x3f0 (active_len=6, ramp_len=10, adm_len=6, perm_len=10, rotation=on)
pcu_info_update(): t2=0x00 t3=0x0f, allowed: 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 7)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
*** Barring one ACC ***
@@ -1252,9 +1281,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1f9 -> 0x1f3 (active_len=7, ramp_len=10, adm_len=7, perm_len=9, rotation=on)
pcu_info_update(): t2=0x02 t3=0x0c, allowed: 0 1 4 5 6 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 7)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3f8 (active_len=7, ramp_len=10, adm_len=7, perm_len=10, rotation=on)
@@ -1320,9 +1351,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1fc -> 0x3f8 (active_len=7, ramp_len=10, adm_len=7, perm_len=10, rotation=on)
pcu_info_update(): t2=0x00 t3=0x07, allowed: 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(true, 8)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
*** Barring one ACC ***
@@ -1391,9 +1424,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1fd -> 0x1fb (active_len=8, ramp_len=10, adm_len=8, perm_len=9, rotation=on)
pcu_info_update(): t2=0x02 t3=0x04, allowed: 0 1 3 4 5 6 7 8
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 8)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3fc (active_len=8, ramp_len=10, adm_len=8, perm_len=10, rotation=on)
@@ -1459,9 +1494,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1fe -> 0x3fc (active_len=8, ramp_len=10, adm_len=8, perm_len=10, rotation=on)
pcu_info_update(): t2=0x00 t3=0x03, allowed: 2 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_mgr_rotate(false, 9)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_mgr_rotate()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3fe (active_len=9, ramp_len=10, adm_len=9, perm_len=10, rotation=on)
@@ -1527,9 +1564,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x1ff -> 0x3fe (active_len=9, ramp_len=10, adm_len=9, perm_len=10, rotation=on)
pcu_info_update(): t2=0x00 t3=0x01, allowed: 1 2 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_mgr_rotate()
===test_acc_ramp===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off)
@@ -1564,9 +1603,11 @@
(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
pcu_info_update(): t2=0x00 t3=0x00, allowed: 0 1 2 3 4 5 6 7 8 9
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp()
===test_acc_ramp2===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp2()
(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3f8 (active_len=7, ramp_len=10, adm_len=7, perm_len=10, rotation=on)
@@ -1583,9 +1624,11 @@
pcu_info_update(): t2=0x03 t3=0x80, allowed: 0 1 2 3 4 5 6
sys={15.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp2()
===test_acc_ramp3===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp3()
*** Barring some ACCs ***
@@ -1618,9 +1661,11 @@
sys={45.000000}: select()
(bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=10, perm_len=5, rotation=off)
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp3()
===test_acc_ramp_up_rotate(0, 100, 100)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_up_rotate()
*** Barring one ACC ***
@@ -1709,9 +1754,11 @@
sys={3000.000000}: select()
sys={3250.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_up_rotate()
===test_acc_ramp_up_rotate(0, 20, 50)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_up_rotate()
*** Barring one ACC ***
@@ -1800,9 +1847,11 @@
sys={3000.000000}: select()
sys={3250.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_up_rotate()
===test_acc_ramp_up_rotate(70, 80, 90)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_up_rotate()
*** Barring one ACC ***
@@ -1891,9 +1940,11 @@
sys={3000.000000}: select()
sys={3250.000000}: select()
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_up_rotate()
===test_acc_ramp_updown_rotate(80, 90, 0, 100, 15)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_updown_rotate()
*** Barring one ACC ***
@@ -2012,9 +2063,11 @@
sys={7250.000000}: select(48): chan_load_avg=90
sys={7500.000000}: select(49): chan_load_avg=100
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_updown_rotate()
===test_acc_ramp_updown_rotate(30, 50, 10, 100, 15)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_updown_rotate()
*** Barring one ACC ***
@@ -2157,9 +2210,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x003 -> 0x006 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on)
pcu_info_update(): t2=0x03 t3=0xf9, allowed: 1 2
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_updown_rotate()
===test_acc_ramp_updown_rotate(50, 49, 0, 100, 10)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_updown_rotate()
*** Barring one ACC ***
@@ -2312,9 +2367,11 @@
(bts=0) ACC: rotate ACC allowed active subset 0x01c -> 0x038 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on)
pcu_info_update(): t2=0x03 t3=0xc7, allowed: 3 4 5
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_updown_rotate()
===test_acc_ramp_updown_rotate(30, 80, 30, 80, 5)===
NM_BTS_SM_OP{DISABLED_NOTINSTALLED}: Allocated
+NM_BTS_OP{DISABLED_NOTINSTALLED}: Allocated
(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off)
BTS allocation OK in test_acc_ramp_updown_rotate()
*** Barring one ACC ***
@@ -2373,4 +2430,5 @@
sys={12250.000000}: select(48): chan_load_avg=70
sys={12500.000000}: select(49): chan_load_avg=75
NM_BTS_SM_OP(bts_sm){DISABLED_NOTINSTALLED}: Deallocated
+NM_BTS_OP(bts0){DISABLED_NOTINSTALLED}: Deallocated
BTS deallocated OK in test_acc_ramp_updown_rotate()
diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am
index d64915b..4d3d379 100644
--- a/tests/bsc/Makefile.am
+++ b/tests/bsc/Makefile.am
@@ -39,6 +39,7 @@
$(top_builddir)/src/osmo-bsc/osmo_bsc_filter.o \
$(top_builddir)/src/osmo-bsc/bsc_subscriber.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/handover_cfg.o \
@@ -47,6 +48,7 @@
$(top_builddir)/src/osmo-bsc/net_init.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOVTY_LIBS) \
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am
index 656498f..b2451e2 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -28,6 +28,7 @@
$(top_builddir)/src/osmo-bsc/gsm_04_08_rr.o \
$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/net_init.o \
@@ -36,6 +37,7 @@
$(top_builddir)/src/osmo-bsc/neighbor_ident.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 4b8f269..4617518 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -82,6 +82,7 @@
$(top_builddir)/src/osmo-bsc/net_init.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_ctrl.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_lcls.o \
$(top_builddir)/src/osmo-bsc/osmo_bsc_mgcp.o \
diff --git a/tests/nanobts_omlattr/Makefile.am b/tests/nanobts_omlattr/Makefile.am
index 05dc662..09374b2 100644
--- a/tests/nanobts_omlattr/Makefile.am
+++ b/tests/nanobts_omlattr/Makefile.am
@@ -31,6 +31,7 @@
$(top_builddir)/src/osmo-bsc/gsm_data.o \
$(top_builddir)/src/osmo-bsc/nm_common_fsm.o \
$(top_builddir)/src/osmo-bsc/nm_bts_sm_fsm.o \
+ $(top_builddir)/src/osmo-bsc/nm_bts_fsm.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20401
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7756a8ce90b6cc8a502b5665889a7987d7f749cb
Gerrit-Change-Number: 20401
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201015/1a2e6c44/attachment.htm>