Age | Commit message (Collapse) | Author | Files | Lines |
|
Related: OS#5273
Change-Id: Ib01d38c59ba9fa083fcc0682009c13d2db3664fe
|
|
A bit of archeology, history & recap:
ec1b5a0e9e2b6549e0ede48e803095e569997355 (openbsc.git) Adds assert in gsm_ts2chan_nr()
2f44693fad8505255293d3ed37dbd4e7cabebd37 (openbsc.git) ASSERT is disabled due to reported hit in octphy and
litecell in gerrit for ec1b5a0e9e2b6549e0ede48e803095e569997355
5cef0623ef64bc641d2d29edb1ebaaafcc7c0df6 (osmo-bts,git) minor fixes to gsm_ts2chan_nr() regarding the pragma
c9079d91069eaadf181a6e26e3c7205f1f05cbda (osmo-bts.git) GSM_PCHAN_NONE case is introduced in gsm_ts2chan_nr()
This code has long evolved and robustness has improved, it's not even
part of openbsc.git for several years now. Let's always assert if we
receive an unexpected value there, since they are all internally handled
values and hence we have control over them.
Related: OS#2906
Change-Id: I25e2cf0c922bc9902336e9add75a47535b9355bf
|
|
It can happen when using several TRX that all of them go alreadyunder
shutdown target tx power level, but that due to configuration the BTS
still may want to keep pushing the tx power level even lower. Hence, we
end up in a situation where the FSM is trying to close all the TRX while the
power ramp procedure is ongoing for some of them. As a result, race
conditions can happen where for instance the power ramping procedure for
one TRX ends and calls the cb to send SETPOWER after the TRX PHY has
been closed (and hence TRXC link is unavaialble).
If that happens, the trx_if lower layers store the SETPOWER and attempt
a later retransmit, which may take up to 2 seconds after TRX becomes
active if BTS reconnects immediatelly.
Hence, we end up in some test cases where BTS reconnects and configures
some TRX while others are kep unconfigured for a while due to the
mentioned delay, hence the test attempting to use the TS while it hasn't
been yet configured.
The solution is to avoid this kind of unexpected events with ongoing
powe ramp once we have decided tx power is lower enough to shutdown the
TRX completely. Hence we abort the pending power ramp procedure.
Change-Id: Ibca581131eb142d7c38c917a0d6990efec03123c
|
|
Fixes crash when TTCN3 BTS_Tests_LAPDm TC_rr_response_frame_loss
runs run after TC_t200_n200.
The BTS was shutdown after TC_t200_n200 failed (drop oml link), and
lchan was moved ACTIVE->NONE without lapdm_channel_exit() being called
on it. Hence, on next test (TC_rr_response_frame_loss), when
lchan_init_lapdm() was called again, some memory corruption was caused.
The lapdm_channel_exit can be dropped from gsm_lchan_release() and
rsl_tx_rf_rel_ack() since it's already called in the same path:
"""
rsl_rx_rf_chan_rel
gsm_lchan_release(lchan, LCHAN_REL_ACT_RSL);
l1sap_chan_rel(lchan->ts->trx, gsm_lchan2chan_nr(lchan));
l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_DEACTIVATE)
bts_model_l1sap_down
bts_model_lchan_deactivate_sacch(lchan);
-
lchan_deactivate(lchan);
bts_model_lchan_deactivate
lchan_set_state(lchan, LCHAN_S_NONE); <---------
mph_info_chan_confirm(trx, chan_nr, PRIM_INFO_DEACTIVATE, 0);
l1sap_info_rel_cnf
rsl_tx_rf_rel_ack(lchan);
lapdm_channel_exit(&lchan->lapdm_ch);
lapdm_channel_exit(&lchan->lapdm_ch);
"""
Related: SYS#5262
Change-Id: If0ec5f0c7be4d15c8d684d33e15e24d68bd5192e
|
|
osmo-bts-trx/l1_if.c lchan_init_lapdm() for CCCH is already done when
trx_set_ts_as_pchan() calls:
"lchan_set_state(&ts->lchan[CCCH_LCHAN], LCHAN_S_ACTIVE);"
Change-Id: I7a9c3660b9aab57ff8765e2f1526349599630cd9
|
|
Change-Id: If75ed432fa9dcb10159a0dac9b8ba7efe6958b35
|
|
Let's avoid running over state change conditions or even printing log
lines if there's no state change.
Change-Id: I1ca86aa846084f53751076643665cb6dabc26a06
|
|
Change-Id: Idd48fd8fbb13b715096a4765dcb08a18d85098a7
|
|
Change-Id: I17ebe6af69e31d1b4dbad7656bbf043f4c9243c1
|
|
There's no need to re-setup it every time.
Mark the cb as static since its private to the module, and move it
above its use point so it can be referenced.
Change-Id: I90324f26d8ca09d425c7523a25b3e6c951fa49d6
|
|
* Move way too verbose command description to the manuals.
* None of these commands apply immediately, correct the attributes.
** Remove meaningless call to l1if_provision_transceiver_trx().
* Make 'maxdlynb' hidden, so it only appears in the expert mode.
* One GMSK symbol actually corresponds to 550m.
Change-Id: I46839cf56bba2dcdc70303cd393e86d35aa2f3f5
|
|
trx_phy_inst_open() already guards against NULL trx ptr when calling
trx_sched_init(). Later on, in same path, trx_phy_inst_close() can be
called which ends up calling trx_sched_clean(trx), this time not being
guarded against NULL trx. This fixes Coverity CID#240498.
Fixes: CID#240498
Change-Id: I00afc739559d57dd98db68c76f2a85006c15e875
|
|
- one gsm symbol is 0,00000369 seconds
- 2*550m/c = 0,00000366 seconds
-> one ta symbol is a DISTANCE of 550m (or a RTT of 550m*2) between bts and ue.
-> no idea why this was constrained to TA/2.
Change-Id: I8d79080c82411e6427eec37d008614fa5d5e1ace
Related: OS#5140
|
|
The OML NM Channel FSM state only apply to primary timeslots, hence we
need to make sure we pick the primary TS (the non-shadow one).
Due to this bug, all channels on shadow TS where NACKed because the
related state was never "Enabled Ok".
Fixes: c97a7f51e1b15d40e39df4b7d07b3c6534540186
Related: OS#5249
Related: OS#5251
Change-Id: If47e4bdd45a05ed1b5709b6e3d541f2830723e37
|
|
Since non-shadow TS are currently not allocated as talloc contexts,
lchan objects tend to allocate their own memory on trx talloc ctx
instead. That's fine for non-shadow TS, since the TS follow trx lifecycle
since they are part of the same talloc context. However, shadow TS are
recreated (re-allocated) each time the BTS reconnects, hence when htey
are freed we need to free substructs (lchan) memory in order to avoid it
being kept in trx talloc ctx.
Related: OS#5248
Change-Id: I73742535eb3c40a6866731acbff782940dab06c3
|
|
Use it as a counterpart of gsm_bts_trx_init_shadow_ts()
Change-Id: I38baa2b2cfcf6221325d45860b3c7dd53235b8ff
|
|
Change-Id: Ic14e9de7487ba8152ffb1aa1bab508a2b9a11ea0
Related: OS#5248
|
|
Change-Id: I44a8f18c81dd8bc76ca07dfaae7bcdb2fedc9261
Related: OS#5248
|
|
Code in oml.c, upon receiving net attributes, merges the new attributes
with old ones (for some reason I don't really know). Hence, if we
disconnect from a BSC and go to NOT_INSTALLED state, we must free
previous nm_attr in order to avoid mixing them once we connect to a new
(potentially different) BSC upon reconnect.
Related: OS#5248
Change-Id: I45cc22dd68121a7930301581bfd0a8db37879c77
|
|
Let's rather put it there instead of the shutdown code path, since we'll
be adding more and more reset coe there.
Change-Id: I43a136ade731a2c58c0a29d97875088e9b6d4414
|
|
Change-Id: Ide45a0f7836bf35ffbe88070fa8367022311ca44
Related: SYS#5313
|
|
Currently, only osmo-bts-trx is capable of reporting the interference
levels to L1SAP. Thus it does not make sense to trigger the averaging
logic and send empty reports over the A-bis/RSL and the PCUIF.
Change-Id: Ic17eb46bdca3c33ac4d6e560a093b635b75424a5
Related: SYS#5313
|
|
Starting from [1], interference levels on PDCH timeslots are also
reported over the A-bis/RSL. They may be useful for the BSC to
determine whether dynamic PDCH timeslots might be better used for
new circuit switched connections, or whether alternative PDCH slots
should be allocated for interference reasons.
* Handle GSM_LCHAN_PDTCH in lchan_report_interf_meas().
* Rework pcu_tx_interf_ind() to accept 'struct gsm_bts_trx'.
* Call pcu_tx_interf_ind() from l1sap_interf_meas_report().
Regarding pcu_tx_interf_ind(), it's better to call this function
from the upper layers once, rather than calling it from various
places in the model specific code.
[1] I5b4d1da0920e788ac8063cc765fe5b0223c76758
Change-Id: I3fbaad5dbc3bbd305b3ad4cb4bfb431a42cfbffc
Related: SYS#5313
|
|
This information may be useful for the BSC to determine whether
dynamic PDCH timeslots might be better used for new circuit
switched connections, or whether alternative PDCH slots should
be allocated for interference reasons.
Change-Id: I5b4d1da0920e788ac8063cc765fe5b0223c76758
Related: SYS#5313
|
|
It's cleaner from the architectural point of view to have the
interference measurements processed in a separate function.
Change-Id: I3981608e01a50585359cad673c38c8a305027d30
Related: SYS#5313
|
|
It may happen that the BSC requests logical channel activation on a
dynamic timeslot, which is in a process of switching from one pchan
type to another due to a preceding channel activation request.
In this case 'struct gsm_bts_trx_ts' already holds an msgb with the
preceding RSL CHANnel ACTIVation message, that is normally handled
once the PHY completes the process of timeslot re-configuration.
On receipt of subsequent RSL CHANnel ACTIVation messages, in function
dyn_ts_l1_reconnect() we overwrite the preceeding msgb (memleak), by
the most recent one. And once the timeslot re-configuration is done,
only the most recent CHANnel ACTIVation message gets ACKed.
In order to avoid this, let's move the msgb ownership to 'struct
gsm_lchan', so it cannot be overwritten by the CHANnel ACTIVation
message that is related to a different lchan on the same timeslot.
Change-Id: Ia625c2827fca883ea712076706d5ef21ed793ba6
Related: I3b602ac9dbe0ab3e80eb30de573c9b48a79872d8
Fixes: OS#5245
|
|
Change-Id: Id1f8710f0d6b7511fff6ab221e6ec974a94c6f8b
Fixes: I94a934a6b3b397b4cd0e9da3577325de58814335
|
|
Otherwise after reconnecting some SI are still marked as valid despite
the new BSC conn didn't set them.
Change-Id: I71e2a5cdf4e2e287db7b05df1a165a1e32c958ca
|
|
This fixes some TTCN3 tests where some lchan resources were kept from
previous tests.
Change-Id: I78dca32cd061fba86cc88c4c4f323b33d51c58d0
|
|
Change-Id: I0525beaba3c833f8d7adf9701fe373761a7720d3
|
|
Change-Id: I09ea92e843383d65c8033196814d345135ff918e
|
|
We already have similar classification in osmo-bsc.
Change-Id: I1493f40d99f88a565f15d3e0943a512fb9b8719a
|
|
Let's split all lchan and power_control specific stuff into their own headers,
it helps finding out data and operations available related to them.
We already have similar classification in osmo-bsc.
Change-Id: I6424dcbd2e329fc1a516f8886359554ed7e9487e
|
|
It makes no sense to transmit load information if the channel is still
not operational. This solves errors messages seen in osmo-bsc.
Related: OS#4872
Change-Id: I7ddda9776158eed0694df9e458f3f91df90bf674
|
|
Have a more stable loop with less temporary oscillations at the expense
of increased reaction time.
4 SACCH blocks (P_CON_INTERVAL=2) is the minimum interval to get stable
measurements for the last requested MS Power level. With P_CON_INTERVAL=1,
are also made during a period with stable power being use to transmit,
but the MS Power level used (and announced in MR) is not the last one
requested by the BTS, but the one requested in the previous loop
iteration. This can make the MS and BTS bounce 2 values forth and back,
and create some temporary oscillation.
See osmo-bsc User manual section "Power Control" for more information.
Related: SYS#5371
Change-Id: I91c505447f68714239a4f033d4f06e91893df201
|
|
Let's move lchan specific struct stuff into lchan.c
Change-Id: I9cb96707c63b8b7d76591d25fe906f02e34bb76b
|
|
A broken BSC could send a Chan Activation on a TS which has not yet been
enabled (or even configured). This is the case with our TTCN3 tests,
where OML side is currently handled in parallel by an osmo-bsc while
TTCN3 takes care of the RSL side. This can actually be seen as a
malfunctioning BSC, but it was spotted that given this sequence of
events osmo-bts can crash (see ticket below).
Hence, let's NACK any attempt from a BSC to activate an lchan on a
disabled TS.
Related: OS#5249
Change-Id: I9c3b68487c12efc412a057728a561e061560c544
|
|
EV_CLOSE in state OPEN_WAIT_POWERON_CNF was not permitted, hence TRX0
was finally moved and kept to state OPEN_POWERON while other TRX were
moved OPEN_POWERON->OPEN_WAIT_POWER_CNF:
"""
20211004090637640 DL1C <0006> trx_provision_fsm.c:86 TRX_PROV(phy0-0)[0x55fddfb1fda0]{OPEN_POWEROFF}: Received Event TRX_PROV_EV_NOMTXPOWER_CNF
20211004090637640 DL1C <0006> trx_provision_fsm.c:498 TRX_PROV(phy0-0)[0x55fddfb1fda0]{OPEN_POWEROFF}: state_chg to OPEN_WAIT_POWERON_CNF
20211004090637640 DTRX <000b> trx_if.c:256 phy0.0: Enqueuing TRX control command 'CMD POWERON'
...
20211004090637641 DABIS <000d> abis.c:397 E1L(0) Signalling link down
...
20211004090637642 DOML <0001> bts_shutdown_fsm.c:74 BTS_SHUTDOWN(bts0)[0x55fddfb0b4e0]{NONE}: state_chg to WAIT_TRX_CLOSED
...
20211004090637642 DL1C <0006> l1_if.c:191 TRX_PROV(phy0-3)[0x55fddfb238b0]{OPEN_POWERON}: Received Event TRX_PROV_EV_CLOSE
20211004090637642 DL1C <0006> trx_provision_fsm.c:606 TRX_PROV(phy0-3)[0x55fddfb238b0]{OPEN_POWERON}: state_chg to OPEN_WAIT_POWEROFF_CNF
20211004090637642 DOML <0001> l1_if.c:194 NM_RCARRIER_OP(bts0-trx3)[0x55fddfb2ab20]{DISABLED_OFFLINE}: Received Event DISABLE
20211004090637642 DOML <0001> l1_if.c:195 NM_BBTRANSC_OP(bts0-trx3)[0x55fddfb2ae00]{DISABLED_OFFLINE}: Received Event DISABLE
20211004090637642 DL1C <0006> l1_if.c:191 TRX_PROV(phy0-2)[0x55fddfb22500]{OPEN_POWERON}: Received Event TRX_PROV_EV_CLOSE
20211004090637642 DL1C <0006> trx_provision_fsm.c:606 TRX_PROV(phy0-2)[0x55fddfb22500]{OPEN_POWERON}: state_chg to OPEN_WAIT_POWEROFF_CNF
20211004090637642 DOML <0001> l1_if.c:194 NM_RCARRIER_OP(bts0-trx2)[0x55fddfb27410]{DISABLED_OFFLINE}: Received Event DISABLE
20211004090637642 DOML <0001> l1_if.c:195 NM_BBTRANSC_OP(bts0-trx2)[0x55fddfb27660]{DISABLED_OFFLINE}: Received Event DISABLE
20211004090637642 DL1C <0006> l1_if.c:191 TRX_PROV(phy0-1)[0x55fddfb21150]{OPEN_POWERON}: Received Event TRX_PROV_EV_CLOSE
20211004090637642 DL1C <0006> trx_provision_fsm.c:606 TRX_PROV(phy0-1)[0x55fddfb21150]{OPEN_POWERON}: state_chg to OPEN_WAIT_POWEROFF_CNF
20211004090637642 DOML <0001> l1_if.c:194 NM_RCARRIER_OP(bts0-trx1)[0x55fddfb23b50]{DISABLED_OFFLINE}: Received Event DISABLE
20211004090637642 DOML <0001> l1_if.c:195 NM_BBTRANSC_OP(bts0-trx1)[0x55fddfb23e60]{DISABLED_OFFLINE}: Received Event DISABLE
20211004090637642 DL1C <0006> l1_if.c:191 TRX_PROV(phy0-0)[0x55fddfb1fda0]{OPEN_WAIT_POWERON_CNF}: Received Event TRX_PROV_EV_CLOSE
20211004090637642 DL1C <0006> l1_if.c:191 TRX_PROV(phy0-0)[0x55fddfb1fda0]{OPEN_WAIT_POWERON_CNF}: Event TRX_PROV_EV_CLOSE not permitted
20211004090637642 DOML <0001> l1_if.c:194 NM_RCARRIER_OP(bts0-trx0)[0x55fddfb0bb70]{DISABLED_OFFLINE}: Received Event DISABLE
20211004090637642 DOML <0001> l1_if.c:195 NM_BBTRANSC_OP(bts0-trx0)[0x55fddfb0be50]{DISABLED_OFFLINE}: Received Event DISABLE
20211004090637642 DTRX <000b> trx_if.c:672 phy0.0: Response message: 'RSP POWERON 0'
20211004090637642 DL1C <0006> trx_provision_fsm.c:56 TRX_PROV(phy0-0)[0x55fddfb1fda0]{OPEN_WAIT_POWERON_CNF}: Received Event TRX_PROV_EV_POWERON_CNF
"""
This left the BTS in an unexpected broken state and TTCN3 tests after
this race condition failed.
Change-Id: Ic4831201a5be1bc9aff757a9a061c637d98582de
|
|
It helps better understanding the code, and will allow handling
situations where for instance a POWERON in in transit while the BTS is
instructed to shutdown, hence a POWEROFF needs to be sent.
Change-Id: Iaf62217ceab7420afa4140cba61e1c2f983c61b4
|
|
config.enabled is always true in that state. Hence, those paths can be
securely dropped since only add confusion.
Change-Id: Icf00c52e61ddedd8e32eb37223cea5686005e6a3
|
|
Since recently, reset of all fields is already properly done in
trx_provision_reset().
Change-Id: I3e6bc8205704e425644507dd1f1b299dea4cd851
|
|
The first check in this function ensures that the state is NONE.
Therefore it does not make sense to print it below..
Change-Id: I62ea4117dd5e1eebb8774809134e5cb73774945c
|
|
Change-Id: Ifc46b94b4540705f7d9b4678a7398158f3aaf7c5
Fixes: Iecd3c7cb96f5fff3b4c7e04c74e031df0f7a6987
|
|
Change-Id: I28cb36a43b44865caa409b3255c05963acc74848
|
|
This was colliding with the global "show trx" command introduced a few
years ago, and prevented both command from working.
Change-Id: I57f9515292f7bd906599e2cc277542bfaf3b657b
Related: OS#5080
|
|
Each RSL MEASurement RESult message contains a Measurement Number
IE, which is basically a monolithically increasing number. We
shall not increase this counter if for whatever reason the report
has not been sent to the BSC.
Change-Id: I441adb4b202e94ddee8c0b6777849e36ea644b1d
Fixes: Id67259ec9ac4c2c33bd0eef3f64450affbe3fb9f
Fixes: OS#5243
|
|
Avoid re-connecting to a new BSC while BTS is in shutting down. All the
FSMs are complex enough to even try to re-start when stopping has not
yet finished...
Change-Id: I1727828a16f4ec8043b00cc6b2e02a4c35f71377
|
|
Prior to this patch, the power ramping started when the PHY is
available, but that doesn't necessarily mean the RCARRIER is enabled.
Due to this, it was spotted a situation where BTS bootstrap failed after
PHY turning up, when RSL connection establishment failed. Hence
bts_shutdown_fsm triggered a shutdown while an active power ramping up
was ongoing...
Change-Id: I17208b74ea2649b1bbb717aee0aa355e42b7e860
|
|
This may happen if bts_shutdown starts a poweroff procedure while
POWERON was still not sent to the TRX. In this case, we want to go back
to initial closed state to fullfill expected state when BTS is shutdown.
Change-Id: Id660fa1018ef175ab237733b37629c56313c061d
|
|
Change-Id: I39bef8b5776cbf1098753865c597b1c99d355bec
|