Commit Graph

7623 Commits

Author SHA1 Message Date
Alexander Couzens f81c4bd681 sysmobts: expect feature IPV6_NSVC
The IPV6_NSVC feature is required to use IPv6 NSVC to connect
to the SGSN. The features in general should be dynamic discovered for
the BTS which support this.

Workaround for OS#4870
Related: SYS#4915, OS#4870

Change-Id: I711efca931012b8e66516f2721390e9dbdbb72a8
2020-11-28 11:25:46 +00:00
Alexander Couzens 60e3280372 bts_ipaccess_nanobts: check if msgb_alloc fails
Change-Id: Ib7867fa29d62eeea2cbc5603b28e5b00d0f62222
2020-11-28 01:03:38 +01:00
Pau Espin 55d7ee57cf main: generate coredump and exit upon SIGABRT received
Previous code relied on abort() switching sigaction to SIG_FDL +
retriggering SIGABRT in case the signal handler returns, which would
then generate the coredump + terminate the process.
However, if a SIGABRT is received from somewhere else (killall -SIGABRT
osmo-bsc), then the process would print the talloc report and continue
running, which is not desired.

Change-Id: I125288283af630efa20d64505e319636964a0982
Fixes: OS#4865
2020-11-25 20:46:46 +00:00
Harald Welte baa25b0d80 update aoip-mgw-options document with reality of 2020
This was started in 2017 before the NITB split.  Let's align it with
reality, mostly in terms of naming and making explicit what was
implemented.

Change-Id: Ib4e66b565a1edfc5ea8c1446f911011bfd4b1642
2020-11-20 20:58:54 +01:00
Harald Welte 6a6db09c7e fix some size-t format string characters
(shows up on 32bit builds)

Change-Id: Idd588761d537f3fbff89d99c87738e3dc81c3527
2020-11-20 13:44:55 +00:00
Neels Hofmeyr 2978e746b3 handover_test: add test 32: half used TCH/H on dyn TS
Shows undesired behavior of moving a TCH/H from a fully used dyn TS
leading to two half-used dyn TS, rather than moving the half-used dyn TS
that would lead to completely freeing a dyn TS.

Change-Id: I3beaa95d12ca0a19d4d1a732f3e22558e68ee29c
2020-11-18 15:28:15 +01:00
Neels Hofmeyr e0792fd342 handover test 30: play through filling up all lchans
Change-Id: I938ef9ebf77a4e72fc525f4f764daf34f17167ef
2020-11-18 14:50:25 +01:00
Neels Hofmeyr dc69da17ad hodec 2: favor moving dyn TS
When a used timeslot gets moved to another timeslot for load balancing, prefer
moving a dynamic timeslot, as illustrated by handover_test.c test 30.

Rationale: freeing up a dynamic timeslot is better for PDCH availability, as
well as for flexibility in timeslots. Test 30 shows that when freeing a static
TCH/F even though a dynamic one with identical ratings is in use, later
handovers to a TCH/H may become impossible, because no more dynamic timeslots
are available to switch to TCH/H. A freed dynamic timeslot allows congestion
resolution to continue and reduce more TCH/F to TCH/H.

The scope of this preference is per-TRX, where the RXLEV ratings used for
picking a target lchan are the same by definition. In other words, this never
overrules picking another lchan that has better RXLEV.

Among lchans on dynamic timeslots that could be moved, this code favors moving
later lchans; mainly because it makes for a simpler condition in the code.

Change-Id: Ic221b8d2687cdec0bf94410c84a4da43853f0900
2020-11-18 14:50:25 +01:00
Neels Hofmeyr 829db22eeb hodec 2: prep: common pick_better_lchan_to_move() function
There are four places deciding which of 2 lchans to move, depending on average
db ratings. Upcoming patches will enrich that decision for better handling of
dynamic timeslots, so have one common function for these to avoid code dup.

Change-Id: I745dc95cf564dd330295cecb4d64dccebf55163f
2020-11-18 14:50:11 +01:00
Neels Hofmeyr dad4e7c3f7 fix TCH/H allocation: use half occupied dyn TS instead of switching more dyn TS
Change-Id: I5a8d943f31774af00664d037550be14e767d312a
2020-11-17 03:32:17 +01:00
Neels Hofmeyr b08ec40282 handover_test: add test 31: TCH/H: re-use dyn TS
Show undesired behavior of opening up another TCH/H timeslot even though
another TCH/H timeslot still has room for a second lchan. This is particularly
bad for dynamic timeslots, reducing PDCH as well as TCH/F resources.

Change-Id: If222835af92d832b848824e5466bdcaf9af8a614
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 25e8f76116 handover test: add test 30: de-congest TCH/F by moving to dyn TS TCH/H
In the test, show the undesired behavior of moving non-dynamic timeslots first,
because they are the first to be considered in the congestion resolution loop.
The behavior will be fixed in Ic221b8d2687cdec0bf94410c84a4da43853f0900.

Change-Id: I09ab9f2f79fa434c7279cb4d09899f69b047aa55
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 7424bd2973 handover_test: drop secondary array of lchans
Change-Id: I7c80a16324d764969f279a5e1d6f55b0dbe9c17b
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 90d4b98322 handover_test: change 'meas-rep' params to bts-trx-ts-ss nr
So far the 'meas-rep' expects the index of the MS in order of appearance, to
send a measurement report for that MS. That may seem like a simplification for
human readability, but in fact, it is confusing for a human to keep track which
MS has which index, and to which timeslot it has been handovered. When reading
the tests, it is much easier to read exactly which timeslot the measurement
report is being sent to; which MS came first is inherently not as interesting
as which lchans are currently occupied.

Change-Id: I7ab2ef604196cfe96112dfefb9aa930368bf4812
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 5531fae5da handover_test: add 'set-ts-use'
When a test wants to use N lchans, so far it has to issue N 'create-ms'
commands. Many lchan distributions cannot be easily obtained by this, because
'crate-ms' always takes the first free lchan. To shorten test setup and easily
allow arbitrary lchan distributions, this command sets specific lchans to
specific usage states in one line.

Change-Id: I6e90679bf22609fb72e53e3d11748a4070a38159
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 43666544e7 handover test: add 'expect-ts-use' to clarify tests
In handover tests, it can be hard to follow which lchans are currently
occupied. The expect-ts-use command is like an assertion for a specific
distribution of used lchans, and helps understanding test intentions.

Change-Id: I6f4b573de7faace2d6bfe4f58b568e69c74dd07d
2020-11-17 03:32:17 +01:00
Neels Hofmeyr fb6d9dc508 handover test: fix dyn ts: set pchan_is on act / rel
Before this, handover_test channel activation and release on dynamic timeslots
failed to reflect the correct pchan type that osmo-bsc uses.

Change-Id: I3284b4565ad2c3b124442f4373243da1518206ce
2020-11-17 03:32:17 +01:00
Neels Hofmeyr cfbf11f8ef handover_test: allow arbitrary timeslot config and multiple TRX
Adjust 'create-bts' command so that it allows multiple TRX and arbitrary
timeslot configurations. It is now possible to write tests for dynamic
timeslots and multiple TRX.

Change-Id: Ic645cea671aa4798804666b8886f11bab5351e11
2020-11-17 03:32:17 +01:00
Neels Hofmeyr b5a107d8c9 handover_test cosmetic: eliminate bts array and bts_num from main()
This "global" array shadows the bsc_gsmnet state and is not needed. Look up the
BTS in bsc_gsmnet like all of osmo-bsc does.

Change-Id: Ieb27403b97124771e4d28b9c69bf7c36288f396d
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 4942da8c2e handover_test prep: rename 'create-bts' to 'create-n-bts'
I will add a command to create a single BTS with arbitrary timeslot
configurations.

To limit amount of editing of the current tests, keep the current 'create-bts'
command, which creates N identically configured BTS, but rename it to
'create-n-bts'.

Thus allow the upcoming single-BTS command to take the name 'create-bts'.

Change-Id: I4853771cf23b509b7f278d04c57883332ede786d
2020-11-17 03:32:17 +01:00
Neels Hofmeyr dd7b710cf7 handover_test prep: allow configuring several trx in create_bts()
Preparation for Ic645cea671aa4798804666b8886f11bab5351e11 to allow arbitrary
timeslot configurations in the tests.

Change-Id: Ie0d0c85552ba24802392423b60cfa3919e87563f
2020-11-17 03:32:17 +01:00
Neels Hofmeyr e3eb67ccf7 handover_test prep: allow arbitrary timeslots in create_bts() code
Allow passing timeslot config to create_bts().

Preparation for Ic645cea671aa4798804666b8886f11bab5351e11 to allow arbitrary
timeslot configurations in the tests.

Change-Id: I3ae898be4a503060c6bf30ae89115a75461ffc27
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 780f028a79 handover_test prep: move generate_si() into create_bts()
Preparation for Ic645cea671aa4798804666b8886f11bab5351e11 to allow arbitrary
timeslot configurations in the tests.

Change-Id: I8ed468da53f7b0e5ba8125d1bebafebe8c5becbb
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 2f58de5b30 handover_test prep: move arfcn into create_bts()
Preparation for Ic645cea671aa4798804666b8886f11bab5351e11 to allow arbitrary
timeslot configurations in the tests.

Change-Id: I6eb11e9f98c827cfcd819990db38b6848bf18b27
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 72d64e7227 handover_test: fix comment
Change-Id: Ice7932aae8b57bedf8bfc98eb77e73ad039a7e82
2020-11-17 03:32:17 +01:00
Neels Hofmeyr 4d8a469cd4 handover vty doc: explain rxqual values
Change-Id: I4f9d6b59c4f4a0550fb6a386342be55dcd777de8
2020-11-17 03:32:14 +01:00
Harald Welte eb77a2971b Use osmo_fd_*_{disable,enable}
Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
Change-Id: I4e228399d21098cc9a99b9cc1aa42b24ec609159
2020-11-11 20:15:22 +00:00
Philipp Maier 98439edd85 osmo_bsc_bssap: actually check for lchan
The function bssmap_handle_cipher_mode() suggests to check if an lchan
is actually present when it gets called, but it only checks for conn.
This might lead to a segfault later in the execution path.

Change-Id: I3103ec89cd6dce1a11ea8e9f8187373e4114e852
2020-11-09 16:55:47 +01:00
Daniel Willmann 47899f1695 configure.ac: Require python3 for ext_tests
The python scripts already use #!/usr/bin/env python3 so it was pure
coincidence that the tests are working.

Change-Id: Id5745d5ff5ff1072ccfbf9ad50b2d67f3ea95583
2020-11-09 10:58:21 +00:00
Harald Welte 39b92ff33a debian/control: Recommend installation of osmo-mgw
osmo-bsc is pretty useless without osmo-mgw these days.  Let's not
make it a strong dependency, as the mgw could of course be running
on different machines.

Change-Id: I17711c6abdab0fc2d5d3afe1976d4248fd010e83
2020-11-07 17:41:35 +01:00
Vadim Yanitskiy c6f38a40bc vty: add reminder messages about the radio link timeout
Change-Id: Ief3af40cab1a62a276f9976fe1a1ca7aa2e13720
Related: SYS#4910
2020-11-02 09:47:14 +00:00
Neels Hofmeyr eca6a57692 minor code dup: smlc_set_cs7_instance()
Change-Id: I140bbe9922d3c13ee48ca75171097768bb3e8ac5
2020-10-29 23:47:44 +01:00
Neels Hofmeyr 3e5f08181c add fixme comment for OS#3833
Change-Id: I103d968ffc5e362133fbf017493259048f37e607
2020-10-29 23:47:32 +01:00
Neels Hofmeyr fe60875897 fix missing RR release when there is no MSC
Related: OS#4832
Related: I4ffcfd4be551e0647abe00c4eaa8e9c490887190 (ttcn3 test case)
Change-Id: I697ec1287f2e813b99d95e2855d0184b14eb2783
2020-10-28 22:53:41 +00:00
Neels Hofmeyr 88a0789a8e manual: describe LCS and Lb interface
Change-Id: I7ba432706759433987fabbc674bfc8cd55f2ce62
2020-10-28 03:24:27 +01:00
Pau Espin c4c6ba4b07 nm_channel_fsm: Fix innocuous transition not permitted log error
Event NM_EV_OML_DOWN in allstate will transition to Disabled
NotInstalled state. In the case where that is the current state, there's
really no change but we didn't allow the transition. Let's allow it
since it doesn't hurt and get rid of error messages when a BTS
disconnects.

Fixes: OS#4831
Change-Id: Ia5b7c88ff89e68ec5086d24f6ee20a8b3b2d994d
2020-10-26 10:48:52 +01:00
Vadim Yanitskiy c5a0ab6efd main: add --vty-ref-mode, use vty_dump_xml_ref_mode()
Change-Id: I1a89829a29dd38fe69002c898503d76a3376a874
Depends: Ie2022a7f9e167e5ceacf15350c037dd43768ff40
Related: SYS#4910
2020-10-24 04:29:27 +07:00
Harald Welte 806e7a37dd use osmo_fd_setup() whenever applicable
Change-Id: Iee26d14e997cc77c49b8fc1a9f388e4e2f783105
2020-10-19 12:05:17 +02:00
Vadim Yanitskiy 218b3753f1 bts: move rate counter / stat item definitions from *.h to *.c
A header file should only contain declarations, not entire definitions.
The fact that we have 'static const struct ...' definitions in a header
file means that very C file including this header file will get its own
private copy of the entire definition.

The header file should only include declarations, while the actual
non-static definitions should go to a *.c file.  Let's fix this.

Also, take a chance to improve readability and apply more consistent
formatting (similar to 'struct hf_register_info[]' in Wireshark).

Change-Id: Ib5949879902acbe1edda577477d9d51a2cc425d1
Closes: OS#4816
2020-10-19 01:07:24 +07:00
Pau Espin 0aa489252d ipa: Fix use of null pointer in log macro
Fixes: Coverity CID#214962
Fixes: Coverity CID#214963
Change-Id: Iafea915dbbbfbaa710fb5899cb9be5e507ba384c
2020-10-17 13:56:16 +00:00
Neels Hofmeyr 60e5ddf65d drop features 'core-location-area-code' and 'core-cell-identity'
This feature apparently assigned a fixed LAC and CI to a specific MSC, but
looking at the implementation was obviously not useful.

Keep the vty commands for legacy compat, now without effect besides logging an
error via vty_out().

Related: OS#4751
Change-Id: I6bee704e7e5d5b6b86473323bae1fa9fce9241ee
2020-10-16 13:51:48 +00:00
Pau Espin 7c02e4cfd5 abis_nm: Log Opstart NACK with error loglevel
Change-Id: I586c3dd3547d35bca3d11f66dfad322e22c09068
2020-10-15 05:55:36 +00:00
Pau Espin 558183f3dc OML: Stay compatible with older osmo-bts versions
Older osmo-bts versions (before FSMs) tended to mimic broken behavior
from nanoBTS. As so, we detect it because SiteMGr becomes Enabled by
default as in nanoBTS, and hence we can manage them also by expecting no
Offline state and sending Opstart (and hence finally transitting to
Enabled) during Dependency state.

Change-Id: Iaa036a2936f609b9b9721b2b4ad8d6deaf023f42
2020-10-15 05:55:36 +00:00
Pau Espin 09544ab436 Introduce Radio Channel FSM
Change-Id: Iddc008c5737afb2fddd32c628bc5278056a64d89
2020-10-15 05:55:36 +00:00
Pau Espin d9d105c1f7 Introduce NM RadioCarrier FSM
Change-Id: Ieed61d1fb1e896db42545c2c3421b20cb41ad549
2020-10-15 05:55:36 +00:00
Pau Espin 95486f248a Introduce NM BaseBand Transceiver FSM
Change-Id: Ib4d35316c52eb4c71ea0d352a1e06fd5e600fe08
2020-10-15 05:55:36 +00:00
Pau Espin 6adeb607d0 Introduce NM BTS FSM
Change-Id: I7756a8ce90b6cc8a502b5665889a7987d7f749cb
2020-10-15 05:55:36 +00:00
Pau Espin 4338de5f51 Introduce NM BTS Site Manager FSM
Change-Id: Ic001ce6ebeff6f51470ef58140b0235f4a30265e
2020-10-15 05:55:36 +00:00
Pau Espin 12e15479d6 Set all NM OML objects to Locked by default
Before they were set with a value of 0, which had no related enum field,
but since in general all comparsions are done against NM_STATE_UNLOCKED
they also hold valid.

The major change in behavior with this patch is upon OML link down,
where gsm_bts_mo_reset() is called on all objects. This way, upon OML
re-establishment we have again all objects as Locked again, which is the
expected default value as per TS 12.21.

Change-Id: I68ae0bc51a565f903b47cf72f3e3dd6f1a2d2651
2020-10-15 05:55:36 +00:00
Neels Hofmeyr 737bb2f47b LCS: Lb startup: no need to re-use existing SCCP user
This bit of code was borrowed from MSC handling, where multiple MSC might tap
on the same SCCP user. There is only one remote SMLC, so there is no need to
osmo_sccp_user_find(), just bind it and be done.

Change-Id: Ia05c27c13dfb9df4f89c87b8477eea4e62fbe349
2020-10-15 05:39:10 +02:00