aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-03-03bssmap_rcvmsg_dt1(): consistently log on conn->fineels/bssmap_lengthNeels Hofmeyr1-2/+3
The rest of this function already logs using LOGPFSML(conn->fi), change the last two LOGP(DMSC) to also log with conn context. Change-Id: I87da05694b2585277ede3dbe79c1876ee040bb9a
2023-03-03do not pass length outside of msgb (3): bssmap_rcvmsg_dt1()Neels Hofmeyr1-39/+36
absorb bssmap_msg_len() into bssmap_rcvmsg_dt1(). Change-Id: I3d56229816ced33ae1041b755f6caea24c387bfe
2023-03-03do not pass length outside of msgb (2): bssmap_msg_len()Neels Hofmeyr1-5/+4
Change-Id: I047f1fe0710fcf7b9f8238a6063de9937e6ceb47
2023-03-03do not pass length outside of msgb (1): bsc_handle_dt()Neels Hofmeyr3-6/+6
Change-Id: If7f119c32cd445561841fd69b450e3675e5dba59
2023-03-03vty: improve doc for 'amr tch-X modes'Neels Hofmeyr1-2/+4
Change-Id: Ie2f895d12d3e95ec0c31ee026cca073b4f8da0c9
2023-03-03log error if any of the AMR S1 rates are forbiddenNeels Hofmeyr3-0/+25
Change-Id: Id4b1c81bca92d7ec06963643a24150ce8e187f26
2023-03-03doc: add codec_resolution.ladderNeels Hofmeyr2-0/+140
Original source for codec_resolution.msc, see libosmocore/contrib/ladder_to_msc.py Iefac4cb91b82c93a64b4999afa62e299479913af Change-Id: I4a46f244b9083e547872786ef10931dec390ae67
2023-03-03doc: add codec_resolution.mscNeels Hofmeyr2-0/+49
Illustrate the various factors that influence picking a codec for a 2G voice call in osmo-bsc. Change-Id: I3d63a0d587a43fc18ea54b3982800b19b4d50a08
2023-03-03drop gsm_pchan_ids, use sanitized FSM ids insteadNeels Hofmeyr5-35/+17
gsm_pchan_ids[] exists only to compose osmo_fsm compliant IDs. We do have osmo_fsm_inst_update_id_f_sanitize() now, rather use that. This removes some confusion about which value_string array has an effect on the VTY command 'ts' / 'phys_chan_config'. Note that tests/bsc_test.ok does not change, hence the new way of composing FSM IDs is identical to using the old gsm_pchan_ids[]. Change-Id: Ib85b7aa4ea882ae37919dd3ea0c033e949c083e5
2023-03-03tweak gsm_pchan_ids[]: DYNAMIC/{OSMOCOM,IPACCESS}Neels Hofmeyr3-8/+9
This patch affects *only* on osmo_fsm instance IDs, which are visible on the CTRL and VTY interfaces to identify FSM instances, and in the log. Why bother: An upcoming patch wants to replace gsm_pchan_ids[] with osmo_fsm_inst_update_id_f_sanitize(gsm_pchan_name(x)), this is an explicit step to match gsm_pchan_names[]. Change-Id: I4a540744cced466f0ca4fc605db4d0ec14ee8e87
2023-03-03bsc_test.c: test FSM IDs that contain pchan namesNeels Hofmeyr4-1/+115
Show the timeslot_fsm, lchan_fsm, assignment_fsm fi->id strings. The IDs include the current pchan configuration. I want to tweak the composition of these in an upcoming patch, so the test should show whether any FSM IDs change from that. Change-Id: If369f23fa140b9d7792f5a511815cbbd14b371e9
2023-03-03stat: change pchan naming to dynamic/{osmocom,ipaccess}Neels Hofmeyr1-4/+4
Change names of stat exports to be consistent with VTY,CTRL: - from "chan_osmo_dyn" to "chan_dynamic_osmocom" - from "chan_tch_f_pdch" to "chan_dynamic_ipaccess" Change-Id: I863ad05e892563442041722bcd57f7c987e1f5ab
2023-03-03VTY,CTRL: add pchan dynamic/{osmocom,ipaccess}Neels Hofmeyr8-63/+83
We already use "OSMO_DYN" as C name for "fully dynamic" timeslot config, when working with osmo-bsc.cfg I dearly miss this short name, it is a pain / has become ridiculous to write 'tch/f_tch/h_sdcch8_pdch'. Introduce 'dynamic/osmocom' and 'dynamic/ipaccess' as default names for our dynamic timeslots on VTY and CTRL. The old 'tch/f_tch/h_sdcch8_pdch' and 'tch/f_pdch' are still supported. Change-Id: I37719edd867c777d1ce944b8e2f1efffac38f00e
2023-03-03ensure correct phys_chan_config doc string count on VTYNeels Hofmeyr1-1/+6
Add a static assert, and comments indicating the importance of the two value_string arrays defining pchans on the VTY matching up. Change-Id: I8118bec35400f7f00ca9ae43b603059ed701fa25
2023-03-03vty: msc / codec-list: forbid invalid codec versionsNeels Hofmeyr2-10/+17
Change-Id: I421c306aa22dfdad0f30c6ba8b482e1eff188a8e
2023-03-03vty: msc / codec-list: forbid duplicate entriesNeels Hofmeyr4-23/+48
Change-Id: Ifdc9e04bf1d623da65bfb8a2fddea765601f6d9b
2023-03-03simplify storage of bsc_msc_data->audio_supportNeels Hofmeyr6-130/+76
Make it a plain array, no dynamic allocation needed. Change-Id: I625cedc4bb040d649fd6e1794ba468f4c6ad6adc
2023-03-03test_codec_support_bts_rate: add missing breaksOliver Smith1-0/+2
Fixes: 3db22c61 ("cosmetic: clarify test_codec_support_bts()") Fixes: CID#310823 Change-Id: I951783b6310f0a6ef5546a36c962def9d6e66285
2023-03-02bsc_test: add 'update_exp'Neels Hofmeyr1-0/+4
Change-Id: I0e758e264f0bba76a78839931a72245d98936b8f
2023-03-02assignment_fsm.c: make two functions staticNeels Hofmeyr1-2/+2
Change-Id: I33eef9d105bacbb46538dff233502e834f7a3b51
2023-03-02implicitly register osmo_fsm definitionsNeels Hofmeyr11-25/+5
I'm going to add a regression test that probes lchan_fsm. I noticed that I have to call lchan_fsm_init() for osmo_fsm_register(). Let's make this implicit as we usually do now, to not have to register FSMs in tests. Change-Id: I58760e743c78a370aedc9720f265c0f8da5c2045
2023-03-02add timeslot.vtyNeels Hofmeyr1-0/+71
Prepare some basic tests for 'timeslot' / 'phys_chan_config', because an upcoming patch will add the 'osmodyn' alias, and this test shall show the changes on the VTY. Change-Id: I2c4aab90bcbc9019ca004fb1d4945476edbb7363
2023-03-02select_codecs(): constify ct argNeels Hofmeyr1-1/+1
Change-Id: Icb07374b40629e48d811a036b9a56d026c1d897c
2023-03-02select_codecs(): doc tweakNeels Hofmeyr1-1/+1
Change-Id: I52a111b1992db1e335c692d2caee7c5398a6f90e
2023-03-02cosmetic: clarify test_codec_support_bts()Neels Hofmeyr1-22/+16
Change-Id: I13d9b158d08f4938c5aa47ef3134819a4b1f7d29
2023-03-02vty: msc / codec-list: tweak error msgNeels Hofmeyr2-9/+1
Change-Id: I7ba508cceccb8a25db0936f756f3e4a28ec1333f
2023-03-02bsc_vty.c write_msc(): fix weird printf formatNeels Hofmeyr1-2/+2
Change-Id: I856c2d620b89efcf3239186ef53c6941577dbccc
2023-03-02bsc_vty.c: s/bsc/msc for commands under msc nodeNeels Hofmeyr1-18/+18
Change-Id: Id91a82ca8e2eb91b52836e024ccf925245886ae6
2023-03-02vty: improve doc for 'codec-list'Neels Hofmeyr2-4/+5
Change-Id: I33e6568997bcb1a9466e1e0c1b00718b703e2904
2023-03-02cosmetic: use i++ instead of ++i in for loopNeels Hofmeyr1-1/+1
Change-Id: I9903e54e3eb59db9b9cd22e017bc81b9b86e01e9
2023-03-02cosmetic: use char literals in cfg_net_bsc_codec_list()Neels Hofmeyr1-2/+2
Change-Id: I1a29fb54cdcd15c6e9b6447d929db0e9492264f7
2023-03-02add msc.vty to test 'msc' / 'codec-list' cfgNeels Hofmeyr1-0/+124
Show various weird things we allow in codec-list. Change-Id: I04ce02dff7cadab826611bd6a0df5596a40578b5
2023-03-02pick up all *.vty in EXTRA_DISTNeels Hofmeyr1-11/+1
*.vty tests are picked up by the Makefile.am by means of a wildcard -- they are run when they are there. So when you forget to add it to EXTRA_DIST, it will be run in your local build tree, but it will be silently omitted from a distribution tar, and nothing will complain about it gone missing. Instead, also use a *.vty wildcard in EXTRA_DIST. So any *.vty test added to the git source will both be run *and* included in distribution tars implicitly. Change-Id: I47c9011b5e0e2886d221e34e6aa281d1dd0495c7
2023-03-02abis_rsl: guard against over long IMMEDIATE ASSIGNMENT MessagesPhilipp Maier1-1/+9
The length parameter in rsl_imm_assign_cmd_common() may cause a buffer overflow when it is chosen larger than GSM_MACBLOCK_LEN. Lets make sure this cannot happen. Change-Id: I9417b35fb8c0517f2555e17059bf8ac60fa59791
2023-03-01examples: osmo-bsc-minimal.cfg: drop codec-listNeels Hofmeyr1-1/+0
A new VTY test is coming up that includes testing the default codec-list setting. The VTY tests are using osmo-bsc-minimal.cfg, so let's not overwrite the compile time default for codec-list. Also, there is no need to define a codec-list, so it is actually minimal to omit it. Change-Id: I01bee711f21023e2eab0688f45ff68f81afe1831
2023-03-01utils: fix incorrect string checks in meas_db_insert()Vadim Yanitskiy1-3/+3
Comparing an array to null is not useful, since the test will always evaluate as true (NO_EFFECT). Change-Id: I8a41078070119bc22d594c0dfff5d98b5d16f970 Fixes: fbead4327 utils: store more fields from meas-feed in db Fixes: CID#310821
2023-03-01pcu_sock: print OML alerts from PCUPhilipp Maier1-0/+3
The PCU is able to send OML alerts via the BTS to the BSC. When the PCU operates in co-location to the BSC we just print the alerts in the log directly Change-Id: Id32553556356c2affe32e47ae1c3ae6a514efdce Related: OS#5198
2023-03-01codec_pref: split test_codec_support_bts_rateOliver Smith1-18/+24
Move the check for the rate into an extra function, so it can be used for CSD without checking a speech codec at the same time. Related: OS#4393 Change-Id: Iea8a23ef3c66ed556110038fe9f3bc7f6eef3e96
2023-03-01bssmap_handle_ass_req_ct_speech: refactorOliver Smith1-30/+21
Move the translation from osmo_sockaddr_to_str_and_uint into bssmap_handle_ass_req_tp_rtp_addr, which will be used by bssmap_handle_ass_req_ct_data in a future patch too. Pass pointers to variables in req, instead of duplicating variables and filling it in later (like in bssmap_handle_ass_req_ct_sign). Related: OS#4393 Change-Id: I6bb16b26d89056dffa50bd8296fefe9315c587ca
2023-03-01bssmap_handle_ass_req_ct_speech: split upOliver Smith1-29/+78
Allow reusing common code in an upcoming bssmap_handle_ass_req_ct_data. It won't use _osmux for now (maybe in the future?), but splitting it out as well makes it consistent. Related: OS#4393 Change-Id: I4d9a4df314b1e56b9c1f90c9d7914332b70b56f8
2023-03-01bssmap_handle_assignm_req: split upOliver Smith1-123/+144
Prepare to implement GSM0808_CHAN_DATA without making this function even longer. Related: OS#4393 Change-Id: I8580e75e292cff1b52b6ba1bafd12c155c3bbe93
2023-02-28utils: store more fields from meas-feed in dbMichael Iedema4-56/+63
More fields need to be captured from meas-feed to perform meaningful analysis of data from multi-bts and multi-trx systems. This patch adds expands the existing db utils to record nearly all available fields from meas-feed. Change-Id: I509c939524b11a4ee455bcfc3ebee6c5c35b9fba
2023-02-28Cosmetic: codec_pref: tweak commentsOliver Smith1-12/+9
Remove "Helper function for match_codec_pref()" at the beginning of the descriptions of these functions, looks like a leftover from before this was moved to its own c file. Remove a duplicated "received" in a comment. Change-Id: I30f0744db9aebf2f05077fef840097c332b9dafd
2023-02-28Cosmetic: fix various typosOliver Smith2-2/+2
Change-Id: I9225e733e3afa8171f24253e21eaffc654f689af
2023-02-28timeslot_fsm: fix sourcecode indentingPhilipp Maier1-3/+3
Change-Id: I1cfd377cd8014e42aa45f9f0da664598ee88e02d
2023-02-28osmo_bsc_main: don't allocate talloc_ctr_ctxOliver Smith1-2/+0
tall_ctr_ctx is not defined or used in osmo-bsc and apparently was only exported by accident from libosmocore. It's not exported anymore since libosmocore.map was introduced in I13169c00a59fb59513dfc598de5a71d094492422. Fix for: /usr/bin/ld: osmo_bsc_main.o: in function `main': osmo_bsc_main.c:(.text+0x830d): undefined reference to `tall_ctr_ctx' /usr/bin/ld: osmo_bsc_main.c:(.text+0x8331): undefined reference to `tall_ctr_ctx' Change-Id: I558e1ec722f3b1ff1f2e89b3cb97ed1dba9063e3
2023-02-27Work around coverity false positives in macrosHarald Welte1-2/+2
We have some macros that may at times have signed arguments, and at other times unsigned. Checking for <= 0 is not a bug in this case. Let's typecast any unsigned arguments to signed int to work around. Change-Id: I10e60b20c6f8092cf1ce09ebe501e739fd4a9479 Closes: CID#272993, CID#272992 (and many others)
2023-02-16fsms: use configurable timers instead of T23042Oliver Smith2-4/+4
T23042 was a placeholder for timers to be filled in later. Replace it with timers that can be configured via VTY. Previous timeout for the states was 5s, from using the default of 5 for undefined timers. * ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC and HO_ST_WAIT_MGW_ENDPOINT_TO_MSC: * Runs gscon_connect_mgw_to_msc() on enter, which waits for one MGCP CRCX or MDCX response (or changes state immediately) * Use existing X9 ("Timeout for availability of MGW endpoint"), 5s, which is already being used by lchan_rtp_fsm for a similar purpose * HO_ST_WAIT_RR_HO_DETECT: * Handover initiation as described in 3GPP TS 04.08 § 3.4.4.1: "The network initiates the handover procedure by sending a HANDOVER COMMAND message to the mobile station on the main DCCH. It then starts timer T3103." * Use existing but unused timer T3103 ("Handover"), 5s * HO_ST_WAIT_RR_HO_COMPLETE: * Handover completion as described in 3GPP TS 04.08 § 3.4.4.3: "When receiving the HANDOVER COMPLETE message, the network stops timer T3103 and releases the old channels." * Continue using T3103 with keep_timer = true Closes: OS#5787 Change-Id: Id0d4d0788f609f3272fc81c80a754383dde25c16
2023-02-16ho: remove timeout for HO_ST_WAIT_LCHAN_ESTABLISHEDOliver Smith1-1/+1
Remove placeholder timer T23042. This handover fsm state waits for both RSL/RR and RTP/MGW to be complete. I've added TTCN-3 tests to ensure that both cases are covered by existing timer T3101 in lchan fsm state LCHAN_ST_WAIT_RLL_RTP_ESTABLISH, which on timeout lets the handover fail. Related: OS#5787 Related: osmo-ttcn3-hacks I30e1811f97406cff6ba794fcd6882e2bb0205087 Related: osmo-ttcn3-hacks I2f79e3ff988a4315fbef3538f02403b818fa7839 Change-Id: I53468766c3c5fad7d7e275c0f20b5c20677fe4e8
2023-02-16ho: remove timeout for HO_ST_WAIT_LCHAN_ACTIVEOliver Smith1-1/+1
Remove placeholder timer T23042. Neels wrote: > I think the right thing here is to remove this timeout; this needs > no timeout at all because we can rely on the lchan_fsm to either > return HO_EV_LCHAN_ACTIVE or HO_EV_LCHAN_ERROR after the usual > timeouts set for lchan activation. IOW since it is internal to > osmo-bsc one of the two events is guaranteed to occur. > > If we superimpose a timer on top of the lchan timeouts, configuring > larger lchan activation timeouts becomes complex, because the user > has to take care to also allow a larger timeout for the same > procedure during HO. Related: OS#5787 Change-Id: Ibf740aaa9bddc2de85cf8087ad90bab47aac12c2