pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32285 )
Change subject: osmo-bts-virtual: properly activate [CBCH/]BCCH/CCCH
......................................................................
osmo-bts-virtual: properly activate [CBCH/]BCCH/CCCH
In change 8e04613e I overlooked that osmo-bts-virtual is re-using the
scheduler of osmo-bts-trx and forgot to update its OML logic. As a
result, osmo-bts-virtual is broken and does not transmit anything on
the broadcast channels.
Change-Id: I2276f7e5e4042e56ddf1fd1642c917dba0005ac4
Fixes: 8e04613e "osmo-bts-trx: properly activate [CBCH/]BCCH/CCCH"
Related: OS#6001, OS#1572
---
M src/osmo-bts-virtual/bts_model.c
M src/osmo-bts-virtual/l1_if.c
2 files changed, 38 insertions(+), 8 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/osmo-bts-virtual/bts_model.c b/src/osmo-bts-virtual/bts_model.c
index eb71138..5ea517e 100644
--- a/src/osmo-bts-virtual/bts_model.c
+++ b/src/osmo-bts-virtual/bts_model.c
@@ -125,6 +125,28 @@
if (trx_sched_set_pchan(ts, pchan) != 0)
return NM_NACK_RES_NOTAVAIL;
+ /* activate lchans for [CBCH/]BCCH/CCCH */
+ switch (pchan) {
+ case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
+ /* using RSL_CHAN_OSMO_CBCH4 is correct here, because the scheduler
+ * does not distinguish between SDCCH/4+CBCH abd SDCCH/8+CBCH. */
+ trx_sched_set_lchan(&ts->lchan[CBCH_LCHAN],
+ RSL_CHAN_OSMO_CBCH4, LID_DEDIC, true);
+ break;
+ case GSM_PCHAN_CCCH_SDCCH4_CBCH:
+ trx_sched_set_lchan(&ts->lchan[CBCH_LCHAN],
+ RSL_CHAN_OSMO_CBCH4, LID_DEDIC, true);
+ /* fall-through */
+ case GSM_PCHAN_CCCH_SDCCH4:
+ case GSM_PCHAN_CCCH:
+ trx_sched_set_bcch_ccch(&ts->lchan[CCCH_LCHAN], true);
+ ts->lchan[CCCH_LCHAN].rel_act_kind = LCHAN_REL_ACT_OML;
+ lchan_set_state(&ts->lchan[CCCH_LCHAN], LCHAN_S_ACTIVE);
+ break;
+ default:
+ break;
+ }
+
return 0;
}
diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c
index 469e84f..6410d9d 100644
--- a/src/osmo-bts-virtual/l1_if.c
+++ b/src/osmo-bts-virtual/l1_if.c
@@ -192,14 +192,6 @@
if (vbts_sched_start(pinst->trx->bts) < 0)
return -ENOLINK;
- /* Only start the scheduler for the transceiver on C0.
- * If we have multiple transceivers, CCCH is always on C0
- * and has to be auto active */
- pinst->trx->ts[0].lchan[CCCH_LCHAN].rel_act_kind = LCHAN_REL_ACT_OML;
-
- /* Other TRX are activated via OML by a PRIM_INFO_MODIFY / PRIM_INFO_ACTIVATE */
- lchan_set_state(&pinst->trx->ts[0].lchan[CCCH_LCHAN], LCHAN_S_ACTIVE);
-
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32285
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2276f7e5e4042e56ddf1fd1642c917dba0005ac4
Gerrit-Change-Number: 32285
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32269 )
Change subject: bts/oml: Repurpose test TC_ipa_rsl_connect_nack
......................................................................
bts/oml: Repurpose test TC_ipa_rsl_connect_nack
The old test was not really correct, since it is fine for the BTS to ACK
the RSL CONNECT despite later on failing to connect the RSL link.
RSL_CONNECT is really just setting the attributes (it could even be
replaced by SETATTR in the future), and connect happens later on.
This can still be found out by the BSC because the BBTRANSC will never
transition to a Enabled state until the RSL link becomes up.
This patch repurposes the existent test to do some more meaningful check
in a case the RSL CONNECT can be answered with a NACK. This scenario was
actually failing to be properly checked in osmo-bts until recently, so
it is expected that it will fail (and even crash) older versions of
osmo-bts.
Depends: osmo-bts.git Change-Id If27639ae1727fc5232e1a964a1b29f50c8805d80
Related: OS#5964
Change-Id: I10df611f0086d34a5482f7c8a79703938313ab3d
---
M bts/BTS_Tests_OML.ttcn
M library/AbisOML_Types.ttcn
2 files changed, 39 insertions(+), 8 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
daniel: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/bts/BTS_Tests_OML.ttcn b/bts/BTS_Tests_OML.ttcn
index cf88931..980643a 100644
--- a/bts/BTS_Tests_OML.ttcn
+++ b/bts/BTS_Tests_OML.ttcn
@@ -675,14 +675,15 @@
f_shutdown_helper();
}
-/* Make sure that the IUT sends RSL Connect NACK when the remote is not reachable. */
+/* Make sure that the IUT sends RSL Connect NACK when configuring unexistent TRX NR */
testcase TC_ipa_rsl_connect_nack() runs on BSC_OML_CT {
timer T := 2.0;
+ /* Unconfigured TRX: */
+ template (value) OML_FOM_ObjectInstance obj_inst := ts_OML_ObjectInstance(0, 200, 255);
f_init_oml(testcasename());
- /* Most likely, nobody is listening to this port */
- OML.send(ts_OML_IPA_RslConnect(0, 65535));
+ OML.send(ts_OML_IPA_RslConnect(obj_inst, 0, 65535));
T.start;
alt {
@@ -811,9 +812,11 @@
execute( TC_ts_opstart() );
execute( TC_ts_opstart_noattr() );
execute( TC_initial_state_reports() );
- execute( TC_ipa_rsl_connect_nack() );
execute( TC_ipa_osmo_pcu_anr_fwd() );
+
+ /* This one makes osmo-bts <= 1.6.0 crash, keep it at the end: */
+ execute( TC_ipa_rsl_connect_nack() );
}
/* BTS:
diff --git a/library/AbisOML_Types.ttcn b/library/AbisOML_Types.ttcn
index ae39671..99ad252 100644
--- a/library/AbisOML_Types.ttcn
+++ b/library/AbisOML_Types.ttcn
@@ -1249,13 +1249,17 @@
-template (value) OML_PDU ts_OML_IPA_RslConnect(uint8_t stream_id, uint16_t port_nr) :=
- ts_OML_IPA_MsgType(NM_MT_IPACC_RSL_CONNECT, NM_OC_BASEB_TRANSC, ts_OML_ObjectInstance(0,0,255), {
+template (value) OML_PDU ts_OML_IPA_RslConnect(template (value) OML_FOM_ObjectInstance obj_inst,
+ template (value) uint8_t stream_id,
+ template (value) uint16_t port_nr) :=
+ ts_OML_IPA_MsgType(NM_MT_IPACC_RSL_CONNECT, NM_OC_BASEB_TRANSC, obj_inst, {
ts_OML_IE(NM_ATT_IPACC_STREAM_ID, OML_FOM_IE_Body:{stream_id := stream_id}),
ts_OML_IE(NM_ATT_IPACC_DST_IP_PORT, OML_FOM_IE_Body:{portnr := port_nr})
});
-template OML_PDU tr_OML_IPA_RslConnect(template uint8_t stream_id, template uint16_t port_nr) :=
- tr_OML_IPA_MsgType(NM_MT_IPACC_RSL_CONNECT, NM_OC_BASEB_TRANSC, tr_OML_ObjectInstance(0,0,255), {
+template OML_PDU tr_OML_IPA_RslConnect(template (present) OML_FOM_ObjectInstance obj_inst,
+ template (present) uint8_t stream_id,
+ template (present) uint16_t port_nr) :=
+ tr_OML_IPA_MsgType(NM_MT_IPACC_RSL_CONNECT, NM_OC_BASEB_TRANSC, obj_inst, {
tr_OML_IE(NM_ATT_IPACC_STREAM_ID, OML_FOM_IE_Body:{stream_id := stream_id}),
tr_OML_IE(NM_ATT_IPACC_DST_IP_PORT, OML_FOM_IE_Body:{portnr := port_nr})
});
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32269
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I10df611f0086d34a5482f7c8a79703938313ab3d
Gerrit-Change-Number: 32269
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged