pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32052 )
Change subject: bts-trx: Fix no NM Radio{Carrier,Channel} switching to Enabled if one TRX is rf_locked
......................................................................
bts-trx: Fix no NM Radio{Carrier,Channel} switching to Enabled if one TRX is rf_locked
Differentiate in each TRX between being provisioned (configuration available) and being provisioned *plus enabled*.
TRX0 waits for all other TRX to be ready before sending POWERON, since
all TRX need to have been minimally configured over TRXC before POWERON
is called. This "ready" state though, doesn't necessarily mean the
TRX!=0 are enabled (aka NM Enabled and rf_locked=0). With them being
configured it es enough to start the whole PHY.
With the old logic, given any TRX was rf_locked=1 at startup, the PHY
would not become UP because it the TRX_PROV FSM was waiting for OPSTART
to arrive on all TRX, which wouldn't happen on TRX that had rf_locked=1.
So in summary, the desired requirements to start the PHY are (in any
order):
1- Wait all TRX are configured
2- Wait for TRX0 OPSTART
Related: SYS#6370
Change-Id: Ie4836f5721ce8227a63c267730aeb17228994214
(cherry picked from commit 72f991f541b17bcb8305d36ee28637aa0be34a0e)
---
M src/osmo-bts-trx/trx_provision_fsm.c
1 file changed, 50 insertions(+), 17 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/osmo-bts-trx/trx_provision_fsm.c b/src/osmo-bts-trx/trx_provision_fsm.c
index 5deecd7..8b20b10 100644
--- a/src/osmo-bts-trx/trx_provision_fsm.c
+++ b/src/osmo-bts-trx/trx_provision_fsm.c
@@ -253,11 +253,11 @@
l1h->config.setslot_sent[data->tn] = false;
}
-/* Whether a given TRX is fully configured and can be powered on */
+/* Whether a given TRX is fully configured */
static bool trx_is_provisioned(struct trx_l1h *l1h)
{
struct phy_instance *pinst = l1h->phy_inst;
- if (l1h->config.enabled && l1h->config.rxtune_acked && l1h->config.txtune_acked &&
+ if (l1h->config.rxtune_acked && l1h->config.txtune_acked &&
(l1h->config.bsic_acked || !pinst->phy_link->u.osmotrx.use_legacy_setbsic) &&
(l1h->config.tsc_acked || pinst->phy_link->u.osmotrx.use_legacy_setbsic) &&
(l1h->config.nomtxpower_acked || l1h->config.nominal_power_set_by_vty) &&
@@ -267,6 +267,11 @@
return false;
}
+/* Whether a given TRX is fully configured and can be powered on */
+static bool trx_is_provisioned_and_enabled(struct trx_l1h *l1h)
+{
+ return l1h->config.enabled && trx_is_provisioned(l1h);
+}
static void trx_signal_ready_trx0(struct trx_l1h *l1h)
{
@@ -282,7 +287,7 @@
}
}
-/* Called from TRX0 to check if other TRX are already configured and powered so POWERON can be sent */
+/* Called from TRX0 to check if other TRX are already configured so POWERON can be sent */
static bool trx_other_trx0_ready(struct trx_l1h *l1h)
{
struct phy_instance *pinst = l1h->phy_inst;
@@ -293,7 +298,7 @@
struct trx_l1h *l1h_it = pinst_it->u.osmotrx.hdl;
if (l1h_it->phy_inst->num == 0)
continue;
- if (l1h_it->provision_fi->state != TRX_PROV_ST_OPEN_POWERON)
+ if (!trx_is_provisioned(l1h_it))
return false;
}
return true;
@@ -389,7 +394,8 @@
uint16_t arfcn;
int nominal_power;
int status;
- bool others_ready;
+ bool waiting_other_trx;
+ bool was_ready = trx_is_provisioned(l1h);
switch (event) {
case TRX_PROV_EV_CLOSE:
@@ -485,22 +491,22 @@
l1if_provision_transceiver_trx(l1h);
- if (l1h->phy_inst->num == 0)
- others_ready = trx_other_trx0_ready(l1h);
- else
- others_ready = true; /* we don't care about others in TRX!=0 */
+ if (l1h->phy_inst->num == 0) {
+ waiting_other_trx = !trx_other_trx0_ready(l1h);
+ } else {
+ waiting_other_trx = false; /* we don't care about others in TRX!=0 */
+ /* If we just became ready for TRX0 POWERON (aka this TRX becomes provisioned), signal it to TRX0: */
+ if (l1h->phy_inst->num != 0 && (!was_ready && trx_is_provisioned(l1h)))
+ trx_signal_ready_trx0(l1h);
+ }
/* if we gathered all data and could go forward. For TRX0, only after
* all other TRX are prepared, since it will send POWERON commad */
- if (trx_is_provisioned(l1h) &&
- (l1h->phy_inst->num != 0 || others_ready)) {
- if (l1h->phy_inst->num != 0) {
+ if (trx_is_provisioned_and_enabled(l1h) && !waiting_other_trx) {
+ if (l1h->phy_inst->num != 0)
trx_prov_fsm_state_chg(fi, TRX_PROV_ST_OPEN_POWERON);
- /* Once we are powered on, signal TRX0 in case it was waiting for us */
- trx_signal_ready_trx0(l1h);
- } else {
+ else
trx_prov_fsm_state_chg(fi, TRX_PROV_ST_OPEN_WAIT_POWERON_CNF);
- }
} else {
LOGPFSML(fi, LOGL_INFO, "Delay poweron, wait for:%s%s%s%s%s%s%s%s\n",
l1h->config.enabled ? "" :" enable",
@@ -512,7 +518,7 @@
l1h->config.txtune_acked ? "" : " txtune-ack",
l1h->config.nominal_power_set_by_vty ? "" : (l1h->config.nomtxpower_acked ? "" : " nomtxpower-ack"),
l1h->config.setformat_acked ? "" : " setformat-ack",
- (l1h->phy_inst->num != 0 || others_ready) ? "" : " other-trx"
+ waiting_other_trx ? "" : " other-trx"
);
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32052
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: 2023q1
Gerrit-Change-Id: Ie4836f5721ce8227a63c267730aeb17228994214
Gerrit-Change-Number: 32052
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin, dexter.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32049 )
Change subject: doc: Add details regarding BSC co-location
......................................................................
Patch Set 3:
(1 comment)
File doc/manuals/chapters/overview.adoc:
https://gerrit.osmocom.org/c/osmo-pcu/+/32049/comment/721f2b95_68d3b2ef
PS2, Line 12: In small base stations, the PCU is usually co-located inside the BTS. In this
> Hmm. I am also not sure about this. I wonder how it is with large IP based BTS. […]
Size has nothing to do with it. It's an architectural decision. The latency of GPRS on the radio interface is so high that you don't really care about the (usually super short) latency of a terrestrial CCU-PCU backhaul.
The main reason for old/established vendors' PCU being BSC-colocated is, I guess, for backwards copatibility (we've always done it that way, our codebase is built around the assumption) and also the fact that in network-assisted or network-controlled cell changges or actual hand-over in GPRS it is much easier to do from an element that has all the state of the neighbor cells, vs. just the state of one cell.
Please remove the notion of "small" here. You can write "In most OsmoPCU-supported base stations" or something like that, which is certainly true.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32049
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib2a3b60849fd312b21073a3511b8ca36b4536343
Gerrit-Change-Number: 32049
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 24 Mar 2023 17:07:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32052 )
Change subject: bts-trx: Fix no NM Radio{Carrier,Channel} switching to Enabled if one TRX is rf_locked
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32052
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: 2023q1
Gerrit-Change-Id: Ie4836f5721ce8227a63c267730aeb17228994214
Gerrit-Change-Number: 32052
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 24 Mar 2023 17:02:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32055 )
Change subject: contrib/jenkins: build libosmo-abis without dahdi
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> why is it "not needed"? DAHDI is used in production systems that sysmocom sells, maitanins and supp […]
I just backported it from master https://gerrit.osmocom.org/c/osmo-bts/+/31012, where you already changed your mind -1 -> +1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32055
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: 2023q1
Gerrit-Change-Id: I61c483983a4793e0429bb37804dee0a128125daf
Gerrit-Change-Number: 32055
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 24 Mar 2023 17:02:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32055 )
Change subject: contrib/jenkins: build libosmo-abis without dahdi
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
> why is it "not needed"? DAHDI is used in production systems that sysmocom sells, maitanins and supp […]
nevermind, I didn't realize this is about osmo-bts only. osmo-bts doesn't need DAHDI.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32055
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: 2023q1
Gerrit-Change-Id: I61c483983a4793e0429bb37804dee0a128125daf
Gerrit-Change-Number: 32055
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 24 Mar 2023 17:02:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment