Projects
osmocom:latest
osmo-bsc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
osmo-bsc.spec
Changed
@@ -18,13 +18,14 @@ Name: osmo-bsc Requires: osmocom-latest -Version: 1.9.0 +Version: 1.10.0 Release: 0 Summary: OsmoBSC: Osmocom's Base Station Controller for 2G CS mobile networks License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Hardware/Mobile URL: https://osmocom.org/projects/osmobsc -Source: osmo-bsc_1.9.0.tar.xz +Source: osmo-bsc_1.10.0.tar.xz +Source1: rpmlintrc BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2 BuildRequires: pkgconfig >= 0.20 @@ -32,15 +33,15 @@ BuildRequires: systemd-rpm-macros %endif BuildRequires: pkgconfig(libcrypto) >= 0.9.5 -BuildRequires: pkgconfig(libosmo-mgcp-client) >= 1.10.0 -BuildRequires: pkgconfig(libosmo-netif) >= 1.2.0 -BuildRequires: pkgconfig(libosmo-sigtran) >= 1.6.0 -BuildRequires: pkgconfig(libosmoabis) >= 1.3.0 -BuildRequires: pkgconfig(libosmocore) >= 1.7.0 -BuildRequires: pkgconfig(libosmoctrl) >= 1.7.0 -BuildRequires: pkgconfig(libosmogb) >= 1.7.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.7.0 -BuildRequires: pkgconfig(libosmovty) >= 1.7.0 +BuildRequires: pkgconfig(libosmo-mgcp-client) >= 1.11.0 +BuildRequires: pkgconfig(libosmo-netif) >= 1.3.0 +BuildRequires: pkgconfig(libosmo-sigtran) >= 1.7.0 +BuildRequires: pkgconfig(libosmoabis) >= 1.4.0 +BuildRequires: pkgconfig(libosmocore) >= 1.8.0 +BuildRequires: pkgconfig(libosmoctrl) >= 1.8.0 +BuildRequires: pkgconfig(libosmogb) >= 1.8.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.8.0 +BuildRequires: pkgconfig(libosmovty) >= 1.8.0 BuildRequires: pkgconfig(talloc) %{?systemd_requires} @@ -89,7 +90,7 @@ * meas_json to convert measurement feed into a JSON feed %prep -%setup -q +%setup -n osmo-bsc -q %build echo "%{version}" >.tarball-version
View file
osmo-bsc_1.9.0.dsc -> osmo-bsc_1.10.0.dsc
Changed
@@ -2,13 +2,13 @@ Source: osmo-bsc Binary: osmo-bsc, osmo-bsc-dbg, abisip-find, osmo-bsc-ipaccess-utils, osmo-bsc-bs11-utils, osmo-bsc-meas-utils, osmo-bsc-doc Architecture: any all -Version: 1.9.0 +Version: 1.10.0 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-bsc Standards-Version: 3.9.8 Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-bsc Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-bsc -Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, autoconf, automake, libtool, pkg-config, python3-minimal, libcdk5-dev, libtalloc-dev, libosmocore-dev (>= 1.7.0), libosmo-sigtran-dev (>= 1.6.0), libosmo-abis-dev (>= 1.3.0), libosmo-netif-dev (>= 1.2.0), libosmo-mgcp-client-dev (>= 1.10.0), osmo-gsm-manuals-dev (>= 1.3.0) +Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, autoconf, automake, libtool, pkg-config, python3-minimal, libcdk5-dev, libtalloc-dev, libosmocore-dev (>= 1.8.0), libosmo-sigtran-dev (>= 1.7.0), libosmo-abis-dev (>= 1.4.0), libosmo-netif-dev (>= 1.3.0), libosmo-mgcp-client-dev (>= 1.11.0), osmo-gsm-manuals-dev (>= 1.4.0) Package-List: abisip-find deb net extra arch=any osmo-bsc deb net extra arch=any @@ -18,8 +18,8 @@ osmo-bsc-ipaccess-utils deb net extra arch=any osmo-bsc-meas-utils deb net extra arch=any Checksums-Sha1: - b407bf30b4a91b442f43dec17c2b780c7ad39518 575124 osmo-bsc_1.9.0.tar.xz + 2909746d5138851e61c7effd671daa08a0c7e9aa 588396 osmo-bsc_1.10.0.tar.xz Checksums-Sha256: - 0ece7fc0f30dfa41fc6f2c28e92dc7122d35525413e753466f16b237987e25a2 575124 osmo-bsc_1.9.0.tar.xz + 3c2d1f3e67905bb9851a26b399247c6955ecfe10a9a41018d0ae2b70bb6dd46b 588396 osmo-bsc_1.10.0.tar.xz Files: - 26d1d846fd566a36723993b7bab2ba71 575124 osmo-bsc_1.9.0.tar.xz + 9fd06989074d737bd2b0afd6fe826fc1 588396 osmo-bsc_1.10.0.tar.xz
View file
osmo-bsc_1.9.0.tar.xz/.tarball-version -> osmo-bsc_1.10.0.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.9.0 \ No newline at end of file +1.10.0
View file
osmo-bsc_1.9.0.tar.xz/configure.ac -> osmo-bsc_1.10.0.tar.xz/configure.ac
Changed
@@ -36,24 +36,21 @@ fi PKG_PROG_PKG_CONFIG(0.20) -dnl checks for libraries -AC_SEARCH_LIBS(dlopen, dl dld, LIBRARY_DL="$LIBS";LIBS="") -AC_SUBST(LIBRARY_DL) - # Enable/disable ipaccess-utils (src/ipacces/)? AC_ARG_ENABLE(ipaccess-utils, AS_HELP_STRING(--enable-ipaccess-utils, Build ipaccess utils: abisip-find, ipaccess-config, ...), osmo_ac_ipa_utils="$enableval",osmo_ac_ipa_utils="yes") AM_CONDITIONAL(BUILD_IPA_UTILS, test "x$osmo_ac_ipa_utils" = "xyes") AC_SUBST(osmo_ac_ipa_utils) -PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0) -PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.7.0) -PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.7.0) -PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.7.0) -PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.3.0) -PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.2.0) -PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.6.0) -PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.10.0) +dnl checks for libraries +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0) +PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.8.0) +PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.8.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.8.0) +PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.4.0) +PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.3.0) +PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.7.0) +PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.11.0) dnl checks for header files AC_HEADER_STDC
View file
osmo-bsc_1.9.0.tar.xz/contrib/osmo-bsc.spec.in -> osmo-bsc_1.10.0.tar.xz/contrib/osmo-bsc.spec.in
Changed
@@ -17,6 +17,7 @@ %define _lto_cflags %{nil} Name: osmo-bsc +Requires: osmocom-latest Version: @VERSION@ Release: 0 Summary: OsmoBSC: Osmocom's Base Station Controller for 2G CS mobile networks @@ -31,15 +32,15 @@ BuildRequires: systemd-rpm-macros %endif BuildRequires: pkgconfig(libcrypto) >= 0.9.5 -BuildRequires: pkgconfig(libosmo-mgcp-client) >= 1.10.0 -BuildRequires: pkgconfig(libosmo-netif) >= 1.2.0 -BuildRequires: pkgconfig(libosmo-sigtran) >= 1.6.0 -BuildRequires: pkgconfig(libosmoabis) >= 1.3.0 -BuildRequires: pkgconfig(libosmocore) >= 1.7.0 -BuildRequires: pkgconfig(libosmoctrl) >= 1.7.0 -BuildRequires: pkgconfig(libosmogb) >= 1.7.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.7.0 -BuildRequires: pkgconfig(libosmovty) >= 1.7.0 +BuildRequires: pkgconfig(libosmo-mgcp-client) >= 1.11.0 +BuildRequires: pkgconfig(libosmo-netif) >= 1.3.0 +BuildRequires: pkgconfig(libosmo-sigtran) >= 1.7.0 +BuildRequires: pkgconfig(libosmoabis) >= 1.4.0 +BuildRequires: pkgconfig(libosmocore) >= 1.8.0 +BuildRequires: pkgconfig(libosmoctrl) >= 1.8.0 +BuildRequires: pkgconfig(libosmogb) >= 1.8.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.8.0 +BuildRequires: pkgconfig(libosmovty) >= 1.8.0 BuildRequires: pkgconfig(talloc) %{?systemd_requires} @@ -47,6 +48,7 @@ OsmoBSC: Osmocom's Base Station Controller for 2G circuit-switched mobile networks. %package abisip-find +Requires: osmocom-latest Summary: CLI utility to find ip.access compatible BTS License: GPL-2.0-or-later Group: Productivity/Telephony/Utilities @@ -55,6 +57,7 @@ Command line utility to find ip.access compatible BTS. %package ipaccess-utils +Requires: osmocom-latest Summary: Command line utilities for ip.access nanoBTS License: GPL-2.0-or-later Group: Productivity/Telephony/Utilities @@ -65,6 +68,7 @@ and ipaccess-proxy. %package bs11-utils +Requires: osmocom-latest Summary: Command line utilities for Siemens BS-11 BTS License: GPL-2.0-or-later Group: Productivity/Telephony/Utilities @@ -75,6 +79,7 @@ public telephone network as frequency standard for the E1 line. %package meas-utils +Requires: osmocom-latest Summary: Command line utilities for OsmoBSC's measurement reports License: GPL-2.0-or-later Group: Productivity/Telephony/Utilities
View file
osmo-bsc_1.9.0.tar.xz/contrib/systemd/osmo-bsc.service -> osmo-bsc_1.10.0.tar.xz/contrib/systemd/osmo-bsc.service
Changed
@@ -5,6 +5,8 @@ Service Type=simple Restart=always +StateDirectory=osmocom +WorkingDirectory=%S/osmocom ExecStart=/usr/bin/osmo-bsc -c /etc/osmocom/osmo-bsc.cfg -s RestartSec=2
View file
osmo-bsc_1.9.0.tar.xz/debian/changelog -> osmo-bsc_1.10.0.tar.xz/debian/changelog
Changed
@@ -1,3 +1,175 @@ +osmo-bsc (1.10.0) unstable; urgency=medium + + Vadim Yanitskiy + * fix uninitialized err pointer passed to osmo_bssap_le_dec() + * lchan_select: prepare a list of timeslots once, iterate over it + * lchan_select: allow different alloc order for assignment and handover + * lchan_select: implement dynamic selection mode for assignment + * lchan_select: fix 'chan_alloc_reverse' may be used uninitialized + * osmo-bsc/Makefile.am: fix undefined reference to symbol pow() + * .gitignore: remove non-existing files + * call osmo_timer_del() unconditionally, without osmo_timer_pending() + * configure.ac: do not require unused dlopen + * power_control: add CTRL command for sending default params + * vty: fix description of 'nokia_site bts-reset-timer' + * bts_vty: fix wrong description used for C/I threshold values + * fix bsc_vty_go_parent(): add missing case for MGW_NODE + * bsc_vty: use gsmnet_from_vty() everywhere, not vty->index + + Pau Espin Pedrol + * cbsp: Change log level ERROR->INFO on CBSP tx and link down + * smscb: Tx Failure and Restart Ind using CGI as cellID + * smscb: Tx Failure and Restart Ind for each Bcast Msg Type + * tests/ctrl: Avoid creating logfile + * doc: Fix typo in several diagrams + * Use libosmocore available API to get value_list + * split lchan specific defines and code to its own file + * lchan: Move init logic to a specific function + * cosmetic: Clean initiating whitespace + * Add Osmux support on the Abis-side data plane + * oml: Integrate signal S_NM_IPACC_SET_ATTR_ACK inside S_NM_IPACC_ACK + * vty: Allow setting LAC as hexadecimal value + * doc: Document use of Osmux in IPA Abis against OsmoBTS + * oml: Delay Tx of OPSTART(BBTRANSC) after rx of RSL CONNECT ACK + * ipaccess-config: Initiate missing IPA osmo_link + * ipaccess-config: Initialize RSL ts driver fd to proper value + * ipaccess-config: use available API to set e1inp_line_ops + * ipaccess-config: Exit program with error if OML link is dropped + * mgcp: Set up Osmux only when AMR codec is selected + * ipacces-config: override gsm_bts_check_cfg() to void checking unset bts configuration + * ipaccess: Remove unused stub + * ipaccess-config: Fix writing pcap output to fd=0 (stdin) + * Drop Osmux call setup if BTS didn't provide a remote CID + * cosmetic: vty: Fix formatting of if-else brackets + * vty: Print Osmux CID on lchans using Osmux + * cosmetic: Fix typo in comment + * Rearrange ctrl interface code + * ctrl: Introduce hopping-arfcn-{add,del} commands + * vty: 'hopping arfcn add': succeed if adding arfcn already in set + * cosmetic: Fix whitespace indentation + * vty: Fix indentation in osmux cmd during write-config output + * Introduce support for MGW-pinning per BTS + * vty: Move all MSC_NODE commands to be together + * gscon_ensure_mgw_endpoint(): Set mgw_enpoint ptr to NULL not needed + * cosmetic: Fix indentation whitespace + * cosmetic: Fix typo in comment + * cosmetic: Fix indentation whitespace + * vty: Make use of new mgcp_client_pool_config_write() API + * Update examples to use mgw pooling VTY commands + * Use new mgcp-client VTY commands under mgw node + * doc: Generalize mgwpool.adoc and move BSC-specific sections to runnning.adoc + * doc: Use mgwpool.adoc from osmo-gsm-manuals.git + * doc: running.adoc: Fix typo in MGW pinning section + * sccplite: Use mgwpool config to set up socket forwarding IPA-MGCP from MSC to MGW + * vty: Fix and deprecate typo in cmd 'amr-payload bandwith-efficient' + * paging: Avoid repeated paging req lookup on BTS receiving paging resp + * paging: Get rid of unneeded count returned + * paging: Store list of gsm_paging_request in bsc_subscr + * paging: Use bsub->active_paging_requests to allow early loop termination adding paging_req + * lcs: Fix passing NULL bsc_subscr to paging_request_cancel() + * paging: Use bsub->active_paging_requests to optimize cancelling based on reason + * paging: Rename stat t3113 -> paging:t3113 + * paging: Introduce BTS stat paging:request_queue_length + * paging: Introduce BTS stat paging:available_slots + * paging: constify bts param in some functions + * subscriber: constify bsub func param + * subscriber: Add comment documenting struct type hold in list + * paging: Fix regression stopping active requests on unanswered BTS + * paging: paging: Drop unneeded extra param in paging_remove_request() + * vty: Fix lost 'no timer-dynamic T3113' config when writing current config + * paging: Introduce VTY configurable X3113 (Maximum Paging Request Transmit Delay Threshold) + * paging: Fix wrong count of reqs_before if queue only contains retransmissions + * paging: Split paging queue into 2 queues: initial and retrans + * paging: Replace reqs waiting for retransmission with new incoming inital req if queue is full + * paging: Optimize retrieving number of request per paging group + * vty: Write amount of timeouts elapsed for a paging request + * bsc: Fix crash if PagingResponse with invalid MobileIdentity is received + * bsc_subscriber: Allow creating subscribers identified by IMEI + * bsc_compl_l3(): Update documentation regarding no bsc_subscr in conn + + Philipp Maier + * bsc_subscr_conn_fsm: fix use after free + * abis_om2000: fix missing signal + * signal.h: make om2k mo const + * abis_om2000: move switch-case to function + * abis_om2000: constify mo in mo2obj + * abis_om2000: update_op_state() does not send signal + * abis_om2000: om2k_trx_s_done_onenter() does not send signal + * abis_om2000: duplicate nmstate of bb_trxc mo to trx mo + * bts_trx_vty: prefix bb_trxc mo with Virtual for ericsson BTS + * pcu_sock: fix memleak + * pcu_sock: check size of primitive + * pcu_sock: add some guard space to message buffer + * abis_rsl: delete CHAN RQD from queue when rach ind was sent + * abis_rsl: be more clear about vendor specif RSL extension + * pcuif_proto: cosmetic: add constant PCU_IF_NUM_NSVC and replace magic numbers + * pcuif_proto: use define constant to specify nax number of trx + * abis_rsl: add spec ref for frame number calculation + * abis_rsl: show full request reference in log + * abis_rsl: when doing packet access, log t1,t3,t2 and fn + * pcu_sock: drop unused function prototype + * pcu_sock: drop unused variable pcu_direct + * abis_rsl: fix frame number calculation + * abis_rsl: fix sourcecode formatting + * pcu_sock: guard against too many TRX + * pcu_sock: move code that fills in trx info to helper function + * pcu_sock: check trx mo state + * pcu_sock: fix sourcecode formatting + * pcu_sock: clean up logging in info_ind_fill_trx + * abis_om2000: send TS_EV_OML_READY when TRX is fully done + * pcu_sock: rework check logic for ts + * timeslot_fsm: Warn in case Ercisson RBS uses static PDCH + * pcuif_proto: add indication to communicate E1 parameters + * pcu_sock: fix endianess when populating gsm_pcu_if_info_ind + * pcu_sock: Also fill in BSIC in gsm_pcu_if_info_ind + * pcu_sock: remove unecessary OSMO_ASSERT()s + * pcu_sock: rework log output + * timeslot_fsm: remove duplicate TS_ST_BORKEN from out_state_mask + * pcuif_proto: move gsm_pcu_if_e1_ccu_ind into right place + + Harald Welte + * bts_nokia_site: Implement channel config for CBCH + * Support building with -Werror=strict-prototypes / -Werror=old-style-definition + * update very outdated vty copyright statement + + Max + * BSSMAP: add assert to reset resending + * Set working directory in systemd service file + * ctrl: take both address and port from vty config + * SI: use defined constant instead of magic number + * SI: set type 10 length properly + * HO: use defined constant instead of magic number + + Neels Hofmeyr + * gscon_pre_term: properly clear mgw ep + * fix Speech Codec cfg in BSSMAP Assignment Complete + * doc: add mscpool-attach.dot + + Oliver Smith + * tests: add test_meas_rep_multi_band.ho_vty + * gsm48_parse_meas_rep: fix parsing multi-band list + * Cosmetic: fix desc of neighbor_ident_add_neighbor + * Cosmetic: lchan_fsm: drop obsolete comment + * lchan_fsm: fix lchan_fsm_on_error size + * Cosmetic: fix spaces around timers + + Alexander Couzens + * bts_ipaccess_nanobts: remove unused assignment + * gsm_data.h: replace white spaces with tabs + * Add BTS setup ramping to prevent BSC overloading + * nm_rcarrier_fsm: fix indention of ENABLED state + * bts: ipa/osmo-bts/sysmobts: MO: add support for the second NSVC + + arehbein + * osmo-bsc: Transition to use of 'telnet_init_default' + * vty: Add support for Ny1 configuration + * vty: Add check against sensible default value for Ny1 + * osmo-bsc: Log error regarding BTS number explicitly + * osmo-bsc: Fix 'apply-config-file' CTRL command + * bsc_ctrl_commands: Add GET for bts neighbor-list (local bts numbers) + + -- Pau Espin Pedrol <pespin@sysmocom.de> Tue, 07 Feb 2023 17:21:10 +0100 + osmo-bsc (1.9.0) unstable; urgency=medium Philipp Maier
View file
osmo-bsc_1.9.0.tar.xz/debian/control -> osmo-bsc_1.10.0.tar.xz/debian/control
Changed
@@ -12,12 +12,12 @@ python3-minimal, libcdk5-dev, libtalloc-dev, - libosmocore-dev (>= 1.7.0), - libosmo-sigtran-dev (>= 1.6.0), - libosmo-abis-dev (>= 1.3.0), - libosmo-netif-dev (>= 1.2.0), - libosmo-mgcp-client-dev (>= 1.10.0), - osmo-gsm-manuals-dev (>= 1.3.0) + libosmocore-dev (>= 1.8.0), + libosmo-sigtran-dev (>= 1.7.0), + libosmo-abis-dev (>= 1.4.0), + libosmo-netif-dev (>= 1.3.0), + libosmo-mgcp-client-dev (>= 1.11.0), + osmo-gsm-manuals-dev (>= 1.4.0) Standards-Version: 3.9.8 Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-bsc Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-bsc
View file
osmo-bsc_1.9.0.tar.xz/doc/Makefile.am -> osmo-bsc_1.10.0.tar.xz/doc/Makefile.am
Changed
@@ -26,6 +26,7 @@ $(builddir)/handover-intra-bsc-fsm.png \ $(builddir)/handover-inter-bsc-out-fsm.png \ $(builddir)/handover-inter-bsc-in-fsm.png \ + $(builddir)/mscpool-attach.png \ $(NULL) $(builddir)/%.png: $(srcdir)/%.msc
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus01-4trx.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus01-4trx.cfg
Changed
@@ -33,13 +33,13 @@ band GSM900 om2000 version-limit oml gen 12 rev 10 cell_identity 0 - location_area_code 1 + location_area_code 0x0001 training_sequence_code 7 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 - channel allocator descending + channel allocator mode set-all descending rach tx integer 9 rach max transmission 7 oml e1 line 0 timeslot 1 sub-slot full
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus02-4trx.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus02-4trx.cfg
Changed
@@ -33,13 +33,13 @@ band GSM900 om2000 version-limit oml gen 12 rev 10 cell_identity 0 - location_area_code 1 + location_area_code 0x0001 training_sequence_code 7 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 - channel allocator descending + channel allocator mode set-all descending rach tx integer 9 rach max transmission 7 oml e1 line 0 timeslot 1 sub-slot full
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus02-8trx.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus02-8trx.cfg
Changed
@@ -33,13 +33,13 @@ band GSM900 om2000 version-limit oml gen 12 rev 10 cell_identity 0 - location_area_code 1 + location_area_code 0x0001 training_sequence_code 7 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 - channel allocator descending + channel allocator mode set-all descending rach tx integer 9 rach max transmission 7 oml e1 line 0 timeslot 1 sub-slot full
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/ericsson/osmo-bsc.rbs2308.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/ericsson/osmo-bsc.rbs2308.cfg
Changed
@@ -39,13 +39,13 @@ type rbs2000 band PCS1900 cell_identity 0 - location_area_code 1 + location_area_code 0x0001 training_sequence_code 7 base_station_id_code 63 ms max power 33 cell reselection hysteresis 4 rxlev access min 0 - channel allocator descending + channel allocator mode set-all descending rach tx integer 9 rach max transmission 7 oml e1 line 0 timeslot 1 sub-slot full
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/nokia/osmo-bsc.insite.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/nokia/osmo-bsc.insite.cfg
Changed
@@ -27,7 +27,7 @@ type nokia_site band GSM1900 cell_identity 1 - location_area_code 1 + location_area_code 0x0001 base_station_id_code 63 training_sequence_code 7
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg
Changed
@@ -7,17 +7,21 @@ encryption a5 0 neci 1 paging any use tch 0 + mgw 0 + remote-ip 127.0.0.1 + remote-port 2427 + local-port 2727 bts 0 type osmo-bts band DCS1800 cell_identity 6969 - location_area_code 1 + location_area_code 0x0001 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 radio-link-timeout 32 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 channel-description attach 1 @@ -154,8 +158,5 @@ hopping enabled 0 msc 0 allow-emergency allow - mgw remote-ip 127.0.0.1 - mgw remote-port 2427 - mgw local-port 2727 bsc mid-call-timeout 0
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
Changed
@@ -4,7 +4,7 @@ bts 0 type osmo-bts band GSM-1800 - location_area_code 23 + location_area_code 0x0017 ipa unit-id 1800 0 trx 0 rf_locked 0
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/osmo-bsc.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/osmo-bsc.cfg
Changed
@@ -19,17 +19,21 @@ handover1 maximum distance 9999 ! T3212 is in units of 6min, so below we set 5 * 6 = 30min timer net T3212 5 + mgw 0 + remote-ip 127.0.0.1 + remote-port 2427 + local-port 2727 bts 0 type osmo-bts band DCS1800 cell_identity 6969 - location_area_code 1 + location_area_code 0x0001 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 radio-link-timeout 32 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 channel-description attach 1 @@ -81,8 +85,5 @@ amr-config 5_90k allowed amr-config 5_15k forbidden amr-config 4_75k forbidden - mgw remote-ip 127.0.0.1 - mgw remote-port 2427 - mgw local-port 2727 bsc mid-call-timeout 0
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
Changed
@@ -22,13 +22,13 @@ type osmo-bts band DCS1800 cell_identity 0 - location_area_code 1 + location_area_code 0x0001 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 radio-link-timeout 32 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 channel-description attach 1
View file
osmo-bsc_1.9.0.tar.xz/doc/examples/osmo-bsc/siemens/osmo-bsc.bs11.cfg -> osmo-bsc_1.10.0.tar.xz/doc/examples/osmo-bsc/siemens/osmo-bsc.bs11.cfg
Changed
@@ -39,7 +39,7 @@ type bs11 band GSM900 cell_identity 1 - location_area_code 1 + location_area_code 0x0001 training_sequence_code 7 base_station_id_code 63 oml e1 line 2 timeslot 1 sub-slot full
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/bts-examples.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/chapters/bts-examples.adoc
Changed
@@ -26,13 +26,13 @@ type nanobts <2> band DCS1800 <3> cell_identity 0 - location_area_code 1 + location_area_code 0x0001 training_sequence_code 7 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 ipa unit-id 1801 0 <4> @@ -104,13 +104,13 @@ type nanobts band DCS1800 cell_identity 0 - location_area_code 1 + location_area_code 0x0001 training_sequence_code 7 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 ipa unit-id 1800 0 <1> @@ -197,13 +197,13 @@ band GSM900 om2000 version-limit oml gen 12 rev 10 <2> cell_identity 0 - location_area_code 1 + location_area_code 0x0001 training_sequence_code 7 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 oml e1 line 0 timeslot 1 sub-slot full <3>
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/bts.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/chapters/bts.adoc
Changed
@@ -108,7 +108,7 @@ type osmo-bts band DCS1800 description The new BTS in Baikonur - location_area_code 2342 + location_area_code 0x0926 cell_identity 5 base_station_id_code 63 ip.access unit_id 8888 0
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/chan_alloc.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/chapters/chan_alloc.adoc
Changed
@@ -19,19 +19,24 @@ ---- network bts 0 - channel allocator ascending + channel allocator mode chan-req ascending + channel allocator mode assignment ascending + channel allocator mode handover ascending channel allocator avoid-interference 0 channel allocator tch-signalling-policy always ---- ==== Channel allocation modes -Currently only the following two simple channel allocation modes are supported: +Currently the following channel allocation modes are supported: - ascending (default): allocates channels in ascending order, starting from timeslot 0 of the first TRX (also called C0, the BCCH carrier); - descending: allocates channels in descending order, -starting from timeslot 7 of the last TRX. +starting from timeslot 7 of the last TRX; +- dynamic (only for assignment): dynamically choose between ascending +and descending order depending on some additional parameters +(see <<chan_alloc_dyn_mode>>). NOTE: Regardless of the chosen mode, logical channels (sub-slots) are always selected in ascending order. For example, if a timeslot is configured as SDCCH/8 @@ -41,11 +46,82 @@ The allocation mode to be used can be configured using the following VTY command: ---- -OsmoBSC(config-net-bts)# channel allocator ? - ascending Allocate Timeslots and Transceivers in ascending order - descending Allocate Timeslots and Transceivers in descending order +OsmoBSC(config-net-bts)# channel allocator mode ? <1> + set-all Set a single mode for all variants + chan-req Channel allocation for CHANNEL REQUEST (RACH) + assignment Channel allocation for assignment + handover Channel allocation for handover + +OsmoBSC(config-net-bts)# channel allocator mode set-all ? <2> + ascending Allocate Timeslots and Transceivers in ascending order + descending Allocate Timeslots and Transceivers in descending order + +OsmoBSC(config-net-bts)# channel allocator mode assignment ? <3> + ascending Allocate Timeslots and Transceivers in ascending order + descending Allocate Timeslots and Transceivers in descending order + dynamic Dynamic lchan selection based on configured parameters <3> +---- +<1> It's optionally possible to configure different allocation modes for +different allocation causes, e.g. `ascending` for `chan-req` and `descending` +for both `assignment` and `handover`. +<2> `set-all` is equivalent to the old (deprecated) command syntax: +`channel allocator (ascending|descending)`. +<3> The `dynamic` mode can be selected only for `assignment`. + +chan_alloc_dyn_mode +===== Dynamic channel allocation mode + +There exists an additional channel allocation mode, which can be employed +during a TCH channel allocation for assignment. This mode selects between +ascending and descending order depending on pre-configured parameters: + +- Uplink RxLev threshold and number of samples for averaging, +- C0 (BCCH carrier) channel load threshold. + +This is useful in setups where Tx power of the RF carriers cannot be adjusted +dynamically at run-time and thus no BS Power Control can be performed. In +such setups the BCCH carrier is transmitting at relatively higher power than +the other RF carriers. The key idea is to allocate channels in a smarter way, +so that UEs with poor signal would get channels on carriers with high Tx power, +while UEs with good signal could use carriers with lower Tx power. + +The configuration parameters for dynamic selection are listed below: + +---- +OsmoBSC(config-net-bts)# channel allocator dynamic-param ? + sort-by-trx-power Whether to sort TRX instances by their respective power levels + ul-rxlev Uplink RxLev + c0-chan-load C0 (BCCH carrier) channel load + +channel allocator dynamic-param sort-by-trx-power ? + 0 Do not sort, use the same order as in the configuration file + 1 Sort TRX instances by their power levels in descending order + +OsmoBSC(config-net-bts)# channel allocator dynamic-param ul-rxlev thresh ? + <0-63> Uplink RxLev threshold +OsmoBSC(config-net-bts)# channel allocator dynamic-param ul-rxlev thresh 50 avg-num ? + <1-10> Minimum number of RxLev samples for averaging +OsmoBSC(config-net-bts)# channel allocator dynamic-param c0-chan-load thresh ? + <0-100> Channel load threshold (in %) ---- +The default values are: + +---- +network + bts 0 + channel allocator dynamic-param sort-by-trx-power 0 <1> + channel allocator dynamic-param ul-rxlev thresh 50 avg-num 2 <2> + channel allocator dynamic-param c0-chan-load thresh 60 <3> +---- +<1> Assume that RF carriers are listed in descending order sorted by Tx power. +<2> Use descending order if AVG of at least two Uplink RxLev samples >= 50 (-60 dBm). +<3> Use descending order if more than 60% logical channels of C0 are occupied. + +NOTE: The final ascending/descending order decision is based on the two conditions. +The descending order will be used only if *both conditions are met*, otherwise the +allocator will use ascending order. + ==== Interference aware channel allocation The channel allocator can be configured to prefer logical channels with least @@ -59,10 +135,11 @@ 1 In channel allocation, prefer lchans with less interference. ---- -NOTE: Interference levels are compared within the scope of a single TRX, which -is selected with respect to the configured allocation mode. This means that -the selection logic would ignore channels on the other TRXes, even if they -are better according to the interference reports from the BTS. +NOTE: Interference levels are compared within the scope of the whole BTS. This +means that the selection logic may pick channels on the other TRXes, if they are +better according to the interference reports from the BTS. This feature makes +the allocation order non-deterministic and therefore nullifies the meaning of +channel allocation modes described above. ==== TCH sigalling policy
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/control.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/chapters/control.adoc
Changed
@@ -33,6 +33,7 @@ |bts.N.cell-identity|RW|No|"<id>"|Set/Get Cell Identity (value between (0, 65535)). |bts.N.apply-configuration|WO|No|Ignored|Restart BTS via OML. |bts.N.send-new-system-informations|WO|No|Ignored|Regenerate and resend System Information messages for given BTS. +|bts.N.send-power-control-defaults|WO|No|Ignored|Resend default power control parameters for given BTS. |bts.N.channel-load|RO|No|"<name>,<used>,<total>"|See <<chanlo>> for details. |bts.N.oml-connection-state|RO|No|"connected", "disconnected", "degraded"|Indicate the status of OML connection of BTS. |bts.N.oml-uptime|RO|No|<uptime>|Return OML link uptime in seconds.
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/handover.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/chapters/handover.adoc
Changed
@@ -223,15 +223,15 @@ network bts 0 - # this cell's LAC=23 CI=5 - location_area_code 23 + # this cell's LAC=0x0017 CI=5 + location_area_code 0x0017 cell_identity 5 # reference bts 1 neighbor lac-ci 23 6 bts 1 - # this cell's LAC=23 CI=6 - location_area_code 23 + # this cell's LAC=0x0017 CI=6 + location_area_code 0x0017 cell_identity 6 # reference bts 0 neighbor lac-ci 23 5 @@ -252,8 +252,8 @@ network bts 0 - # this cell's LAC=23 CI=5 - location_area_code 23 + # this cell's LAC=0x0017 CI=5 + location_area_code 0x0017 cell_identity 5 # this cell's ARFCN=1 BSIC=1 trx 0 @@ -263,8 +263,8 @@ neighbor lac-ci 23 6 arfcn 2 bsic 2 bts 1 - # LAC=23 CI=6 - location_area_code 23 + # LAC=0x0017 CI=6 + location_area_code 0x0017 cell_identity 6 # this cell's ARFCN=2 BSIC=2 trx 0 @@ -286,8 +286,8 @@ # BSC Alpha's osmo-bsc.cfg network bts 0 - # this cell's LAC=23 CI=6 - location_area_code 23 + # this cell's LAC=0x0017 CI=6 + location_area_code 0x0017 cell_identity 6 # this cell's ARFCN=2 BSIC=2 trx 0 @@ -299,8 +299,8 @@ # BSC Beta's osmo-bsc.cfg network bts 0 - # this cell's LAC=42 CI=3 - location_area_code 42 + # this cell's LAC=0x002A CI=3 + location_area_code 0x002A cell_identity 3 # this cell's ARFCN=1 BSIC=3 trx 0
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/osmux_bsc.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/chapters/osmux_bsc.adoc
Changed
@@ -14,14 +14,14 @@ ==== {program-name} in a 3GPP AoIP network setup Osmux usage in {program-name} in managed through the VTY command `osmux -(on|off|only)`. Once enabled (`on` or `only`), {program-name} will start -appending the vendor specific _Osmux Support_ IE in _BSSMAP RESET_ and _BSSMAP -RESET-ACK_ message towards the MSC in order to announce it supports Osmux. This -way, the MSC can decide whether to use Osmux or not based on this information -when setting up a call (this time using _Osmux CID_ IE). It should be noted that -this option should not be enabled unless MSC managing {program-name} supports -handling this extension IE (like OsmoMSC), a 3rd-party MSC might otherwise -refuse the related _RESET_/_RESET-ACK_ messages. +(on|off|only)` under the `msc` node. Once enabled (`on` or `only`), +{program-name} will start appending the vendor specific _Osmux Support_ IE in +_BSSMAP RESET_ and _BSSMAP RESET-ACK_ message towards the MSC in order to +announce it supports Osmux. This way, the MSC can decide whether to use Osmux or +not based on this information when setting up a call (this time using _Osmux +CID_ IE). It should be noted that this option should not be enabled unless MSC +managing {program-name} supports handling this extension IE (like OsmoMSC), a +3rd-party MSC might otherwise refuse the related _RESET_/_RESET-ACK_ messages. {program-name} will behave differently during call set up based on the VTY command presented above: @@ -41,3 +41,42 @@ calls on the CN-side, this is, if _BSSMAP Assign Request_ from MSC doesn't contain an _Osmux CID_ IE, it will reject the assignment and the call set up will fail. + +==== Osmux in the ip.access Abis interface + +{program-name} can also talk Osmux instead of RTP to an OsmoBTS which supports +the feature. Osmux usage agains the BTS in {program-name} in managed through the +VTY command `osmux (on|off|only)` under the `bts` node. + +If a BTS supports Osmux, it may announce the _OSMUX_ BTS feature towards the BSC +over OML. This way, the {program-name} becomes aware that this BTS supports +using Osmux to transfer voice call user data when the AMR codec is selected. + +It is then up to {program-name} to decide whether to use Osmux or not when +establishing a new call. If {program-name} decides to use Osmux for a given +call, it will instruct its co-located MGW to set up an Osmux connection in the +endpoint (using the `X-Osmux extension`) and then it will forward the received +Osmux CID to the BTS in the the _IPACC CRCX/MDCX_ messages by means of an extra _Osmux +CID_ IE appended to it. +The IP address and port provided in the same messages refer to the +address and port where Osmux frames with the provided CID are expected to be +received. Similarly, the BTS appends an _Osmux CID_ IE to the _IPACC +CRCX/MDCX ACK_ message it generates, this time with its own local Osmux CID, +which {program-name} will in turn forward back to the co-located MGW. +Same goes for the BTS' local IP address and port where Osmux frames are expected +to be received. + +{program-name} will behave differently during call set up based on the VTY +command `use (on|off|only)` under each `bts` node presented above: + +* `off`: {program-name} will never attempt use of Osmux against this BTS (default). +* `on`: {program-name} will use Osmux against the BTS if the BTS announced Osmux + support during OML bringup, and if MGW provided a valid Osmux CID during _MGCP + CRCX_. Otherwise BSC will simply automatically fall back to using RTP for each + call. For non-AMR calls, RTP will always be used. +* `only`: Same as per `on`, except that {program-name} will accept only Osmux + calls on the BTS-side. This is, if _MGCP CRCX ACK_ from MGW doesn't + contain an _Osmux CID_ IE or _IPACC CRCX ACK_ from BSC doesn't + contain an _Osmux CID_ IE, it will reject the assignment and the call set up + will fail. This means also that only AMR calls (`Channel Mode GSM3`) are + allowed.
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/power_control.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/chapters/power_control.adoc
Changed
@@ -53,13 +53,24 @@ link re-establishment and thus interrupting the service. The following command triggers resending of both MS/BS power control parameters: +.Example: Resending default power control parameters via the VTY ---- # Resending from the 'enable' node: -OsmoBSC# bts 0 resend-power-control-defaults +OsmoBSC# bts 0 <1> resend-power-control-defaults # Resending from any configuration node (note prefix 'do'): -OsmoBSC(config-ms-power-ctrl)# do bts 0 resend-power-control-defaults +OsmoBSC(config-ms-power-ctrl)# do bts 0 <1> resend-power-control-defaults ---- +<1> BTS number for which to resend default power control parameters. + +.Example: Resending default power control parameters via the CTRL +---- +$ osmo_ctrl.py \ + --host 127.0.0.1 <1> -p 4249 \ + --set "bts.0.send-power-control-defaults" 1 <2> +---- +<1> Remote address of the host running osmo-bsc (localhost in this example). +<2> An arbitrary dummy value (ignored). Required because SET command is used. NOTE: The above statement mostly applies to parameters for dynamic power control mode (see below). Switching between power control modes, as well as changing
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/running.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/chapters/running.adoc
Changed
@@ -134,18 +134,78 @@ Here is an example configuration for a remote MGW: ---- -msc 0 - mgw remote-ip 10.9.8.7 - mgw remote-port 2427 - mgw reset-endpoint rtpbridge/* <1> +network + mgw 0 + remote-ip 10.9.8.7 + remote-port 2427 + reset-endpoint rtpbridge/* <1> ---- <1> The 'reset-endpoint' setting instructs the OsmoBSC to send a wildcarded DLCX to the media gateway. This helps to clear lingering calls from the media gateway when the OsmoBSC is restarted. -NOTE: OsmoBSC is also able to handle a pool of media gateways for load -distribution. See also <<mgw_pooling>>. +OsmoBSC is also able to handle a pool of media gateways for load +distribution since mid 2021. See also <<mgw_pooling>>. +NOTE +==== +Previous versions of OsmoBSC didn't have the 'mgw' VTY node and +hence didn't support the MGW pooling feature. Therefore, historically the MGW +related commands where placed under the `msc` VTY node. The MGW related commands +under the `msc` VTY are still parsed and used but its use is deprecated and +hence discouraged in favour of the new `mgw` node. Writing the config to a file +from within OsmoBSC will automatically convert the config to use the new `mgw` +node. +==== + +===== Pinning a BTS to a specific MGW + +It is sometimes desirable to assign a specific MGW to a given BTS, so that all +calls where the BTS is involved use the assigned MGW with a higher precedence if +possible. + +This is specially important if the BTS is configured to serve calls using Osmux +instead of RTP. Osmux features trunking optimizations, which allow transmission +of audio payload from different concurrent calls inside the same underlaying UDP +packet, hence reducing the total required throughput and saving costs on the +required link. + +In order for Osmux trunking optimization to work, the source and destination IP +address of uderlaying UDP packet must be of course the same for all the calls +involved. That essentially boils down to having all the concurrent calls of the +BTS be connected to the same MGW so that they can be trunked over the same UDP +connection. + +The pinning to a specific MGW can be configured per BTS, and hence it is +configured under the `bts` VTY node: + +---- +OsmoBSC> enable +OsmoBSC# configure terminal +OsmoBSC(config)# network +OsmoBSC(config-net)# bts 1 +OsmoBSC(config-bts)# mgw pool-target 1 <1> +OsmoBSC(config-bts)# exit +OsmoBSC(config-net)# bts 2 +OsmoBSC(config-mgw)# mgw pool-target 7 strict <2> +OsmoBSC(config-net)# bts 3 +OsmoBSC(config-mgw)# no mgw pool-target <3> +---- + +<1> Pin BTS1 to prefer MGW1 (node `mgw 1`). If MGW1 is not configured, +administrateivly blocked or not connected at the time a new call is to be +established, then another MGW from the pool is selected following the usual +procedures. This allows applying pinning in the usual scenario while still +keeping call service ongoing against another MGW if the preferred MGW is not +available at a given time. + +<2> Pin BTS2 to prefer MGW7 (node `mgw 7`). If MGW7 is not configured, +administrateivly blocked or not connected at the time a new call is to be +established, then the MGW assignment will fail and ultimately the call will be +terminated during establishment. + +<3> Apply no pinning at all (default). The MGW with the lowest load is the one +being selected for each new call. ==== Configure Lb to connect to an SMLC
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/message-sequences/mo_call-abis_a.msc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/message-sequences/mo_call-abis_a.msc
Changed
@@ -85,8 +85,8 @@ ...; --- label="BSC finally can report successful TCH assignment"; - bsc -> m_sc label="SCCP DT1 (BSSMAP ASSGN CMPL (3GPP AoIP MGW:3000))"; - m_sc box m_sc label="Connect remote RTP to MGW addr from ASSGN CMPL"; + bsc -> m_sc label="SCCP DT1 (BSSMAP ASSIGN CMPL (3GPP AoIP MGW:3000))"; + m_sc box m_sc label="Connect remote RTP to MGW addr from ASSIGN CMPL"; ...; mgw <-> m_sc label="RTP Audio MGW:3000 MSC:4000", textcolor="blue", linecolor="blue";
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/mgw/classic-bsc.msc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/mgw/classic-bsc.msc
Changed
@@ -10,13 +10,13 @@ ms -> m_sc label="DTAP CC SETUP"; ms <- m_sc label="DTAP CC CALL PROCEEDING"; - bsc <- m_sc label="BSSAP ASSGN REQ"; + bsc <- m_sc label="BSSAP ASSIGN REQ"; bsc box m_sc label="E1 TS for PCM specified by CIC"; bts <- bsc label="RSL CHAN ACT"; bts -> bsc label="RSL CHAN ACT ACK"; bts box bsc label="E1 TS + 16k sub-slot configured for given lchan"; ms <-> bsc label="Assignment"; - bsc -> m_sc label="BSSAP ASSGN CMPL"; + bsc -> m_sc label="BSSAP ASSIGN CMPL"; ...; trau <- m_sc label="PCM Audio in full E1 slot";
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/mgw/osmo-bsc-new-mgw-e1.msc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/mgw/osmo-bsc-new-mgw-e1.msc
Changed
@@ -11,7 +11,7 @@ ms <- m_sc label="DTAP CC CALL PROCEEDING"; m_sc box m_sc label="Bind arbitrary local port (4000)"; - bsc <- m_sc label="BSSAP ASSGN REQ (3GPP AoIP MSC:4000)"; + bsc <- m_sc label="BSSAP ASSIGN REQ (3GPP AoIP MSC:4000)"; bts <- bsc label="RSL CHAN ACT"; bts -> bsc label="RSL CHAN ACT ACK"; ms <-> bsc label="Assignment"; @@ -22,8 +22,8 @@ mgcp -> bsc label="MGCP CRCX ts1/ss2@mgw OK (MGW:3000)"; ...; - bsc -> m_sc label="BSSAP ASSGN CMPL (3GPP AoIP MGW:3000)"; - m_sc box m_sc label="Connect remote RTP to MGW addr from ASSGN CMPL"; + bsc -> m_sc label="BSSAP ASSIGN CMPL (3GPP AoIP MGW:3000)"; + m_sc box m_sc label="Connect remote RTP to MGW addr from ASSIGN CMPL"; ...; mgcp <=> m_sc label="RTP Audio MGW:3000 MSC:4000";
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/mgw/osmo-bsc-new-mgw.msc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/mgw/osmo-bsc-new-mgw.msc
Changed
@@ -10,7 +10,7 @@ ms <- m_sc label="DTAP CC CALL PROCEEDING"; m_sc box m_sc label="Bind arbitrary local port (4000)"; - bsc <- m_sc label="BSSAP ASSGN REQ (3GPP AoIP MSC:4000)"; + bsc <- m_sc label="BSSAP ASSIGN REQ (3GPP AoIP MSC:4000)"; bts <- bsc label="RSL CHAN ACT"; bts -> bsc label="RSL CHAN ACT ACK"; ms <-> bsc label="Assignment"; @@ -35,8 +35,8 @@ mgcp -> bsc label="MGCP CRCX rtpbridge/2@mgw OK (MGW:3000)"; ...; - bsc -> m_sc label="BSSAP ASSGN CMPL (3GPP AoIP MGW:3000)"; - m_sc box m_sc label="Connect remote RTP to MGW addr from ASSGN CMPL"; + bsc -> m_sc label="BSSAP ASSIGN CMPL (3GPP AoIP MGW:3000)"; + m_sc box m_sc label="Connect remote RTP to MGW addr from ASSIGN CMPL"; ...; mgcp <=> m_sc label="RTP Audio MGW:3000 MSC:4000";
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/mgw/osmo-bsc-old-sccplite.msc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/mgw/osmo-bsc-old-sccplite.msc
Changed
@@ -10,11 +10,11 @@ ms -> m_sc label="DTAP CC SETUP"; ms <- m_sc label="DTAP CC CALL PROCEEDING"; - bsc <- m_sc label="BSSAP ASSGN REQ"; + bsc <- m_sc label="BSSAP ASSIGN REQ"; bts <- bsc label="RSL CHAN ACT"; bts -> bsc label="RSL CHAN ACT ACK"; ms <-> bsc label="Assignment"; - bsc -> m_sc label="BSSAP ASSGN CMPL"; + bsc -> m_sc label="BSSAP ASSIGN CMPL"; ...; bts <- bsc label="IPA CRCX";
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/osmobsc-usermanual.adoc -> osmo-bsc_1.10.0.tar.xz/doc/manuals/osmobsc-usermanual.adoc
Changed
@@ -36,7 +36,7 @@ include::{srcdir}/chapters/mscpool.adoc -include::{srcdir}/chapters/mgwpool.adoc +include::./common/chapters/mgwpool.adoc include::{srcdir}/chapters/smlc.adoc
View file
osmo-bsc_1.10.0.tar.xz/doc/mscpool-attach.dot
Added
@@ -0,0 +1,30 @@ +digraph G { + rankdir=LR + labelloc=t; label="OsmoBSC MSC-pool conn (re)direction" + + subgraph cluster_msc_usable { + style=dotted; label="MSC usable\n(successful BSSMAP RESET)" + + allowed label="MSC\nallow-attach" + notallowed label="MSC\nno allow-attach\n(MSC should respond\nwith null-NRI)" + } + + subgraph cluster_msc_unusable { + style=dotted; label="MSC unusable\n(no link)" + allowed_unusable label="MSC\nallow-attach" + notallowed_unusable label="MSC\nno allow-attach" + } + + TMSI_unknown_NRI label="TMSI, NRI unknown" + TMSI_null_NRI label="TMSI, null-NRI" + TMSI_known_NRI label="TMSI, NRI known" + + IMSI -> allowed + TMSI_unknown_NRI -> allowed + TMSI_null_NRI -> allowed + TMSI_known_NRI -> allowed + TMSI_known_NRI -> notallowed + + never style=dotted + never -> {allowed_unusable, notallowed_unusable} style=dotted +}
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/Makefile.am -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/Makefile.am
Changed
@@ -13,6 +13,7 @@ bss.h \ bts.h \ bts_sm.h \ + bts_setup_ramp.h \ bts_trx.h \ bts_ipaccess_nanobts_omlattr.h \ chan_alloc.h \ @@ -32,6 +33,7 @@ handover_vty.h \ ipaccess.h \ lb.h \ + lchan.h \ lchan_fsm.h \ lchan_rtp_fsm.h \ lchan_select.h \
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/assignment_fsm.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/assignment_fsm.h
Changed
@@ -4,6 +4,7 @@ #include <osmocom/gsm/protocol/gsm_04_08.h> #include <osmocom/bsc/debug.h> +#include <osmocom/bsc/lchan.h> /* This macro automatically includes a final \n, if omitted. */ #define LOG_ASSIGNMENT(conn, level, fmt, args...) do { \ @@ -39,7 +40,7 @@ ASSIGNMENT_EV_CONN_RELEASING, }; -void assignment_fsm_init(); +void assignment_fsm_init(void); int reassignment_request_to_lchan(enum assign_for assign_for, struct gsm_lchan *lchan, struct gsm_lchan *to_lchan, int tsc_set, int tsc);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/bsc_stats.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/bsc_stats.h
Changed
@@ -113,4 +113,4 @@ void bsc_update_connection_stats(struct gsm_network *net); void all_allocated_update_bts(struct gsm_bts *bts); -void all_allocated_update_bsc(); +void all_allocated_update_bsc(void);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/bsc_subscr_conn_fsm.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/bsc_subscr_conn_fsm.h
Changed
@@ -57,7 +57,7 @@ struct assignment_request; struct gsm_lchan; -void bsc_subscr_conn_fsm_init(); +void bsc_subscr_conn_fsm_init(void); /* Allocate a subscriber connection and its associated FSM */ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_network *net);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/bsc_subscriber.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/bsc_subscriber.h
Changed
@@ -10,15 +10,19 @@ #include <osmocom/gsm/gsm48.h> struct log_target; +struct gsm_bts; struct bsc_subscr { struct llist_head entry; struct osmo_use_count use_count; char imsiGSM23003_IMSI_MAX_DIGITS+1; + char imeiGSM23003_IMEI_NUM_DIGITS_NO_CHK+1; uint32_t tmsi; - uint32_t active_paging_requests; + /* List head of (struct gsm_paging_request).bsub_entry */ + uint32_t active_paging_requests_len; + struct llist_head active_paging_requests; }; const char *bsc_subscr_name(struct bsc_subscr *bsub); @@ -27,6 +31,9 @@ struct bsc_subscr *bsc_subscr_find_or_create_by_imsi(struct llist_head *list, const char *imsi, const char *use_token); +struct bsc_subscr *bsc_subscr_find_or_create_by_imei(struct llist_head *list, + const char *imei, + const char *use_token); struct bsc_subscr *bsc_subscr_find_or_create_by_tmsi(struct llist_head *list, uint32_t tmsi, const char *use_token); @@ -36,6 +43,9 @@ struct bsc_subscr *bsc_subscr_find_by_imsi(struct llist_head *list, const char *imsi, const char *use_token); +struct bsc_subscr *bsc_subscr_find_by_imei(struct llist_head *list, + const char *imei, + const char *use_token); struct bsc_subscr *bsc_subscr_find_by_tmsi(struct llist_head *list, uint32_t tmsi, const char *use_token); @@ -43,6 +53,7 @@ const char *use_token); void bsc_subscr_set_imsi(struct bsc_subscr *bsub, const char *imsi); +void bsc_subscr_set_imei(struct bsc_subscr *bsub, const char *imei); #define bsc_subscr_get(bsc_subscr, use) \ OSMO_ASSERT(osmo_use_count_get_put(&(bsc_subscr)->use_count, use, 1) == 0) @@ -51,3 +62,9 @@ void log_set_filter_bsc_subscr(struct log_target *target, struct bsc_subscr *bsub); + +struct gsm_paging_request; +void bsc_subscr_add_active_paging_request(struct bsc_subscr *bsub, struct gsm_paging_request *req); +void bsc_subscr_remove_active_paging_request(struct bsc_subscr *bsub, struct gsm_paging_request *req); +void bsc_subscr_remove_active_paging_request_all(struct bsc_subscr *bsub); +struct gsm_paging_request *bsc_subscr_find_req_by_bts(const struct bsc_subscr *bsub, const struct gsm_bts *bts);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/bts.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/bts.h
Changed
@@ -18,6 +18,7 @@ #include "osmocom/bsc/bts_sm.h" #include "osmocom/bsc/abis_om2000.h" #include "osmocom/bsc/paging.h" +#include "osmocom/bsc/bts_setup_ramp.h" enum bts_counter_id { BTS_CTR_CHREQ_TOTAL, @@ -227,7 +228,9 @@ BTS_STAT_TS_BORKEN, BTS_STAT_NUM_TRX_RSL_CONNECTED, BTS_STAT_NUM_TRX_TOTAL, - BTS_STAT_T3113, + BTS_STAT_PAGING_REQ_QUEUE_LENGTH, + BTS_STAT_PAGING_AVAILABLE_SLOTS, + BTS_STAT_PAGING_T3113, }; extern const struct osmo_stat_item_desc bts_stat_desc; @@ -517,7 +520,19 @@ /* should the channel allocator allocate channels from high TRX to TRX0, * rather than starting from TRX0 and go upwards? */ - int chan_alloc_reverse; + bool chan_alloc_chan_req_reverse; + bool chan_alloc_assignment_reverse; + bool chan_alloc_handover_reverse; + + /* Whether to use dynamic allocation mode for assignment */ + bool chan_alloc_assignment_dynamic; + /* Parameters used for dynamic mode of allocation */ + struct { + bool sort_by_trx_power; + uint8_t ul_rxlev_thresh; + uint8_t ul_rxlev_avg_num; + uint8_t c0_chan_load_thresh; + } chan_alloc_dyn_params; /* When true, interference measurements from the BTS are used in the channel allocator to favor lchans with less * interference reported in RSL Resource Indication. */ @@ -568,6 +583,10 @@ /* exclude the BTS from the global RF Lock handling */ int excl_from_rf_lock; + /* MGW specificities for this BTS: */ + int mgw_pool_target; /* Pin to specific MGW. -1 = wildcard */ + bool mgw_pool_target_strict; /* Only allow pinned MGW */ + /* supported codecs beside FR */ struct bts_codec_conf codec; @@ -578,6 +597,9 @@ struct amr_multirate_conf mr_full; struct amr_multirate_conf mr_half; + /* osmux config: */ + enum osmux_usage use_osmux; + /* PCU socket state */ char *pcu_sock_path; struct pcu_sock_state *pcu_state; @@ -647,6 +669,8 @@ struct chan_counts chan_counts; struct all_allocated all_allocated; + + struct bts_setup_ramp bts_setup_ramp; }; #define GSM_BTS_SI2Q(bts, i) (struct gsm48_system_information_type_2quater *)((bts)->si_bufSYSINFO_TYPE_2quateri) @@ -805,3 +829,5 @@ enum gsm_bts_type_variant str2btsvariant(const char *arg); const char *btsvariant2str(enum gsm_bts_type_variant v); + +bool gsm_bts_check_ny1(const struct gsm_bts *bts);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h
Changed
@@ -27,10 +27,11 @@ struct gsm_bts_sm; struct gsm_bts; struct gsm_bts_trx; +struct gsm_gprs_nsvc; struct msgb *nanobts_gen_set_bts_attr(struct gsm_bts *bts); struct msgb *nanobts_gen_set_nse_attr(struct gsm_bts_sm *bts_sm); struct msgb *nanobts_gen_set_cell_attr(struct gsm_bts *bts); -struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_bts *bts); +struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_gprs_nsvc *nsvc); struct msgb *nanobts_gen_set_radio_attr(struct gsm_bts *bts, struct gsm_bts_trx *trx);
View file
osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/bts_setup_ramp.h
Added
@@ -0,0 +1,69 @@ +/* (C) 2022 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> + * + * Author: Alexander Couzens <acouzens@sysmocom.de> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#pragma once + +#include <stdbool.h> +#include <stdint.h> + +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/timer.h> + +struct gsm_bts; +struct gsm_network; + +enum bts_setup_ramp_state { + BTS_SETUP_RAMP_INIT, /*!< initial state */ + BTS_SETUP_RAMP_WAIT, /*!< BTS has to wait, too many BTS configuring */ + BTS_SETUP_RAMP_READY, /*!< BTS is allowed to configure */ +}; + +struct bts_setup_ramp { + enum bts_setup_ramp_state state; + struct llist_head list; +}; + +struct bts_setup_ramp_net { + unsigned count; /*!< max count */ + unsigned step_size; /*!< also the maximum concurrent bts to configure */ + + struct llist_head head; + struct osmo_timer_list timer; + unsigned int step_interval; /*!< in seconds */ + bool enabled; /*!< enabled by vty */ + bool active; /*!< if currently active */ +}; + +void bts_setup_ramp_init_bts(struct gsm_bts *bts); +void bts_setup_ramp_init_network(struct gsm_network *net); + +bool bts_setup_ramp_active(struct gsm_network *net); +bool bts_setup_ramp_wait(struct gsm_bts *bts); +void bts_setup_ramp_remove(struct gsm_bts *bts); +int bts_setup_ramp_unblock_bts(struct gsm_bts *bts); + +/* vty related functions */ +void bts_setup_ramp_enable(struct gsm_network *net); +void bts_setup_ramp_disable(struct gsm_network *net); +void bts_setup_ramp_set_step_interval(struct gsm_network *net, unsigned int step_interval); +void bts_setup_ramp_set_step_size(struct gsm_network *net, unsigned int step_size); + +const char *bts_setup_ramp_get_state_str(struct gsm_bts *bts);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/chan_counts.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/chan_counts.h
Changed
@@ -6,11 +6,11 @@ struct gsm_bts_trx_ts; struct gsm_lchan; -void chan_counts_sig_init(); +void chan_counts_sig_init(void); void chan_counts_ts_update(struct gsm_bts_trx_ts *ts); void chan_counts_ts_clear(struct gsm_bts_trx_ts *ts); void chan_counts_trx_update(struct gsm_bts_trx *trx); -void chan_counts_bsc_verify(); +void chan_counts_bsc_verify(void); /* First array index to chan_counts.val. */ enum chan_counts_dim1 {
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/ctrl.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/ctrl.h
Changed
@@ -2,8 +2,18 @@ #include <osmocom/ctrl/control_cmd.h> -struct ctrl_handle *bsc_controlif_setup(struct gsm_network *net, - const char *bind_addr, uint16_t port); +struct gsm_network; +struct gsm_bts; +struct bsc_msc_data; + +struct ctrl_handle *bsc_controlif_setup(struct gsm_network *net, uint16_t port); + +/* Used internally in different ctrl source code files: */ +int bsc_bts_ctrl_cmds_install(void); +int bsc_bts_trx_ctrl_cmds_install(void); +void ctrl_generate_bts_location_state_trap(struct gsm_bts *bts, struct bsc_msc_data *msc); +void osmo_bsc_send_trap(struct ctrl_cmd *cmd, struct bsc_msc_data *msc_data); + enum bsc_ctrl_node { CTRL_NODE_MSC = _LAST_CTRL_NODE,
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/gsm_data.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/gsm_data.h
Changed
@@ -31,13 +31,26 @@ #include <osmocom/gsm/protocol/gsm_12_21.h> #include <osmocom/gsm/protocol/gsm_03_41.h> #include <osmocom/abis/e1_input.h> +#include <osmocom/bsc/bts_setup_ramp.h> #include <osmocom/bsc/meas_rep.h> #include <osmocom/bsc/acc.h> #include <osmocom/bsc/osmux.h> #include <osmocom/bsc/chan_counts.h> +#include <osmocom/bsc/lchan.h> #define GSM_T3122_DEFAULT 10 +#define GSM_T3105_DEFAULT 100UL +#define GSM_T3124_SDCCH 675UL +#define GSM_T3124_OTHER_CH 320UL +#define GSM_T3124_MAX GSM_T3124_SDCCH + +/* Some guess for delta (see comment below) */ +#define GSM_NY1_REQ_DELTA 1000UL +/* Requirements: We want Ny1 to be as low as possible, while respecting T3105 * Ny1 > T3124 + delta + * with delta = time between expiration of T3124 and receiving HANDOVER FAILURE by the serving BSC. */ +#define GSM_NY1_DEFAULT ((unsigned long)((GSM_T3124_MAX + GSM_NY1_REQ_DELTA)/GSM_T3105_DEFAULT + 1)) + struct mgcp_client_conf; struct mgcp_client; struct gsm0808_cell_id; @@ -91,22 +104,6 @@ struct msgb *msg, void *data, void *param); -/* Maximum number of neighbor cells whose average we track */ -#define MAX_NEIGH_MEAS 10 -/* Maximum size of the averaging window for neighbor cells */ -#define MAX_WIN_NEIGH_AVG 10 -/* Maximum number of report history we store */ -#define MAX_MEAS_REP 10 - -/* processed neighbor measurements for one cell */ -struct neigh_meas_proc { - uint16_t arfcn; - uint8_t bsic; - uint8_t rxlevMAX_WIN_NEIGH_AVG; - unsigned int rxlev_cnt; - uint8_t last_seen_nr; -}; - struct gsm_classmark { bool classmark1_set; struct gsm48_classmark1 classmark1; @@ -122,34 +119,6 @@ SUBSCR_SCCP_ST_CONNECTED }; -enum channel_rate { - CH_RATE_SDCCH, - CH_RATE_HALF, - CH_RATE_FULL, -}; - -enum channel_rate chan_t_to_chan_rate(enum gsm_chan_t chan_t); - -enum lchan_csd_mode { - LCHAN_CSD_M_NT, - LCHAN_CSD_M_T_1200_75, - LCHAN_CSD_M_T_600, - LCHAN_CSD_M_T_1200, - LCHAN_CSD_M_T_2400, - LCHAN_CSD_M_T_9600, - LCHAN_CSD_M_T_14400, - LCHAN_CSD_M_T_29000, - LCHAN_CSD_M_T_32000, -}; - -struct channel_mode_and_rate { - enum gsm48_chan_mode chan_mode; - enum channel_rate chan_rate; - uint16_t s15_s0; - /* only used for GSM48_CMODE_DATA_* */ - enum lchan_csd_mode csd_mode; -}; - enum assign_for { ASSIGN_FOR_NONE, ASSIGN_FOR_BSSMAP_REQ, @@ -161,14 +130,6 @@ static inline const char *assign_for_name(enum assign_for assign_for) { return get_value_string(assign_for_names, assign_for); } -/* If .present is false, use the default value defined elsewhere. If true, use .val below. - * (A practical benefit of this is that the default initialization sets .present to false, so that even if a .val == 0 - * is a valid value, a struct containing this as member does not need to explicitly set .val = INVALID_VAL_CONSTANT.) */ -struct optional_val { - bool present; - int val; -}; - /* Information retrieved during an Assignment Request from the MSC. This is storage of the Assignment instructions * parsed from the Assignment Request message, to pass on until the gscon and assignment FSMs have decided whether an * Assignment is actually going to be carried out. Should remain unchanged after initial decoding. */ @@ -444,21 +405,6 @@ struct osmo_bsc_sccp_con; -/* Channel Request reason */ -enum gsm_chreq_reason_t { - GSM_CHREQ_REASON_EMERG, - GSM_CHREQ_REASON_PAG, - GSM_CHREQ_REASON_CALL, - GSM_CHREQ_REASON_LOCATION_UPD, - GSM_CHREQ_REASON_OTHER, - GSM_CHREQ_REASON_PDCH, -}; - -static inline bool gsm_chreq_reason_is_voicecall(enum gsm_chreq_reason_t reason) -{ - return reason == GSM_CHREQ_REASON_EMERG || reason == GSM_CHREQ_REASON_CALL; -} - /* lchans 0..3 are SDCCH in combined channel configuration, use 4 as magic number for BCCH hack - see osmo-bts-../oml.c:opstart_compl() */ #define CCCH_LCHAN 4 @@ -513,6 +459,8 @@ bool get_attr_rep_received; bool set_attr_sent; bool set_attr_ack_received; + bool rsl_connect_sent; + bool rsl_connect_ack_received; bool force_rf_lock; }; @@ -556,11 +504,6 @@ * rest octets elements, so to really fit 48 EARFCNs most other SI2quater elements need to be omitted. */ #define MAX_EARFCN_LIST (3*16) -/* is the data link established? who established it? */ -#define LCHAN_SAPI_UNUSED 0 -#define LCHAN_SAPI_MS 1 -#define LCHAN_SAPI_NET 2 - /* BTS ONLY */ #define MAX_NUM_UL_MEAS 104 #define LC_UL_M_F_L1_VALID (1 << 0) @@ -599,33 +542,6 @@ }; /* /BTS ONLY */ -/* State of the SAPIs in the lchan */ -enum lchan_sapi_state { - LCHAN_SAPI_S_NONE, - LCHAN_SAPI_S_REQ, - LCHAN_SAPI_S_ASSIGNED, - LCHAN_SAPI_S_REL, - LCHAN_SAPI_S_ERROR, -}; - -#define MAX_A5_KEY_LEN (128/8) - -struct gsm_encr { - uint8_t alg_a5_n; /* N: 0 (A5/0), 1 (A5/1), ... 7 (A5/7) */ - uint8_t key_len; - uint8_t keyMAX_A5_KEY_LEN; - bool kc128_present; - uint8_t kc12816; -}; - -#define LOGPLCHAN(lchan, ss, level, fmt, args...) \ - LOGP(ss, level, "%s (ss=%d,%s) (%s) " fmt, \ - lchan ? gsm_ts_and_pchan_name(lchan->ts) : "-", \ - lchan ? lchan->nr : 0, \ - lchan ? gsm_lchant_name(lchan->type) : "-", \ - bsc_subscr_name(lchan && lchan->conn ? lchan->conn->bsub : NULL), \ - ## args) - /* Iterate at most N lchans of the given timeslot. * usage: * struct gsm_lchan *lchan; @@ -641,260 +557,9 @@ && ((lchan - (ts)->lchan) < (N)); \ lchan++) -enum lchan_activate_for { - ACTIVATE_FOR_NONE, - ACTIVATE_FOR_MS_CHANNEL_REQUEST, - ACTIVATE_FOR_ASSIGNMENT, - ACTIVATE_FOR_HANDOVER, - ACTIVATE_FOR_VTY, - ACTIVATE_FOR_MODE_MODIFY_RTP, -}; - -extern const struct value_string lchan_activate_mode_names; -static inline const char *lchan_activate_mode_name(enum lchan_activate_for activ_for) -{ return get_value_string(lchan_activate_mode_names, activ_for); } - -enum imm_ass_time { - IMM_ASS_TIME_POST_CHAN_ACK = 0, - IMM_ASS_TIME_PRE_CHAN_ACK, - IMM_ASS_TIME_PRE_TS_ACK, -}; - -struct lchan_activate_info { - enum lchan_activate_for activ_for; - /* If activ_for == ACTIVATE_FOR_MS_CHANNEL_REQUEST, the original CHREQ reason. */ - enum gsm_chreq_reason_t chreq_reason; - struct gsm_subscriber_connection *for_conn; - struct channel_mode_and_rate ch_mode_rate; - struct gsm_encr encr; - bool requires_voice_stream; - bool wait_before_switching_rtp; /*< true = requires LCHAN_EV_READY_TO_SWITCH_RTP */ - uint16_t msc_assigned_cic; - /* During intra-BSC handover, we keep the MGW endpoint intact and just re-route to the new lchan. This - * activate_info is for the new lchan, the re_use_mgw_endpoint_from_lchan points at the old lchan. */ - struct gsm_lchan *re_use_mgw_endpoint_from_lchan; - bool ta_known; - uint8_t ta; - - /* The TSC Set to use if 'use' is true, otherwise automatically determine the TSC Set value to use. Valid range - * is 1 to 4, as described in 3GPP TS 45.002. */ - struct optional_val tsc_set; - /* The TSC to use if 'use' is true, otherwise automatically determine the TSC value to use. Valid range is 0 to - * 7, as described in 3GPP TS 45.002. */ - struct optional_val tsc; - - bool vamos; - - /* A copy of bts->imm_ass_time at the time where Channel Activation was requested. A change in the VTY - * configuration has immediate effect on the value, so make sure we don't get mixed up when it gets changed - * while a channel activation is in progress. */ - enum imm_ass_time imm_ass_time; -}; - -enum lchan_modify_for { - MODIFY_FOR_NONE, - MODIFY_FOR_ASSIGNMENT, - MODIFY_FOR_VTY, -}; - -extern const struct value_string lchan_modify_for_names; -static inline const char *lchan_modify_for_name(enum lchan_modify_for modify_for) -{ return get_value_string(lchan_modify_for_names, modify_for); } - -struct lchan_modify_info { - enum lchan_modify_for modify_for; - struct channel_mode_and_rate ch_mode_rate; - bool requires_voice_stream; - uint16_t msc_assigned_cic; - - /* The TSC Set to use if 'use' is true, otherwise automatically determine the TSC Set value to use. Valid range - * is 1 to 4, as described in 3GPP TS 45.002. */ - struct optional_val tsc_set; - /* The TSC to use if 'use' is true, otherwise automatically determine the TSC value to use. Valid range is 0 to - * 7, as described in 3GPP TS 45.002. */ - struct optional_val tsc; - - bool vamos; -}; - #define INTERF_DBM_UNKNOWN 0 #define INTERF_BAND_UNKNOWN 0xff -/* Measurement pre-processing state */ -struct gsm_power_ctrl_meas_proc_state { - /* Number of measurements processed */ - unsigned int meas_num; - /* Algorithm specific data */ - union { - struct { - /* Scaled up 100 times average value */ - int Avg100; - } ewma; - }; -}; - -struct lchan_power_ctrl_state { - /* Measurement pre-processing state (for dynamic mode) */ - struct gsm_power_ctrl_meas_proc_state rxlev_meas_proc; - struct gsm_power_ctrl_meas_proc_state rxqual_meas_proc; - /* Number of SACCH blocks to skip (for dynamic mode) */ - int skip_block_num; -}; - -struct gsm_lchan { - /* The TS that we're part of */ - struct gsm_bts_trx_ts *ts; - /* The logical subslot number in the TS */ - uint8_t nr; - char *name; - - char *last_error; - - struct osmo_fsm_inst *fi; - struct osmo_fsm_inst *fi_rtp; - struct osmo_mgcpc_ep_ci *mgw_endpoint_ci_bts; - - struct { - /* The request as made by the caller, see lchan_activate(). - * lchan->activate.info is treated immutable: remains unchanged throughout the Activation. - * The mutable versions are below: some values need automatic adjustments, in which case they are copied - * from immutable lchan->activate.info.* to lchan->activate.*, for example lchan->activate.ch_mode_rate - * is initially a copy of lchan->activate.info.ch_mode_rate, and is possibly adjusted afterwards. */ - struct lchan_activate_info info; - - struct channel_mode_and_rate ch_mode_rate; - struct gsm48_multi_rate_conf mr_conf_filtered; - bool activ_ack; /*< true as soon as RSL Chan Activ Ack is received */ - bool immediate_assignment_sent; - /*! This flag ensures that when an lchan activation has succeeded, and we have already - * sent ACKs like Immediate Assignment or BSSMAP Assignment Complete, and if other errors - * occur later, e.g. during release, that we don't send a NACK out of context. */ - bool concluded; - enum gsm0808_cause gsm0808_error_cause; - /* Actually used TSC Set. */ - int tsc_set; - /* Actually used TSC. */ - uint8_t tsc; - } activate; - - struct { - /* The request as made by the caller, see lchan_mode_modify(). - * lchan->modify.info is treated immutable: remains unchanged throughout the Mode Modify. - * The mutable versions are below: some values need automatic adjustments, in which case they are copied - * from immutable lchan->modify.info.* to lchan->modify.*, for example lchan->modify.ch_mode_rate - * is initially a copy of lchan->modify.info.ch_mode_rate, and is possibly adjusted afterwards. */ - struct lchan_modify_info info; - - struct channel_mode_and_rate ch_mode_rate; - struct gsm48_multi_rate_conf mr_conf_filtered; - /* Actually used TSC Set. */ - int tsc_set; - /* Actually used TSC. */ - uint8_t tsc; - bool concluded; - } modify; - - struct { - /* If an event to release the lchan comes in while still waiting for responses, just mark this - * flag, so that the lchan will gracefully release at the next sensible junction. */ - bool requested; - bool do_rr_release; - enum gsm48_rr_cause rr_cause; - bool last_eutran_plmn_valid; - struct osmo_plmn_id last_eutran_plmn; - - /* There is an RSL error cause of value 0, so we need a separate flag. */ - bool in_error; - /* RSL error code, RSL_ERR_* */ - uint8_t rsl_error_cause; - - /* If a release event is being handled, ignore other ricocheting release events until that - * release handling has concluded. */ - bool in_release_handler; - } release; - - /* The logical channel type */ - enum gsm_chan_t type; - /* Power levels for MS and BTS */ - uint8_t bs_power_db; - uint8_t ms_power; - /* Encryption information */ - struct gsm_encr encr; - - /* Established data link layer services */ - uint8_t sapis8; - - struct { - uint32_t bound_ip; /*< where the BTS receives RTP */ - uint16_t bound_port; - uint32_t connect_ip; /*< where the BTS sends RTP to (MGW) */ - uint16_t connect_port; - uint16_t conn_id; - uint8_t rtp_payload; - uint8_t rtp_payload2; - uint8_t speech_mode; - - /* info we need to postpone the AoIP - * assignment completed message */ - struct { - uint8_t rr_cause; - bool valid; - } ass_compl; - } abis_ip; - - /* At first, the Timing Advance from the initial Channel Request. Later, the Timing Advance value received from - * the most recent Measurement Report. */ - uint8_t last_ta; - - /* table of neighbor cell measurements */ - struct neigh_meas_proc neigh_measMAX_NEIGH_MEAS; - - /* cache of last measurement reports on this lchan */ - struct gsm_meas_rep meas_repMAX_MEAS_REP; - int meas_rep_idx; - int meas_rep_count; - uint8_t meas_rep_last_seen_nr; - - /* GSM Random Access data */ - /* TODO: don't allocate this, rather keep an "is_present" flag */ - struct gsm48_req_ref *rqd_ref; - - struct gsm_subscriber_connection *conn; - - /* After the Channel Activation ACK or RSL Mode Modify ACK is received, this reflects the actually used - * channel_mode_and_rate. */ - struct channel_mode_and_rate current_ch_mode_rate; - struct gsm48_multi_rate_conf current_mr_conf; - - /* Circuit-Switched TSC Set in use, or -1 if no specific TSC Set was requested. The valid range is 1-4 as - * described in the spec 3GPP TS 45.002. */ - int tsc_set; - /* Training Sequence Code in use. The valid range is 0-7 as described in the spec 3GPP TS 45.002. */ - uint8_t tsc; - - struct { - /* Whether this lchan represents a secondary "shadow" lchan to multiplex a second MS onto a primary - * "normal" lchan */ - bool is_secondary; - - /* Whether this lchan is activated/modified into a mode that allows VAMOS multiplexing at this moment */ - bool enabled; - } vamos; - - /* dBm value of interference level as reported in the most recent Resource Indication, if any for this lchan. Or - * INTERF_DBM_UNKNOWN if this lchan was not included in the most recent Resource Indication. - * The range is typically -115 to -85 dBm, here stored 1:1 as a signed integer, to ease comparison. */ - int16_t interf_dbm; - /* Actual reported interference band index, or INTERF_BAND_UNKNOWN if this lchan was not included in the most - * recent Resource Indication. */ - uint8_t interf_band; - /* MS power control state */ - struct lchan_power_ctrl_state ms_power_ctrl; - /* Timestamps and markers to track active state duration. */ - struct timespec active_start; - struct timespec active_stored; -}; - /* One Timeslot in a TRX */ struct gsm_bts_trx_ts { struct gsm_bts_trx *trx; @@ -967,8 +632,6 @@ struct chan_counts chan_counts; }; -#define GSM_LCHAN_SI(lchan, i) (void *)((lchan)->si.bufi0) - struct gsm_envabtse { struct gsm_abis_mo mo; }; @@ -1148,18 +811,9 @@ static inline const char *gsm_pchan_id(enum gsm_phys_chan_config c) { return get_value_string(gsm_pchan_ids, c); } enum gsm_phys_chan_config gsm_pchan_parse(const char *name); -const char *gsm_lchant_name(enum gsm_chan_t c); const char *gsm_chreq_name(enum gsm_chreq_reason_t c); char *gsm_ts_name(const struct gsm_bts_trx_ts *ts); char *gsm_ts_and_pchan_name(const struct gsm_bts_trx_ts *ts); -void lchan_update_name(struct gsm_lchan *lchan); -uint64_t gsm_lchan_active_duration_ms(const struct gsm_lchan *lchan); - -static inline char *gsm_lchan_name(const struct gsm_lchan *lchan) -{ - OSMO_ASSERT(lchan); - return lchan->name; -} void gsm_abis_mo_reset(struct gsm_abis_mo *mo); void gsm_mo_init(struct gsm_abis_mo *mo, struct gsm_bts *bts, @@ -1191,13 +845,9 @@ uint8_t pchan_subslots_vamos(enum gsm_phys_chan_config pchan); bool ts_is_tch(struct gsm_bts_trx_ts *ts); -struct gsm_lchan *gsm_lchan_vamos_to_primary(const struct gsm_lchan *lchan_vamos); -struct gsm_lchan *gsm_lchan_primary_to_vamos(const struct gsm_lchan *lchan_primary); - struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn); void conn_update_ms_power_class(struct gsm_subscriber_connection *conn, uint8_t power_class); -void lchan_update_ms_power_ctrl_level(struct gsm_lchan *lchan, int ms_power_dbm); struct gsm_tz { int override; /* if 0, use system's time zone instead. */ @@ -1234,10 +884,10 @@ struct llist_head bts_list; struct llist_head bts_rejected; - /* BTS-based counters when we can't find the actual BTS - * e.g. when conn->lchan is NULL */ - struct rate_ctr_group *bts_unknown_ctrs; - struct osmo_stat_item_group *bts_unknown_statg; + /* BTS-based counters when we can't find the actual BTS + * e.g. when conn->lchan is NULL */ + struct rate_ctr_group *bts_unknown_ctrs; + struct osmo_stat_item_group *bts_unknown_statg; /* see gsm_network_T_defs */ struct osmo_tdef *T_defs; @@ -1318,6 +968,8 @@ /* Don't refuse to start with mutually exclusive codec settings */ bool allow_unusable_timeslots; + struct bts_setup_ramp_net bts_setup_ramp; + uint8_t nri_bitlen; struct osmo_nri_ranges *null_nri_ranges; @@ -1360,9 +1012,6 @@ /* generic E1 line operations for all ISDN-based BTS. */ extern struct e1inp_line_ops bts_isdn_e1inp_line_ops; -/* control interface handling */ -int bsc_base_ctrl_cmds_install(void); - bool ts_is_usable(const struct gsm_bts_trx_ts *ts); int gsm_lchan_type_by_pchan(enum gsm_phys_chan_config pchan);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/handover_fsm.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/handover_fsm.h
Changed
@@ -55,7 +55,7 @@ const uint8_t *access_delay; }; -void handover_fsm_init(); +void handover_fsm_init(void); int handover_request(struct handover_out_req *req); void handover_start(struct handover_out_req *req);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/handover_vty.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/handover_vty.h
Changed
@@ -3,6 +3,6 @@ #include <osmocom/vty/vty.h> #include <osmocom/bsc/handover_cfg.h> -void ho_vty_init(); +void ho_vty_init(void); void ho_vty_write_net(struct vty *vty, struct gsm_network *net); void ho_vty_write_bts(struct vty *vty, struct gsm_bts *bts);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/lb.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/lb.h
Changed
@@ -57,7 +57,7 @@ extern const struct rate_ctr_desc smlc_ctr_description; extern const struct rate_ctr_group_desc smlc_ctrg_desc; -int lb_init(); -int lb_start_or_stop(); +int lb_init(void); +int lb_start_or_stop(void); int lb_send(struct gsm_subscriber_connection *conn, const struct bssap_le_pdu *bssap_le); void lb_close_conn(struct gsm_subscriber_connection *conn);
View file
osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/lchan.h
Added
@@ -0,0 +1,388 @@ +#pragma once + +#include <stdint.h> +#include <stdbool.h> + +#include <osmocom/core/utils.h> + +#include <osmocom/gsm/gsm_utils.h> +#include <osmocom/gsm/protocol/gsm_04_08.h> +#include <osmocom/gsm/protocol/gsm_08_08.h> +#include <osmocom/gsm/gsm23003.h> + +#include <osmocom/bsc/meas_rep.h> + +/* If .present is false, use the default value defined elsewhere. If true, use .val below. + * (A practical benefit of this is that the default initialization sets .present to false, so that even if a .val == 0 + * is a valid value, a struct containing this as member does not need to explicitly set .val = INVALID_VAL_CONSTANT.) */ +struct optional_val { + bool present; + int val; +}; + +/* Maximum number of neighbor cells whose average we track */ +#define MAX_NEIGH_MEAS 10 +/* Maximum size of the averaging window for neighbor cells */ +#define MAX_WIN_NEIGH_AVG 10 +/* Maximum number of report history we store */ +#define MAX_MEAS_REP 10 + +/* processed neighbor measurements for one cell */ +struct neigh_meas_proc { + uint16_t arfcn; + uint8_t bsic; + uint8_t rxlevMAX_WIN_NEIGH_AVG; + unsigned int rxlev_cnt; + uint8_t last_seen_nr; +}; + +enum channel_rate { + CH_RATE_SDCCH, + CH_RATE_HALF, + CH_RATE_FULL, +}; + +enum channel_rate chan_t_to_chan_rate(enum gsm_chan_t chan_t); + +enum lchan_csd_mode { + LCHAN_CSD_M_NT, + LCHAN_CSD_M_T_1200_75, + LCHAN_CSD_M_T_600, + LCHAN_CSD_M_T_1200, + LCHAN_CSD_M_T_2400, + LCHAN_CSD_M_T_9600, + LCHAN_CSD_M_T_14400, + LCHAN_CSD_M_T_29000, + LCHAN_CSD_M_T_32000, +}; + +struct channel_mode_and_rate { + enum gsm48_chan_mode chan_mode; + enum channel_rate chan_rate; + uint16_t s15_s0; + /* only used for GSM48_CMODE_DATA_* */ + enum lchan_csd_mode csd_mode; +}; + +/* Channel Request reason */ +enum gsm_chreq_reason_t { + GSM_CHREQ_REASON_EMERG, + GSM_CHREQ_REASON_PAG, + GSM_CHREQ_REASON_CALL, + GSM_CHREQ_REASON_LOCATION_UPD, + GSM_CHREQ_REASON_OTHER, + GSM_CHREQ_REASON_PDCH, +}; + +static inline bool gsm_chreq_reason_is_voicecall(enum gsm_chreq_reason_t reason) +{ + return reason == GSM_CHREQ_REASON_EMERG || reason == GSM_CHREQ_REASON_CALL; +} + +/* State of the SAPIs in the lchan */ +enum lchan_sapi_state { + LCHAN_SAPI_S_NONE, + LCHAN_SAPI_S_REQ, + LCHAN_SAPI_S_ASSIGNED, + LCHAN_SAPI_S_REL, + LCHAN_SAPI_S_ERROR, +}; + +/* is the data link established? who established it? */ +#define LCHAN_SAPI_UNUSED 0 +#define LCHAN_SAPI_MS 1 +#define LCHAN_SAPI_NET 2 + +#define MAX_A5_KEY_LEN (128/8) + +struct gsm_encr { + uint8_t alg_a5_n; /* N: 0 (A5/0), 1 (A5/1), ... 7 (A5/7) */ + uint8_t key_len; + uint8_t keyMAX_A5_KEY_LEN; + bool kc128_present; + uint8_t kc12816; +}; + +enum lchan_activate_for { + ACTIVATE_FOR_NONE, + ACTIVATE_FOR_MS_CHANNEL_REQUEST, + ACTIVATE_FOR_ASSIGNMENT, + ACTIVATE_FOR_HANDOVER, + ACTIVATE_FOR_VTY, + ACTIVATE_FOR_MODE_MODIFY_RTP, +}; + +extern const struct value_string lchan_activate_mode_names; +static inline const char *lchan_activate_mode_name(enum lchan_activate_for activ_for) +{ return get_value_string(lchan_activate_mode_names, activ_for); } + +enum imm_ass_time { + IMM_ASS_TIME_POST_CHAN_ACK = 0, + IMM_ASS_TIME_PRE_CHAN_ACK, + IMM_ASS_TIME_PRE_TS_ACK, +}; + +struct lchan_activate_info { + enum lchan_activate_for activ_for; + /* If activ_for == ACTIVATE_FOR_MS_CHANNEL_REQUEST, the original CHREQ reason. */ + enum gsm_chreq_reason_t chreq_reason; + struct gsm_subscriber_connection *for_conn; + struct channel_mode_and_rate ch_mode_rate; + struct gsm_encr encr; + bool requires_voice_stream; + bool wait_before_switching_rtp; /*< true = requires LCHAN_EV_READY_TO_SWITCH_RTP */ + uint16_t msc_assigned_cic; + /* During intra-BSC handover, we keep the MGW endpoint intact and just re-route to the new lchan. This + * activate_info is for the new lchan, the re_use_mgw_endpoint_from_lchan points at the old lchan. */ + struct gsm_lchan *re_use_mgw_endpoint_from_lchan; + bool ta_known; + uint8_t ta; + + /* The TSC Set to use if 'use' is true, otherwise automatically determine the TSC Set value to use. Valid range + * is 1 to 4, as described in 3GPP TS 45.002. */ + struct optional_val tsc_set; + /* The TSC to use if 'use' is true, otherwise automatically determine the TSC value to use. Valid range is 0 to + * 7, as described in 3GPP TS 45.002. */ + struct optional_val tsc; + + bool vamos; + + /* A copy of bts->imm_ass_time at the time where Channel Activation was requested. A change in the VTY + * configuration has immediate effect on the value, so make sure we don't get mixed up when it gets changed + * while a channel activation is in progress. */ + enum imm_ass_time imm_ass_time; +}; + +enum lchan_modify_for { + MODIFY_FOR_NONE, + MODIFY_FOR_ASSIGNMENT, + MODIFY_FOR_VTY, +}; + +extern const struct value_string lchan_modify_for_names; +static inline const char *lchan_modify_for_name(enum lchan_modify_for modify_for) +{ return get_value_string(lchan_modify_for_names, modify_for); } + +struct lchan_modify_info { + enum lchan_modify_for modify_for; + struct channel_mode_and_rate ch_mode_rate; + bool requires_voice_stream; + uint16_t msc_assigned_cic; + + /* The TSC Set to use if 'use' is true, otherwise automatically determine the TSC Set value to use. Valid range + * is 1 to 4, as described in 3GPP TS 45.002. */ + struct optional_val tsc_set; + /* The TSC to use if 'use' is true, otherwise automatically determine the TSC value to use. Valid range is 0 to + * 7, as described in 3GPP TS 45.002. */ + struct optional_val tsc; + + bool vamos; +}; + +/* Measurement pre-processing state */ +struct gsm_power_ctrl_meas_proc_state { + /* Number of measurements processed */ + unsigned int meas_num; + /* Algorithm specific data */ + union { + struct { + /* Scaled up 100 times average value */ + int Avg100; + } ewma; + }; +}; + +struct lchan_power_ctrl_state { + /* Measurement pre-processing state (for dynamic mode) */ + struct gsm_power_ctrl_meas_proc_state rxlev_meas_proc; + struct gsm_power_ctrl_meas_proc_state rxqual_meas_proc; + /* Number of SACCH blocks to skip (for dynamic mode) */ + int skip_block_num; +}; + +struct gsm_lchan { + /* The TS that we're part of */ + struct gsm_bts_trx_ts *ts; + /* The logical subslot number in the TS */ + uint8_t nr; + char *name; + + char *last_error; + + struct osmo_fsm_inst *fi; + struct osmo_fsm_inst *fi_rtp; + struct osmo_mgcpc_ep_ci *mgw_endpoint_ci_bts; + + struct { + /* The request as made by the caller, see lchan_activate(). + * lchan->activate.info is treated immutable: remains unchanged throughout the Activation. + * The mutable versions are below: some values need automatic adjustments, in which case they are copied + * from immutable lchan->activate.info.* to lchan->activate.*, for example lchan->activate.ch_mode_rate + * is initially a copy of lchan->activate.info.ch_mode_rate, and is possibly adjusted afterwards. */ + struct lchan_activate_info info; + + struct channel_mode_and_rate ch_mode_rate; + struct gsm48_multi_rate_conf mr_conf_filtered; + bool activ_ack; /*< true as soon as RSL Chan Activ Ack is received */ + bool immediate_assignment_sent; + /*! This flag ensures that when an lchan activation has succeeded, and we have already + * sent ACKs like Immediate Assignment or BSSMAP Assignment Complete, and if other errors + * occur later, e.g. during release, that we don't send a NACK out of context. */ + bool concluded; + enum gsm0808_cause gsm0808_error_cause; + /* Actually used TSC Set. */ + int tsc_set; + /* Actually used TSC. */ + uint8_t tsc; + } activate; + + struct { + /* The request as made by the caller, see lchan_mode_modify(). + * lchan->modify.info is treated immutable: remains unchanged throughout the Mode Modify. + * The mutable versions are below: some values need automatic adjustments, in which case they are copied + * from immutable lchan->modify.info.* to lchan->modify.*, for example lchan->modify.ch_mode_rate + * is initially a copy of lchan->modify.info.ch_mode_rate, and is possibly adjusted afterwards. */ + struct lchan_modify_info info; + + struct channel_mode_and_rate ch_mode_rate; + struct gsm48_multi_rate_conf mr_conf_filtered; + /* Actually used TSC Set. */ + int tsc_set; + /* Actually used TSC. */ + uint8_t tsc; + bool concluded; + } modify; + + struct { + /* If an event to release the lchan comes in while still waiting for responses, just mark this + * flag, so that the lchan will gracefully release at the next sensible junction. */ + bool requested; + bool do_rr_release; + enum gsm48_rr_cause rr_cause; + bool last_eutran_plmn_valid; + struct osmo_plmn_id last_eutran_plmn; + + /* There is an RSL error cause of value 0, so we need a separate flag. */ + bool in_error; + /* RSL error code, RSL_ERR_* */ + uint8_t rsl_error_cause; + + /* If a release event is being handled, ignore other ricocheting release events until that + * release handling has concluded. */ + bool in_release_handler; + } release; + + /* The logical channel type */ + enum gsm_chan_t type; + /* Power levels for MS and BTS */ + uint8_t bs_power_db; + uint8_t ms_power; + /* Encryption information */ + struct gsm_encr encr; + + /* Established data link layer services */ + uint8_t sapis8; + + struct { + uint32_t bound_ip; /*< where the BTS receives RTP */ + uint16_t bound_port; + uint32_t connect_ip; /*< where the BTS sends RTP to (MGW) */ + uint16_t connect_port; + uint16_t conn_id; + uint8_t rtp_payload; + uint8_t rtp_payload2; + uint8_t speech_mode; + + /* info we need to postpone the AoIP + * assignment completed message */ + struct { + uint8_t rr_cause; + bool valid; + } ass_compl; + + struct { + bool use; + uint8_t local_cid; + bool remote_cid_present; + uint8_t remote_cid; + } osmux; + } abis_ip; + + /* At first, the Timing Advance from the initial Channel Request. Later, the Timing Advance value received from + * the most recent Measurement Report. */ + uint8_t last_ta; + + /* table of neighbor cell measurements */ + struct neigh_meas_proc neigh_measMAX_NEIGH_MEAS; + + /* cache of last measurement reports on this lchan */ + struct gsm_meas_rep meas_repMAX_MEAS_REP; + int meas_rep_idx; + int meas_rep_count; + uint8_t meas_rep_last_seen_nr; + + /* GSM Random Access data */ + /* TODO: don't allocate this, rather keep an "is_present" flag */ + struct gsm48_req_ref *rqd_ref; + + struct gsm_subscriber_connection *conn; + + /* After the Channel Activation ACK or RSL Mode Modify ACK is received, this reflects the actually used + * channel_mode_and_rate. */ + struct channel_mode_and_rate current_ch_mode_rate; + struct gsm48_multi_rate_conf current_mr_conf; + + /* Circuit-Switched TSC Set in use, or -1 if no specific TSC Set was requested. The valid range is 1-4 as + * described in the spec 3GPP TS 45.002. */ + int tsc_set; + /* Training Sequence Code in use. The valid range is 0-7 as described in the spec 3GPP TS 45.002. */ + uint8_t tsc; + + struct { + /* Whether this lchan represents a secondary "shadow" lchan to multiplex a second MS onto a primary + * "normal" lchan */ + bool is_secondary; + + /* Whether this lchan is activated/modified into a mode that allows VAMOS multiplexing at this moment */ + bool enabled; + } vamos; + + /* dBm value of interference level as reported in the most recent Resource Indication, if any for this lchan. Or + * INTERF_DBM_UNKNOWN if this lchan was not included in the most recent Resource Indication. + * The range is typically -115 to -85 dBm, here stored 1:1 as a signed integer, to ease comparison. */ + int16_t interf_dbm; + /* Actual reported interference band index, or INTERF_BAND_UNKNOWN if this lchan was not included in the most + * recent Resource Indication. */ + uint8_t interf_band; + /* MS power control state */ + struct lchan_power_ctrl_state ms_power_ctrl; + /* Timestamps and markers to track active state duration. */ + struct timespec active_start; + struct timespec active_stored; +}; + +#define GSM_LCHAN_SI(lchan, i) (void *)((lchan)->si.bufi0) + +void lchan_init(struct gsm_lchan *lchan, struct gsm_bts_trx_ts *ts, unsigned int nr); + +void lchan_update_name(struct gsm_lchan *lchan); +uint64_t gsm_lchan_active_duration_ms(const struct gsm_lchan *lchan); + +static inline char *gsm_lchan_name(const struct gsm_lchan *lchan) +{ + OSMO_ASSERT(lchan); + return lchan->name; +} + +struct gsm_lchan *gsm_lchan_vamos_to_primary(const struct gsm_lchan *lchan_vamos); +struct gsm_lchan *gsm_lchan_primary_to_vamos(const struct gsm_lchan *lchan_primary); + +void lchan_update_ms_power_ctrl_level(struct gsm_lchan *lchan, int ms_power_dbm); + +#define LOGPLCHAN(lchan, ss, level, fmt, args...) \ + LOGP(ss, level, "%s (ss=%d,%s) (%s) " fmt, \ + lchan ? gsm_ts_and_pchan_name(lchan->ts) : "-", \ + lchan ? lchan->nr : 0, \ + lchan ? gsm_chan_t_name(lchan->type) : "-", \ + bsc_subscr_name(lchan && lchan->conn ? lchan->conn->bsub : NULL), \ + ## args)
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/lchan_fsm.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/lchan_fsm.h
Changed
@@ -7,7 +7,7 @@ /* This macro automatically includes a final \n, if omitted. */ #define LOG_LCHAN(lchan, level, fmt, args...) do { \ if ((lchan)->fi) \ - LOGPFSML((lchan)->fi, level, "(type=%s) " fmt, gsm_lchant_name((lchan)->type), ## args); \ + LOGPFSML((lchan)->fi, level, "(type=%s) " fmt, gsm_chan_t_name((lchan)->type), ## args); \ else \ LOGP(DRSL, level, "%s (not initialized) " fmt, gsm_lchan_name(lchan), ## args); \ } while (0) @@ -56,7 +56,7 @@ LCHAN_EV_REQUEST_MODE_MODIFY, }; -void lchan_fsm_init(); +void lchan_fsm_init(void); void lchan_fsm_alloc(struct gsm_lchan *lchan); void lchan_release(struct gsm_lchan *lchan, bool do_rr_release,
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/lchan_rtp_fsm.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/lchan_rtp_fsm.h
Changed
@@ -1,6 +1,8 @@ /* osmo-bsc API to manage lchans, logical channels in GSM cells. */ #pragma once +#include <osmocom/bsc/lchan.h> + #define LOG_LCHAN_RTP(lchan, level, fmt, args...) do { \ if (lchan->fi_rtp) \ LOGPFSML(lchan->fi_rtp, level, fmt, ## args); \ @@ -11,6 +13,7 @@ struct gsm_lchan; struct mgcp_conn_peer; +enum mgcp_codecs; enum lchan_rtp_fsm_state { LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_AVAILABLE, @@ -46,3 +49,4 @@ void lchan_forget_mgw_endpoint(struct gsm_lchan *lchan); void mgcp_pick_codec(struct mgcp_conn_peer *verb_info, const struct gsm_lchan *lchan, bool bss_side); +bool mgcp_codec_is_picked(const struct mgcp_conn_peer *verb_info, enum mgcp_codecs codec);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/lchan_select.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/lchan_select.h
Changed
@@ -1,9 +1,28 @@ /* Select a suitable lchan from a given cell. */ #pragma once -struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts, enum gsm_chan_t type); +enum lchan_select_reason { + SELECT_FOR_MS_CHAN_REQ, + SELECT_FOR_ASSIGNMENT, + SELECT_FOR_HANDOVER, +}; + +extern const struct value_string lchan_select_reason_names; +static inline const char *lchan_select_reason_name(enum lchan_select_reason reason) +{ return get_value_string(lchan_select_reason_names, reason); } + +struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts, + enum gsm_chan_t type, + enum lchan_select_reason reason, + void *ctx); enum gsm_chan_t chan_mode_to_chan_type(enum gsm48_chan_mode chan_mode, enum channel_rate chan_rate); struct gsm_lchan *lchan_select_by_chan_mode(struct gsm_bts *bts, - enum gsm48_chan_mode chan_mode, enum channel_rate chan_rate); -struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, enum gsm_chan_t type, bool log); + enum gsm48_chan_mode chan_mode, + enum channel_rate chan_rate, + enum lchan_select_reason reason, + void *ctx); +struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, + enum gsm_chan_t type, + enum lchan_select_reason reason, + void *ctx, bool log); void lchan_select_set_type(struct gsm_lchan *lchan, enum gsm_chan_t type);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/neighbor_ident.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/neighbor_ident.h
Changed
@@ -73,7 +73,7 @@ int resolve_neighbors(struct gsm_bts **local_neighbor_p, struct gsm0808_cell_id_list2 *remote_neighbors, struct gsm_bts *from_bts, const struct cell_ab *target_ab, bool log_errors); -void neighbor_ident_vty_init(); +void neighbor_ident_vty_init(void); void neighbor_ident_vty_write_bts(struct vty *vty, const char *indent, struct gsm_bts *bts); void neighbor_ident_vty_write_network(struct vty *vty, const char *indent); @@ -81,7 +81,7 @@ int neighbor_ident_del_neighbor(struct vty *vty, struct gsm_bts *bts, struct neighbor *n); int neighbor_ident_ctrl_init(void); -int neighbors_check_cfg(); +int neighbors_check_cfg(void); #define CELL_AB_VTY_PARAMS "arfcn <0-1023> bsic (<0-63>|any)" #define CELL_AB_VTY_DOC \
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/nm_common_fsm.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/nm_common_fsm.h
Changed
@@ -38,8 +38,11 @@ NM_EV_OPSTART_ACK, NM_EV_OPSTART_NACK, NM_EV_OML_DOWN, + NM_EV_SETUP_RAMP_READY, /* BTS setup ramp allow to continue to configure */ NM_EV_FORCE_LOCK, /* Only supported by RadioCarrier so far */ NM_EV_FEATURE_NEGOTIATED, /* Sent by BTS to NSVC MO */ + NM_EV_RSL_CONNECT_ACK, /* Sent by BTS to BBTRANSC MO */ + NM_EV_RSL_CONNECT_NACK, /* Sent by BTS to BBTRANSC MO */ }; extern const struct value_string nm_fsm_event_names; @@ -118,3 +121,5 @@ void nm_obj_fsm_becomes_enabled_disabled(struct gsm_bts *bts, void *obj, enum abis_nm_obj_class obj_class, bool running); + +void nm_fsm_dispatch_all_configuring(struct gsm_bts *bts, uint32_t event, void *data);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/osmo_bsc.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/osmo_bsc.h
Changed
@@ -17,7 +17,7 @@ struct gsm_subscriber_connection; struct gsm_bts; -struct bsc_api *osmo_bsc_api(); +struct bsc_api *osmo_bsc_api(void); int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg); int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg); @@ -25,7 +25,8 @@ int bsc_handle_udt(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length); int bsc_handle_dt(struct gsm_subscriber_connection *conn, struct msgb *msg, unsigned int len); -int bsc_ctrl_cmds_install(); +struct gsm_network; +int bsc_ctrl_cmds_install(struct gsm_network *net); void bsc_gen_location_state_trap(struct gsm_bts *bts);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/paging.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/paging.h
Changed
@@ -53,6 +53,17 @@ BSC_PAGING_FOR_LCS = 0x2, }; +/* OS#5552, OS#5553: Maximum allowed scheduling transmit delay in paging + * requests to be queued, in seconds. If calculated delay for requests to be + * queued goes over this threshold, they are discarded instead of inserted to + * the queue. This avoids keeping queueing requests which will be scheduled for + * transmission too late. + */ +#define PAGING_THRESHOLD_X3113_DEFAULT_SEC 60 + +#define MAX_PAGING_BLOCKS_CCCH 9 +#define MAX_BS_PA_MFRMS 9 + struct bsc_paging_params { enum bsc_paging_reason reason; struct bsc_msc_data *msc; @@ -69,9 +80,10 @@ struct gsm_paging_request { /* list_head for list of all paging requests */ struct llist_head entry; - /* the subscriber which we're paging. Later gsm_paging_request - * should probably become a part of the bsc_subsrc struct? */ + /* the subscriber which we're paging. This struct is included using + * bsub_entry field in list bsub->active_paging_requests */ struct bsc_subscr *bsub; + struct llist_head bsub_entry; /* back-pointer to the BTS on which we are paging */ struct gsm_bts *bts; /* what kind of channel type do we ask the MS to establish */ @@ -99,10 +111,18 @@ * to the gsm_bts, a timer and some more state. */ struct gsm_bts_paging_state { - /* pending requests */ - struct llist_head pending_requests; + /* pending requests (initial paging request, no retransmits) */ + struct llist_head initial_req_list; + /* Number of requests in initial_req_list */ + unsigned int initial_req_list_len; + /* pending requests (already transmitted at least once) */ + struct llist_head retrans_req_list; /* Number of requests in pending_requests_len */ - unsigned int pending_requests_len; + unsigned int retrans_req_list_len; + + /* Number of requests in initial_req_list, indexed by pgroup. */ + unsigned int initial_req_pgroup_countsMAX_PAGING_BLOCKS_CCCH * MAX_BS_PA_MFRMS; + struct gsm_bts *bts; struct osmo_timer_list work_timer; @@ -126,20 +146,20 @@ /* schedule paging request */ int paging_request_bts(const struct bsc_paging_params *params, struct gsm_bts *bts); -int paging_request_stop(struct bsc_msc_data **msc_p, enum bsc_paging_reason *reasons_p, +void paging_request_stop(struct bsc_msc_data **msc_p, enum bsc_paging_reason *reasons_p, struct gsm_bts *bts, struct bsc_subscr *bsub); -int paging_request_cancel(struct bsc_subscr *bsub, enum bsc_paging_reason reasons); +void paging_request_cancel(struct bsc_subscr *bsub, enum bsc_paging_reason reasons); /* update paging load */ void paging_update_buffer_space(struct gsm_bts *bts, uint16_t); /* pending paging requests */ -unsigned int paging_pending_requests_nr(struct gsm_bts *bts); +unsigned int paging_pending_requests_nr(const struct gsm_bts *bts); void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc); void paging_flush_network(struct gsm_network *net, struct bsc_msc_data *msc); -uint16_t paging_estimate_available_slots(struct gsm_bts *bts, unsigned int time_span_s); +uint16_t paging_estimate_available_slots(const struct gsm_bts *bts, unsigned int time_span_s); int bsc_paging_start(struct bsc_paging_params *params); #endif
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/pcu_if.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/pcu_if.h
Changed
@@ -5,6 +5,8 @@ extern int pcu_direct; +#define PCUIF_HDR_SIZE (sizeof(struct gsm_pcu_if) - sizeof(((struct gsm_pcu_if *)0)->u)) + struct pcu_sock_state { struct gsm_network *net; struct osmo_fd listen_bfd; /* fd for listen socket */
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/pcuif_proto.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/pcuif_proto.h
Changed
@@ -19,6 +19,7 @@ #define PCU_IF_MSG_DATA_CNF_DT 0x11 /* confirm (with direct tlli) */ #define PCU_IF_MSG_RACH_IND 0x22 /* receive RACH */ #define PCU_IF_MSG_INFO_IND 0x32 /* retrieve BTS info */ +#define PCU_IF_MSG_E1_CCU_IND 0x33 /* retrieve E1 CCU comm. parameters */ #define PCU_IF_MSG_ACT_REQ 0x40 /* activate/deactivate PDCH */ #define PCU_IF_MSG_TIME_IND 0x52 /* GSM time indication */ #define PCU_IF_MSG_INTERF_IND 0x53 /* interference report */ @@ -62,6 +63,9 @@ #define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */ #define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */ +#define PCU_IF_NUM_NSVC 2 +#define PCU_IF_NUM_TRX 8 + enum gsm_pcu_if_text_type { PCU_VERSION, PCU_OML_ALERT, @@ -144,7 +148,7 @@ struct gsm_pcu_if_info_ind { uint32_t version; uint32_t flags; - struct gsm_pcu_if_info_trx trx8; /* TRX infos per BTS */ + struct gsm_pcu_if_info_trx trxPCU_IF_NUM_TRX; /* TRX infos per BTS */ uint8_t bsic; /* RAI */ uint16_t mcc, mnc; @@ -173,14 +177,25 @@ uint8_t initial_cs; uint8_t initial_mcs; /* NSVC */ - uint16_t nsvci2; - uint16_t local_port2; - uint16_t remote_port2; - uint8_t address_type2; + uint16_t nsvciPCU_IF_NUM_NSVC; + uint16_t local_portPCU_IF_NUM_NSVC; + uint16_t remote_portPCU_IF_NUM_NSVC; + uint8_t address_typePCU_IF_NUM_NSVC; union { struct in_addr v4; struct in6_addr v6; - } remote_ip2; + } remote_ipPCU_IF_NUM_NSVC; +} __attribute__ ((packed)); + +/* E1 CCU connection parameters */ +struct gsm_pcu_if_e1_ccu_ind { + /* GSM/GPRS air interface */ + uint8_t trx_nr; + uint8_t ts_nr; + /* E1 line interface */ + uint8_t e1_nr; + uint8_t e1_ts; + uint8_t e1_ts_ss; } __attribute__ ((packed)); struct gsm_pcu_if_act_req { @@ -270,6 +285,7 @@ struct gsm_pcu_if_rach_ind rach_ind; struct gsm_pcu_if_txt_ind txt_ind; struct gsm_pcu_if_info_ind info_ind; + struct gsm_pcu_if_e1_ccu_ind e1_ccu_ind; struct gsm_pcu_if_act_req act_req; struct gsm_pcu_if_time_ind time_ind; struct gsm_pcu_if_pag_req pag_req;
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/signal.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/signal.h
Changed
@@ -65,7 +65,6 @@ S_NM_NACK, /* GSM 12.21 various NM_MT_*_NACK happened */ S_NM_IPACC_NACK, /* GSM 12.21 nanoBTS extensions NM_MT_IPACC_*_*_NACK happened */ S_NM_IPACC_ACK, /* GSM 12.21 nanoBTS extensions NM_MT_IPACC_*_*_ACK happened */ - S_NM_IPACC_SET_ATTR_ACK,/* GSM 12.21 nanoBTS extensions NM_MT_IPACC_SET_ATTR_ACK happened */ S_NM_IPACC_RESTART_ACK, /* nanoBTS has send a restart ack */ S_NM_IPACC_RESTART_NACK,/* nanoBTS has send a restart ack */ S_NM_TEST_REP, /* GSM 12.21 Test Report */ @@ -121,8 +120,10 @@ }; struct ipacc_ack_signal_data { - struct gsm_bts_trx *trx; - uint8_t msg_type; + /* The BTS which sent the ACK/NACK to us: */ + struct gsm_bts *bts; + /* messge header containing msg_type, obj_class, obj_inst: */ + struct abis_om_fom_hdr *foh; }; struct abis_om2k_mo; @@ -138,7 +139,7 @@ /* This pointer is valid for TS 12.21 MO */ struct abis_om_obj_inst *obj_inst; /* This pointer is valid for RBS2000 MO */ - struct abis_om2k_mo *om2k_mo; + const struct abis_om2k_mo *om2k_mo; }; /* data for <SS_NM, S_NM_RUNNING_CHG>: */
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/system_information.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/system_information.h
Changed
@@ -7,6 +7,7 @@ struct gsm_bts; +int band_compatible(const struct gsm_bts *bts, int arfcn); int generate_cell_chan_alloc(struct gsm_bts *bts); int generate_cell_chan_list(uint8_t *chan_list, struct gsm_bts *bts); int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type);
View file
osmo-bsc_1.9.0.tar.xz/include/osmocom/bsc/vty.h -> osmo-bsc_1.10.0.tar.xz/include/osmocom/bsc/vty.h
Changed
@@ -23,7 +23,7 @@ enum bsc_vty_node { GSMNET_NODE = _LAST_OSMOVTY_NODE + 1, - MGW_NODE, + MGW_NODE, BTS_NODE, TRX_NODE, TS_NODE,
View file
osmo-bsc_1.9.0.tar.xz/src/ipaccess/abisip-find.c -> osmo-bsc_1.10.0.tar.xz/src/ipaccess/abisip-find.c
Changed
@@ -53,7 +53,7 @@ .format_json = false, }; -static void print_help() +static void print_help(void) { printf("\n"); printf("Usage: abisip-find -l <interface-name>\n"); @@ -265,7 +265,7 @@ void *ctx = NULL; -void print_timestamp() +void print_timestamp(void) { time_t now = time(NULL); printf("\n\n----- %s\n", ctime(&now)); @@ -304,7 +304,7 @@ return true; } -bool base_stations_timeout() +bool base_stations_timeout(void) { struct base_station *bs, *next_bs; time_t now = time(NULL); @@ -323,7 +323,7 @@ return changed; } -void base_stations_print() +void base_stations_print(void) { struct base_station *bs; int count = 0;
View file
osmo-bsc_1.9.0.tar.xz/src/ipaccess/ipaccess-config.c -> osmo-bsc_1.10.0.tar.xz/src/ipaccess/ipaccess-config.c
Changed
@@ -129,7 +129,7 @@ { struct e1inp_line *line; struct e1inp_ts *sign_ts, *rsl_ts; - struct e1inp_sign_link *oml_link, *rsl_link; + struct e1inp_sign_link *oml_link, *osmo_link, *rsl_link; line = talloc_zero(tall_bsc_ctx, struct e1inp_line); if (!line) @@ -140,7 +140,8 @@ fprintf(stderr, "cannot `ipa' driver, giving up.\n"); return -EINVAL; } - line->ops = &ipaccess_e1inp_line_ops; + e1inp_line_bind_ops(line, &ipaccess_e1inp_line_ops); + e1_set_pcap_fd2(line, -1); /* Disable writing to pcap */ sign_ts = e1inp_line_ipa_oml_ts(line); rsl_ts = e1inp_line_ipa_rsl_ts(line, 0); @@ -148,15 +149,19 @@ /* create E1 timeslots for signalling and TRAU frames */ e1inp_ts_config_sign(sign_ts, line); e1inp_ts_config_sign(rsl_ts, line); + rsl_ts->driver.ipaccess.fd.fd = -1; /* create signalling links for TRX0 */ oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML, bts->c0, IPAC_PROTO_OML, 0); + osmo_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OSMO, + bts->c0, IPAC_PROTO_OSMO, 0); rsl_link = e1inp_sign_link_create(rsl_ts, E1INP_SIGN_RSL, bts->c0, IPAC_PROTO_RSL, 0); /* create back-links from bts/trx */ bts->oml_link = oml_link; + bts->osmo_link = osmo_link; bts->c0->rsl_link_primary = rsl_link; /* default port at BTS for incoming connections is 3006 */ @@ -191,6 +196,9 @@ static int ipacc_msg_ack(uint8_t mt, struct gsm_bts_trx *trx) { + if (mt != NM_MT_IPACC_SET_NVATTR_ACK && mt != NM_MT_IPACC_SET_ATTR_ACK) + return 0; + if (sw_load_state == 1) { fprintf(stderr, "The new software is activated.\n"); check_restart_or_exit(trx); @@ -352,14 +360,23 @@ struct ipacc_ack_signal_data *ipacc_data; struct nm_statechg_signal_data *nsd; struct msgb *oml_msg; + struct gsm_bts_trx *trx; switch (signal) { case S_NM_IPACC_NACK: ipacc_data = signal_data; - return ipacc_msg_nack(ipacc_data->msg_type); + return ipacc_msg_nack(ipacc_data->foh->msg_type); case S_NM_IPACC_ACK: ipacc_data = signal_data; - return ipacc_msg_ack(ipacc_data->msg_type, ipacc_data->trx); + switch (ipacc_data->foh->obj_class) { + case NM_OC_BASEB_TRANSC: + case NM_OC_RADIO_CARRIER: + trx = gsm_bts_trx_num(ipacc_data->bts, + ipacc_data->foh->obj_inst.trx_nr); + return ipacc_msg_ack(ipacc_data->foh->msg_type, trx); + default: + return 0; + } case S_NM_IPACC_RESTART_ACK: if (!quiet) printf("The BTS has acked the restart. Exiting.\n"); @@ -387,6 +404,32 @@ return 0; } +/* Callback function to be called every time we receive a signal from INPUT */ +static int inp_sig_cb(unsigned int subsys, unsigned int signal, + void *handler_data, void *signal_data) +{ + struct input_signal_data *isd = signal_data; + + if (subsys != SS_L_INPUT) + return -EINVAL; + + fprintf(stderr, "%s(): Input signal '%s' received\n", __func__, + get_value_string(e1inp_signal_names, signal)); + + switch (signal) { + case S_L_INP_TEI_UP: + break; + case S_L_INP_TEI_DN: + fprintf(stderr, "Lost E1 %s link\n", e1inp_signtype_name(isd->link_type)); + exit(1); + break; + default: + break; + } + + return 0; +} + /* callback function passed to the ABIS OML code */ static int percent; static int percent_old; @@ -1152,6 +1195,7 @@ bts->oml_tei = stream_id; osmo_signal_register_handler(SS_NM, nm_sig_cb, NULL); + osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL); osmo_signal_register_handler(SS_IPAC_NWL, nwl_sig_cb, NULL); ipac_nwl_init();
View file
osmo-bsc_1.9.0.tar.xz/src/ipaccess/stubs.c -> osmo-bsc_1.10.0.tar.xz/src/ipaccess/stubs.c
Changed
@@ -1,6 +1,6 @@ /* Stubs required for linking */ -/* (C) 2018 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> +/* (C) 2018-2022 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> * * All Rights Reserved * @@ -19,14 +19,10 @@ * */ -#include <stdbool.h> struct gsm_bts; -struct gsm_bts_trx_ts; -struct msgb; -struct bsc_msc_data; -bool on_gsm_ts_init(struct gsm_bts_trx_ts *ts) +int gsm_bts_check_cfg(struct gsm_bts *bts) { - /* No TS init required here. */ - return true; + /* No checks required here */ + return 0; }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/Makefile.am -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/Makefile.am
Changed
@@ -33,7 +33,7 @@ abis_rsl.c \ acc.c \ assignment_fsm.c \ - bsc_ctrl_commands.c \ + bsc_ctrl.c \ bsc_ctrl_lookup.c \ bsc_init.c \ bsc_rf_ctrl.c \ @@ -45,6 +45,7 @@ bsc_vty.c \ bts.c \ bts_trx.c \ + bts_trx_ctrl.c \ bts_ericsson_rbs2000.c \ bts_init.c \ bts_ipaccess_nanobts.c \ @@ -54,6 +55,8 @@ bts_sm.c \ bts_osmobts.c \ bts_unknown.c \ + bts_ctrl.c \ + bts_setup_ramp.c \ bts_vty.c \ bts_trx_vty.c \ chan_alloc.c \ @@ -70,6 +73,7 @@ handover_logic.c \ handover_vty.c \ lb.c \ + lchan.c \ lchan_fsm.c \ lchan_rtp_fsm.c \ lchan_select.c \ @@ -92,7 +96,6 @@ nm_rcarrier_fsm.c \ gsm_08_08.c \ osmo_bsc_bssap.c \ - osmo_bsc_ctrl.c \ osmo_bsc_filter.c \ osmo_bsc_grace.c \ osmo_bsc_lcls.c \ @@ -122,6 +125,7 @@ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOMGCPCLIENT_LIBS) \ + -lm \ $(NULL) bin_PROGRAMS = \
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/abis_nm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/abis_nm.c
Changed
@@ -2865,6 +2865,7 @@ struct tlv_parsed tp; struct ipacc_ack_signal_data signal; struct e1inp_sign_link *sign_link = msg->dst; + struct gsm_bts *bts = sign_link->trx->bts; struct gsm_bts_trx *trx; foh = (struct abis_om_fom_hdr *) (oh->data + 1 + idstrlen); @@ -2874,14 +2875,14 @@ return -EINVAL; } - if (abis_nm_tlv_parse(&tp, sign_link->trx->bts, foh->data, oh->length - sizeof(*foh)) < 0) { + if (abis_nm_tlv_parse(&tp, bts, foh->data, oh->length - sizeof(*foh)) < 0) { LOGPFOH(DNM, LOGL_ERROR, foh, "%s(): tlv_parse failed\n", __func__); return -EINVAL; } /* The message might be received over the main OML link, so we cannot * just use sign_link->trx. Resolve it by number from the FOM header. */ - trx = gsm_bts_trx_num(sign_link->trx->bts, foh->obj_inst.trx_nr); + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); DEBUGPFOH(DNM, foh, "Rx IPACCESS(0x%02x): %s\n", foh->msg_type, osmo_hexdump(foh->data, oh->length - sizeof(*foh))); @@ -2961,21 +2962,16 @@ case NM_MT_IPACC_RSL_CONNECT_NACK: case NM_MT_IPACC_SET_NVATTR_NACK: case NM_MT_IPACC_GET_NVATTR_NACK: - if (!trx) - goto obj_inst_error; - signal.trx = trx; - signal.msg_type = foh->msg_type; + signal.bts = bts; + signal.foh = foh; osmo_signal_dispatch(SS_NM, S_NM_IPACC_NACK, &signal); break; + case NM_MT_IPACC_RSL_CONNECT_ACK: case NM_MT_IPACC_SET_NVATTR_ACK: - if (!trx) - goto obj_inst_error; - signal.trx = trx; - signal.msg_type = foh->msg_type; - osmo_signal_dispatch(SS_NM, S_NM_IPACC_ACK, &signal); - break; case NM_MT_IPACC_SET_ATTR_ACK: - osmo_signal_dispatch(SS_NM, S_NM_IPACC_SET_ATTR_ACK, msg); + signal.bts = bts; + signal.foh = foh; + osmo_signal_dispatch(SS_NM, S_NM_IPACC_ACK, &signal); break; default: break; @@ -3041,8 +3037,17 @@ LOG_TRX(trx, DRSL, LOGL_NOTICE, "RSL connection request timed out\n"); /* Fake an RSL CONNECT NACK message from the BTS. */ - signal.trx = trx; - signal.msg_type = NM_MT_IPACC_RSL_CONNECT_NACK; + struct abis_om_fom_hdr foh = { + .msg_type = NM_MT_IPACC_RSL_CONNECT_NACK, + .obj_class = NM_OC_BASEB_TRANSC, + .obj_inst = { + .bts_nr = trx->bts->bts_nr, + .trx_nr = trx->nr, + .ts_nr = 0xff, + }, + }; + signal.foh = &foh; + signal.bts = trx->bts; osmo_signal_dispatch(SS_NM, S_NM_IPACC_NACK, &signal); }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/abis_om2000.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/abis_om2000.c
Changed
@@ -44,9 +44,22 @@ #include <osmocom/bsc/abis_om2000.h> #include <osmocom/bsc/signal.h> #include <osmocom/bsc/timeslot_fsm.h> +#include <osmocom/bsc/nm_common_fsm.h> #include <osmocom/bsc/bts.h> #include <osmocom/abis/e1_input.h> +static inline void abis_om2000_fsm_transc_becomes_enabled(struct gsm_bts_trx *trx) +{ + nm_obj_fsm_becomes_enabled_disabled(trx->bts, trx, NM_OC_RADIO_CARRIER, true); + nm_obj_fsm_becomes_enabled_disabled(trx->bts, &trx->bb_transc, NM_OC_BASEB_TRANSC, true); +} + +static inline void abis_om2000_fsm_transc_becomes_disabled(struct gsm_bts_trx *trx) +{ + nm_obj_fsm_becomes_enabled_disabled(trx->bts, trx, NM_OC_RADIO_CARRIER, false); + nm_obj_fsm_becomes_enabled_disabled(trx->bts, &trx->bb_transc, NM_OC_BASEB_TRANSC, false); +} + /* FIXME: move to libosmocore */ struct osmo_fsm_inst *osmo_fsm_inst_alloc_child_id(struct osmo_fsm *fsm, struct osmo_fsm_inst *parent, @@ -921,7 +934,7 @@ return nm_state; } -static void *mo2obj(struct gsm_bts *bts, struct abis_om2k_mo *mo) +static void *mo2obj(struct gsm_bts *bts, const struct abis_om2k_mo *mo) { struct gsm_bts_trx *trx; @@ -949,23 +962,11 @@ return NULL; } -static void update_mo_state(struct gsm_bts *bts, struct abis_om2k_mo *mo, uint8_t mo_state) +/* Derive an OML Availability state from an OM2000 MO state */ +static enum abis_nm_avail_state abis_nm_av_state_from_om2k_av_state(struct abis_om2k_mo *mo, uint8_t mo_state) { - struct gsm_nm_state *nm_state = mo2nm_state(bts, mo); - struct nm_statechg_signal_data nsd; bool has_enabled_state; - if (!nm_state) - return; - - memset(&nsd, 0, sizeof(nsd)); - - nsd.bts = bts; - nsd.obj = mo2obj(bts, mo); - nsd.old_state = *nm_state; - nsd.new_state = *nm_state; - nsd.om2k_mo = mo; - switch (mo->class) { case OM2K_MO_CLS_CF: case OM2K_MO_CLS_TRXC: @@ -978,50 +979,130 @@ switch (mo_state) { case OM2K_MOSTATE_RESET: - nsd.new_state.availability = NM_AVSTATE_POWER_OFF; - break; + return NM_AVSTATE_POWER_OFF; case OM2K_MOSTATE_STARTED: - nsd.new_state.availability = has_enabled_state ? NM_AVSTATE_OFF_LINE : NM_AVSTATE_OK; - break; + return has_enabled_state ? NM_AVSTATE_OFF_LINE : NM_AVSTATE_OK; case OM2K_MOSTATE_ENABLED: - nsd.new_state.availability = NM_AVSTATE_OK; - break; + return NM_AVSTATE_OK; case OM2K_MOSTATE_DISABLED: - nsd.new_state.availability = NM_AVSTATE_POWER_OFF; - break; + return NM_AVSTATE_POWER_OFF; default: - nsd.new_state.availability = NM_AVSTATE_DEGRADED; - break; + return NM_AVSTATE_DEGRADED; } +} - /* Update current state before emitting signal: */ - nm_state->availability = nsd.new_state.availability; +/* The OM2000 -> 12.21 mapping we do doesn't have a separate bb_transc MO, + * for compatibility reasons we pretend to have it anyway. */ +static void update_bb_trxc_mo_state(struct gsm_bts *bts, struct abis_om2k_mo *mo, uint8_t mo_state) +{ + struct nm_statechg_signal_data nsd; + struct gsm_bts_trx *trx; + + trx = gsm_bts_trx_num(bts, mo->inst); + if (!trx) + return; + + memset(&nsd, 0, sizeof(nsd)); + nsd.bts = bts; + nsd.obj = mo2obj(bts, mo); + nsd.old_state = trx->bb_transc.mo.nm_state; + nsd.new_state = trx->bb_transc.mo.nm_state; + nsd.om2k_mo = mo; + + nsd.new_state.availability = abis_nm_av_state_from_om2k_av_state(mo, mo_state); + trx->bb_transc.mo.nm_state.availability = nsd.new_state.availability; osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); } -static void update_op_state(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t op_state) +static void update_mo_state(struct gsm_bts *bts, struct abis_om2k_mo *mo, uint8_t mo_state) { struct gsm_nm_state *nm_state = mo2nm_state(bts, mo); - struct gsm_nm_state new_state; + struct nm_statechg_signal_data nsd; if (!nm_state) return; - new_state = *nm_state; + memset(&nsd, 0, sizeof(nsd)); + + nsd.bts = bts; + nsd.obj = mo2obj(bts, mo); + nsd.old_state = *nm_state; + nsd.new_state = *nm_state; + nsd.om2k_mo = mo; + + nsd.new_state.availability = abis_nm_av_state_from_om2k_av_state(mo, mo_state); + + /* Update current state before emitting signal: */ + nm_state->availability = nsd.new_state.availability; + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); + + /* When the TRXC MO is updated, also update the BB TRXC accordingly. */ + if (mo->class == OM2K_MO_CLS_TRXC) + update_bb_trxc_mo_state(bts, mo, mo_state); +} + +/* Derive an OML Operational state from an OM2000 OP state */ +static enum abis_nm_op_state abis_nm_op_state_from_om2k_op_state(uint8_t op_state) +{ switch (op_state) { case 1: - new_state.operational = NM_OPSTATE_ENABLED; - break; + return NM_OPSTATE_ENABLED; case 0: - new_state.operational = NM_OPSTATE_DISABLED; - break; + return NM_OPSTATE_DISABLED; default: - new_state.operational = NM_OPSTATE_NULL; - break; + return NM_OPSTATE_NULL; } +} + +/* (see comment in update_bb_trxc_mo_state() above) */ +static void update_bb_trxc_op_state(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t op_state) +{ + struct nm_statechg_signal_data nsd; + struct gsm_bts_trx *trx; + + trx = gsm_bts_trx_num(bts, mo->inst); + if (!trx) + return; + + memset(&nsd, 0, sizeof(nsd)); + + nsd.bts = bts; + nsd.obj = mo2obj(bts, mo); + nsd.old_state = trx->bb_transc.mo.nm_state; + nsd.new_state = trx->bb_transc.mo.nm_state; + nsd.om2k_mo = mo; + + nsd.new_state.operational = abis_nm_op_state_from_om2k_op_state(op_state); + trx->bb_transc.mo.nm_state.operational = nsd.new_state.operational; + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); +} + +static void update_op_state(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t op_state) +{ + struct gsm_nm_state *nm_state = mo2nm_state(bts, mo); + struct nm_statechg_signal_data nsd; - nm_state->operational = new_state.operational; + if (!nm_state) + return; + + memset(&nsd, 0, sizeof(nsd)); + + nsd.bts = bts; + nsd.obj = mo2obj(bts, mo); + nsd.old_state = *nm_state; + nsd.new_state = *nm_state; + nsd.om2k_mo = mo; + + nsd.new_state.operational = abis_nm_op_state_from_om2k_op_state(op_state); + + /* Update current state before emitting signal: */ + nm_state->operational = nsd.new_state.operational; + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); + + /* When the TRXC MO is updated, also update the BB TRXC accordingly. */ + if (mo->class == OM2K_MO_CLS_TRXC) + update_bb_trxc_op_state(bts, mo, op_state); } static int abis_om2k_sendmsg(struct gsm_bts *bts, struct msgb *msg) @@ -2173,10 +2254,6 @@ struct om2k_trx_fsm_priv *otfp = fi->priv; struct gsm_bts_trx_ts *ts; - /* notify TS is ready */ - ts = &otfp->trx->tsotfp->cur_ts_nr; - osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_READY, NULL); - /* next ? */ if (++otfp->cur_ts_nr < 8) { /* iterate to the next timeslot */ @@ -2201,18 +2278,54 @@ static void om2k_trx_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct om2k_trx_fsm_priv *otfp = fi->priv; + struct nm_statechg_signal_data nsd; + struct nm_statechg_signal_data nsd_bb_transc; + struct gsm_bts_trx *trx = otfp->trx; + unsigned int i; + + memset(&nsd, 0, sizeof(nsd)); + + nsd.bts = trx->bts; + nsd.obj = trx; + nsd.old_state = trx->mo.nm_state; + nsd.new_state = trx->mo.nm_state; + nsd.om2k_mo = &trx->rbs2000.trxc.om2k_mo.addr; /* See e1_config:bts_isdn_sign_link() / OS#4914 */ - otfp->trx->mo.nm_state.administrative = NM_STATE_UNLOCKED; + nsd.new_state.administrative = NM_STATE_UNLOCKED; + trx->mo.nm_state.administrative = nsd.new_state.administrative; + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd); + + /* The OM2000 -> 12.21 mapping we do doesn't have separate bb_transc MO, + * for compatibility reasons we pretend to have it anyway and mirror the + * mo state of the TRXC on it. */ + memset(&nsd_bb_transc, 0, sizeof(nsd)); + nsd_bb_transc.bts = trx->bts; + nsd_bb_transc.obj = &trx->bb_transc; + nsd_bb_transc.old_state = trx->bb_transc.mo.nm_state; + nsd_bb_transc.new_state = trx->bb_transc.mo.nm_state; + nsd_bb_transc.om2k_mo = &trx->rbs2000.trxc.om2k_mo.addr; + nsd_bb_transc.new_state.administrative = NM_STATE_UNLOCKED; + trx->bb_transc.mo.nm_state.administrative = nsd_bb_transc.new_state.administrative; + osmo_signal_dispatch(SS_NM, S_NM_STATECHG, &nsd_bb_transc); + + abis_om2000_fsm_transc_becomes_enabled(trx); if (fi->proc.parent) osmo_fsm_inst_dispatch(fi->proc.parent, otfp->done_event, NULL); + + /* Notify the timeslot FSM that all TRX initialization steps are done. */ + for (i = 0; i < ARRAY_SIZE(trx->ts); i++) + osmo_fsm_inst_dispatch(trx->tsi.fi, TS_EV_OML_READY, NULL); } static void om2k_trx_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct om2k_trx_fsm_priv *otfp = fi->priv; + switch (event) { case OM2K_TRX_EVT_RESET: + abis_om2000_fsm_transc_becomes_disabled(otfp->trx); osmo_fsm_inst_broadcast_children(fi, event, data); osmo_fsm_inst_state_chg(fi, OM2K_TRX_S_INIT, 0, 0); break;
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/abis_rsl.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/abis_rsl.c
Changed
@@ -57,6 +57,7 @@ #include <osmocom/bsc/bts.h> #include <osmocom/bsc/power_control.h> #include <osmocom/bsc/chan_counts.h> +#include <osmocom/bsc/lchan.h> static void send_lchan_signal(int sig_no, struct gsm_lchan *lchan, struct gsm_meas_rep *resp) @@ -439,7 +440,7 @@ default: LOGP(DRSL, LOGL_ERROR, "unsupported activation lchan->type %u %s\n", - lchan->type, gsm_lchant_name(lchan->type)); + lchan->type, gsm_chan_t_name(lchan->type)); return -EINVAL; } @@ -962,7 +963,7 @@ return abis_rsl_sendmsg(msg); } -/* Chapter 8.5.6 */ +/* Chapter 8.5.6 Immediate Assignment Command (with Ericcson vendor specific RSL extension) */ int rsl_ericsson_imm_assign_cmd(struct gsm_bts *bts, uint32_t tlli, uint8_t len, uint8_t *val) { struct msgb *msg = rsl_imm_assign_cmd_common(bts, len, val); @@ -1799,25 +1800,29 @@ /* Handle packet channel rach requests */ static int rsl_rx_pchan_rqd(struct chan_rqd *rqd) { - uint8_t t1, t2, t3; uint32_t fn; uint8_t rqd_ta; uint8_t is_11bit; + struct gsm_time gsm_time; /* Process rach request and forward contained information to PCU */ if (rqd->ref.ra == 0x7F) { is_11bit = 1; /* FIXME: Also handle 11 bit rach requests */ - LOGP(DRSL, LOGL_ERROR, "BTS %d eleven bit access burst not supported yet!\n",rqd->bts->nr); + LOGP(DRSL, LOGL_ERROR, "BTS %d eleven bit access burst not supported yet!\n", rqd->bts->nr); return -EINVAL; } else { is_11bit = 0; - t1 = rqd->ref.t1; - t2 = rqd->ref.t2; - t3 = rqd->ref.t3_low | (rqd->ref.t3_high << 3); - fn = (51 * ((t3-t2) % 26) + t3 + 51 * 26 * t1); rqd_ta = rqd->ta; + + gsm_time.t1 = rqd->ref.t1; + gsm_time.t2 = rqd->ref.t2; + gsm_time.t3 = rqd->ref.t3_low | (rqd->ref.t3_high << 3); + fn = gsm_gsmtime2fn(&gsm_time); + + LOG_BTS(rqd->bts, DRSL, LOGL_INFO, "CHAN RQD: fn(t1=%u,t3=%u,t2=%u) = %u\n", + gsm_time.t1, gsm_time.t3, gsm_time.t2, fn); } return pcu_tx_rach_ind(rqd->bts, rqd_ta, rqd->ref.ra, fn, is_11bit, @@ -1911,8 +1916,10 @@ /* Determine channel request cause code */ rqd->reason = get_reason_by_chreq(rqd->ref.ra, bts->network->neci); - LOG_BTS(bts, DRSL, LOGL_INFO, "CHAN RQD: reason: %s (ra=0x%02x, neci=0x%02x, chreq_reason=0x%02x)\n", - get_value_string(gsm_chreq_descs, rqd->reason), rqd->ref.ra, bts->network->neci, rqd->reason); + LOG_BTS(bts, DRSL, LOGL_INFO, "CHAN RQD: reason: %s (ra=0x%02x, t1=%d, t3=%d, t2=%d, neci=0x%02x, chreq_reason=0x%02x)\n", + get_value_string(gsm_chreq_descs, rqd->reason), rqd->ref.ra, + rqd->ref.t1, rqd->ref.t3_high << 3 | rqd->ref.t3_low, rqd->ref.t2, + bts->network->neci, rqd->reason); rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_CHREQ_TOTAL)); switch (rqd->reason) { @@ -1978,10 +1985,10 @@ ts_for_n_lchans(lchan, ts, ts->max_primary_lchans) { if (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H) { if (lchan->fi->state == LCHAN_ST_ESTABLISHED) { - if (!lchan_est || bts->chan_alloc_reverse) + if (!lchan_est || bts->chan_alloc_chan_req_reverse) lchan_est = lchan; } else { - if (!lchan_any || bts->chan_alloc_reverse) + if (!lchan_any || bts->chan_alloc_chan_req_reverse) lchan_any = lchan; } } @@ -2007,12 +2014,12 @@ /* First check the situation on the BTS, if we have TCH/H or TCH/F resources available for another (EMERGENCY) * call. If yes, then no (further) action has to be carried out. */ - if (lchan_avail_by_type(rqd->bts, GSM_LCHAN_TCH_F, true)) { + if (lchan_avail_by_type(rqd->bts, GSM_LCHAN_TCH_F, SELECT_FOR_MS_CHAN_REQ, NULL, true)) { LOG_BTS(rqd->bts, DRSL, LOGL_NOTICE, "CHAN RQD/EMERGENCY-PRIORITY: at least one TCH/F is (now) available!\n"); return false; } - if (lchan_avail_by_type(rqd->bts, GSM_LCHAN_TCH_H, true)) { + if (lchan_avail_by_type(rqd->bts, GSM_LCHAN_TCH_H, SELECT_FOR_MS_CHAN_REQ, NULL, true)) { LOG_BTS(rqd->bts, DRSL, LOGL_NOTICE, "CHAN RQD/EMERGENCY-PRIORITY: at least one TCH/H is (now) available!\n"); return false; @@ -2083,7 +2090,7 @@ int free_tchf, free_tchh; bool needs_dyn_switch; - lchan = lchan_avail_by_type(bts, GSM_LCHAN_SDCCH, false); + lchan = lchan_avail_by_type(bts, GSM_LCHAN_SDCCH, SELECT_FOR_MS_CHAN_REQ, NULL, false); if (!lchan) return NULL; @@ -2095,7 +2102,7 @@ if (free_tchf == 0 && free_tchh == 0) { LOG_BTS(bts, DRSL, LOGL_INFO, "CHAN RQD: 0x%x Requesting %s reason=call but no TCH available\n", - rqd->ref.ra, gsm_lchant_name(lctype)); + rqd->ref.ra, gsm_chan_t_name(lctype)); return NULL; } @@ -2124,7 +2131,7 @@ LOG_BTS(bts, DRSL, LOGL_INFO, "CHAN RQD: 0x%x Requesting %s reason=call but dyn TS switch to " "SDCCH would starve the single available TCH timeslot\n", - rqd->ref.ra, gsm_lchant_name(lctype)); + rqd->ref.ra, gsm_chan_t_name(lctype)); return NULL; } @@ -2146,8 +2153,8 @@ /* Handle PDCH related rach requests (in case of BSC-co-located-PCU) */ if (rqd->reason == GSM_CHREQ_REASON_PDCH) { - rsl_rx_pchan_rqd(rqd); - return; + if (rsl_rx_pchan_rqd(rqd) == 0) + goto leave; } /* Ensure that emergency calls will get priority over regular calls, however releasing @@ -2172,7 +2179,9 @@ if (rqd->reason == GSM_CHREQ_REASON_CALL) { lchan = _select_sdcch_for_call(bts, rqd, lctype); } else if (rqd->reason != GSM_CHREQ_REASON_EMERG) { - lchan = lchan_select_by_type(bts, GSM_LCHAN_SDCCH); + lchan = lchan_select_by_type(bts, GSM_LCHAN_SDCCH, + SELECT_FOR_MS_CHAN_REQ, + NULL); } /* else: Emergency calls will be put on a free TCH/H or TCH/F directly * in the code below, all other channel requests will get an SDCCH first @@ -2185,20 +2194,24 @@ rqd->reason == GSM_CHREQ_REASON_EMERG)) { if (!lchan) { LOG_BTS(bts, DRSL, LOGL_NOTICE, "CHAN RQD%s: no resources for %s 0x%x, retrying with %s\n", - get_value_string(gsm_chreq_descs, rqd->reason), gsm_lchant_name(GSM_LCHAN_SDCCH), - rqd->ref.ra, gsm_lchant_name(GSM_LCHAN_TCH_H)); - lchan = lchan_select_by_type(bts, GSM_LCHAN_TCH_H); + get_value_string(gsm_chreq_descs, rqd->reason), gsm_chan_t_name(GSM_LCHAN_SDCCH), + rqd->ref.ra, gsm_chan_t_name(GSM_LCHAN_TCH_H)); + lchan = lchan_select_by_type(bts, GSM_LCHAN_TCH_H, + SELECT_FOR_MS_CHAN_REQ, + NULL); } if (!lchan) { LOG_BTS(bts, DRSL, LOGL_NOTICE, "CHAN RQD%s: no resources for %s 0x%x, retrying with %s\n", - get_value_string(gsm_chreq_descs, rqd->reason), gsm_lchant_name(GSM_LCHAN_SDCCH), - rqd->ref.ra, gsm_lchant_name(GSM_LCHAN_TCH_F)); - lchan = lchan_select_by_type(bts, GSM_LCHAN_TCH_F); + get_value_string(gsm_chreq_descs, rqd->reason), gsm_chan_t_name(GSM_LCHAN_SDCCH), + rqd->ref.ra, gsm_chan_t_name(GSM_LCHAN_TCH_F)); + lchan = lchan_select_by_type(bts, GSM_LCHAN_TCH_F, + SELECT_FOR_MS_CHAN_REQ, + NULL); } } if (!lchan) { LOG_BTS(bts, DRSL, LOGL_NOTICE, "CHAN RQD%s: no resources for %s 0x%x\n", - get_value_string(gsm_chreq_descs, rqd->reason), gsm_lchant_name(lctype), rqd->ref.ra); + get_value_string(gsm_chreq_descs, rqd->reason), gsm_chan_t_name(lctype), rqd->ref.ra); rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_CHREQ_NO_CHANNEL)); rsl_tx_imm_ass_rej(bts, &rqd->ref); llist_del(&rqd->entry); @@ -2227,6 +2240,8 @@ }; lchan_activate(lchan, &info); + +leave: llist_del(&rqd->entry); talloc_free(rqd); return; @@ -2732,11 +2747,16 @@ port = ntohs(port); lchan->abis_ip.connect_port = port; } + if (TLVP_PRESENT(tv, RSL_IE_OSMO_OSMUX_CID)) { + lchan->abis_ip.osmux.remote_cid_present = true; + lchan->abis_ip.osmux.remote_cid = tlvp_val8(tv, RSL_IE_OSMO_OSMUX_CID, 0); + } LOG_LCHAN(lchan, LOGL_DEBUG, "Rx IPACC %s ACK:" - " BTS=%s:%u conn_id=%u rtp_payload2=0x%02x speech_mode=0x%02x\n", + " BTS=%s:%u conn_id=%u rtp_payload2=0x%02x speech_mode=0x%02x osmux_use=%d osmux_loc_cid=%d\n", label, ip_to_a(lchan->abis_ip.bound_ip), lchan->abis_ip.bound_port, - lchan->abis_ip.conn_id, lchan->abis_ip.rtp_payload2, lchan->abis_ip.speech_mode); + lchan->abis_ip.conn_id, lchan->abis_ip.rtp_payload2, lchan->abis_ip.speech_mode, + lchan->abis_ip.osmux.use, lchan->abis_ip.osmux.local_cid); } /*! Send Issue IPA RSL CRCX to configure the RTP port of the BTS. @@ -2761,9 +2781,13 @@ /* 0x1- == receive-only, 0x-1 == EFR codec */ msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, lchan->abis_ip.speech_mode); msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD, lchan->abis_ip.rtp_payload); + if (lchan->abis_ip.osmux.use) + msgb_tlv_put(msg, RSL_IE_OSMO_OSMUX_CID, 1, &lchan->abis_ip.osmux.local_cid); - LOG_LCHAN(lchan, LOGL_DEBUG, "Sending IPACC CRCX to BTS: speech_mode=0x%02x RTP_PAYLOAD=%d\n", - lchan->abis_ip.speech_mode, lchan->abis_ip.rtp_payload); + LOG_LCHAN(lchan, LOGL_DEBUG, + "Sending IPACC CRCX to BTS: speech_mode=0x%02x RTP_PAYLOAD=%d osmux_use=%d osmux_loc_cid=%d\n", + lchan->abis_ip.speech_mode, lchan->abis_ip.rtp_payload, + lchan->abis_ip.osmux.use, lchan->abis_ip.osmux.local_cid); msg->dst = rsl_chan_link(lchan); @@ -2801,6 +2825,8 @@ msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD, lchan->abis_ip.rtp_payload); if (lchan->abis_ip.rtp_payload2) msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD2, lchan->abis_ip.rtp_payload2); + if (lchan->abis_ip.osmux.use) + msgb_tlv_put(msg, RSL_IE_OSMO_OSMUX_CID, 1, &lchan->abis_ip.osmux.local_cid); msg->dst = rsl_chan_link(lchan); @@ -2858,6 +2884,15 @@ return -EINVAL; } + if (!lchan->abis_ip.osmux.use && TLVP_PRESENT(&tv, RSL_IE_OSMO_OSMUX_CID)) { + LOGP(DRSL, LOGL_NOTICE, "Received unexpected IE Osmux CID\n"); + return -EINVAL; + } + if (lchan->abis_ip.osmux.use && !TLVP_PRESENT(&tv, RSL_IE_OSMO_OSMUX_CID)) { + LOGP(DRSL, LOGL_NOTICE, "Mandatory IE Osmux CID missing\n"); + return -EINVAL; + } + ipac_parse_rtp(lchan, &tv, "CRCX"); osmo_fsm_inst_dispatch(lchan->fi_rtp, LCHAN_RTP_EV_IPACC_CRCX_ACK, 0);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/acc.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/acc.c
Changed
@@ -73,9 +73,8 @@ if (!osmo_timer_pending(&acc_mgr->rotate_timer)) osmo_timer_schedule(&acc_mgr->rotate_timer, acc_mgr->rotation_time_sec, 0); } else { - /* No rotation needed, disable rotation timer */ - if (osmo_timer_pending(&acc_mgr->rotate_timer)) - osmo_timer_del(&acc_mgr->rotate_timer); + /* No rotation needed, disable rotation timer (if pending) */ + osmo_timer_del(&acc_mgr->rotate_timer); } } @@ -565,8 +564,7 @@ */ void acc_ramp_abort(struct acc_ramp *acc_ramp) { - if (osmo_timer_pending(&acc_ramp->step_timer)) - osmo_timer_del(&acc_ramp->step_timer); + osmo_timer_del(&acc_ramp->step_timer); acc_mgr_set_len_allowed_ramp(&acc_ramp->bts->acc_mgr, 10); }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/assignment_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/assignment_fsm.c
Changed
@@ -37,7 +37,7 @@ #include <osmocom/bsc/abis_rsl.h> #include <osmocom/bsc/bts.h> #include <osmocom/bsc/bsc_stats.h> - +#include <osmocom/bsc/lchan.h> #include <osmocom/bsc/assignment_fsm.h> static struct osmo_fsm assignment_fsm; @@ -51,10 +51,10 @@ } static const struct osmo_tdef_state_timeout assignment_fsm_timeouts32 = { - ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE = { .T=10 }, - ASSIGNMENT_ST_WAIT_RR_ASS_COMPLETE = { .keep_timer=true }, - ASSIGNMENT_ST_WAIT_LCHAN_ESTABLISHED = { .keep_timer=true }, - ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC = { .T=23042 }, + ASSIGNMENT_ST_WAIT_LCHAN_ACTIVE = { .T = 10 }, + ASSIGNMENT_ST_WAIT_RR_ASS_COMPLETE = { .keep_timer = true }, + ASSIGNMENT_ST_WAIT_LCHAN_ESTABLISHED = { .keep_timer = true }, + ASSIGNMENT_ST_WAIT_MGW_ENDPOINT_TO_MSC = { .T = 23042 }, }; /* Transition to a state, using the T timer defined in assignment_fsm_timeouts. @@ -190,7 +190,7 @@ assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE, "Unable to compose Chosen Channel for mode=%s type=%s", get_value_string(gsm48_chan_mode_names, lchan->current_ch_mode_rate.chan_mode), - gsm_lchant_name(lchan->type)); + gsm_chan_t_name(lchan->type)); return; } @@ -222,7 +222,7 @@ if (gscon_is_aoip(conn)) { /* Extrapolate speech codec from speech mode */ gsm0808_speech_codec_from_chan_type(&sc, perm_spch); - sc.cfg = conn->lchan->activate.ch_mode_rate.s15_s0; + sc.cfg = conn->lchan->current_ch_mode_rate.s15_s0; sc_ptr = ≻ } } @@ -364,7 +364,7 @@ } } -void assignment_fsm_init() +void assignment_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&assignment_fsm) == 0); } @@ -597,14 +597,16 @@ "Assignment of lchan %s to %s type %s requested, but lchan is not compatible", gsm_lchan_name(conn->lchan), gsm_lchan_name(req->target_lchan), - gsm_lchant_name(conn->assignment.new_lchan->type)); + gsm_chan_t_name(conn->assignment.new_lchan->type)); return; } } else { /* Try to allocate a new lchan in order of preference */ for (i = 0; i < req->n_ch_mode_rate; i++) { conn->assignment.new_lchan = lchan_select_by_chan_mode(bts, - req->ch_mode_rate_listi.chan_mode, req->ch_mode_rate_listi.chan_rate); + req->ch_mode_rate_listi.chan_mode, + req->ch_mode_rate_listi.chan_rate, + SELECT_FOR_ASSIGNMENT, conn->lchan); if (!conn->assignment.new_lchan) continue; LOG_ASSIGNMENT(conn, LOGL_DEBUG, "selected new lchan %s for mode%d = %s channel_rate=%d\n",
View file
osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bsc_ctrl.c
Added
@@ -0,0 +1,866 @@ +/* + * (C) 2011 by Daniel Willmann <daniel@totalueberwachung.de> + * (C) 2011 by On-Waves + * (C) 2011-2015 by Holger Hans Peter Freyther + * (C) 2013-2015 by sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +#include <errno.h> +#include <time.h> + +#include <osmocom/gsm/ipa.h> + +#include <osmocom/ctrl/control_cmd.h> +#include <osmocom/ctrl/control_if.h> + +#include <osmocom/vty/command.h> +#include <osmocom/vty/misc.h> + +#include <osmocom/gsm/gsm48.h> +#include <osmocom/bsc/ipaccess.h> +#include <osmocom/bsc/gsm_data.h> +#include <osmocom/bsc/abis_nm.h> +#include <osmocom/bsc/debug.h> +#include <osmocom/bsc/chan_alloc.h> +#include <osmocom/bsc/osmo_bsc_rf.h> +#include <osmocom/bsc/bsc_msc_data.h> +#include <osmocom/bsc/bts.h> +#include <osmocom/bsc/a_reset.h> +#include <osmocom/bsc/ctrl.h> +#include <osmocom/bsc/handover_ctrl.h> +#include <osmocom/bsc/neighbor_ident.h> + +static int verify_net_apply_config_file(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + FILE *cfile; + + if (!cmd->value || cmd->value0 == '\0') + return -1; + + cfile = fopen(cmd->value, "r"); + if (!cfile) + return -1; + + fclose(cfile); + + return 0; +} +static int set_net_apply_config_file(struct ctrl_cmd *cmd, void *_data) +{ + int rc; + FILE *cfile; + unsigned cmd_ret = CTRL_CMD_ERROR; + + LOGP(DCTRL, LOGL_NOTICE, "Applying VTY snippet from %s...\n", cmd->value); + cfile = fopen(cmd->value, "r"); + if (!cfile) { + LOGP(DCTRL, LOGL_NOTICE, "Applying VTY snippet from %s: fopen() failed: %d\n", + cmd->value, errno); + cmd->reply = "NoFile"; + return cmd_ret; + } + + rc = vty_read_config_filep(cfile, NULL); + LOGP(DCTRL, LOGL_NOTICE, "Applying VTY snippet from %s returned %d\n", cmd->value, rc); + if (rc) { + cmd->reply = talloc_asprintf(cmd, "ParseError=%d", rc); + if (!cmd->reply) + cmd->reply = "OOM"; + goto close_ret; + } + + rc = neighbors_check_cfg(); + if (rc) { + cmd->reply = talloc_asprintf(cmd, "Errors in neighbor configuration"); + if (!cmd->reply) + cmd->reply = "OOM"; + goto close_ret; + } + + cmd->reply = "OK"; + cmd_ret = CTRL_CMD_REPLY; +close_ret: + fclose(cfile); + return cmd_ret; +} +CTRL_CMD_DEFINE_WO(net_apply_config_file, "apply-config-file"); + +static int verify_net_write_config_file(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + return 0; +} +static int set_net_write_config_file(struct ctrl_cmd *cmd, void *_data) +{ + const char *cfile_name; + unsigned cmd_ret = CTRL_CMD_ERROR; + + if (strcmp(cmd->value, "overwrite")) + host_config_set(cmd->value); + + cfile_name = host_config_file(); + + LOGP(DCTRL, LOGL_NOTICE, "Writing VTY config to file %s...\n", cfile_name); + if (osmo_vty_write_config_file(cfile_name) < 0) + goto ret; + + cmd->reply = "OK"; + cmd_ret = CTRL_CMD_REPLY; +ret: + return cmd_ret; +} +CTRL_CMD_DEFINE_WO(net_write_config_file, "write-config-file"); + +CTRL_CMD_DEFINE(net_mcc, "mcc"); +static int get_net_mcc(struct ctrl_cmd *cmd, void *_data) +{ + struct gsm_network *net = cmd->node; + cmd->reply = talloc_asprintf(cmd, "%s", osmo_mcc_name(net->plmn.mcc)); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + return CTRL_CMD_REPLY; +} +static int set_net_mcc(struct ctrl_cmd *cmd, void *_data) +{ + struct gsm_network *net = cmd->node; + uint16_t mcc; + if (osmo_mcc_from_str(cmd->value, &mcc)) + return -1; + net->plmn.mcc = mcc; + return get_net_mcc(cmd, _data); +} +static int verify_net_mcc(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + if (osmo_mcc_from_str(value, NULL)) + return -1; + return 0; +} + +CTRL_CMD_DEFINE(net_mnc, "mnc"); +static int get_net_mnc(struct ctrl_cmd *cmd, void *_data) +{ + struct gsm_network *net = cmd->node; + cmd->reply = talloc_asprintf(cmd, "%s", osmo_mnc_name(net->plmn.mnc, net->plmn.mnc_3_digits)); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + return CTRL_CMD_REPLY; +} +static int set_net_mnc(struct ctrl_cmd *cmd, void *_data) +{ + struct gsm_network *net = cmd->node; + struct osmo_plmn_id plmn = net->plmn; + if (osmo_mnc_from_str(cmd->value, &plmn.mnc, &plmn.mnc_3_digits)) { + cmd->reply = "Error while decoding MNC"; + return CTRL_CMD_ERROR; + } + net->plmn = plmn; + return get_net_mnc(cmd, _data); +} +static int verify_net_mnc(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + if (osmo_mnc_from_str(value, NULL, NULL)) + return -1; + return 0; +} + +static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_network *net = cmd->node; + struct gsm_bts *bts; + + llist_for_each_entry(bts, &net->bts_list, list) { + if (!is_ipaccess_bts(bts)) + continue; + + /* + * The ip.access nanoBTS seems to be unreliable on BSSGP + * so let's us just reboot it. For the sysmoBTS we can just + * restart the process as all state is gone. + */ + if (!is_osmobts(bts) && strcmp(cmd->value, "restart") == 0) { + struct gsm_bts_trx *trx; + llist_for_each_entry_reverse(trx, &bts->trx_list, list) + abis_nm_ipaccess_restart(trx); + } else + ipaccess_drop_oml(bts, "ctrl net.apply-configuration"); + } + + cmd->reply = "Tried to drop the BTS"; + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_WO_NOVRF(net_apply_config, "apply-configuration"); + +static int verify_net_mcc_mnc_apply(struct ctrl_cmd *cmd, const char *value, void *d) +{ + char *tmp, *saveptr, *mcc, *mnc; + int rc = 0; + + tmp = talloc_strdup(cmd, value); + if (!tmp) + return 1; + + mcc = strtok_r(tmp, ",", &saveptr); + mnc = strtok_r(NULL, ",", &saveptr); + + if (osmo_mcc_from_str(mcc, NULL) || osmo_mnc_from_str(mnc, NULL, NULL)) + rc = -1; + + talloc_free(tmp); + return rc; +} + +static int set_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_network *net = cmd->node; + char *tmp, *saveptr, *mcc_str, *mnc_str; + struct osmo_plmn_id plmn; + + tmp = talloc_strdup(cmd, cmd->value); + if (!tmp) + goto oom; + + mcc_str = strtok_r(tmp, ",", &saveptr); + mnc_str = strtok_r(NULL, ",", &saveptr); + + if (osmo_mcc_from_str(mcc_str, &plmn.mcc)) { + cmd->reply = "Error while decoding MCC"; + talloc_free(tmp); + return CTRL_CMD_ERROR; + } + + if (osmo_mnc_from_str(mnc_str, &plmn.mnc, &plmn.mnc_3_digits)) { + cmd->reply = "Error while decoding MNC"; + talloc_free(tmp); + return CTRL_CMD_ERROR; + } + + talloc_free(tmp); + + if (!osmo_plmn_cmp(&net->plmn, &plmn)) { + cmd->reply = "Nothing changed"; + return CTRL_CMD_REPLY; + } + + net->plmn = plmn; + + return set_net_apply_config(cmd, data); + +oom: + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; +} +CTRL_CMD_DEFINE_WO(net_mcc_mnc_apply, "mcc-mnc-apply"); + +static int get_net_rf_lock(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_network *net = cmd->node; + struct gsm_bts *bts; + const char *policy_name; + + policy_name = osmo_bsc_rf_get_policy_name(net->rf_ctrl->policy); + + llist_for_each_entry(bts, &net->bts_list, list) { + struct gsm_bts_trx *trx; + + /* Exclude the BTS from the global lock */ + if (bts->excl_from_rf_lock) + continue; + + llist_for_each_entry(trx, &bts->trx_list, list) { + if (trx->mo.nm_state.availability == NM_AVSTATE_OK && + trx->mo.nm_state.operational != NM_OPSTATE_DISABLED) { + cmd->reply = talloc_asprintf(cmd, + "state=on,policy=%s,bts=%u,trx=%u", + policy_name, bts->nr, trx->nr); + return CTRL_CMD_REPLY; + } + } + } + + cmd->reply = talloc_asprintf(cmd, "state=off,policy=%s", + policy_name); + return CTRL_CMD_REPLY; +} + +#define TIME_FORMAT_RFC2822 "%a, %d %b %Y %T %z" + +static int set_net_rf_lock(struct ctrl_cmd *cmd, void *data) +{ + int locked = atoi(cmd->value); + struct gsm_network *net = cmd->node; + time_t now = time(NULL); + char now_buf64; + struct osmo_bsc_rf *rf; + + if (!net) { + cmd->reply = "net not found."; + return CTRL_CMD_ERROR; + } + + rf = net->rf_ctrl; + + if (!rf) { + cmd->reply = "RF Ctrl is not enabled in the BSC Configuration"; + return CTRL_CMD_ERROR; + } + + talloc_free(rf->last_rf_lock_ctrl_command); + strftime(now_buf, sizeof(now_buf), TIME_FORMAT_RFC2822, gmtime(&now)); + rf->last_rf_lock_ctrl_command = + talloc_asprintf(rf, "rf_locked %u (%s)", locked, now_buf); + + osmo_bsc_rf_schedule_lock(rf, locked == 1 ? '0' : '1'); + + cmd->reply = talloc_asprintf(cmd, "%u", locked); + if (!cmd->reply) { + cmd->reply = "OOM."; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} + +static int verify_net_rf_lock(struct ctrl_cmd *cmd, const char *value, void *data) +{ + int locked = atoi(cmd->value); + + if ((locked != 0) && (locked != 1)) + return 1; + + return 0; +} +CTRL_CMD_DEFINE(net_rf_lock, "rf_locked"); + +static int get_net_bts_num(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_network *net = cmd->node; + + cmd->reply = talloc_asprintf(cmd, "%u", net->num_bts); + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_RO(net_bts_num, "number-of-bts"); + +/* Return a list of the states of each TRX for all BTS: + * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>;<bts_nr>,<trx_nr>,...;...; + * For details on the string, see bsc_rf_states_c(); + */ +static int get_net_rf_states(struct ctrl_cmd *cmd, void *data) +{ + cmd->reply = bsc_rf_states_c(cmd); + if (!cmd->reply) { + cmd->reply = "OOM."; + return CTRL_CMD_ERROR; + } + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_RO(net_rf_states, "rf_states"); + +CTRL_CMD_DEFINE(net_timezone, "timezone"); +static int get_net_timezone(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_network *net = (struct gsm_network *)cmd->node; + + struct gsm_tz *tz = &net->tz; + if (tz->override) + cmd->reply = talloc_asprintf(cmd, "%d,%d,%d", + tz->hr, tz->mn, tz->dst); + else + cmd->reply = talloc_asprintf(cmd, "off"); + + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} + +static int set_net_timezone(struct ctrl_cmd *cmd, void *data) +{ + char *saveptr, *hourstr, *minstr, *dststr, *tmp = 0; + int override = 0; + struct gsm_network *net = (struct gsm_network *)cmd->node; + struct gsm_tz *tz = &net->tz; + + tmp = talloc_strdup(cmd, cmd->value); + if (!tmp) + goto oom; + + hourstr = strtok_r(tmp, ",", &saveptr); + minstr = strtok_r(NULL, ",", &saveptr); + dststr = strtok_r(NULL, ",", &saveptr); + + if (hourstr != NULL) { + override = strcasecmp(hourstr, "off") != 0; + if (override) { + tz->hr = atol(hourstr); + tz->mn = minstr ? atol(minstr) : 0; + tz->dst = dststr ? atol(dststr) : 0; + } + } + + tz->override = override; + + + talloc_free(tmp); + tmp = NULL; + + return get_net_timezone(cmd, data); + +oom: + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; +} + +static int verify_net_timezone(struct ctrl_cmd *cmd, const char *value, void *data) +{ + char *saveptr, *hourstr, *minstr, *dststr, *tmp; + int override, tz_hours, tz_mins, tz_dst; + + tmp = talloc_strdup(cmd, value); + if (!tmp) + return 1; + + hourstr = strtok_r(tmp, ",", &saveptr); + minstr = strtok_r(NULL, ",", &saveptr); + dststr = strtok_r(NULL, ",", &saveptr); + + if (hourstr == NULL) + goto err; + + override = strcasecmp(hourstr, "off") != 0; + + if (!override) { + talloc_free(tmp); + return 0; + } + + if (minstr == NULL || dststr == NULL) + goto err; + + tz_hours = atol(hourstr); + tz_mins = atol(minstr); + tz_dst = atol(dststr); + + talloc_free(tmp); + tmp = NULL; + + if ((tz_hours < -19) || (tz_hours > 19) || + (tz_mins < 0) || (tz_mins >= 60) || (tz_mins % 15 != 0) || + (tz_dst < 0) || (tz_dst > 2)) + goto err; + + return 0; + +err: + talloc_free(tmp); + cmd->reply = talloc_strdup(cmd, "The format is <hours>,<mins>,<dst> or 'off' where -19 <= hours <= 19, mins in {0, 15, 30, 45}, and 0 <= dst <= 2"); + return 1; +} + +CTRL_CMD_DEFINE_RO(bts_connection_status, "bts_connection_status"); +static int bts_connection_status = 0; + +static int get_bts_connection_status(struct ctrl_cmd *cmd, void *data) +{ + if (bts_connection_status) + cmd->reply = "connected"; + else + cmd->reply = "disconnected"; + return CTRL_CMD_REPLY; +} + +static int bts_connection_status_trap_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) +{ + struct ctrl_cmd *cmd; + struct gsm_network *gsmnet = (struct gsm_network *)handler_data; + struct gsm_bts *bts; + int bts_current_status; + + if (signal != S_L_INP_TEI_DN && signal != S_L_INP_TEI_UP) { + return 0; + } + + bts_current_status = 0; + /* Check if OML on at least one BTS is up */ + llist_for_each_entry(bts, &gsmnet->bts_list, list) { + if (bts->oml_link) { + bts_current_status = 1; + break; + } + } + if (bts_connection_status == 0 && bts_current_status == 1) { + LOGP(DCTRL, LOGL_DEBUG, "BTS connection (re)established, sending TRAP.\n"); + } else if (bts_connection_status == 1 && bts_current_status == 0) { + LOGP(DCTRL, LOGL_DEBUG, "No more BTS connected, sending TRAP.\n"); + } else { + return 0; + } + + cmd = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); + if (!cmd) { + LOGP(DCTRL, LOGL_ERROR, "Trap creation failed.\n"); + return 0; + } + + bts_connection_status = bts_current_status; + + cmd->id = "0"; + cmd->variable = "bts_connection_status"; + + get_bts_connection_status(cmd, NULL); + + ctrl_cmd_send_to_all(gsmnet->ctrl, cmd); + + talloc_free(cmd); + + return 0; +} + +CTRL_CMD_DEFINE_RO(msc_connection_status, "connection_status"); +static int get_msc_connection_status(struct ctrl_cmd *cmd, void *data) +{ + struct bsc_msc_data *msc = (struct bsc_msc_data *)cmd->node; + + if (msc == NULL) { + cmd->reply = "msc not found"; + return CTRL_CMD_ERROR; + } + if (a_reset_conn_ready(msc)) + cmd->reply = "connected"; + else + cmd->reply = "disconnected"; + return CTRL_CMD_REPLY; +} + +/* Backwards compat. */ +CTRL_CMD_DEFINE_RO(msc0_connection_status, "msc_connection_status"); + +static int get_msc0_connection_status(struct ctrl_cmd *cmd, void *data) +{ + struct bsc_msc_data *msc = osmo_msc_data_find(bsc_gsmnet, 0); + void *old_node = cmd->node; + int rc; + + cmd->node = msc; + rc = get_msc_connection_status(cmd, data); + cmd->node = old_node; + + return rc; +} + +static int msc_connection_status_trap_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) +{ + struct ctrl_cmd *cmd; + struct gsm_network *gsmnet = (struct gsm_network *)handler_data; + struct bsc_msc_data *msc = (struct bsc_msc_data *)signal_data; + + if (signal == S_MSC_LOST) { + LOGP(DCTRL, LOGL_DEBUG, "MSC connection lost, sending TRAP.\n"); + } else if (signal == S_MSC_CONNECTED) { + LOGP(DCTRL, LOGL_DEBUG, "MSC connection (re)established, sending TRAP.\n"); + } else { + return 0; + } + + cmd = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); + if (!cmd) { + LOGP(DCTRL, LOGL_ERROR, "Trap creation failed.\n"); + return 0; + } + + cmd->id = "0"; + cmd->variable = talloc_asprintf(cmd, "msc.%d.connection_status", msc->nr); + cmd->node = msc; + + get_msc_connection_status(cmd, NULL); + + ctrl_cmd_send_to_all(gsmnet->ctrl, cmd); + + if (msc->nr == 0) { + /* Backwards compat. */ + cmd->variable = "msc_connection_status"; + ctrl_cmd_send_to_all(gsmnet->ctrl, cmd); + } + + talloc_free(cmd); + + return 0; +} + +static int msc_signal_handler(unsigned int subsys, unsigned int signal, + void *handler_data, void *signal_data) +{ + struct msc_signal_data *msc; + struct gsm_network *net; + struct gsm_bts *bts; + + if (subsys != SS_MSC) + return 0; + if (signal != S_MSC_AUTHENTICATED) + return 0; + + msc = signal_data; + + net = msc->data->network; + llist_for_each_entry(bts, &net->bts_list, list) + ctrl_generate_bts_location_state_trap(bts, msc->data); + + return 0; +} + +/* Obtain SS7 application server currently handling given MSC (DPC) */ +static struct osmo_ss7_as *msc_get_ss7_as(struct bsc_msc_data *msc) +{ + struct osmo_ss7_route *rt; + struct osmo_ss7_instance *ss7 = osmo_sccp_get_ss7(msc->a.sccp); + rt = osmo_ss7_route_lookup(ss7, msc->a.msc_addr.pc); + if (!rt) + return NULL; + return rt->dest.as; +} + +static int _ss7_as_send(struct osmo_ss7_as *as, struct msgb *msg) +{ + struct osmo_ss7_asp *asp; + unsigned int i; + + /* FIXME: unify with xua_as_transmit_msg() and perform proper ASP lookup */ + for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { + asp = as->cfg.aspsi; + if (!asp) + continue; + /* FIXME: deal with multiple ASPs per AS */ + return osmo_ss7_asp_send(asp, msg); + } + msgb_free(msg); + return -1; +} + +int bsc_sccplite_msc_send(struct bsc_msc_data *msc, struct msgb *msg) +{ + struct osmo_ss7_as *as; + + as = msc_get_ss7_as(msc); + if (!as) { + msgb_free(msg); + return -1; + } + + /* don't attempt to send CTRL on a non-SCCPlite AS */ + if (as->cfg.proto != OSMO_SS7_ASP_PROT_IPA) + return 0; + + return _ss7_as_send(as, msg); +} + +/* Encode a CTRL command and send it to the given ASP + * \paramin asp ASP through which we shall send the encoded message + * \paramin cmd decoded CTRL command to be encoded and sent. Ownership is *NOT* + * transferred, to permit caller to send the same CMD to several ASPs. + * Caller must hence free 'cmd' itself. + * \returns 0 on success; negative on error */ +static int sccplite_asp_ctrl_cmd_send(struct osmo_ss7_asp *asp, struct ctrl_cmd *cmd) +{ + /* this is basically like libosmoctrl:ctrl_cmd_send(), not for a dedicated + * CTRL connection but for the CTRL piggy-back on the IPA/SCCPlite link */ + struct msgb *msg; + + /* don't attempt to send CTRL on a non-SCCPlite ASP */ + if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA) + return 0; + + msg = ctrl_cmd_make(cmd); + if (!msg) + return -1; + + ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_CTRL); + ipa_prepend_header(msg, IPAC_PROTO_OSMO); + + return osmo_ss7_asp_send(asp, msg); +} + +/* Ownership of 'cmd' is *NOT* transferred, to permit caller to send the same CMD to several ASPs. + * Caller must hence free 'cmd' itself. */ +static int sccplite_msc_ctrl_cmd_send(struct bsc_msc_data *msc, struct ctrl_cmd *cmd) +{ + struct msgb *msg; + + msg = ctrl_cmd_make(cmd); + if (!msg) + return -1; + + ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_CTRL); + ipa_prepend_header(msg, IPAC_PROTO_OSMO); + + return bsc_sccplite_msc_send(msc, msg); +} + +/* receive + process a CTRL command from the piggy-back on the IPA/SCCPlite link. + * Transfers msg ownership. */ +int bsc_sccplite_rx_ctrl(struct osmo_ss7_asp *asp, struct msgb *msg) +{ + struct ctrl_cmd *cmd; + bool parse_failed; + int rc; + + /* caller has already ensured ipaccess_head + ipaccess_head_ext */ + OSMO_ASSERT(msg->l2h); + + /* prase raw (ASCII) CTRL command into ctrl_cmd */ + cmd = ctrl_cmd_parse3(asp, msg, &parse_failed); + OSMO_ASSERT(cmd); + msgb_free(msg); + if (cmd->type == CTRL_TYPE_ERROR && parse_failed) + goto send_reply; + + /* handle the CTRL command */ + ctrl_cmd_handle(bsc_gsmnet->ctrl, cmd, bsc_gsmnet); + +send_reply: + rc = sccplite_asp_ctrl_cmd_send(asp, cmd); + talloc_free(cmd); + return rc; +} + + +void osmo_bsc_send_trap(struct ctrl_cmd *cmd, struct bsc_msc_data *msc_data) +{ + struct ctrl_cmd *trap; + struct ctrl_handle *ctrl; + + ctrl = msc_data->network->ctrl; + + trap = ctrl_cmd_trap(cmd); + if (!trap) { + + LOGP(DCTRL, LOGL_ERROR, "Failed to create trap.\n"); + return; + } + + ctrl_cmd_send_to_all(ctrl, trap); + sccplite_msc_ctrl_cmd_send(msc_data, trap); + + talloc_free(trap); +} + +CTRL_CMD_DEFINE_WO_NOVRF(net_notification, "notification"); +static int set_net_notification(struct ctrl_cmd *cmd, void *data) +{ + struct ctrl_cmd *trap; + struct gsm_network *net; + + net = cmd->node; + + trap = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); + if (!trap) { + LOGP(DCTRL, LOGL_ERROR, "Trap creation failed\n"); + goto handled; + } + + trap->id = "0"; + trap->variable = "notification"; + trap->reply = talloc_strdup(trap, cmd->value); + + /* + * This should only be sent to local systems. In the future + * we might even ask for systems to register to receive + * the notifications. + */ + ctrl_cmd_send_to_all(net->ctrl, trap); + talloc_free(trap); + +handled: + return CTRL_CMD_HANDLED; +} + +CTRL_CMD_DEFINE_WO_NOVRF(net_inform_msc, "inform-msc-v1"); +static int set_net_inform_msc(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_network *net; + struct bsc_msc_data *msc; + + net = cmd->node; + llist_for_each_entry(msc, &net->mscs, entry) { + struct ctrl_cmd *trap; + + trap = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); + if (!trap) { + LOGP(DCTRL, LOGL_ERROR, "Trap creation failed\n"); + continue; + } + + trap->id = "0"; + trap->variable = "inform-msc-v1"; + trap->reply = talloc_strdup(trap, cmd->value); + sccplite_msc_ctrl_cmd_send(msc, trap); + talloc_free(trap); + } + + + return CTRL_CMD_HANDLED; +} + +static int bsc_base_ctrl_cmds_install(struct gsm_network *net) +{ + int rc = 0; + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config_file); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_write_config_file); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_bts_num); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_states); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timezone); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_bts_connection_status); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_msc0_connection_status); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_notification); + rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_inform_msc); + + rc = ctrl_cmd_install(CTRL_NODE_MSC, &cmd_msc_connection_status); + + rc |= osmo_signal_register_handler(SS_L_INPUT, &bts_connection_status_trap_cb, net); + rc |= osmo_signal_register_handler(SS_MSC, &msc_connection_status_trap_cb, net); + rc |= osmo_signal_register_handler(SS_MSC, msc_signal_handler, NULL); + + return rc; +} + + +int bsc_ctrl_cmds_install(struct gsm_network *net) +{ + int rc; + + rc = bsc_base_ctrl_cmds_install(net); + if (rc) + goto end; + rc = bsc_ho_ctrl_cmds_install(net); + if (rc) + goto end; + rc = bsc_bts_ctrl_cmds_install(); + if (rc) + goto end; +end: + return rc; +}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bsc_ctrl_lookup.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bsc_ctrl_lookup.c
Changed
@@ -111,10 +111,7 @@ return -ERANGE; } -struct ctrl_handle *bsc_controlif_setup(struct gsm_network *net, - const char *bind_addr, uint16_t port) +struct ctrl_handle *bsc_controlif_setup(struct gsm_network *net, uint16_t port) { - return ctrl_interface_setup_dynip2(net, bind_addr, port, - bsc_ctrl_node_lookup, - _LAST_CTRL_NODE_BSC); + return ctrl_interface_setup2(net, port, bsc_ctrl_node_lookup, _LAST_CTRL_NODE_BSC); }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bsc_stats.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bsc_stats.c
Changed
@@ -229,7 +229,7 @@ all_allocated_update(&bts->all_allocated, &bts->chan_counts); } -void all_allocated_update_bsc() +void all_allocated_update_bsc(void) { struct gsm_network *net = bsc_gsmnet; all_allocated_update(&net->all_allocated, &net->chan_counts);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bsc_subscr_conn_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bsc_subscr_conn_fsm.c
Changed
@@ -32,6 +32,7 @@ #include <osmocom/bsc/handover_fsm.h> #include <osmocom/bsc/lchan_fsm.h> #include <osmocom/bsc/lchan_rtp_fsm.h> +#include <osmocom/bsc/lchan.h> #include <osmocom/bsc/bsc_subscriber.h> #include <osmocom/bsc/osmo_bsc_sigtran.h> #include <osmocom/bsc/osmo_bsc_lcls.h> @@ -620,6 +621,62 @@ return true; } +static struct mgcp_client *select_mgw(struct gsm_subscriber_connection *conn, struct gsm_lchan *for_lchan) +{ + struct mgcp_client_pool_member *mgcp_pmemb; + struct mgcp_client *mgcp_client; + struct gsm_bts *bts = for_lchan->ts->trx->bts; + + /* If BTS is not pinned to a given MGW, let regular allocation which + * spreads load over available MGWs: */ + if (bts->mgw_pool_target == -1) + goto pick_any; + + /* BTS is pinned to an MGW, retrieve pointer to it: */ + mgcp_pmemb = mgcp_client_pool_find_member_by_nr(conn->network->mgw.mgw_pool, bts->mgw_pool_target); + if (!mgcp_pmemb) { + if (!bts->mgw_pool_target_strict) { + LOGPFSML(conn->fi, LOGL_NOTICE, + "mgw pool-target %u not found! selecting another one.\n", bts->mgw_pool_target); + goto pick_any; + } else { + LOGPFSML(conn->fi, LOGL_ERROR, "mgw pool-target %u not found!\n", bts->mgw_pool_target); + return NULL; + } + } + if (mgcp_client_pool_member_is_blocked(mgcp_pmemb)) { + if (!bts->mgw_pool_target_strict) { + LOGPFSML(conn->fi, LOGL_NOTICE, + "mgw pool-target %u is administratively blocked! selecting another one.\n", + bts->mgw_pool_target); + goto pick_any; + } else { + LOGPFSML(conn->fi, LOGL_ERROR, "mgw pool-target %u is administratively blocked!\n", + bts->mgw_pool_target); + return NULL; + } + } + + mgcp_client = mgcp_client_pool_member_get(mgcp_pmemb); + if (!mgcp_client) { + if (!bts->mgw_pool_target_strict) { + LOGPFSML(conn->fi, LOGL_NOTICE, + "mgw pool-target %u is not connected! selecting another one.\n", + bts->mgw_pool_target); + goto pick_any; + } else { + LOGPFSML(conn->fi, LOGL_ERROR, "mgw pool-target %u is not connected!\n", + bts->mgw_pool_target); + return NULL; + } + } + return mgcp_client; + +pick_any: + mgcp_client = mgcp_client_pool_get(conn->network->mgw.mgw_pool); + return mgcp_client; +} + /* Make sure a conn->user_plane.mgw_endpoint is allocated with the proper mgw endpoint name. For * SCCPlite, pass in msc_assigned_cic the CIC received upon BSSMAP Assignment Command or BSSMAP Handover * Request form the MSC (which is only stored in conn->user_plane after success). Ignored for AoIP. */ @@ -639,11 +696,10 @@ if (gscon_is_sccplite(conn) || gscon_is_aoip(conn)) { /* Get MGCP client from pool */ - mgcp_client = mgcp_client_pool_get(conn->network->mgw.mgw_pool); + mgcp_client = select_mgw(conn, for_lchan); if (!mgcp_client) { LOGPFSML(conn->fi, LOGL_ERROR, "cannot ensure MGW endpoint -- no MGW configured, check configuration!\n"); - conn->user_plane.mgw_endpoint = NULL; return NULL; } } @@ -940,6 +996,10 @@ mgcp_client = osmo_mgcpc_ep_client(conn->user_plane.mgw_endpoint); mgcp_client_pool_put(mgcp_client); + /* Be sure that the endpoint CI we are maintaining in user_plane + * is also removed from the other locations as well. */ + gscon_forget_mgw_endpoint_ci(conn, conn->user_plane.mgw_endpoint_ci_msc); + conn->user_plane.mgw_endpoint = NULL; conn->user_plane.mgw_endpoint_ci_msc = NULL; conn->ho.created_ci_for_msc = NULL; @@ -1067,7 +1127,7 @@ osmo_mgcpc_ep_clear(conn->user_plane.mgw_endpoint); conn->user_plane.mgw_endpoint = NULL; - conn->user_plane.mgw_endpoint = NULL; + conn->user_plane.mgw_endpoint_ci_msc = NULL; if (conn->ho.fi) osmo_fsm_inst_dispatch(conn->ho.fi, HO_EV_CONN_RELEASING, NULL); @@ -1142,7 +1202,7 @@ .event_names = gscon_fsm_event_names, }; -void bsc_subscr_conn_fsm_init() +void bsc_subscr_conn_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&gscon_fsm) == 0); OSMO_ASSERT(osmo_fsm_register(&lcls_fsm) == 0);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bsc_subscriber.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bsc_subscriber.c
Changed
@@ -30,6 +30,7 @@ #include <osmocom/core/logging.h> #include <osmocom/bsc/bsc_subscriber.h> +#include <osmocom/bsc/paging.h> #include <osmocom/bsc/debug.h> static void bsc_subscr_free(struct bsc_subscr *bsub); @@ -77,6 +78,7 @@ .talloc_object = bsub, .use_cb = bsub_use_cb, }; + INIT_LLIST_HEAD(&bsub->active_paging_requests); llist_add_tail(&bsub->entry, list); @@ -101,6 +103,24 @@ return NULL; } +struct bsc_subscr *bsc_subscr_find_by_imei(struct llist_head *list, + const char *imei, + const char *use_token) +{ + struct bsc_subscr *bsub; + + if (!imei || !*imei) + return NULL; + + llist_for_each_entry(bsub, list, entry) { + if (!strcmp(bsub->imei, imei)) { + bsc_subscr_get(bsub, use_token); + return bsub; + } + } + return NULL; +} + struct bsc_subscr *bsc_subscr_find_by_tmsi(struct llist_head *list, uint32_t tmsi, const char *use_token) @@ -127,6 +147,8 @@ switch (mi->type) { case GSM_MI_TYPE_IMSI: return bsc_subscr_find_by_imsi(list, mi->imsi, use_token); + case GSM_MI_TYPE_IMEI: + return bsc_subscr_find_by_imei(list, mi->imei, use_token); case GSM_MI_TYPE_TMSI: return bsc_subscr_find_by_tmsi(list, mi->tmsi, use_token); default: @@ -141,6 +163,13 @@ osmo_strlcpy(bsub->imsi, imsi, sizeof(bsub->imsi)); } +void bsc_subscr_set_imei(struct bsc_subscr *bsub, const char *imei) +{ + if (!bsub) + return; + osmo_strlcpy(bsub->imei, imei, sizeof(bsub->imei)); +} + struct bsc_subscr *bsc_subscr_find_or_create_by_imsi(struct llist_head *list, const char *imsi, const char *use_token) @@ -157,6 +186,22 @@ return bsub; } +struct bsc_subscr *bsc_subscr_find_or_create_by_imei(struct llist_head *list, + const char *imei, + const char *use_token) +{ + struct bsc_subscr *bsub; + bsub = bsc_subscr_find_by_imei(list, imei, use_token); + if (bsub) + return bsub; + bsub = bsc_subscr_alloc(list); + if (!bsub) + return NULL; + bsc_subscr_set_imei(bsub, imei); + bsc_subscr_get(bsub, use_token); + return bsub; +} + struct bsc_subscr *bsc_subscr_find_or_create_by_tmsi(struct llist_head *list, uint32_t tmsi, const char *use_token) @@ -181,6 +226,8 @@ switch (mi->type) { case GSM_MI_TYPE_IMSI: return bsc_subscr_find_or_create_by_imsi(list, mi->imsi, use_token); + case GSM_MI_TYPE_IMEI: + return bsc_subscr_find_or_create_by_imei(list, mi->imei, use_token); case GSM_MI_TYPE_TMSI: return bsc_subscr_find_or_create_by_tmsi(list, mi->tmsi, use_token); default: @@ -198,6 +245,8 @@ } if (bsub->imsi0) OSMO_STRBUF_PRINTF(sb, "-IMSI-%s", bsub->imsi); + else if (bsub->imei0) + OSMO_STRBUF_PRINTF(sb, "-IMEI-%s", bsub->imei); if (bsub->tmsi != GSM_RESERVED_TMSI) OSMO_STRBUF_PRINTF(sb, "-TMSI-0x%08x", bsub->tmsi); return sb.chars_needed; @@ -222,6 +271,7 @@ static void bsc_subscr_free(struct bsc_subscr *bsub) { + OSMO_ASSERT(llist_empty(&bsub->active_paging_requests)); llist_del(&bsub->entry); talloc_free(bsub); } @@ -246,3 +296,41 @@ } else target->filter_map &= ~(1 << LOG_FLT_BSC_SUBSCR); } + +void bsc_subscr_add_active_paging_request(struct bsc_subscr *bsub, struct gsm_paging_request *req) +{ + bsub->active_paging_requests_len++; + bsc_subscr_get(bsub, BSUB_USE_PAGING_REQUEST); + llist_add_tail(&req->bsub_entry, &bsub->active_paging_requests); +} + +void bsc_subscr_remove_active_paging_request(struct bsc_subscr *bsub, struct gsm_paging_request *req) +{ + llist_del(&req->bsub_entry); + bsub->active_paging_requests_len--; + bsc_subscr_put(bsub, BSUB_USE_PAGING_REQUEST); +} + +void bsc_subscr_remove_active_paging_request_all(struct bsc_subscr *bsub) +{ + /* Avoid accessing bsub after reaching 0 active_paging_request_len, + * since it could be freed during put(): */ + unsigned remaining = bsub->active_paging_requests_len; + while (remaining > 0) { + struct gsm_paging_request *req; + req = llist_first_entry(&bsub->active_paging_requests, + struct gsm_paging_request, bsub_entry); + bsc_subscr_remove_active_paging_request(bsub, req); + remaining--; + } +} + +struct gsm_paging_request *bsc_subscr_find_req_by_bts(const struct bsc_subscr *bsub, const struct gsm_bts *bts) +{ + struct gsm_paging_request *req; + llist_for_each_entry(req, &bsub->active_paging_requests, bsub_entry) { + if (req->bts == bts) + return req; + } + return NULL; +}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bsc_vty.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bsc_vty.c
Changed
@@ -44,6 +44,7 @@ #include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/abis_om2000.h> #include <osmocom/bsc/chan_alloc.h> +#include <osmocom/bsc/bts_setup_ramp.h> #include <osmocom/bsc/system_information.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/paging.h> @@ -65,6 +66,7 @@ #include <osmocom/bsc/assignment_fsm.h> #include <osmocom/bsc/bssmap_reset.h> #include <osmocom/bsc/bsc_msc_data.h> +#include <osmocom/bsc/lchan.h> #include <inttypes.h> @@ -405,6 +407,7 @@ } neighbor_ident_vty_write_network(vty, " "); + mgcp_client_pool_config_write(vty, " "); return CMD_SUCCESS; } @@ -770,9 +773,12 @@ { LOG_LCHAN(from_lchan, LOGL_NOTICE, "Manually triggering Assignment from VTY\n"); if (!to_lchan) { - to_lchan = lchan_select_by_type(from_lchan->ts->trx->bts, from_lchan->type); + struct gsm_bts *bts = from_lchan->ts->trx->bts; + to_lchan = lchan_select_by_type(bts, from_lchan->type, + SELECT_FOR_ASSIGNMENT, + from_lchan); vty_out(vty, "Error: cannot find free lchan of type %s%s", - gsm_lchant_name(from_lchan->type), VTY_NEWLINE); + gsm_chan_t_name(from_lchan->type), VTY_NEWLINE); } if (reassignment_request_to_lchan(ASSIGN_FOR_VTY, from_lchan, to_lchan, -1, -1)) { vty_out(vty, "Error: not allowed to start assignment for %s%s", @@ -955,18 +961,20 @@ continue; llist_for_each_entry(trx, &bts->trx_list, list) { - struct gsm_lchan *lchan = lchan_select_by_type(bts, free_type); + struct gsm_lchan *lchan = lchan_select_by_type(bts, free_type, + SELECT_FOR_HANDOVER, + NULL); if (!lchan) continue; vty_out(vty, "Found unused %s slot: %s%s", - gsm_lchant_name(free_type), gsm_lchan_name(lchan), VTY_NEWLINE); + gsm_chan_t_name(free_type), gsm_lchan_name(lchan), VTY_NEWLINE); lchan_dump_full_vty(vty, lchan); return bts; } } vty_out(vty, "%% Cannot find any BTS (other than BTS %u) with free %s lchan%s", - not_this_bts? not_this_bts->nr : 255, gsm_lchant_name(free_type), VTY_NEWLINE); + not_this_bts ? not_this_bts->nr : 255, gsm_chan_t_name(free_type), VTY_NEWLINE); return NULL; } @@ -1036,7 +1044,7 @@ static void paging_dump_vty(struct vty *vty, struct gsm_paging_request *pag) { - vty_out(vty, "Paging on BTS %u%s", pag->bts->nr, VTY_NEWLINE); + vty_out(vty, "Paging on BTS %u (%u request timeouts)%s", pag->bts->nr, pag->attempts, VTY_NEWLINE); bsc_subscr_dump_vty(vty, pag->bsub); } @@ -1044,7 +1052,9 @@ { struct gsm_paging_request *pag; - llist_for_each_entry(pag, &bts->paging.pending_requests, entry) + llist_for_each_entry(pag, &bts->paging.initial_req_list, entry) + paging_dump_vty(vty, pag); + llist_for_each_entry(pag, &bts->paging.retrans_req_list, entry) paging_dump_vty(vty, pag); } @@ -2279,7 +2289,7 @@ "Timezone offset (45 minutes)\n", CMD_ATTR_IMMEDIATE) { - struct gsm_network *net = vty->index; + struct gsm_network *net = gsmnet_from_vty(vty); int tzhr = atoi(argv0); int tzmn = atoi(argv1); @@ -2303,7 +2313,7 @@ "DST offset (hours)\n", CMD_ATTR_IMMEDIATE) { - struct gsm_network *net = vty->index; + struct gsm_network *net = gsmnet_from_vty(vty); int tzhr = atoi(argv0); int tzmn = atoi(argv1); int tzdst = atoi(argv2); @@ -2323,7 +2333,7 @@ "Disable network timezone override, use system tz\n", CMD_ATTR_IMMEDIATE) { - struct gsm_network *net = vty->index; + struct gsm_network *net = gsmnet_from_vty(vty); net->tz.override = 0; @@ -2339,7 +2349,7 @@ "Periodic Location Updating Interval\n" "Periodic Location Updating Interval in Minutes\n") { - struct gsm_network *net = vty->index; + struct gsm_network *net = gsmnet_from_vty(vty); struct osmo_tdef *d = osmo_tdef_get_entry(net->T_defs, 3212); OSMO_ASSERT(d); @@ -2357,7 +2367,7 @@ "Periodic Location Updating Interval\n" "Periodic Location Updating Interval\n") { - struct gsm_network *net = vty->index; + struct gsm_network *net = gsmnet_from_vty(vty); struct osmo_tdef *d = osmo_tdef_get_entry(net->T_defs, 3212); OSMO_ASSERT(d); @@ -2517,7 +2527,7 @@ if (msc->amr_octet_aligned) vty_out(vty, " amr-payload octet-aligned%s", VTY_NEWLINE); else - vty_out(vty, " amr-payload bandwith-efficient%s", VTY_NEWLINE); + vty_out(vty, " amr-payload bandwidth-efficient%s", VTY_NEWLINE); } static void msc_write_nri(struct vty *vty, struct bsc_msc_data *msc, bool verbose); @@ -2616,6 +2626,17 @@ vty_out(vty, " bsc-auto-rf-off %d%s", bsc_gsmnet->auto_off_timeout, VTY_NEWLINE); + if (bsc_gsmnet->bts_setup_ramp.enabled) + vty_out(vty, " bts-setup-ramping%s", VTY_NEWLINE); + + if (bsc_gsmnet->bts_setup_ramp.step_size > 0) + vty_out(vty, " bts-setup-ramping-step-size %d%s", + bsc_gsmnet->bts_setup_ramp.step_size, VTY_NEWLINE); + + if (bsc_gsmnet->bts_setup_ramp.step_interval > 0) + vty_out(vty, " bts-setup-ramping-step-interval %d%s", + bsc_gsmnet->bts_setup_ramp.step_interval, VTY_NEWLINE); + return CMD_SUCCESS; } @@ -3039,6 +3060,88 @@ return CMD_SUCCESS; } +DEFUN_ATTR(cfg_bsc_bts_setup_ramping, + cfg_bsc_bts_setup_ramping_cmd, + "bts-setup-ramping", + "Enable BTS setup ramping to limit the amount of BTS to configure within a time window.\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_network *net = gsmnet_from_vty(vty); + bts_setup_ramp_enable(net); + return CMD_SUCCESS; +} + +DEFUN_ATTR(cfg_bsc_no_bts_setup_ramping, + cfg_bsc_no_bts_setup_ramping_cmd, + "no bts-setup-ramping", + NO_STR + "Disable BTS ramping and configure all waiting BTS.\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_network *net = gsmnet_from_vty(vty); + bts_setup_ramp_disable(net); + return CMD_SUCCESS; +} + +DEFUN_ATTR(cfg_bsc_bts_ramping_step_interval, + cfg_bsc_bts_setup_ramping_step_interval_cmd, + "bts-setup-ramping-step-interval <0-65535>", + "Configure the BTS setup ramping step interval. The time between ramping steps.\n" + "Set a step interval (in seconds)\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_network *net = gsmnet_from_vty(vty); + int interval_size = atoi(argv0); + bts_setup_ramp_set_step_interval(net, interval_size); + return CMD_SUCCESS; +} + +DEFUN_ATTR(cfg_bsc_bts_ramping_step_size, + cfg_bsc_bts_setup_ramping_step_size_cmd, + "bts-setup-ramping-step-size <0-65535>", + "Configure the BTS setup ramping step size. The amount of BTS to allow to configure within a ramping interval\n" + "Amount of BTS to setup while a step size\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_network *net = gsmnet_from_vty(vty); + int seconds = atoi(argv0); + bts_setup_ramp_set_step_size(net, seconds); + return CMD_SUCCESS; +} + +DEFUN(bts_unblock_setup_ramping, + bts_unblock_setup_ramping_cmd, + "bts <0-255> unblock-setup-ramping", + "BTS Specific Commands\n" BTS_NR_STR + "Unblock and allow to configure a BTS if kept back by BTS ramping\n") +{ + struct gsm_network *gsmnet; + struct gsm_bts *bts; + unsigned int bts_nr; + + gsmnet = gsmnet_from_vty(vty); + + bts_nr = atoi(argv0); + if (bts_nr >= gsmnet->num_bts) { + vty_out(vty, "%% BTS number must be between 0 and %d. It was %d.%s", + gsmnet->num_bts, bts_nr, VTY_NEWLINE); + return CMD_WARNING; + } + + bts = gsm_bts_num(gsmnet, bts_nr); + if (!bts) { + vty_out(vty, "%% BTS Nr. %d could not be found.%s", bts_nr, VTY_NEWLINE); + return CMD_WARNING; + } + + if (bts_setup_ramp_unblock_bts(bts)) { + vty_out(vty, "%% The BTS is not blocked by BTS ramping.%s", VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + DEFUN(show_statistics, show_statistics_cmd, "show statistics", @@ -3205,7 +3308,7 @@ DEFUN_USRATTR(cfg_net_msc_amr_octet_align, cfg_net_msc_amr_octet_align_cmd, X(BSC_VTY_ATTR_NEW_LCHAN), - "amr-payload (octet-aligned|bandwith-efficient", + "amr-payload (octet-aligned|bandwidth-efficient)", "Set AMR payload framing mode\n" "payload fields aligned on octet boundaries\n" "payload fields packed (AoIP)\n") @@ -3214,11 +3317,22 @@ if (strcmp(argv0, "octet-aligned") == 0) data->amr_octet_aligned = true; - else if (strcmp(argv0, "bandwith-efficient") == 0) + else if (strcmp(argv0, "bandwidth-efficient") == 0) data->amr_octet_aligned = false; + else { + data->amr_octet_aligned = false; + vty_out(vty, "%% Command 'amr-payload': Option 'bandwith-efficient' " + "containing typo is deprecated, use 'bandwidth-efficient' instead!%s", + VTY_NEWLINE); + } return CMD_SUCCESS; } +ALIAS_DEPRECATED(cfg_net_msc_amr_octet_align, + cfg_net_msc_amr_octet_align_deprecated_cmd, + "amr-payload bandwith-efficient", + "Set AMR payload framing mode\n" + "payload fields packed (AoIP)\n"); DEFUN_ATTR(cfg_msc_nri_add, cfg_msc_nri_add_cmd, "nri add <0-32767> <0-32767>", @@ -3449,10 +3563,11 @@ install_element(GSMNET_NODE, &cfg_net_nri_null_del_cmd); bts_vty_init(); - mgcp_client_pool_vty_init(GSMNET_NODE, MGW_NODE, " ", vty_global_gsm_network->mgw.mgw_pool); + mgcp_client_pool_vty_init(GSMNET_NODE, MGW_NODE, NULL, vty_global_gsm_network->mgw.mgw_pool); install_element(ENABLE_NODE, &drop_bts_cmd); install_element(ENABLE_NODE, &restart_bts_cmd); + install_element(ENABLE_NODE, &bts_unblock_setup_ramping_cmd); install_element(ENABLE_NODE, &bts_resend_sysinfo_cmd); install_element(ENABLE_NODE, &bts_resend_power_ctrl_params_cmd); install_element(ENABLE_NODE, &bts_c0_power_red_cmd); @@ -3493,6 +3608,10 @@ install_element(BSC_NODE, &cfg_net_no_rf_off_time_cmd); install_element(BSC_NODE, &cfg_net_bsc_missing_msc_ussd_cmd); install_element(BSC_NODE, &cfg_net_bsc_no_missing_msc_text_cmd); + install_element(BSC_NODE, &cfg_bsc_bts_setup_ramping_cmd); + install_element(BSC_NODE, &cfg_bsc_no_bts_setup_ramping_cmd); + install_element(BSC_NODE, &cfg_bsc_bts_setup_ramping_step_size_cmd); + install_element(BSC_NODE, &cfg_bsc_bts_setup_ramping_step_interval_cmd); install_node(&msc_node, config_write_msc); install_element(MSC_NODE, &cfg_net_bsc_ncc_cmd); @@ -3520,6 +3639,7 @@ install_element(MSC_NODE, &cfg_net_msc_amr_5_15_cmd); install_element(MSC_NODE, &cfg_net_msc_amr_4_75_cmd); install_element(MSC_NODE, &cfg_net_msc_amr_octet_align_cmd); + install_element(MSC_NODE, &cfg_net_msc_amr_octet_align_deprecated_cmd); install_element(MSC_NODE, &cfg_net_msc_lcls_mode_cmd); install_element(MSC_NODE, &cfg_net_msc_lcls_mismtch_cmd); install_element(MSC_NODE, &cfg_msc_cs7_bsc_addr_cmd); @@ -3530,7 +3650,11 @@ install_element(MSC_NODE, &cfg_msc_show_nri_cmd); install_element(MSC_NODE, &cfg_msc_allow_attach_cmd); install_element(MSC_NODE, &cfg_msc_no_allow_attach_cmd); - + install_element(MSC_NODE, &cfg_msc_mgw_x_osmo_ign_cmd); + install_element(MSC_NODE, &cfg_msc_no_mgw_x_osmo_ign_cmd); + install_element(MSC_NODE, &cfg_msc_osmux_cmd); + /* Deprecated: Old MGCP config without pooling support in MSC node: */ + mgcp_client_vty_init(network, MSC_NODE, network->mgw.conf); /* Deprecated: ping time config, kept to support legacy config files. */ install_element(MSC_NODE, &cfg_net_msc_no_ping_time_cmd); install_element(MSC_NODE, &cfg_net_msc_ping_time_cmd); @@ -3549,10 +3673,5 @@ install_element(CFG_LOG_NODE, &logging_fltr_imsi_cmd); - mgcp_client_vty_init(network, MSC_NODE, network->mgw.conf); - install_element(MSC_NODE, &cfg_msc_mgw_x_osmo_ign_cmd); - install_element(MSC_NODE, &cfg_msc_no_mgw_x_osmo_ign_cmd); - install_element(MSC_NODE, &cfg_msc_osmux_cmd); - return 0; }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bssmap_reset.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bssmap_reset.c
Changed
@@ -245,11 +245,13 @@ void bssmap_reset_resend_reset(struct bssmap_reset *bssmap_reset) { + OSMO_ASSERT(bssmap_reset); + /* Immediately (1ms) kick off reset sending mechanism */ osmo_fsm_inst_state_chg_ms(bssmap_reset->fi, BSSMAP_RESET_ST_DISC, 1, 0); } -static __attribute__((constructor)) void bssmap_reset_fsm_init() +static __attribute__((constructor)) void bssmap_reset_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&bssmap_reset_fsm) == 0); }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bts.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts.c
Changed
@@ -145,6 +145,7 @@ static int gsm_bts_talloc_destructor(struct gsm_bts *bts) { paging_destructor(bts); + bts_setup_ramp_remove(bts); osmo_timer_del(&bts->cbch_timer); @@ -292,6 +293,9 @@ bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by bts->early_classmark_allowed param */ bts->si_unused_send_empty = true; bts->chan_alloc_tch_signalling_policy = BTS_TCH_SIGNALLING_ALWAYS; + bts->chan_alloc_dyn_params.ul_rxlev_thresh = 50; /* >= -60 dBm */ + bts->chan_alloc_dyn_params.ul_rxlev_avg_num = 2; /* at least 2 samples */ + bts->chan_alloc_dyn_params.c0_chan_load_thresh = 60; /* >= 60% */ bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */ bts->si_common.cell_sel_par.rxlev_acc_min = 0; bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list; @@ -328,6 +332,9 @@ INIT_LLIST_HEAD(&bts->oml_fail_rep); INIT_LLIST_HEAD(&bts->chan_rqd_queue); + /* Don't pin the BTS to any MGW by default: */ + bts->mgw_pool_target = -1; + /* Enable all codecs by default. These get reset to a more fine grained selection IF a * 'codec-support' config appears in the config file (see bsc_vty.c). */ bts->codec = (struct bts_codec_conf){ @@ -425,9 +432,12 @@ memcpy(&bts->mr_half.bts_mode0, &amr_hr_ms_bts_mode0, sizeof(amr_hr_ms_bts_mode)); bts->mr_half.num_modes = ARRAY_SIZE(amr_hr_ms_bts_mode); + bts->use_osmux = OSMUX_USAGE_OFF; + bts_cbch_init(bts); bts_etws_init(bts); + bts_setup_ramp_init_bts(bts); acc_mgr_init(&bts->acc_mgr, bts); acc_ramp_init(&bts->acc_ramp, bts); @@ -456,7 +466,7 @@ } /* Validate BTS configuration (ARFCN settings and physical channel configuration) */ -int gsm_bts_check_cfg(struct gsm_bts *bts) +__attribute__((weak)) int gsm_bts_check_cfg(struct gsm_bts *bts) { struct gsm_bts_trx *trx; @@ -504,6 +514,13 @@ bts_gprs_mode_name(bts->gprs.mode)); return -EINVAL; } + if (bts->use_osmux == OSMUX_USAGE_ONLY && + !osmo_bts_has_feature(&bts->features, BTS_FEAT_OSMUX)) { + LOGP(DNM, LOGL_ERROR, + "(bts=%u) osmux use set to 'only', but BTS does not support Osmux\n", + bts->nr); + return -EINVAL; + } } /* Verify the physical channel mapping */ @@ -515,6 +532,9 @@ } } + if (!gsm_bts_check_ny1(bts)) + return -EINVAL; + return 0; } @@ -1025,7 +1045,9 @@ osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_CHAN_SDCCH8_CBCH_TOTAL), 0); osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_CHAN_OSMO_DYN_USED), 0); osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_CHAN_OSMO_DYN_TOTAL), 0); - osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_T3113), 0); + osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_T3113), 0); + osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_REQ_QUEUE_LENGTH), paging_pending_requests_nr(bts)); + osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_AVAILABLE_SLOTS), bts->paging.available_slots); } const struct rate_ctr_desc bts_ctr_description = { @@ -1677,8 +1699,16 @@ { "num_trx:total", "Number of configured TRX in this BTS", "" }, - BTS_STAT_T3113 = \ - { "t3113", + BTS_STAT_PAGING_REQ_QUEUE_LENGTH = \ + { "paging:request_queue_length", + "Paging Request queue length", + "", 60, 0 }, + BTS_STAT_PAGING_AVAILABLE_SLOTS = \ + { "paging:available_slots", + "Available paging slots in this BTS", + "", 60, 0 }, + BTS_STAT_PAGING_T3113 = \ + { "paging:t3113", "T3113 paging timer", "s", 60, 0 }, }; @@ -1690,3 +1720,20 @@ .num_items = ARRAY_SIZE(bts_stat_desc), .item_desc = bts_stat_desc, }; + +/* Return 'true' if and only if Ny1 satisfies network requirements */ +bool gsm_bts_check_ny1(const struct gsm_bts *bts) +{ + unsigned long T3105, ny1, ny1_recommended; + T3105 = osmo_tdef_get(bts->network->T_defs, 3105, OSMO_TDEF_MS, -1); + ny1 = osmo_tdef_get(bts->network->T_defs, -3105, OSMO_TDEF_CUSTOM, -1); + if (!(T3105 * ny1 > GSM_T3124_MAX + GSM_NY1_REQ_DELTA)) { + /* See comment for GSM_NY1_DEFAULT */ + ny1_recommended = (GSM_T3124_MAX + GSM_NY1_REQ_DELTA)/T3105 + 1; + LOGP(DNM, LOGL_ERROR, "Value of Ny1 should be higher. " + "Is: %lu, lowest recommendation: %lu\n", + ny1, ny1_recommended); + return false; + } + return true; +}
View file
osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_ctrl.c
Added
@@ -0,0 +1,652 @@ +/* + * (C) 2013-2015 by Holger Hans Peter Freyther + * (C) 2013-2022 by sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <errno.h> +#include <time.h> + +#include <osmocom/ctrl/control_cmd.h> + +#include <osmocom/vty/command.h> +#include <osmocom/vty/misc.h> + +#include <osmocom/bsc/ctrl.h> +#include <osmocom/bsc/osmo_bsc_rf.h> +#include <osmocom/bsc/bts.h> +#include <osmocom/bsc/ipaccess.h> +#include <osmocom/bsc/chan_alloc.h> +#include <osmocom/bsc/abis_nm.h> +#include <osmocom/bsc/neighbor_ident.h> + +static int location_equal(struct bts_location *a, struct bts_location *b) +{ + return ((a->tstamp == b->tstamp) && (a->valid == b->valid) && (a->lat == b->lat) && + (a->lon == b->lon) && (a->height == b->height)); +} + +static void cleanup_locations(struct llist_head *locations) +{ + struct bts_location *myloc, *tmp; + int invalpos = 0, i = 0; + + LOGP(DCTRL, LOGL_DEBUG, "Checking position list.\n"); + llist_for_each_entry_safe(myloc, tmp, locations, list) { + i++; + if (i > 3) { + LOGP(DCTRL, LOGL_DEBUG, "Deleting old position.\n"); + llist_del(&myloc->list); + talloc_free(myloc); + } else if (myloc->valid == BTS_LOC_FIX_INVALID) { + /* Only capture the newest of subsequent invalid positions */ + invalpos++; + if (invalpos > 1) { + LOGP(DCTRL, LOGL_DEBUG, "Deleting subsequent invalid position.\n"); + invalpos--; + i--; + llist_del(&myloc->list); + talloc_free(myloc); + } + } else { + invalpos = 0; + } + } + LOGP(DCTRL, LOGL_DEBUG, "Found %d positions.\n", i); +} + +static int get_bts_loc(struct ctrl_cmd *cmd, void *data); + +void ctrl_generate_bts_location_state_trap(struct gsm_bts *bts, struct bsc_msc_data *msc) +{ + struct ctrl_cmd *cmd; + const char *oper, *admin, *policy; + + cmd = ctrl_cmd_create(msc, CTRL_TYPE_TRAP); + if (!cmd) { + LOGP(DCTRL, LOGL_ERROR, "Failed to create TRAP command.\n"); + return; + } + + cmd->id = "0"; + cmd->variable = talloc_asprintf(cmd, "bts.%d.location-state", bts->nr); + + /* Prepare the location reply */ + cmd->node = bts; + get_bts_loc(cmd, NULL); + + oper = osmo_bsc_rf_get_opstate_name(osmo_bsc_rf_get_opstate_by_bts(bts)); + admin = osmo_bsc_rf_get_adminstate_name(osmo_bsc_rf_get_adminstate_by_bts(bts)); + policy = osmo_bsc_rf_get_policy_name(osmo_bsc_rf_get_policy_by_bts(bts)); + + cmd->reply = talloc_asprintf_append(cmd->reply, + ",%s,%s,%s,%s,%s", + oper, admin, policy, + osmo_mcc_name(bts->network->plmn.mcc), + osmo_mnc_name(bts->network->plmn.mnc, + bts->network->plmn.mnc_3_digits)); + + osmo_bsc_send_trap(cmd, msc); + talloc_free(cmd); +} + +void bsc_gen_location_state_trap(struct gsm_bts *bts) +{ + struct bsc_msc_data *msc; + + llist_for_each_entry(msc, &bts->network->mscs, entry) + ctrl_generate_bts_location_state_trap(bts, msc); +} + +CTRL_CMD_DEFINE(bts_loc, "location"); +static int get_bts_loc(struct ctrl_cmd *cmd, void *data) +{ + struct bts_location *curloc; + struct gsm_bts *bts = (struct gsm_bts *) cmd->node; + if (!bts) { + cmd->reply = "bts not found."; + return CTRL_CMD_ERROR; + } + + if (llist_empty(&bts->loc_list)) { + cmd->reply = talloc_asprintf(cmd, "0,invalid,0,0,0"); + return CTRL_CMD_REPLY; + } + + curloc = llist_entry(bts->loc_list.next, struct bts_location, list); + + cmd->reply = talloc_asprintf(cmd, "%lu,%s,%f,%f,%f", curloc->tstamp, + get_value_string(bts_loc_fix_names, curloc->valid), curloc->lat, curloc->lon, curloc->height); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} + +static int set_bts_loc(struct ctrl_cmd *cmd, void *data) +{ + char *saveptr, *lat, *lon, *height, *tstamp, *valid, *tmp; + struct bts_location *curloc, *lastloc; + int ret; + struct gsm_bts *bts = (struct gsm_bts *) cmd->node; + if (!bts) { + cmd->reply = "bts not found."; + return CTRL_CMD_ERROR; + } + + tmp = talloc_strdup(cmd, cmd->value); + if (!tmp) + goto oom; + + tstamp = strtok_r(tmp, ",", &saveptr); + valid = strtok_r(NULL, ",", &saveptr); + lat = strtok_r(NULL, ",", &saveptr); + lon = strtok_r(NULL, ",", &saveptr); + height = strtok_r(NULL, "\0", &saveptr); + + /* Check if one of the strtok results was NULL. This will probably never occur since we will only see verified + * input in this code path */ + if ((tstamp == NULL) || (valid == NULL) || (lat == NULL) || (lon == NULL) || (height == NULL)) { + talloc_free(tmp); + cmd->reply = "parse error"; + return CTRL_CMD_ERROR; + } + + curloc = talloc_zero(tall_bsc_ctx, struct bts_location); + if (!curloc) { + talloc_free(tmp); + goto oom; + } + INIT_LLIST_HEAD(&curloc->list); + + curloc->tstamp = atol(tstamp); + curloc->valid = get_string_value(bts_loc_fix_names, valid); + curloc->lat = atof(lat); + curloc->lon = atof(lon); + curloc->height = atof(height); + talloc_free(tmp); + + lastloc = llist_entry(bts->loc_list.next, struct bts_location, list); + + /* Add location to the end of the list */ + llist_add(&curloc->list, &bts->loc_list); + + ret = get_bts_loc(cmd, data); + + if (!location_equal(curloc, lastloc)) + bsc_gen_location_state_trap(bts); + + cleanup_locations(&bts->loc_list); + + return ret; + +oom: + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; +} + +static int verify_bts_loc(struct ctrl_cmd *cmd, const char *value, void *data) +{ + char *saveptr, *latstr, *lonstr, *heightstr, *tstampstr, *validstr, *tmp; + time_t tstamp; + int valid; + double lat, lon, height __attribute__((unused)); + + tmp = talloc_strdup(cmd, value); + if (!tmp) + return 1; + + tstampstr = strtok_r(tmp, ",", &saveptr); + validstr = strtok_r(NULL, ",", &saveptr); + latstr = strtok_r(NULL, ",", &saveptr); + lonstr = strtok_r(NULL, ",", &saveptr); + heightstr = strtok_r(NULL, "\0", &saveptr); + + if ((tstampstr == NULL) || (validstr == NULL) || (latstr == NULL) || + (lonstr == NULL) || (heightstr == NULL)) + goto err; + + tstamp = atol(tstampstr); + valid = get_string_value(bts_loc_fix_names, validstr); + lat = atof(latstr); + lon = atof(lonstr); + height = atof(heightstr); + talloc_free(tmp); + tmp = NULL; + + if (((tstamp == 0) && (valid != BTS_LOC_FIX_INVALID)) || (lat < -90) || (lat > 90) || + (lon < -180) || (lon > 180) || (valid < 0)) { + goto err; + } + + return 0; + +err: + talloc_free(tmp); + cmd->reply = talloc_strdup(cmd, "The format is <unixtime>,(invalid|fix2d|fix3d),<lat>,<lon>,<height>"); + return 1; +} + +/* BTS related commands below */ +CTRL_CMD_DEFINE_RANGE(bts_lac, "location-area-code", struct gsm_bts, location_area_code, 0, 65535); +CTRL_CMD_DEFINE_RANGE(bts_ci, "cell-identity", struct gsm_bts, cell_identity, 0, 65535); + +static int set_bts_apply_config(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = cmd->node; + + if (!is_ipaccess_bts(bts)) { + cmd->reply = "BTS is not IP based"; + return CTRL_CMD_ERROR; + } + + ipaccess_drop_oml(bts, "ctrl bts.apply-configuration"); + cmd->reply = "Tried to drop the BTS"; + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_WO_NOVRF(bts_apply_config, "apply-configuration"); + +static int set_bts_si(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = cmd->node; + int rc; + + rc = gsm_bts_set_system_infos(bts); + if (rc != 0) { + cmd->reply = "Failed to generate SI"; + return CTRL_CMD_ERROR; + } + + cmd->reply = "Generated new System Information"; + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_WO_NOVRF(bts_si, "send-new-system-informations"); + +static int set_bts_power_ctrl_defs(struct ctrl_cmd *cmd, void *data) +{ + const struct gsm_bts *bts = cmd->node; + const struct gsm_bts_trx *trx; + + if (bts->ms_power_ctrl.mode != GSM_PWR_CTRL_MODE_DYN_BTS) { + cmd->reply = "BTS is not using dyn-bts mode"; + return CTRL_CMD_ERROR; + } + + if (bts->model->power_ctrl_send_def_params == NULL) { + cmd->reply = "Not implemented for this BTS model"; + return CTRL_CMD_ERROR; + } + + llist_for_each_entry(trx, &bts->trx_list, list) { + if (bts->model->power_ctrl_send_def_params(trx) != 0) { + cmd->reply = "power_ctrl_send_def_params() failed"; + return CTRL_CMD_ERROR; + } + } + + cmd->reply = "Default power control parameters have been sent"; + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_WO_NOVRF(bts_power_ctrl_defs, "send-power-control-defaults"); + +static int get_bts_chan_load(struct ctrl_cmd *cmd, void *data) +{ + int i; + struct pchan_load pl; + struct gsm_bts *bts; + const char *space = ""; + + bts = cmd->node; + memset(&pl, 0, sizeof(pl)); + bts_chan_load(&pl, bts); + + cmd->reply = talloc_strdup(cmd, ""); + + for (i = 0; i < ARRAY_SIZE(pl.pchan); ++i) { + const struct load_counter *lc = &pl.pchani; + + /* These can never have user load */ + if (i == GSM_PCHAN_NONE) + continue; + if (i == GSM_PCHAN_CCCH) + continue; + if (i == GSM_PCHAN_PDCH) + continue; + if (i == GSM_PCHAN_UNKNOWN) + continue; + + cmd->reply = talloc_asprintf_append(cmd->reply, + "%s%s,%u,%u", + space, gsm_pchan_name(i), lc->used, lc->total); + if (!cmd->reply) + goto error; + space = " "; + } + + return CTRL_CMD_REPLY; + +error: + cmd->reply = "Memory allocation failure"; + return CTRL_CMD_ERROR; +} + +CTRL_CMD_DEFINE_RO(bts_chan_load, "channel-load"); + +static int get_bts_oml_conn(struct ctrl_cmd *cmd, void *data) +{ + const struct gsm_bts *bts = cmd->node; + + cmd->reply = get_model_oml_status(bts); + + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_RO(bts_oml_conn, "oml-connection-state"); + +static int get_bts_oml_up(struct ctrl_cmd *cmd, void *data) +{ + const struct gsm_bts *bts = cmd->node; + + cmd->reply = talloc_asprintf(cmd, "%llu", bts_uptime(bts)); + if (!cmd->reply) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_RO(bts_oml_up, "oml-uptime"); + +static int verify_bts_gprs_mode(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + int valid; + enum bts_gprs_mode mode; + struct gsm_bts *bts = cmd->node; + + mode = bts_gprs_mode_parse(value, &valid); + if (!valid) { + cmd->reply = "Mode is not known"; + return 1; + } + + if (!bts_gprs_mode_is_compat(bts, mode)) { + cmd->reply = "bts does not support this mode"; + return 1; + } + + return 0; +} + +static int get_bts_gprs_mode(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = cmd->node; + + cmd->reply = talloc_strdup(cmd, bts_gprs_mode_name(bts->gprs.mode)); + return CTRL_CMD_REPLY; +} + +static int set_bts_gprs_mode(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = cmd->node; + + bts->gprs.mode = bts_gprs_mode_parse(cmd->value, NULL); + return get_bts_gprs_mode(cmd, data); +} + +CTRL_CMD_DEFINE(bts_gprs_mode, "gprs-mode"); + +static int get_bts_rf_state(struct ctrl_cmd *cmd, void *data) +{ + const char *oper, *admin, *policy; + struct gsm_bts *bts = cmd->node; + + if (!bts) { + cmd->reply = "bts not found."; + return CTRL_CMD_ERROR; + } + + oper = osmo_bsc_rf_get_opstate_name(osmo_bsc_rf_get_opstate_by_bts(bts)); + admin = osmo_bsc_rf_get_adminstate_name(osmo_bsc_rf_get_adminstate_by_bts(bts)); + policy = osmo_bsc_rf_get_policy_name(osmo_bsc_rf_get_policy_by_bts(bts)); + + cmd->reply = talloc_asprintf(cmd, "%s,%s,%s", oper, admin, policy); + if (!cmd->reply) { + cmd->reply = "OOM."; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_RO(bts_rf_state, "rf_state"); + +/* Return a list of the states of each TRX for a given BTS. + * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>;<bts_nr>,<trx_nr>,...;...; + * For details on the string, see bsc_rf_states_c(); + */ +static int get_bts_rf_states(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = cmd->node; + + if (!bts) { + cmd->reply = "bts not found."; + return CTRL_CMD_ERROR; + } + + cmd->reply = bsc_rf_states_of_bts_c(cmd, bts); + if (!cmd->reply) { + cmd->reply = "OOM."; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} +CTRL_CMD_DEFINE_RO(bts_rf_states, "rf_states"); + +static int verify_bts_c0_power_red(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + const int red = atoi(value); + + if (red < 0 || red > 6) { + cmd->reply = "Value is out of range"; + return 1; + } else if (red % 2 != 0) { + cmd->reply = "Value must be even"; + return 1; + } + + return 0; +} + +static int get_bts_c0_power_red(struct ctrl_cmd *cmd, void *data) +{ + const struct gsm_bts *bts = cmd->node; + + cmd->reply = talloc_asprintf(cmd, "%u", bts->c0_max_power_red_db); + if (!cmd->reply) { + cmd->reply = "OOM."; + return CTRL_CMD_ERROR; + } + + return CTRL_CMD_REPLY; +} + +static int set_bts_c0_power_red(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = cmd->node; + const int red = atoi(cmd->value); + int rc; + + rc = gsm_bts_set_c0_power_red(bts, red); + if (rc == -ENOTSUP) { + cmd->reply = "BCCH carrier power reduction is not supported"; + return CTRL_CMD_ERROR; + } else if (rc != 0) { + cmd->reply = "Failed to enable BCCH carrier power reduction"; + return CTRL_CMD_ERROR; + } + + return get_bts_c0_power_red(cmd, data); +} + +CTRL_CMD_DEFINE(bts_c0_power_red, "c0-power-reduction"); + +static int verify_bts_neighbor_list_add_del(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + int arfcn; + + if (osmo_str_to_int(&arfcn, value, 10, 0, 1023) < 0) { + cmd->reply = "Invalid ARFCN value"; + return 1; + } + + return 0; +} + +static int set_bts_neighbor_list_add_del(struct ctrl_cmd *cmd, void *data, bool add) +{ + struct gsm_bts *bts = cmd->node; + struct bitvec *bv = &bts->si_common.neigh_list; + int arfcn_int; + uint16_t arfcn; + enum gsm_band unused; + + if (osmo_str_to_int(&arfcn_int, cmd->value, 10, 0, 1023) < 0) { + cmd->reply = "Failed to parse ARFCN value"; + return CTRL_CMD_ERROR; + } + arfcn = (uint16_t) arfcn_int; + + if (bts->neigh_list_manual_mode == NL_MODE_AUTOMATIC) { + cmd->reply = "Neighbor list not in manual mode"; + return CTRL_CMD_ERROR; + } + + if (gsm_arfcn2band_rc(arfcn, &unused) < 0) { + cmd->reply = "Invalid arfcn detected"; + return CTRL_CMD_ERROR; + } + + if (add) + bitvec_set_bit_pos(bv, arfcn, 1); + else + bitvec_set_bit_pos(bv, arfcn, 0); + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} + +static int verify_bts_neighbor_list_add(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + return verify_bts_neighbor_list_add_del(cmd, value, _data); +} + +static int set_bts_neighbor_list_add(struct ctrl_cmd *cmd, void *data) +{ + return set_bts_neighbor_list_add_del(cmd, data, true); +} + +CTRL_CMD_DEFINE_WO(bts_neighbor_list_add, "neighbor-list add"); + +static int verify_bts_neighbor_list_del(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + return verify_bts_neighbor_list_add_del(cmd, value, _data); +} + +static int set_bts_neighbor_list_del(struct ctrl_cmd *cmd, void *data) +{ + return set_bts_neighbor_list_add_del(cmd, data, false); +} + +CTRL_CMD_DEFINE_WO(bts_neighbor_list_del, "neighbor-list del"); + +static int verify_bts_neighbor_list_mode(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + if (!strcmp(value, "automatic")) + return 0; + if (!strcmp(value, "manual")) + return 0; + if (!strcmp(value, "manual-si5")) + return 0; + + cmd->reply = "Invalid mode"; + return 1; +} + +static int set_bts_neighbor_list_mode(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = cmd->node; + int mode = NL_MODE_AUTOMATIC; + + if (!strcmp(cmd->value, "automatic")) + mode = NL_MODE_AUTOMATIC; + else if (!strcmp(cmd->value, "manual")) + mode = NL_MODE_MANUAL; + else if (!strcmp(cmd->value, "manual-si5")) + mode = NL_MODE_MANUAL_SI5SEP; + + switch (mode) { + case NL_MODE_MANUAL_SI5SEP: + case NL_MODE_MANUAL: + /* make sure we clear the current list when switching to + * manual mode */ + if (bts->neigh_list_manual_mode == 0) + memset(&bts->si_common.data.neigh_list, 0, sizeof(bts->si_common.data.neigh_list)); + break; + default: + break; + } + + bts->neigh_list_manual_mode = mode; + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_WO(bts_neighbor_list_mode, "neighbor-list mode"); + +int bsc_bts_ctrl_cmds_install(void) +{ + int rc = 0; + + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_loc); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_lac); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_ci); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_apply_config); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_si); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_power_ctrl_defs); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_chan_load); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_oml_conn); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_oml_up); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_gprs_mode); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_rf_state); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_rf_states); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_c0_power_red); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_add); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_del); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_mode); + + rc |= neighbor_ident_ctrl_init(); + + rc = bsc_bts_trx_ctrl_cmds_install(); + + return rc; +}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bts_ipaccess_nanobts.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_ipaccess_nanobts.c
Changed
@@ -168,7 +168,6 @@ break; case NM_OC_CHANNEL: ts = obj; - trx = ts->trx; osmo_fsm_inst_dispatch(ts->mo.fi, NM_EV_STATE_CHG_REP, nsd); break; case NM_OC_RADIO_CARRIER: @@ -185,9 +184,6 @@ break; case NM_OC_GPRS_NSVC: nsvc = obj; - /* We skip NSVC1 since we only use NSVC0 */ - if (nsvc->id == 1) - break; osmo_fsm_inst_dispatch(nsvc->mo.fi, NM_EV_STATE_CHG_REP, nsd); break; default: @@ -413,19 +409,15 @@ osmo_fsm_inst_dispatch(ts->mo.fi, NM_EV_SET_ATTR_ACK, NULL); } -static void nm_rx_ipacc_set_attr_ack(struct msgb *oml_msg) +static void nm_rx_ipacc_set_attr_ack(struct ipacc_ack_signal_data *sig_data) { - struct e1inp_sign_link *sign_link = oml_msg->dst; - struct gsm_bts *bts = sign_link->trx->bts; - struct abis_om_hdr *oh = msgb_l2(oml_msg); - uint8_t idstrlen = oh->data0; - struct abis_om_fom_hdr *foh; + struct gsm_bts *bts = sig_data->bts; + struct abis_om_fom_hdr *foh = sig_data->foh; void *obj; struct gsm_gprs_nse *nse; struct gsm_gprs_cell *cell; struct gsm_gprs_nsvc *nsvc; - foh = (struct abis_om_fom_hdr *) (oh->data + 1 + idstrlen); obj = gsm_objclass2obj(bts, foh->obj_class, &foh->obj_inst); switch (foh->obj_class) { @@ -447,6 +439,61 @@ } } +static void nm_rx_ipacc_rsl_connect_ack(struct ipacc_ack_signal_data *sig_data) +{ + struct gsm_bts *bts = sig_data->bts; + struct abis_om_fom_hdr *foh = sig_data->foh; + struct gsm_bts_trx *trx; + + if (foh->obj_class != NM_OC_BASEB_TRANSC) { + LOGPFOH(DNM, LOGL_ERROR, foh, "IPACC RSL Connect ACK received on incorrect object class %d!\n", foh->obj_class); + return; + } + + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + osmo_fsm_inst_dispatch(trx->bb_transc.mo.fi, NM_EV_RSL_CONNECT_ACK, NULL); +} + +static void nm_rx_ipacc_ack(struct ipacc_ack_signal_data *sig_data) +{ + switch (sig_data->foh->msg_type) { + case NM_MT_IPACC_SET_ATTR_ACK: + nm_rx_ipacc_set_attr_ack(sig_data); + break; + case NM_MT_IPACC_RSL_CONNECT_ACK: + nm_rx_ipacc_rsl_connect_ack(sig_data); + break; + default: + break; + } +} + +static void nm_rx_ipacc_rsl_connect_nack(struct ipacc_ack_signal_data *sig_data) +{ + struct gsm_bts *bts = sig_data->bts; + struct abis_om_fom_hdr *foh = sig_data->foh; + struct gsm_bts_trx *trx; + + if (foh->obj_class != NM_OC_BASEB_TRANSC) { + LOGPFOH(DNM, LOGL_ERROR, foh, "IPACC RSL Connect NACK received on incorrect object class %d!\n", foh->obj_class); + return; + } + + trx = gsm_bts_trx_num(bts, foh->obj_inst.trx_nr); + osmo_fsm_inst_dispatch(trx->bb_transc.mo.fi, NM_EV_RSL_CONNECT_NACK, NULL); +} + +static void nm_rx_ipacc_nack(struct ipacc_ack_signal_data *sig_data) +{ + switch (sig_data->foh->msg_type) { + case NM_MT_IPACC_RSL_CONNECT_ACK: + nm_rx_ipacc_rsl_connect_nack(sig_data); + break; + default: + break; + } +} + /* Callback function to be called every time we receive a signal from NM */ static int bts_ipa_nm_sig_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) @@ -477,8 +524,11 @@ case S_NM_SET_CHAN_ATTR_ACK: nm_rx_set_chan_attr_ack(signal_data); return 0; - case S_NM_IPACC_SET_ATTR_ACK: - nm_rx_ipacc_set_attr_ack(signal_data); + case S_NM_IPACC_ACK: + nm_rx_ipacc_ack(signal_data); + return 0; + case S_NM_IPACC_NACK: + nm_rx_ipacc_nack(signal_data); return 0; default: break; @@ -562,9 +612,12 @@ gsm_bts_stats_reset(bts); /* Also drop the associated OSMO link */ + OSMO_ASSERT(bts->osmo_link); e1inp_sign_link_destroy(bts->osmo_link); bts->osmo_link = NULL; + bts_setup_ramp_remove(bts); + /* we have issues reconnecting RSL, drop everything. */ llist_for_each_entry(trx, &bts->trx_list, list) { ipaccess_drop_rsl(trx, "OML link drop");
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
Changed
@@ -91,8 +91,9 @@ /* BTS Air Timer (3GPP TS 12.21 sec 9.4.10), 10 milliseconds */ msgb_tv_put(msgb, NM_ATT_BTS_AIR_TIMER, osmo_tdef_get(bts->network->T_defs, 3105, OSMO_TDEF_MS, -1)/10); - /* NY1 (3GPP TS 12.21 sec 9.4.37), 10 retransmissions of physical config */ - msgb_tv_put(msgb, NM_ATT_NY1, 10); + /* NY1 (3GPP TS 12.21 sec 9.4.37), number of retransmissions of physical config */ + gsm_bts_check_ny1(bts); + msgb_tv_put(msgb, NM_ATT_NY1, osmo_tdef_get(bts->network->T_defs, -3105, OSMO_TDEF_CUSTOM, -1)); /* BCCH ARFCN (3GPP TS 12.21 sec 9.4.8) */ buf0 = (bts->c0->arfcn >> 8) & 0x0f; @@ -206,21 +207,20 @@ return msgb; } -struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_bts *bts) +struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_gprs_nsvc *nsvc) { struct msgb *msgb; uint8_t buf256; - struct gsm_bts_sm *bts_sm = bts->site_mgr; msgb = msgb_alloc(1024, "nanobts_attr_bts"); if (!msgb) return NULL; /* 925 */ - buf0 = bts_sm->gprs.nsvc0.nsvci >> 8; - buf1 = bts_sm->gprs.nsvc0.nsvci & 0xff; + buf0 = nsvc->nsvci >> 8; + buf1 = nsvc->nsvci & 0xff; msgb_tl16v_put(msgb, NM_ATT_IPACC_NSVCI, 2, buf); - switch (bts_sm->gprs.nsvc->remote.u.sa.sa_family) { + switch (nsvc->remote.u.sa.sa_family) { case AF_INET6: /* all fields are encoded in network byte order */ /* protocol family */ @@ -228,20 +228,20 @@ /* padding */ buf1 = 0x00; /* local udp port */ - osmo_store16be(bts_sm->gprs.nsvc0.local_port, &buf2); + osmo_store16be(nsvc->local_port, &buf2); /* remote udp port */ - memcpy(&buf4, &bts_sm->gprs.nsvc0.remote.u.sin6.sin6_port, sizeof(uint16_t)); + memcpy(&buf4, &nsvc->remote.u.sin6.sin6_port, sizeof(uint16_t)); /* remote ip address */ - memcpy(&buf6, &bts_sm->gprs.nsvc0.remote.u.sin6.sin6_addr, sizeof(struct in6_addr)); + memcpy(&buf6, &nsvc->remote.u.sin6.sin6_addr, sizeof(struct in6_addr)); msgb_tl16v_put(msgb, NM_ATT_OSMO_NS_LINK_CFG, 6 + sizeof(struct in6_addr), buf); break; case AF_INET: /* remote udp port */ - memcpy(&buf0, &bts_sm->gprs.nsvc0.remote.u.sin.sin_port, sizeof(uint16_t)); + memcpy(&buf0, &nsvc->remote.u.sin.sin_port, sizeof(uint16_t)); /* remote ip address */ - memcpy(&buf2, &bts_sm->gprs.nsvc0.remote.u.sin.sin_addr, sizeof(struct in_addr)); + memcpy(&buf2, &nsvc->remote.u.sin.sin_addr, sizeof(struct in_addr)); /* local udp port */ - osmo_store16be(bts_sm->gprs.nsvc0.local_port, &buf6); + osmo_store16be(nsvc->local_port, &buf6); msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_LINK_CFG, 8, buf); break; default:
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bts_nokia_site.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_nokia_site.c
Changed
@@ -797,6 +797,9 @@ case GSM_PCHAN_CCCH_SDCCH4: chan_config = 1; break; + case GSM_PCHAN_CCCH_SDCCH4_CBCH: + chan_config = 3; + break; case GSM_PCHAN_TCH_F: chan_config = 6; /* 9 should work too */ break; @@ -806,6 +809,9 @@ case GSM_PCHAN_SDCCH8_SACCH8C: chan_config = 4; break; + case GSM_PCHAN_SDCCH8_SACCH8C_CBCH: + chan_config = 5; + break; case GSM_PCHAN_PDCH: chan_config = 11; break;
View file
osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_setup_ramp.c
Added
@@ -0,0 +1,249 @@ +/* (C) 2022 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> + * + * Author: Alexander Couzens <acouzens@sysmocom.de> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <stdbool.h> + +#include <osmocom/core/fsm.h> +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/timer.h> +#include <osmocom/core/utils.h> + +#include <osmocom/bsc/bts.h> +#include <osmocom/bsc/bts_sm.h> +#include <osmocom/bsc/bts_setup_ramp.h> +#include <osmocom/bsc/nm_common_fsm.h> + + +static void _bts_setup_ramp_unblock_bts(struct gsm_bts *bts) +{ + llist_del_init(&bts->bts_setup_ramp.list); + bts->bts_setup_ramp.state = BTS_SETUP_RAMP_READY; + + nm_fsm_dispatch_all_configuring(bts, NM_EV_SETUP_RAMP_READY, NULL); +} + +/*! + * Unblock a BTS from BTS setup ramping to continue setup and configure. + * + * \param bts pointer to the bts + * \return 0 on success, -EINVAL when the BTS is not waiting. + */ +int bts_setup_ramp_unblock_bts(struct gsm_bts *bts) +{ + if (bts->bts_setup_ramp.state != BTS_SETUP_RAMP_WAIT) + return -EINVAL; + + if (llist_empty(&bts->bts_setup_ramp.list)) + return -EINVAL; + + _bts_setup_ramp_unblock_bts(bts); + return 0; +} + +/*! + * Timer callback and called by bts_setup_ramp_deactivate + * \param _net pointer to struct gsm_network + */ +static void bts_setup_ramp_timer_cb(void *_net) +{ + struct gsm_network *net = (struct gsm_network *) _net; + struct gsm_bts *bts, *n; + net->bts_setup_ramp.count = 0; + + llist_for_each_entry_safe(bts, n, &net->bts_setup_ramp.head, bts_setup_ramp.list) { + net->bts_setup_ramp.count++; + _bts_setup_ramp_unblock_bts(bts); + LOG_BTS(bts, DNM, LOGL_INFO, "Unblock BTS %d from BTS ramping.\n", bts->nr); + if (bts_setup_ramp_active(net) && net->bts_setup_ramp.count >= net->bts_setup_ramp.step_size) + break; + } + + if (bts_setup_ramp_active(net)) + osmo_timer_schedule(&net->bts_setup_ramp.timer, net->bts_setup_ramp.step_interval, 0); +} + +const struct value_string bts_setup_ramp_state_values = { + { BTS_SETUP_RAMP_INIT, "Initial" }, + { BTS_SETUP_RAMP_WAIT, "Waiting" }, + { BTS_SETUP_RAMP_READY, "Ready" }, + { 0, NULL }, +}; + +const char *bts_setup_ramp_get_state_str(struct gsm_bts *bts) +{ + return get_value_string_or_null(bts_setup_ramp_state_values, bts->bts_setup_ramp.state); +} + +/* return true when state has been changed. */ +static bool check_config(struct gsm_network *net) +{ + bool new_state = (net->bts_setup_ramp.enabled + && net->bts_setup_ramp.step_size > 0 + && net->bts_setup_ramp.step_interval > 0); + + if (!new_state && bts_setup_ramp_active(net)) { + net->bts_setup_ramp.active = false; + osmo_timer_del(&net->bts_setup_ramp.timer); + /* clear bts list */ + bts_setup_ramp_timer_cb(net); + return true; + } else if (new_state && !bts_setup_ramp_active(net)) { + net->bts_setup_ramp.active = true; + osmo_timer_schedule(&net->bts_setup_ramp.timer, net->bts_setup_ramp.step_interval, 0); + return true; + } + + return false; +} + +/*! + * Enable the bts setup ramping feature + * + * The BTS setup ramping prevents BSC overload when too many BTS tries to setup and + * configure at the same time. E.g. this might happen if there is a major network outage + * between all BTS and the BSC. + * + * \paramin net a pointer to the gsm network + */ +void bts_setup_ramp_enable(struct gsm_network *net) +{ + net->bts_setup_ramp.enabled = true; + check_config(net); +} + +/*! + * Disable the bts setup ramping feature + * + * \paramin net a pointer to the gsm network + */ +void bts_setup_ramp_disable(struct gsm_network *net) +{ + net->bts_setup_ramp.enabled = false; + check_config(net); +} + +/*! Checks if the bts setup ramp correct configured and active + * + * \paramin net a pointer to the gsm network + * \return true if the bts setup ramp is active + */ +bool bts_setup_ramp_active(struct gsm_network *net) +{ + return net->bts_setup_ramp.active; +} + +/*! + * Check if the BTS should wait to setup. + * + * Can be called multiple times by the same BTS. + * + * \param bts pointer to the bts + * \return true if the bts should wait + */ +bool bts_setup_ramp_wait(struct gsm_bts *bts) +{ + struct gsm_network *net = bts->network; + + if (!bts_setup_ramp_active(net)) { + bts->bts_setup_ramp.state = BTS_SETUP_RAMP_READY; + return false; + } + + switch (bts->bts_setup_ramp.state) { + case BTS_SETUP_RAMP_INIT: + break; + case BTS_SETUP_RAMP_WAIT: + return true; + case BTS_SETUP_RAMP_READY: + return false; + } + + if (net->bts_setup_ramp.count < net->bts_setup_ramp.step_size) { + LOG_BTS(bts, DNM, LOGL_INFO, + "BTS %d can configure without waiting for BTS ramping.\n", bts->nr); + + net->bts_setup_ramp.count++; + bts->bts_setup_ramp.state = BTS_SETUP_RAMP_READY; + return false; + } + + bts->bts_setup_ramp.state = BTS_SETUP_RAMP_WAIT; + llist_add_tail(&bts->bts_setup_ramp.list, &net->bts_setup_ramp.head); + LOGP(DNM, LOGL_INFO, "BTS %d will wait for BTS ramping.\n", bts->nr); + + return true; +} + +void bts_setup_ramp_init_network(struct gsm_network *net) +{ + INIT_LLIST_HEAD(&net->bts_setup_ramp.head); + osmo_timer_setup(&net->bts_setup_ramp.timer, bts_setup_ramp_timer_cb, net); +} + +void bts_setup_ramp_init_bts(struct gsm_bts *bts) +{ + /* Initialize bts_setup_ramp.list (llist_entry) to have llist_empty() available */ + INIT_LLIST_HEAD(&bts->bts_setup_ramp.list); + bts->bts_setup_ramp.state = BTS_SETUP_RAMP_INIT; +} + +/*! + * Remove the bts from the bts setup ramp waiting list and resets the BTS setup ramping state. + * Should be called when removing the BTS + * + * \param bts pointer to the bts + */ +void bts_setup_ramp_remove(struct gsm_bts *bts) +{ + if (!llist_empty(&bts->bts_setup_ramp.list)) + llist_del_init(&bts->bts_setup_ramp.list); + bts->bts_setup_ramp.state = BTS_SETUP_RAMP_INIT; +} + +/*! + * Set the BTS setup ramping step interval. + * + * Within the time window of \param step_interval only a limited amount (see step_size) + * of BTS will be configured. + * + * \paramin net a pointer to the gsm network + * \param step_interval in seconds + */ +void bts_setup_ramp_set_step_interval(struct gsm_network *net, unsigned int step_interval) +{ + net->bts_setup_ramp.step_interval = step_interval; + check_config(net); +} + +/*! + * Set the BTS setup ramping step_size + * + * Within the time window of step_interval only a limited amount of BTS (\param step_size) + * will be configured. + * + * \paramin net a pointer to the gsm network + * \param step_size the step size + */ +void bts_setup_ramp_set_step_size(struct gsm_network *net, unsigned int step_size) +{ + net->bts_setup_ramp.step_size = step_size; + check_config(net); +}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bts_trx.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_trx.c
Changed
@@ -31,6 +31,7 @@ #include <osmocom/bsc/pcu_if.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/nm_common_fsm.h> +#include <osmocom/bsc/lchan.h> static int gsm_bts_trx_talloc_destructor(struct gsm_bts_trx *trx) { @@ -107,14 +108,8 @@ ts->hopping.ma.data = ts->hopping.ma_data; for (l = 0; l < TS_MAX_LCHAN; l++) { - struct gsm_lchan *lchan; - lchan = &ts->lchanl; - - lchan->ts = ts; - lchan->nr = l; - lchan->type = GSM_LCHAN_NONE; - - lchan_update_name(lchan); + struct gsm_lchan *lchan = &ts->lchanl; + lchan_init(lchan, ts, l); } } @@ -331,6 +326,23 @@ } break; + case GSM_PCHAN_PDCH: + if (is_ericsson_bts(trx->bts)) { + /* NOTE: A static PDCH is usually handled by the BTS/PCU internally, the BSC + * will not actively manage this channel. It will just keep the timeslot + * unused so that it is free for the BTS/PCU to use it as PDCH. Not all BTSs + * work well in this scheme. Ericsson RBS BTSs support dynamic channels natively + * and require a channel activation on RSL level before the PDCH can be used. + * One could work around this by activating the PDCH once on startup and + * leave it on indefinetly but we decided not to do so. Users of Ericsson RBS + * BTSs must configure a dynamic PDCH channel. */ + LOGP(DNM, LOGL_ERROR, "%s is not allowed, because Ericsson RBS does" + "not support static PDCH (use TCH/F_TCH/H_SDCCH8_PDCH)\n", + gsm_pchan_name(ts->pchan_from_config)); + result = false; + } + break; + default: /* CCCH on TS0 is mandatory for C0 */ if (trx->bts->c0 == trx && i == 0) { @@ -455,8 +467,11 @@ case SYSINFO_TYPE_6: si_lensi_type = 11; break; + case SYSINFO_TYPE_10: + si_lensi_type = 21; + break; default: - si_lensi_type = 23; + si_lensi_type = GSM_MACBLOCK_LEN; } } }
View file
osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_trx_ctrl.c
Added
@@ -0,0 +1,212 @@ +/* + * (C) 2013-2015 by Holger Hans Peter Freyther + * (C) 2013-2022 by sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <errno.h> +#include <time.h> + +#include <osmocom/ctrl/control_cmd.h> + +#include <osmocom/vty/command.h> +#include <osmocom/vty/misc.h> + +#include <osmocom/bsc/ctrl.h> +#include <osmocom/bsc/osmo_bsc_rf.h> +#include <osmocom/bsc/bts.h> +#include <osmocom/bsc/ipaccess.h> +#include <osmocom/bsc/chan_alloc.h> +#include <osmocom/bsc/abis_nm.h> +#include <osmocom/bsc/neighbor_ident.h> +#include <osmocom/bsc/system_information.h> + +/********************* + * TS_NODE + *********************/ + +static int verify_ts_hopping_arfcn_add(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + int64_t arfcn; + enum gsm_band unused; + if (osmo_str_to_int64(&arfcn, value, 10, 0, 1024) < 0) + return 1; + if (gsm_arfcn2band_rc(arfcn, &unused) < 0) { + return 1; + } + return 0; +} +static int set_ts_hopping_arfcn_add(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts_trx_ts *ts = cmd->node; + int arfcn = atoi(cmd->value); + + bitvec_set_bit_pos(&ts->hopping.arfcns, arfcn, ONE); + + /* Update Cell Allocation (list of all the frequencies allocated to a cell) */ + if (generate_cell_chan_alloc(ts->trx->bts) != 0) { + bitvec_set_bit_pos(&ts->hopping.arfcns, arfcn, ZERO); /* roll-back */ + cmd->reply = "Failed to re-generate Cell Allocation"; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} +/* Parameter format: "<arfcn>" */ +CTRL_CMD_DEFINE_WO(ts_hopping_arfcn_add, "hopping-arfcn-add"); + +static int verify_ts_hopping_arfcn_del(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + int64_t arfcn; + enum gsm_band unused; + if (strcmp(value, "all") == 0) + return 0; + if (osmo_str_to_int64(&arfcn, value, 10, 0, 1024) < 0) + return 1; + if (gsm_arfcn2band_rc(arfcn, &unused) < 0) { + return 1; + } + return 0; +} +static int set_ts_hopping_arfcn_del(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts_trx_ts *ts = cmd->node; + bool all = (strcmp(cmd->value, "all") == 0); + int arfcn; + + if (all) { + bitvec_zero(&ts->hopping.arfcns); + } else { + arfcn = atoi(cmd->value); + bitvec_set_bit_pos(&ts->hopping.arfcns, arfcn, ZERO); + } + + /* Update Cell Allocation (list of all the frequencies allocated to a cell) */ + if (generate_cell_chan_alloc(ts->trx->bts) != 0) { + if (!all) + bitvec_set_bit_pos(&ts->hopping.arfcns, arfcn, ONE); /* roll-back */ + cmd->reply = "Failed to re-generate Cell Allocation"; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} +/* Parameter format: "(<arfcn>|all)" */ +CTRL_CMD_DEFINE_WO(ts_hopping_arfcn_del, "hopping-arfcn-del"); + + +static int bsc_bts_trx_ts_ctrl_cmds_install(void) +{ + int rc = 0; + + rc |= ctrl_cmd_install(CTRL_NODE_TS, &cmd_ts_hopping_arfcn_add); + rc |= ctrl_cmd_install(CTRL_NODE_TS, &cmd_ts_hopping_arfcn_del); + + return rc; +} + +/********************* + * TRX_NODE + *********************/ + +static int get_trx_rf_locked(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts_trx *trx = cmd->node; + /* Return rf_locked = 1 only if it is explicitly locked. If it is in shutdown or null state, do not "trick" the + * caller into thinking that sending "rf_locked 0" is necessary to bring the TRX up. */ + cmd->reply = (trx->mo.nm_state.administrative == NM_STATE_LOCKED) ? "1" : "0"; + return CTRL_CMD_REPLY; +} + +static int set_trx_rf_locked(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts_trx *trx = cmd->node; + int locked; + if (osmo_str_to_int(&locked, cmd->value, 10, 0, 1)) { + cmd->reply = "Invalid value"; + return CTRL_CMD_ERROR; + } + + gsm_trx_lock_rf(trx, locked, "ctrl"); + + /* Let's not assume the nm FSM has already switched its state, just return the intended rf_locked value. */ + cmd->reply = locked ? "1" : "0"; + return CTRL_CMD_REPLY; +} + +static int verify_trx_rf_locked(struct ctrl_cmd *cmd, const char *value, void *data) +{ + return osmo_str_to_int(NULL, value, 10, 0, 1); +} +CTRL_CMD_DEFINE(trx_rf_locked, "rf_locked"); + +/* TRX related commands below here */ +CTRL_HELPER_GET_INT(trx_max_power, struct gsm_bts_trx, max_power_red); +static int verify_trx_max_power(struct ctrl_cmd *cmd, const char *value, void *_data) +{ + int tmp = atoi(value); + + if (tmp < 0 || tmp > 22) { + cmd->reply = "Value must be between 0 and 22"; + return -1; + } + + if (tmp & 1) { + cmd->reply = "Value must be even"; + return -1; + } + + return 0; +} +CTRL_CMD_DEFINE_RANGE(trx_arfcn, "arfcn", struct gsm_bts_trx, arfcn, 0, 1023); + +static int set_trx_max_power(struct ctrl_cmd *cmd, void *_data) +{ + struct gsm_bts_trx *trx = cmd->node; + int old_power; + + /* remember the old value, set the new one */ + old_power = trx->max_power_red; + trx->max_power_red = atoi(cmd->value); + + /* Maybe update the value */ + if (old_power != trx->max_power_red) { + LOGP(DCTRL, LOGL_NOTICE, + "%s updating max_pwr_red(%d)\n", + gsm_trx_name(trx), trx->max_power_red); + abis_nm_update_max_power_red(trx); + } + + return get_trx_max_power(cmd, _data); +} +CTRL_CMD_DEFINE(trx_max_power, "max-power-reduction"); + +int bsc_bts_trx_ctrl_cmds_install(void) +{ + int rc = 0; + + rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_max_power); + rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_arfcn); + rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_rf_locked); + + rc |= bsc_bts_trx_ts_ctrl_cmds_install(); + + return rc; +}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bts_trx_vty.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_trx_vty.c
Changed
@@ -39,6 +39,7 @@ #include <osmocom/bsc/system_information.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/timeslot_fsm.h> +#include <osmocom/bsc/lchan.h> #include <osmocom/bsc/lchan_fsm.h> #include <osmocom/bsc/lchan_select.h> #include <osmocom/bsc/bts.h> @@ -401,7 +402,7 @@ if (bitvec_get_bit_pos(&ts->hopping.arfcns, arfcn) == ONE) { vty_out(vty, "%% ARFCN %" PRIu16 " is already set%s", arfcn, VTY_NEWLINE); - return CMD_WARNING; + return CMD_SUCCESS; } bitvec_set_bit_pos(&ts->hopping.arfcns, arfcn, 1); @@ -568,7 +569,7 @@ vty_out(vty, "BTS %u, TRX %u, Timeslot %u, Lchan %u: Type %s%s", lchan->ts->trx->bts->nr, lchan->ts->trx->nr, lchan->ts->nr, - lchan->nr, gsm_lchant_name(lchan->type), VTY_NEWLINE); + lchan->nr, gsm_chan_t_name(lchan->type), VTY_NEWLINE); if (lchan->activate.concluded) { vty_out(vty, " Active for: %s seconds%s", @@ -605,25 +606,35 @@ if (lchan->conn && lchan->conn->bsub) { vty_out(vty, " Subscriber:%s", VTY_NEWLINE); bsc_subscr_dump_vty(vty, lchan->conn->bsub); - } else + } else { vty_out(vty, " No Subscriber%s", VTY_NEWLINE); + } if (is_ipaccess_bts(lchan->ts->trx->bts)) { struct in_addr ia; if (lchan->abis_ip.bound_ip) { ia.s_addr = htonl(lchan->abis_ip.bound_ip); - vty_out(vty, " Bound IP: %s Port %u RTP_TYPE2=%u CONN_ID=%u%s", + vty_out(vty, " Bound IP: %s Port %u CONN_ID=%u", inet_ntoa(ia), lchan->abis_ip.bound_port, - lchan->abis_ip.rtp_payload2, lchan->abis_ip.conn_id, - VTY_NEWLINE); + lchan->abis_ip.conn_id); + if (lchan->abis_ip.osmux.use) + vty_out(vty, " Osmux_CID=%u%s", lchan->abis_ip.osmux.local_cid, VTY_NEWLINE); + else + vty_out(vty, " RTP_TYPE2=%u%s", lchan->abis_ip.rtp_payload2, VTY_NEWLINE); } if (lchan->abis_ip.connect_ip) { ia.s_addr = htonl(lchan->abis_ip.connect_ip); - vty_out(vty, " Conn. IP: %s Port %u RTP_TYPE=%u SPEECH_MODE=0x%02x%s", + vty_out(vty, " Conn. IP: %s Port %u SPEECH_MODE=0x%02x", inet_ntoa(ia), lchan->abis_ip.connect_port, - lchan->abis_ip.rtp_payload, lchan->abis_ip.speech_mode, - VTY_NEWLINE); + lchan->abis_ip.speech_mode); + if (lchan->abis_ip.osmux.use) { + if (lchan->abis_ip.osmux.remote_cid_present) + vty_out(vty, " Osmux_CID=%u%s", lchan->abis_ip.osmux.remote_cid, VTY_NEWLINE); + else + vty_out(vty, " Osmux_CID=?%s", VTY_NEWLINE); + } else { + vty_out(vty, " RTP_TYPE=%u%s", lchan->abis_ip.rtp_payload, VTY_NEWLINE); + } } - } /* we want to report the last measurement report */ @@ -661,7 +672,7 @@ } vty_out(vty, ", Type %s%s TSC-s%dc%u, State %s - L1 MS Power: %u dBm RXL-FULL-dl: %4d dBm RXL-FULL-ul: %4d dBm%s", - gsm_lchant_name(lchan->type), + gsm_chan_t_name(lchan->type), lchan->vamos.enabled ? " (VAMOS)" : "", lchan->tsc_set > 0 ? lchan->tsc_set : 1, lchan->tsc, @@ -738,8 +749,10 @@ net_dump_nmstate(vty, &trx->mo.nm_state); if (print_rsl) vty_out(vty, " RSL State: %s%s", trx->rsl_link_primary? "connected" : "disconnected", VTY_NEWLINE); - vty_out(vty, " Baseband Transceiver NM State: "); - net_dump_nmstate(vty, &trx->bb_transc.mo.nm_state); + + vty_out(vty, " %sBaseband Transceiver NM State: ", is_ericsson_bts(trx->bts) ? "Virtual " : ""); + net_dump_nmstate(vty, &trx->bb_transc.mo.nm_state); + if (is_ipaccess_bts(trx->bts)) { vty_out(vty, " ip.access stream ID: 0x%02x ", trx->rsl_tei_primary); e1isl_dump_vty_tcp(vty, trx->rsl_link_primary);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bts_vty.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/bts_vty.c
Changed
@@ -116,8 +116,8 @@ struct gsm_bts *bts; if (bts_nr > gsmnet->num_bts) { - vty_out(vty, "%% The next unused BTS number is %u%s", - gsmnet->num_bts, VTY_NEWLINE); + vty_out(vty, "%% BTS number %d not valid (next BTS number must be %u)%s", + bts_nr, gsmnet->num_bts, VTY_NEWLINE); return CMD_WARNING; } else if (bts_nr == gsmnet->num_bts) { /* allocate a new one */ @@ -276,17 +276,15 @@ DEFUN_USRATTR(cfg_bts_lac, cfg_bts_lac_cmd, X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK), - "location_area_code <0-65535>", - "Set the Location Area Code (LAC) of this BTS\n" "LAC\n") + "location_area_code (<0-65535>|<0x0000-0xffff>)", + "Set the Location Area Code (LAC) of this BTS\n" + "LAC in decimal format\n" + "LAC in hexadecimal format\n") { struct gsm_bts *bts = vty->index; - int lac = atoi(argv0); - - if (lac < 0 || lac > 0xffff) { - vty_out(vty, "%% LAC %d is not in the valid range (0-65535)%s", - lac, VTY_NEWLINE); + int lac; + if (osmo_str_to_int(&lac, argv0, 0, 0, 0xffff) < 0) return CMD_WARNING; - } if (lac == GSM_LAC_RESERVED_DETACHED || lac == GSM_LAC_RESERVED_ALL_BTS) { vty_out(vty, "%% LAC %d is reserved by GSM 04.08%s", @@ -435,10 +433,11 @@ DEFUN_ATTR(cfg_bts_nokia_site_bts_reset_timer_cnf, cfg_bts_nokia_site_bts_reset_timer_cnf_cmd, - "nokia_site bts-reset-timer <15-100>", + "nokia_site bts-reset-timer <15-100>", NOKIA_STR - "The amount of time (in sec.) between BTS_RESET is sent,\n" - "and the BTS is being bootstrapped.\n", + "The amount of time between BTS_RESET is sent " + "and the BTS is being bootstrapped\n" + "Timer value (in seconds, default 15)\n", CMD_ATTR_IMMEDIATE) { struct gsm_bts *bts = vty->index; @@ -533,20 +532,127 @@ "Channel Allocator\n" \ "Channel Allocator\n" -DEFUN_ATTR(cfg_bts_challoc, - cfg_bts_challoc_cmd, - CHAN_ALLOC_CMD " (ascending|descending)", +#define CHAN_ALLOC_ASC_DSC "(ascending|descending)" +#define CHAN_ALLOC_ASC_DSC_DESC \ + "Allocate Timeslots and Transceivers in ascending order\n" \ + "Allocate Timeslots and Transceivers in descending order\n" + +DEFUN_ATTR(cfg_bts_challoc_mode_all, + cfg_bts_challoc_mode_all_cmd, + CHAN_ALLOC_CMD " " CHAN_ALLOC_ASC_DSC, + CHAN_ALLOC_DESC CHAN_ALLOC_ASC_DSC_DESC, + CMD_ATTR_IMMEDIATE | CMD_ATTR_DEPRECATED) +{ + bool reverse = !strcmp(argv0, "descending"); + struct gsm_bts *bts = vty->index; + + bts->chan_alloc_chan_req_reverse = reverse; + bts->chan_alloc_assignment_reverse = reverse; + bts->chan_alloc_handover_reverse = reverse; + bts->chan_alloc_assignment_dynamic = false; + + return CMD_SUCCESS; +} + +DEFUN_ATTR(cfg_bts_challoc_mode, + cfg_bts_challoc_mode_cmd, + CHAN_ALLOC_CMD + " mode (set-all|chan-req|assignment|handover) " + CHAN_ALLOC_ASC_DSC, CHAN_ALLOC_DESC - "Allocate Timeslots and Transceivers in ascending order\n" - "Allocate Timeslots and Transceivers in descending order\n", + "Channel allocation mode\n" + "Set a single mode for all variants\n" + "Channel allocation for CHANNEL REQUEST (RACH)\n" + "Channel allocation for assignment\n" + "Channel allocation for handover\n" + CHAN_ALLOC_ASC_DSC_DESC, CMD_ATTR_IMMEDIATE) { + bool reverse = !strcmp(argv1, "descending"); + bool set_all = !strcmp(argv0, "set-all"); struct gsm_bts *bts = vty->index; - if (!strcmp(argv0, "ascending")) - bts->chan_alloc_reverse = 0; - else - bts->chan_alloc_reverse = 1; + if (set_all || !strcmp(argv0, "chan-req")) + bts->chan_alloc_chan_req_reverse = reverse; + if (set_all || !strcmp(argv0, "assignment")) { + bts->chan_alloc_assignment_reverse = reverse; + bts->chan_alloc_assignment_dynamic = false; + } + if (set_all || !strcmp(argv0, "handover")) + bts->chan_alloc_handover_reverse = reverse; + + return CMD_SUCCESS; +} + +DEFUN_ATTR(cfg_bts_challoc_mode_ass_dynamic, + cfg_bts_challoc_mode_ass_dynamic_cmd, + CHAN_ALLOC_CMD " mode assignment dynamic", + CHAN_ALLOC_DESC + "Channel allocation mode\n" + "Channel allocation for assignment\n" + "Dynamic lchan selection based on configured parameters\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_bts *bts = vty->index; + + bts->chan_alloc_assignment_dynamic = true; + + return CMD_SUCCESS; +} + +#define CHAN_ALLOC_DYN_PARAM_CMD \ + CHAN_ALLOC_CMD " dynamic-param" +#define CHAN_ALLOC_DYN_PARAM_DESC \ + CHAN_ALLOC_DESC \ + "Parameters for dynamic channel allocation mode\n" + +DEFUN_ATTR(cfg_bts_challoc_dynamic_param_sort_by_trx_power, + cfg_bts_challoc_dynamic_param_sort_by_trx_power_cmd, + CHAN_ALLOC_DYN_PARAM_CMD " sort-by-trx-power (0|1)", + CHAN_ALLOC_DYN_PARAM_DESC + "Whether to sort TRX instances by their respective power levels\n" + "Do not sort, use the same order as in the configuration file\n" + "Sort TRX instances by their power levels in descending order\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_bts *bts = vty->index; + + bts->chan_alloc_dyn_params.sort_by_trx_power = (argv00 == '1'); + + return CMD_SUCCESS; +} + +DEFUN_ATTR(cfg_bts_challoc_dynamic_param_ul_rxlev, + cfg_bts_challoc_dynamic_param_ul_rxlev_cmd, + CHAN_ALLOC_DYN_PARAM_CMD " ul-rxlev thresh <0-63> avg-num <1-10>", + CHAN_ALLOC_DYN_PARAM_DESC + "Uplink RxLev\n" + "Uplink RxLev threshold\n" + "Uplink RxLev threshold\n" + "Minimum number of RxLev samples for averaging\n" + "Minimum number of RxLev samples for averaging\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_bts *bts = vty->index; + + bts->chan_alloc_dyn_params.ul_rxlev_thresh = atoi(argv0); + bts->chan_alloc_dyn_params.ul_rxlev_avg_num = atoi(argv1); + + return CMD_SUCCESS; +} + +DEFUN_ATTR(cfg_bts_challoc_dynamic_param_c0_chan_load, + cfg_bts_challoc_dynamic_param_c0_chan_load_cmd, + CHAN_ALLOC_DYN_PARAM_CMD " c0-chan-load thresh <0-100>", + CHAN_ALLOC_DYN_PARAM_DESC + "C0 (BCCH carrier) channel load\n" + "Channel load threshold\n" + "Channel load threshold (in %)\n", + CMD_ATTR_IMMEDIATE) +{ + struct gsm_bts *bts = vty->index; + + bts->chan_alloc_dyn_params.c0_chan_load_thresh = atoi(argv0); return CMD_SUCCESS; } @@ -2858,10 +2964,76 @@ return check_amr_config(vty); } +#define OSMUX_STR "RTP multiplexing\n" +DEFUN_USRATTR(cfg_bts_osmux, + cfg_bts_osmux_cmd, + X(BSC_VTY_ATTR_NEW_LCHAN), + "osmux (on|off|only)", + OSMUX_STR "Enable OSMUX\n" "Disable OSMUX\n" "Only use OSMUX\n") +{ + struct gsm_bts *bts = vty->index; + enum osmux_usage use; + + if (strcmp(argv0, "off") == 0) + use = OSMUX_USAGE_OFF; + else if (strcmp(argv0, "on") == 0) + use = OSMUX_USAGE_ON; + else if (strcmp(argv0, "only") == 0) + use = OSMUX_USAGE_ONLY; + else + goto err; + + if (!is_osmobts(bts)) + goto err; + + if (bts->features_known && use != OSMUX_USAGE_OFF && + !osmo_bts_has_feature(&bts->features, BTS_FEAT_OSMUX)) + goto err; + + bts->use_osmux = use; + return CMD_SUCCESS; + +err: + LOGP(DNM, LOGL_ERROR, + "(bts=%u) Unable to set 'osmux %s', BTS does not support Osmux\n", + bts->nr, argv0); + return CMD_WARNING; +} + +DEFUN_USRATTR(cfg_bts_mgw_pool_target, + cfg_bts_mgw_pool_target_cmd, + X(BSC_VTY_ATTR_NEW_LCHAN), + "mgw pool-target <0-255> strict", + "MGW configuration for this specific BTS\n" + "Pin BTS to use a single MGW in the pool\n" + "Reference Number of the MGW (in the config) to pin to\n" + "Strictly prohibit use of other MGWs if the pinned one is not available\n") +{ + struct gsm_bts *bts = vty->index; + int mgw_nr = atoi(argv0); + bool strict = argc > 1; + bts->mgw_pool_target = mgw_nr; + bts->mgw_pool_target_strict = strict; + return CMD_SUCCESS; +} + +DEFUN_USRATTR(cfg_bts_no_mgw_pool_target, + cfg_bts_no_mgw_pool_target_cmd, + X(BSC_VTY_ATTR_NEW_LCHAN), + "no mgw pool-target", + NO_STR "MGW configuration for this specific BTS\n" + "Avoid pinning the BTS to any specific MGW (default)\n") +{ + struct gsm_bts *bts = vty->index; + bts->mgw_pool_target = -1; + bts->mgw_pool_target_strict = false; + return CMD_SUCCESS; +} + #define TNUM_STR "T-number, optionally preceded by 't' or 'T'\n" DEFUN_ATTR(cfg_bts_t3113_dynamic, cfg_bts_t3113_dynamic_cmd, "timer-dynamic TNNNN", - "Calculate T3113 dynamically based on channel config and load\n" + "Calculate T3113 dynamically based on channel config and load (default)\n" TNUM_STR, CMD_ATTR_IMMEDIATE) { @@ -3260,9 +3432,9 @@ "Set target C/I thresholds (for dynamic mode), only available in ms-power-control\n" VTY_DESC_CI_TYPE "Lower C/I value\n" - "Lower " POWER_CONTROL_MEAS_RXQUAL_DESC + "Lower " POWER_CONTROL_MEAS_CI_DESC "Upper C/I value\n" - "Upper " POWER_CONTROL_MEAS_RXQUAL_DESC) + "Upper " POWER_CONTROL_MEAS_CI_DESC) { struct gsm_power_ctrl_params *params = vty->index; const char *type = argv0; @@ -3840,6 +4012,8 @@ vty_out(vty, " OML Link: "); e1isl_dump_vty_tcp(vty, bts->oml_link); vty_out(vty, " OML Link state: %s", get_model_oml_status(bts)); + if (bts_setup_ramp_active(bts->network)) + vty_out(vty, " BTS Ramping: %s", bts_setup_ramp_get_state_str(bts)); sec = bts_uptime(bts); if (sec) vty_out(vty, " %llu days %llu hours %llu min. %llu sec.", @@ -4164,7 +4338,7 @@ vty_out(vty, " description %s%s", bts->description, VTY_NEWLINE); vty_out(vty, " band %s%s", gsm_band_name(bts->band), VTY_NEWLINE); vty_out(vty, " cell_identity %u%s", bts->cell_identity, VTY_NEWLINE); - vty_out(vty, " location_area_code %u%s", bts->location_area_code, + vty_out(vty, " location_area_code 0x%04x%s", bts->location_area_code, VTY_NEWLINE); if (bts->dtxu != GSM48_DTX_SHALL_NOT_BE_USED) vty_out(vty, " dtx uplink%s%s", @@ -4212,8 +4386,29 @@ vty_out(vty, " radio-link-timeout %d%s", gsm_bts_get_radio_link_timeout(bts), VTY_NEWLINE); - vty_out(vty, " channel allocator %s%s", - bts->chan_alloc_reverse ? "descending" : "ascending", + vty_out(vty, " channel allocator mode chan-req %s%s", + bts->chan_alloc_chan_req_reverse ? "descending" : "ascending", + VTY_NEWLINE); + if (bts->chan_alloc_assignment_dynamic) { + vty_out(vty, " channel allocator mode assignment dynamic%s", + VTY_NEWLINE); + vty_out(vty, " channel allocator dynamic-param sort-by-trx-power %c%s", + bts->chan_alloc_dyn_params.sort_by_trx_power ? '1' : '0', + VTY_NEWLINE); + vty_out(vty, " channel allocator dynamic-param ul-rxlev thresh %u avg-num %u%s", + bts->chan_alloc_dyn_params.ul_rxlev_thresh, + bts->chan_alloc_dyn_params.ul_rxlev_avg_num, + VTY_NEWLINE); + vty_out(vty, " channel allocator dynamic-param c0-chan-load thresh %u%s", + bts->chan_alloc_dyn_params.c0_chan_load_thresh, + VTY_NEWLINE); + } else { + vty_out(vty, " channel allocator mode assignment %s%s", + bts->chan_alloc_assignment_reverse ? "descending" : "ascending", + VTY_NEWLINE); + } + vty_out(vty, " channel allocator mode handover %s%s", + bts->chan_alloc_handover_reverse ? "descending" : "ascending", VTY_NEWLINE); if (bts->chan_alloc_avoid_interf) vty_out(vty, " channel allocator avoid-interference 1%s", VTY_NEWLINE); @@ -4321,6 +4516,8 @@ /* if we have a limit, write it */ if (bts->paging.free_chans_need >= 0) vty_out(vty, " paging free %d%s", bts->paging.free_chans_need, VTY_NEWLINE); + if (!bts->T3113_dynamic) + vty_out(vty, " no timer-dynamic T3113%s", VTY_NEWLINE); vty_out(vty, " neighbor-list mode %s%s", get_value_string(bts_neigh_mode_strs, bts->neigh_list_manual_mode), VTY_NEWLINE); @@ -4384,6 +4581,18 @@ config_write_bts_amr(vty, bts, &bts->mr_full, 1); config_write_bts_amr(vty, bts, &bts->mr_half, 0); + if (bts->use_osmux != OSMUX_USAGE_OFF) { + vty_out(vty, " osmux %s%s", bts->use_osmux == OSMUX_USAGE_ON ? "on" : "only", + VTY_NEWLINE); + } + + if (bts->mgw_pool_target > -1) { + vty_out(vty, " mgw pool-target %u%s%s", + bts->mgw_pool_target, + bts->mgw_pool_target_strict ? " strict" : "", + VTY_NEWLINE); + } + config_write_bts_gprs(vty, bts); if (bts->excl_from_rf_lock) @@ -4543,7 +4752,12 @@ install_element(BTS_NODE, &cfg_bts_deprecated_stream_id_cmd); install_element(BTS_NODE, &cfg_bts_oml_e1_cmd); install_element(BTS_NODE, &cfg_bts_oml_e1_tei_cmd); - install_element(BTS_NODE, &cfg_bts_challoc_cmd); + install_element(BTS_NODE, &cfg_bts_challoc_mode_cmd); + install_element(BTS_NODE, &cfg_bts_challoc_mode_all_cmd); + install_element(BTS_NODE, &cfg_bts_challoc_mode_ass_dynamic_cmd); + install_element(BTS_NODE, &cfg_bts_challoc_dynamic_param_sort_by_trx_power_cmd); + install_element(BTS_NODE, &cfg_bts_challoc_dynamic_param_ul_rxlev_cmd); + install_element(BTS_NODE, &cfg_bts_challoc_dynamic_param_c0_chan_load_cmd); install_element(BTS_NODE, &cfg_bts_chan_alloc_interf_cmd); install_element(BTS_NODE, &cfg_bts_chan_alloc_tch_signalling_policy_cmd); install_element(BTS_NODE, &cfg_bts_chan_alloc_allow_tch_for_signalling_cmd); @@ -4640,6 +4854,9 @@ install_element(BTS_NODE, &cfg_bts_amr_hr_hyst2_cmd); install_element(BTS_NODE, &cfg_bts_amr_hr_hyst3_cmd); install_element(BTS_NODE, &cfg_bts_amr_hr_start_mode_cmd); + install_element(BTS_NODE, &cfg_bts_osmux_cmd); + install_element(BTS_NODE, &cfg_bts_mgw_pool_target_cmd); + install_element(BTS_NODE, &cfg_bts_no_mgw_pool_target_cmd); install_element(BTS_NODE, &cfg_bts_pcu_sock_cmd); install_element(BTS_NODE, &cfg_bts_acc_rotate_cmd); install_element(BTS_NODE, &cfg_bts_acc_rotate_quantum_cmd);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/cbsp_link.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/cbsp_link.c
Changed
@@ -301,7 +301,7 @@ struct msgb *msg; if (!cbc->client.cli && !cbc->server.srv) { - LOGP(DCBS, LOGL_ERROR, "Discarding Tx CBSP Message Type %s, link is down\n", + LOGP(DCBS, LOGL_INFO, "Discarding Tx CBSP Message Type %s, link is down\n", get_value_string(cbsp_msg_type_names, cbsp->msg_type)); talloc_free(cbsp); return 0;
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/chan_counts.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/chan_counts.c
Changed
@@ -101,7 +101,7 @@ OSMO_STRBUF_PRINTF(sb, " %s.%s{", chan_counts_dim1_namei1, chan_counts_dim2_namei2); } - OSMO_STRBUF_PRINTF(sb, " %s=%d", gsm_lchant_name(i3), v); + OSMO_STRBUF_PRINTF(sb, " %s=%d", gsm_chan_t_name(i3), v); } } @@ -248,7 +248,7 @@ osmo_signal_register_handler(SS_NM, chan_counts_sig_cb, NULL); } -void chan_counts_bsc_verify() +void chan_counts_bsc_verify(void) { struct gsm_bts *bts; struct chan_counts bsc_counts = {0};
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/gsm_04_08_rr.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/gsm_04_08_rr.c
Changed
@@ -46,7 +46,7 @@ #include <osmocom/bsc/bsc_msc_data.h> #include <osmocom/bsc/system_information.h> #include <osmocom/bsc/bts.h> - +#include <osmocom/bsc/lchan.h> int gsm48_sendmsg(struct msgb *msg) { @@ -766,6 +766,56 @@ return 0; } +/* Get the ARFCN from the BCCH channel list by the index "BCCH-FREQ-NCELL i" + * (idx) as described in 3GPP TS 144.018 § 10.5.2.20. The BCCH channel list is + * split into two sub lists, each ascendingly ordered by ARFCN > 0: + * 1) SI* and SI*bis entries + * 2) SI*ter entries (if available) + * ARFCN 0 is at the end of each sub list. + * Both sub lists are stored in one bitvec (nbv), iterate twice through it. */ +static int neigh_list_get_arfcn(struct gsm_bts *bts, const struct bitvec *nbv, unsigned int idx) +{ + unsigned int arfcn, i = 0; + + /* First sub list, ARFCN > 0 */ + for (arfcn = 1; arfcn < nbv->data_len * 8; arfcn++) { + if (bitvec_get_bit_pos(nbv, arfcn) == ZERO) + continue; + /* Skip SI*ter */ + if (!band_compatible(bts, arfcn)) + continue; + if (i == idx) + return arfcn; + i++; + } + + /* First sub list, ARFCN == 0 (last position) */ + if (bitvec_get_bit_pos(nbv, 0) == ONE && band_compatible(bts, 0)) { + if (i == idx) + return 0; + i++; + } + + /* Second sub list, ARFCN > 0 */ + for (arfcn = 1; arfcn < nbv->data_len * 8; arfcn++) { + if (bitvec_get_bit_pos(nbv, arfcn) == ZERO) + continue; + /* Require SI*ter */ + if (band_compatible(bts, arfcn)) + continue; + if (i == idx) + return arfcn; + i++; + } + + /* Second sub list, ARFCN == 0 (last position) */ + if (bitvec_get_bit_pos(nbv, 0) == ONE && !band_compatible(bts, 0) && i == idx) + return 0; + + LOGP(DRR, LOGL_ERROR, "Invalid BCCH channel list index %d in measurement report\n", idx); + return 0; +} + int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg) { struct gsm48_hdr *gh = msgb_l3(msg); @@ -800,7 +850,7 @@ mrc = &rep->cell0; mrc->rxlev = data3 & 0x3f; mrc->neigh_idx = data4 >> 3; - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = ((data4 & 0x07) << 3) | (data5 >> 5); if (rep->num_cell < 2) return 0; @@ -808,7 +858,7 @@ mrc = &rep->cell1; mrc->rxlev = ((data5 & 0x1f) << 1) | (data6 >> 7); mrc->neigh_idx = (data6 >> 2) & 0x1f; - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = ((data6 & 0x03) << 4) | (data7 >> 4); if (rep->num_cell < 3) return 0; @@ -816,7 +866,7 @@ mrc = &rep->cell2; mrc->rxlev = ((data7 & 0x0f) << 2) | (data8 >> 6); mrc->neigh_idx = (data8 >> 1) & 0x1f; - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = ((data8 & 0x01) << 5) | (data9 >> 3); if (rep->num_cell < 4) return 0; @@ -824,7 +874,7 @@ mrc = &rep->cell3; mrc->rxlev = ((data9 & 0x07) << 3) | (data10 >> 5); mrc->neigh_idx = data10 & 0x1f; - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = data11 >> 2; if (rep->num_cell < 5) return 0; @@ -832,7 +882,7 @@ mrc = &rep->cell4; mrc->rxlev = ((data11 & 0x03) << 4) | (data12 >> 4); mrc->neigh_idx = ((data12 & 0xf) << 1) | (data13 >> 7); - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = (data13 >> 1) & 0x3f; if (rep->num_cell < 6) return 0; @@ -840,7 +890,7 @@ mrc = &rep->cell5; mrc->rxlev = ((data13 & 0x01) << 5) | (data14 >> 3); mrc->neigh_idx = ((data14 & 0x07) << 2) | (data15 >> 6); - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = data15 & 0x3f; return 0;
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/gsm_08_08.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/gsm_08_08.c
Changed
@@ -389,11 +389,10 @@ if (osmo_mobile_identity_decode_from_l3(&mi, msg, false)) { LOG_COMPL_L3(pdisc, mtype, LOGL_ERROR, "Cannot extract Mobile Identity: %s\n", msgb_hexdump_c(OTC_SELECT, msg)); - /* Likely this is an invalid Complete Layer 3 message that deserves to be rejected. However, the current - * state of our ttcn3 tests does send invalid Layer 3 Info in some tests and expects osmo-bsc to not - * care about that. So, changing the behavior to rejecting on missing MI causes test failure and, if at - * all, should happen in a separate patch. - * See e.g. BSC_Tests.TC_chan_rel_rll_rel_ind: "dt := * f_est_dchan('23'O, 23, '00010203040506'O);" + /* Likely this is an invalid Complete Layer 3 message that deserves to be rejected. However, the BSC is + * not expected to look at this layer so it's duty of the MSC to reject it. + * Hence, keep on going with the conn without an assigned bsc_subscr, forwarding the L3 to the MSC and + * letting it take decision on the matter. */ } else { bsub = bsc_subscr_find_or_create_by_mi(bsc_gsmnet->bsc_subscribers, &mi, __func__); @@ -440,7 +439,10 @@ paged_from_msc = NULL; paging_reasons = BSC_PAGING_NONE; if (pdisc == GSM48_PDISC_RR && mtype == GSM48_MT_RR_PAG_RESP) { - paging_request_stop(&paged_from_msc, &paging_reasons, bts, conn->bsub); + /* It only makes sense to attempt to find a pending paging request if the subscriber from the + * Paging Response can be identified (bsub != NULL). */ + if (conn->bsub) + paging_request_stop(&paged_from_msc, &paging_reasons, bts, conn->bsub); if (!paged_from_msc) { /* This looks like an unsolicited Paging Response. It is required to pick any MSC, because any * MT-CSFB calls were Paged by the MSC via SGs, and hence are not listed in the BSC. */
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/gsm_data.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/gsm_data.c
Changed
@@ -235,12 +235,6 @@ return get_string_value(gsm_pchant_names, name); } -/* TODO: move to libosmocore, next to gsm_chan_t_names? */ -const char *gsm_lchant_name(enum gsm_chan_t c) -{ - return get_value_string(gsm_chan_t_names, c); -} - static const struct value_string chreq_names = { { GSM_CHREQ_REASON_EMERG, "EMERGENCY" }, { GSM_CHREQ_REASON_PAG, "PAGING" }, @@ -331,32 +325,6 @@ return ts2str; } -void lchan_update_name(struct gsm_lchan *lchan) -{ - struct gsm_bts_trx_ts *ts = lchan->ts; - if (lchan->name) - talloc_free(lchan->name); - lchan->name = talloc_asprintf(ts->trx, "(bts=%d,trx=%d,ts=%d,ss=%s%d)", - ts->trx->bts->nr, ts->trx->nr, ts->nr, - lchan->vamos.is_secondary ? "shadow" : "", - lchan->nr - (lchan->vamos.is_secondary ? ts->max_primary_lchans : 0)); -} - -/* If the lchan is currently active, return the duration since activation in milliseconds. - * Otherwise return 0. */ -uint64_t gsm_lchan_active_duration_ms(const struct gsm_lchan *lchan) -{ - struct timespec now, elapsed; - - if (lchan->active_start.tv_sec == 0 && lchan->active_start.tv_nsec == 0) - return 0; - - osmo_clock_gettime(CLOCK_MONOTONIC, &now); - timespecsub(&now, &lchan->active_start, &elapsed); - - return elapsed.tv_sec * 1000 + elapsed.tv_nsec / 1000000; -} - /* obtain the MO structure for a given object instance */ static inline struct gsm_abis_mo * gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class, @@ -674,36 +642,6 @@ return pchan_is_tch(ts->pchan_is); } -/* For a VAMOS secondary shadow lchan, return its primary lchan. If the lchan is not a secondary lchan, return NULL. */ -struct gsm_lchan *gsm_lchan_vamos_to_primary(const struct gsm_lchan *lchan_vamos) -{ - struct gsm_lchan *lchan_primary; - if (!lchan_vamos || !lchan_vamos->vamos.is_secondary) - return NULL; - /* OsmoBSC currently does not support mixed TCH/F + TCH/H VAMOS multiplexes. Hence the primary <-> secondary - * relation is a simple index shift in the lchan array. If mixed multiplexes were allowed, a TCH/F primary might - * have two TCH/H VAMOS secondary lchans, etc. Fortunately, we don't need to care about that. */ - lchan_primary = (struct gsm_lchan*)lchan_vamos - lchan_vamos->ts->max_primary_lchans; - if (!lchan_primary->fi) - return NULL; - return lchan_primary; -} - -/* For a primary lchan, return its VAMOS secondary shadow lchan. If the lchan is not a primary lchan, return NULL. */ -struct gsm_lchan *gsm_lchan_primary_to_vamos(const struct gsm_lchan *lchan_primary) -{ - struct gsm_lchan *lchan_vamos; - if (!lchan_primary || lchan_primary->vamos.is_secondary) - return NULL; - /* OsmoBSC currently does not support mixed TCH/F + TCH/H VAMOS multiplexes. Hence the primary <-> secondary - * relation is a simple index shift in the lchan array. If mixed multiplexes were allowed, a TCH/F primary might - * have two TCH/H VAMOS secondary lchans, etc. Fortunately, we don't need to care about that. */ - lchan_vamos = (struct gsm_lchan*)lchan_primary + lchan_primary->ts->max_primary_lchans; - if (!lchan_vamos->fi) - return NULL; - return lchan_vamos; -} - struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { if (!conn || !conn->lchan) return NULL; @@ -996,59 +934,6 @@ lchan_update_ms_power_ctrl_level(conn->lchan, bts->ms_max_power); } -void lchan_update_ms_power_ctrl_level(struct gsm_lchan *lchan, int ms_power_dbm) -{ - struct gsm_bts *bts = lchan->ts->trx->bts; - struct gsm_subscriber_connection *conn = lchan->conn; - int max_pwr_dbm_pwclass, new_pwr; - bool send_pwr_ctrl_msg = false; - - LOG_LCHAN(lchan, LOGL_DEBUG, - "MS Power level update requested: %d dBm\n", ms_power_dbm); - - if (!conn) - goto ms_power_default; - - if (conn->ms_power_class == 0) - goto ms_power_default; - - if ((max_pwr_dbm_pwclass = (int)ms_class_gmsk_dbm(bts->band, conn->ms_power_class)) < 0) { - LOG_LCHAN(lchan, LOGL_INFO, - "Failed getting max ms power for power class %" PRIu8 - " on band %s, providing default max ms power\n", - conn->ms_power_class, gsm_band_name(bts->band)); - goto ms_power_default; - } - - /* Current configured max pwr is above maximum one allowed on - current band + ms power class, so use that one. */ - if (ms_power_dbm > max_pwr_dbm_pwclass) - ms_power_dbm = max_pwr_dbm_pwclass; - -ms_power_default: - if ((new_pwr = ms_pwr_ctl_lvl(bts->band, ms_power_dbm)) < 0) { - LOG_LCHAN(lchan, LOGL_INFO, - "Failed getting max ms power level %d on band %s," - " providing default max ms power\n", - ms_power_dbm, gsm_band_name(bts->band)); - return; - } - - LOG_LCHAN(lchan, LOGL_DEBUG, - "MS Power level update (power class %" PRIu8 "): %" PRIu8 " -> %d\n", - conn ? conn->ms_power_class : 0, lchan->ms_power, new_pwr); - - /* If chan was already activated and max ms_power changes (due to power - classmark received), send an MS Power Control message */ - if (lchan->activate.activ_ack && new_pwr != lchan->ms_power) - send_pwr_ctrl_msg = true; - - lchan->ms_power = new_pwr; - - if (send_pwr_ctrl_msg) - rsl_chan_ms_power_ctrl(lchan); -} - const struct value_string lchan_activate_mode_names = { OSMO_VALUE_STRING(ACTIVATE_FOR_NONE), OSMO_VALUE_STRING(ACTIVATE_FOR_MS_CHANNEL_REQUEST),
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/handover_decision_2.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/handover_decision_2.c
Changed
@@ -53,7 +53,7 @@ lchan->ts->trx->nr, \ lchan->ts->nr, \ lchan->nr, \ - gsm_lchant_name(lchan->type), \ + gsm_chan_t_name(lchan->type), \ gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \ bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \ ## args) @@ -64,7 +64,7 @@ lchan->ts->trx->nr, \ lchan->ts->nr, \ lchan->nr, \ - gsm_lchant_name(lchan->type), \ + gsm_chan_t_name(lchan->type), \ gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \ new_bts->nr, \ bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \ @@ -76,7 +76,7 @@ lchan->ts->trx->nr, \ lchan->ts->nr, \ lchan->nr, \ - gsm_lchant_name(lchan->type), \ + gsm_chan_t_name(lchan->type), \ gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode), \ gsm0808_cell_id_list_name(remote_cil), \ bsc_subscr_name(lchan->conn? lchan->conn->bsub : NULL), \ @@ -519,7 +519,7 @@ "tch_mode='%s' type='%s' not supported\n", get_value_string(gsm48_chan_mode_names, c->current.lchan->current_ch_mode_rate.chan_mode), - gsm_lchant_name(c->current.lchan->type)); + gsm_chan_t_name(c->current.lchan->type)); break; } if (codec_type_is_supported(c->current.lchan->conn, GSM0808_SCT_HR1)) @@ -1050,7 +1050,8 @@ /* Would the next TCH/F lchan occupy a dynamic timeslot that currently counts for free TCH/H timeslots? */ - next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_F, false); + next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_F, + SELECT_FOR_HANDOVER, NULL, false); if (next_lchan && next_lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN) c->target.next_tchf_reduces_tchh = 2; else @@ -1058,7 +1059,8 @@ /* Would the next TCH/H lchan occupy a dynamic timeslot that currently counts for free TCH/F timeslots? * Note that a dyn TS already in TCH/H mode (half occupied) would not reduce free TCH/F. */ - next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_H, false); + next_lchan = lchan_avail_by_type(c->target.bts, GSM_LCHAN_TCH_H, + SELECT_FOR_HANDOVER, NULL, false); if (next_lchan && next_lchan->ts->pchan_on_init == GSM_PCHAN_OSMO_DYN && next_lchan->ts->pchan_is != GSM_PCHAN_TCH_H) c->target.next_tchh_reduces_tchf = 1;
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/handover_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/handover_fsm.c
Changed
@@ -46,6 +46,7 @@ #include <osmocom/bsc/bts.h> #include <osmocom/bsc/lcs_loc_req.h> #include <osmocom/bsc/bsc_stats.h> +#include <osmocom/bsc/lchan.h> #define LOG_FMT_BTS "bts %u lac-ci %u-%u arfcn-bsic %d-%d" #define LOG_ARGS_BTS(bts) \ @@ -60,7 +61,7 @@ lchan ? lchan->ts->trx->bts->nr : 0, \ lchan ? lchan->ts->trx->nr : 0, \ lchan ? lchan->ts->nr : 0, \ - lchan ? gsm_lchant_name(lchan->type) : "?", \ + lchan ? gsm_chan_t_name(lchan->type) : "?", \ lchan ? lchan->nr : 0, \ lchan ? gsm48_chan_mode_name(lchan->current_ch_mode_rate.chan_mode) : "?" @@ -138,7 +139,7 @@ "("LOG_FMT_FROM_LCHAN") --HO-> ("LOG_FMT_BTS",%s) " LOG_FMT_HO_SCOPE, LOG_ARGS_FROM_LCHAN(conn->lchan), LOG_ARGS_BTS(ho->new_bts), - gsm_lchant_name(ho->new_lchan_type), + gsm_chan_t_name(ho->new_lchan_type), LOG_ARGS_HO_SCOPE(conn)); else snprintf(buf, sizeof(buf), @@ -167,14 +168,14 @@ ho->inter_bsc_in.cell_id_serving_name, ho->inter_bsc_in.cell_id_target_name, LOG_ARGS_BTS(ho->new_bts), - gsm_lchant_name(ho->new_lchan_type), + gsm_chan_t_name(ho->new_lchan_type), LOG_ARGS_HO_SCOPE(conn)); else snprintf(buf, sizeof(buf), "(remote:%s) --HO-> (local:%s,%s) " LOG_FMT_HO_SCOPE, ho->inter_bsc_in.cell_id_serving_name, ho->inter_bsc_in.cell_id_target_name, - gsm_lchant_name(ho->new_lchan_type), + gsm_chan_t_name(ho->new_lchan_type), LOG_ARGS_HO_SCOPE(conn)); } else snprintf(buf, sizeof(buf), LOG_FMT_HO_SCOPE, LOG_ARGS_HO_SCOPE(conn)); @@ -292,7 +293,7 @@ }; } -void handover_fsm_init() +void handover_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&ho_fsm) == 0); } @@ -379,7 +380,10 @@ ho->async = true; gsm_bts_cell_id_list(&ho->target_cell_ids, ho->new_bts); - ho->new_lchan = lchan_select_by_type(ho->new_bts, ho->new_lchan_type); + ho->new_lchan = lchan_select_by_type(ho->new_bts, + ho->new_lchan_type, + SELECT_FOR_HANDOVER, + NULL); if (ho->scope & HO_INTRA_CELL) { ho_count(bts, CTR_INTRA_CELL_HO_ATTEMPTED); @@ -393,7 +397,7 @@ if (!ho->new_lchan) { ho_fail(HO_RESULT_FAIL_NO_CHANNEL, "No %s lchan available on BTS %u", - gsm_lchant_name(ho->new_lchan_type), ho->new_bts->nr); + gsm_chan_t_name(ho->new_lchan_type), ho->new_bts->nr); return; } LOG_HO(conn, LOGL_DEBUG, "Selected lchan %s\n", gsm_lchan_name(ho->new_lchan)); @@ -696,7 +700,10 @@ ch_mode_rate.chan_rate == CH_RATE_FULL ? "full-rate" : "half-rate", gsm0808_channel_type_name(&req->ct)); - lchan = lchan_select_by_chan_mode(bts, ch_mode_rate.chan_mode, ch_mode_rate.chan_rate); + lchan = lchan_select_by_chan_mode(bts, + ch_mode_rate.chan_mode, + ch_mode_rate.chan_rate, + SELECT_FOR_HANDOVER, NULL); if (!lchan) { LOG_HO(conn, LOGL_DEBUG, "BTS %u has no matching free channels\n", bts->nr); continue;
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/handover_vty.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/handover_vty.c
Changed
@@ -170,7 +170,7 @@ #undef HO_CFG_ONE_MEMBER } -void ho_vty_init() +void ho_vty_init(void) { ho_vty_init_cmds(GSMNET_NODE); install_element(GSMNET_NODE, &cfg_net_ho_congestion_check_interval_cmd);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/lb.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/lb.c
Changed
@@ -46,7 +46,7 @@ } /* Send reset to SMLC */ -int bssmap_le_tx_reset() +int bssmap_le_tx_reset(void) { struct osmo_ss7_instance *ss7; struct msgb *msg; @@ -74,7 +74,7 @@ } /* Send reset-ack to SMLC */ -int bssmap_le_tx_reset_ack() +int bssmap_le_tx_reset_ack(void) { struct osmo_ss7_instance *ss7; struct msgb *msg; @@ -100,7 +100,7 @@ { struct osmo_ss7_instance *ss7; struct bssap_le_pdu bssap_le; - struct osmo_bssap_le_err *err; + struct osmo_bssap_le_err *err = NULL; struct rate_ctr_group *ctrg = bsc_gsmnet->smlc->ctrs; ss7 = osmo_sccp_get_ss7(osmo_sccp_get_sccp(scu)); @@ -352,7 +352,7 @@ #define DEFAULT_ASP_LOCAL_IP "localhost" #define DEFAULT_ASP_REMOTE_IP "localhost" -void lb_cancel_all() +void lb_cancel_all(void) { struct gsm_subscriber_connection *conn; llist_for_each_entry(conn, &bsc_gsmnet->subscr_conns, entry) @@ -384,7 +384,7 @@ bssmap_le_tx_reset_ack(); } -static void lb_start_reset_fsm() +static void lb_start_reset_fsm(void) { struct bssmap_reset_cfg cfg = { .conn_cfm_failure_threshold = 3, @@ -404,13 +404,13 @@ bsc_gsmnet->smlc->bssmap_reset = bssmap_reset_alloc(bsc_gsmnet, "Lb", &cfg); } -static void lb_stop_reset_fsm() +static void lb_stop_reset_fsm(void) { bssmap_reset_term_and_free(bsc_gsmnet->smlc->bssmap_reset); bsc_gsmnet->smlc->bssmap_reset = NULL; } -static int lb_start() +static int lb_start(void) { uint32_t default_pc; struct osmo_ss7_instance *cs7_inst = NULL; @@ -484,7 +484,7 @@ return 0; } -static int lb_stop() +static int lb_stop(void) { /* Not set up? */ if (!bsc_gsmnet->smlc->sccp_user) @@ -499,7 +499,7 @@ return 0; } -int lb_start_or_stop() +int lb_start_or_stop(void) { int rc; if (bsc_gsmnet->smlc->enable) { @@ -534,7 +534,7 @@ static void smlc_vty_init(void); -int lb_init() +int lb_init(void) { OSMO_ASSERT(!bsc_gsmnet->smlc); bsc_gsmnet->smlc = talloc_zero(bsc_gsmnet, struct smlc_config);
View file
osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/lchan.c
Added
@@ -0,0 +1,150 @@ +/* (C) 2022 by sysmocom - s.m.f.c. GmbH <info@sysmocom.de> + * (C) 2008-2018 by Harald Welte <laforge@gnumonks.org> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <stdint.h> +#include <stdbool.h> +#include <inttypes.h> + +#include <osmocom/gsm/gsm_utils.h> + +#include <osmocom/bsc/lchan.h> +#include <osmocom/bsc/lchan_fsm.h> +#include <osmocom/bsc/gsm_data.h> +#include <osmocom/bsc/bts.h> +#include <osmocom/bsc/bts_trx.h> +#include <osmocom/bsc/abis_rsl.h> + +void lchan_init(struct gsm_lchan *lchan, struct gsm_bts_trx_ts *ts, unsigned int nr) +{ + lchan->ts = ts; + lchan->nr = nr; + lchan->type = GSM_LCHAN_NONE; + + lchan_update_name(lchan); +} + +void lchan_update_name(struct gsm_lchan *lchan) +{ + struct gsm_bts_trx_ts *ts = lchan->ts; + if (lchan->name) + talloc_free(lchan->name); + lchan->name = talloc_asprintf(ts->trx, "(bts=%d,trx=%d,ts=%d,ss=%s%d)", + ts->trx->bts->nr, ts->trx->nr, ts->nr, + lchan->vamos.is_secondary ? "shadow" : "", + lchan->nr - (lchan->vamos.is_secondary ? ts->max_primary_lchans : 0)); +} + +/* If the lchan is currently active, return the duration since activation in milliseconds. + * Otherwise return 0. */ +uint64_t gsm_lchan_active_duration_ms(const struct gsm_lchan *lchan) +{ + struct timespec now, elapsed; + + if (lchan->active_start.tv_sec == 0 && lchan->active_start.tv_nsec == 0) + return 0; + + osmo_clock_gettime(CLOCK_MONOTONIC, &now); + timespecsub(&now, &lchan->active_start, &elapsed); + + return elapsed.tv_sec * 1000 + elapsed.tv_nsec / 1000000; +} + +/* For a VAMOS secondary shadow lchan, return its primary lchan. If the lchan is not a secondary lchan, return NULL. */ +struct gsm_lchan *gsm_lchan_vamos_to_primary(const struct gsm_lchan *lchan_vamos) +{ + struct gsm_lchan *lchan_primary; + if (!lchan_vamos || !lchan_vamos->vamos.is_secondary) + return NULL; + /* OsmoBSC currently does not support mixed TCH/F + TCH/H VAMOS multiplexes. Hence the primary <-> secondary + * relation is a simple index shift in the lchan array. If mixed multiplexes were allowed, a TCH/F primary might + * have two TCH/H VAMOS secondary lchans, etc. Fortunately, we don't need to care about that. */ + lchan_primary = (struct gsm_lchan *)lchan_vamos - lchan_vamos->ts->max_primary_lchans; + if (!lchan_primary->fi) + return NULL; + return lchan_primary; +} + +/* For a primary lchan, return its VAMOS secondary shadow lchan. If the lchan is not a primary lchan, return NULL. */ +struct gsm_lchan *gsm_lchan_primary_to_vamos(const struct gsm_lchan *lchan_primary) +{ + struct gsm_lchan *lchan_vamos; + if (!lchan_primary || lchan_primary->vamos.is_secondary) + return NULL; + /* OsmoBSC currently does not support mixed TCH/F + TCH/H VAMOS multiplexes. Hence the primary <-> secondary + * relation is a simple index shift in the lchan array. If mixed multiplexes were allowed, a TCH/F primary might + * have two TCH/H VAMOS secondary lchans, etc. Fortunately, we don't need to care about that. */ + lchan_vamos = (struct gsm_lchan *)lchan_primary + lchan_primary->ts->max_primary_lchans; + if (!lchan_vamos->fi) + return NULL; + return lchan_vamos; +} + +void lchan_update_ms_power_ctrl_level(struct gsm_lchan *lchan, int ms_power_dbm) +{ + struct gsm_bts *bts = lchan->ts->trx->bts; + struct gsm_subscriber_connection *conn = lchan->conn; + int max_pwr_dbm_pwclass, new_pwr; + bool send_pwr_ctrl_msg = false; + + LOG_LCHAN(lchan, LOGL_DEBUG, + "MS Power level update requested: %d dBm\n", ms_power_dbm); + + if (!conn) + goto ms_power_default; + + if (conn->ms_power_class == 0) + goto ms_power_default; + + if ((max_pwr_dbm_pwclass = (int)ms_class_gmsk_dbm(bts->band, conn->ms_power_class)) < 0) { + LOG_LCHAN(lchan, LOGL_INFO, + "Failed getting max ms power for power class %" PRIu8 + " on band %s, providing default max ms power\n", + conn->ms_power_class, gsm_band_name(bts->band)); + goto ms_power_default; + } + + /* Current configured max pwr is above maximum one allowed on + current band + ms power class, so use that one. */ + if (ms_power_dbm > max_pwr_dbm_pwclass) + ms_power_dbm = max_pwr_dbm_pwclass; + +ms_power_default: + if ((new_pwr = ms_pwr_ctl_lvl(bts->band, ms_power_dbm)) < 0) { + LOG_LCHAN(lchan, LOGL_INFO, + "Failed getting max ms power level %d on band %s," + " providing default max ms power\n", + ms_power_dbm, gsm_band_name(bts->band)); + return; + } + + LOG_LCHAN(lchan, LOGL_DEBUG, + "MS Power level update (power class %" PRIu8 "): %" PRIu8 " -> %d\n", + conn ? conn->ms_power_class : 0, lchan->ms_power, new_pwr); + + /* If chan was already activated and max ms_power changes (due to power + classmark received), send an MS Power Control message */ + if (lchan->activate.activ_ack && new_pwr != lchan->ms_power) + send_pwr_ctrl_msg = true; + + lchan->ms_power = new_pwr; + + if (send_pwr_ctrl_msg) + rsl_chan_ms_power_ctrl(lchan); +}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/lchan_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/lchan_fsm.c
Changed
@@ -41,6 +41,7 @@ #include <osmocom/bsc/codec_pref.h> #include <osmocom/bsc/bts.h> #include <osmocom/bsc/bsc_stats.h> +#include <osmocom/bsc/lchan.h> static struct osmo_fsm lchan_fsm; @@ -281,15 +282,15 @@ } struct osmo_tdef_state_timeout lchan_fsm_timeouts32 = { - LCHAN_ST_WAIT_TS_READY = { .T=-5 }, - LCHAN_ST_WAIT_ACTIV_ACK = { .T=-6 }, - LCHAN_ST_WAIT_RLL_RTP_ESTABLISH = { .T=3101 }, - LCHAN_ST_WAIT_RLL_RTP_RELEASED = { .T=3109 }, - LCHAN_ST_WAIT_BEFORE_RF_RELEASE = { .T=3111 }, - LCHAN_ST_WAIT_RF_RELEASE_ACK = { .T=3111 }, - LCHAN_ST_WAIT_AFTER_ERROR = { .T=-3111 }, - LCHAN_ST_WAIT_RR_CHAN_MODE_MODIFY_ACK = { .T=-13 }, - LCHAN_ST_WAIT_RSL_CHAN_MODE_MODIFY_ACK = { .T=-14 }, + LCHAN_ST_WAIT_TS_READY = { .T = -5 }, + LCHAN_ST_WAIT_ACTIV_ACK = { .T = -6 }, + LCHAN_ST_WAIT_RLL_RTP_ESTABLISH = { .T = 3101 }, + LCHAN_ST_WAIT_RLL_RTP_RELEASED = { .T = 3109 }, + LCHAN_ST_WAIT_BEFORE_RF_RELEASE = { .T = 3111 }, + LCHAN_ST_WAIT_RF_RELEASE_ACK = { .T = 3111 }, + LCHAN_ST_WAIT_AFTER_ERROR = { .T = -3111 }, + LCHAN_ST_WAIT_RR_CHAN_MODE_MODIFY_ACK = { .T = -13 }, + LCHAN_ST_WAIT_RSL_CHAN_MODE_MODIFY_ACK = { .T = -14 }, }; /* Transition to a state, using the T timer defined in lchan_fsm_timeouts. @@ -323,7 +324,7 @@ } while (0) /* Which state to transition to when lchan_fail() is called in a given state. */ -uint32_t lchan_fsm_on_error34 = { +uint32_t lchan_fsm_on_error32 = { LCHAN_ST_UNUSED = LCHAN_ST_UNUSED, LCHAN_ST_WAIT_TS_READY = LCHAN_ST_UNUSED, LCHAN_ST_WAIT_ACTIV_ACK = LCHAN_ST_BORKEN, @@ -462,7 +463,7 @@ extern void lchan_rtp_fsm_init(); -void lchan_fsm_init() +void lchan_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&lchan_fsm) == 0); lchan_rtp_fsm_init(); @@ -770,7 +771,7 @@ lchan->activate.info.requires_voice_stream ? (use_mgwep_ci ? osmo_mgcpc_ep_ci_name(use_mgwep_ci) : "new") : "none", - gsm_lchant_name(lchan->type), + gsm_chan_t_name(lchan->type), gsm48_chan_mode_name(lchan->activate.ch_mode_rate.chan_mode), lchan->activate.info.encr.alg_a5_n, lchan->activate.info.encr.key_len ? osmo_hexdump_nospc(lchan->activate.info.encr.key, @@ -1309,7 +1310,7 @@ lchan->modify.info.requires_voice_stream ? (use_mgwep_ci ? osmo_mgcpc_ep_ci_name(use_mgwep_ci) : "new") : "none", - gsm_lchant_name(lchan->type), + gsm_chan_t_name(lchan->type), gsm48_chan_mode_name(lchan->modify.ch_mode_rate.chan_mode), lchan->modify.tsc_set, lchan->modify.tsc); @@ -1529,16 +1530,6 @@ lchan->release.rsl_error_cause = RSL_ERR_INTERWORKING; lchan->release.rr_cause = bsc_gsm48_rr_cause_from_rsl_cause(lchan->release.rsl_error_cause); lchan_fsm_state_chg(LCHAN_ST_WAIT_AFTER_ERROR); - /* TODO: we used to do this only for sysmobts: - int do_free = is_osmobts(ts->trx->bts); - LOGP(DRSL, LOGL_NOTICE, - "%s CHAN REL ACK for broken channel. %s.\n", - gsm_lchan_name(lchan), - do_free ? "Releasing it" : "Keeping it broken"); - if (do_free) - do_lchan_free(lchan); - * Clarify the reason. If a BTS sends a RF Chan Rel ACK, we can consider it released, - * independently from the BTS model, right?? */ return; case LCHAN_EV_RTP_RELEASED:
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/lchan_rtp_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/lchan_rtp_fsm.c
Changed
@@ -31,6 +31,7 @@ #include <osmocom/bsc/abis_rsl.h> #include <osmocom/bsc/bsc_msc_data.h> #include <osmocom/bsc/bts.h> +#include <osmocom/bsc/lchan.h> static struct osmo_fsm lchan_rtp_fsm; @@ -43,10 +44,10 @@ } struct osmo_tdef_state_timeout lchan_rtp_fsm_timeouts32 = { - LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_AVAILABLE = { .T=-9 }, - LCHAN_RTP_ST_WAIT_IPACC_CRCX_ACK = { .T=-7 }, - LCHAN_RTP_ST_WAIT_IPACC_MDCX_ACK = { .T=-8 }, - LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_CONFIGURED = { .T=-10 }, + LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_AVAILABLE = { .T = -9 }, + LCHAN_RTP_ST_WAIT_IPACC_CRCX_ACK = { .T = -7 }, + LCHAN_RTP_ST_WAIT_IPACC_MDCX_ACK = { .T = -8 }, + LCHAN_RTP_ST_WAIT_MGW_ENDPOINT_CONFIGURED = { .T = -10 }, }; /* Transition to a state, using the T timer defined in lchan_rtp_fsm_timeouts. @@ -69,7 +70,7 @@ } while (0) /* Called from lchan_fsm_init(), does not need to be visible in lchan_rtp_fsm.h */ -void lchan_rtp_fsm_init() +void lchan_rtp_fsm_init(void) { OSMO_ASSERT(osmo_fsm_register(&lchan_rtp_fsm) == 0); } @@ -137,9 +138,10 @@ uint32_t prev_state) { struct gsm_lchan *lchan = lchan_rtp_fi_lchan(fi); + struct gsm_bts *bts = lchan->ts->trx->bts; struct osmo_mgcpc_ep *mgwep; struct osmo_mgcpc_ep_ci *use_mgwep_ci = lchan_use_mgw_endpoint_ci_bts(lchan); - struct mgcp_conn_peer crcx_info = {}; + struct mgcp_conn_peer crcx_info; if (!is_ipaccess_bts(lchan->ts->trx->bts)) { LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "Audio link to-BTS via E1, skipping IPACC\n"); @@ -162,14 +164,36 @@ lchan->mgw_endpoint_ci_bts = osmo_mgcpc_ep_ci_add(mgwep, "to-BTS"); + crcx_info = (struct mgcp_conn_peer){ + .ptime = 20, + .x_osmo_osmux_cid = -1, /* -1 is wildcard, .x_osmo_osmux_use set below */ + }; if (lchan->conn) { crcx_info.call_id = lchan->conn->sccp.conn_id; if (lchan->conn->sccp.msc) crcx_info.x_osmo_ign = lchan->conn->sccp.msc->x_osmo_ign; } - crcx_info.ptime = 20; mgcp_pick_codec(&crcx_info, lchan, true); + /* Set up Osmux use in MGW according to configured policy */ + bool amr_picked = mgcp_codec_is_picked(&crcx_info, CODEC_AMR_8000_1); + switch (bts->use_osmux) { + case OSMUX_USAGE_OFF: + crcx_info.x_osmo_osmux_use = false; + break; + case OSMUX_USAGE_ON: + crcx_info.x_osmo_osmux_use = amr_picked; + break; + case OSMUX_USAGE_ONLY: + if (!amr_picked) { + lchan_rtp_fail("Only AMR codec can be used when configured with policy 'osmux only'." + " Check your configuration."); + return; + } + crcx_info.x_osmo_osmux_use = true; + break; + } + osmo_mgcpc_ep_ci_request(lchan->mgw_endpoint_ci_bts, MGCP_VERB_CRCX, &crcx_info, fi, LCHAN_RTP_EV_MGW_ENDPOINT_AVAILABLE, LCHAN_RTP_EV_MGW_ENDPOINT_ERROR, 0); @@ -178,11 +202,26 @@ static void lchan_rtp_fsm_wait_mgw_endpoint_available(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct gsm_lchan *lchan = lchan_rtp_fi_lchan(fi); + struct gsm_bts *bts = lchan->ts->trx->bts; switch (event) { case LCHAN_RTP_EV_MGW_ENDPOINT_AVAILABLE: LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "MGW endpoint: %s\n", osmo_mgcpc_ep_ci_name(lchan_use_mgw_endpoint_ci_bts(lchan))); + if (osmo_mgcpc_ep_ci_get_crcx_info_to_osmux_cid(lchan->mgw_endpoint_ci_bts, + &lchan->abis_ip.osmux.local_cid)) { + if (bts->use_osmux == OSMUX_USAGE_OFF) { + lchan_rtp_fail("Got Osmux CID from MGW but we didn't ask for it"); + return; + } + lchan->abis_ip.osmux.use = true; + } else { + if (bts->use_osmux == OSMUX_USAGE_ONLY) { + lchan_rtp_fail("Got no Osmux CID from MGW but Osmux is mandatory"); + return; + } + lchan->abis_ip.osmux.use = false; + } lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_LCHAN_READY); return; @@ -272,7 +311,7 @@ if (val < 0) { lchan_rtp_fail("Cannot determine Abis/IP speech mode for tch_mode=%s type=%s", get_value_string(gsm48_chan_mode_names, lchan->activate.ch_mode_rate.chan_mode), - gsm_lchant_name(lchan->type)); + gsm_chan_t_name(lchan->type)); return; } lchan->abis_ip.speech_mode = val; @@ -281,7 +320,7 @@ if (val < 0) { lchan_rtp_fail("Cannot determine Abis/IP payload type for tch_mode=%s type=%s", get_value_string(gsm48_chan_mode_names, lchan->activate.ch_mode_rate.chan_mode), - gsm_lchant_name(lchan->type)); + gsm_chan_t_name(lchan->type)); return; } lchan->abis_ip.rtp_payload = val; @@ -411,9 +450,16 @@ struct in_addr addr; const char *addr_str; + if (lchan->abis_ip.osmux.use && !lchan->abis_ip.osmux.remote_cid_present) { + lchan_rtp_fail("BTS didn't provide any remote Osmux CID for the call"); + return; + } + mdcx_info = (struct mgcp_conn_peer){ .port = to_lchan->abis_ip.bound_port, .ptime = 20, + .x_osmo_osmux_use = lchan->abis_ip.osmux.use, + .x_osmo_osmux_cid = lchan->abis_ip.osmux.remote_cid, }; mgcp_pick_codec(&mdcx_info, to_lchan, true); @@ -848,7 +894,7 @@ if (codec < 0) { LOG_LCHAN(lchan, LOGL_ERROR, "Unable to determine MGCP codec type for %s in chan-mode %s\n", - gsm_lchant_name(lchan->type), gsm48_chan_mode_name(lchan->activate.ch_mode_rate.chan_mode)); + gsm_chan_t_name(lchan->type), gsm48_chan_mode_name(lchan->activate.ch_mode_rate.chan_mode)); verb_info->codecs_len = 0; return; } @@ -860,8 +906,8 @@ custom_pt = chan_mode_to_mgcp_bss_pt(codec); if (bss_side && custom_pt > 0) { verb_info->ptmap0.codec = codec; - verb_info->ptmap0.pt = custom_pt; - verb_info->ptmap_len = 1; + verb_info->ptmap0.pt = custom_pt; + verb_info->ptmap_len = 1; } /* AMR requires additional parameters to be set up (framing mode) */ @@ -873,7 +919,7 @@ if (bss_side && verb_info->codecs0 == CODEC_AMR_8000_1) { /* FIXME: At the moment all BTSs we support are using the * octet-aligned payload format. However, in the future - * we may support BTSs that are using bandwith-efficient + * we may support BTSs that are using bandwidth-efficient * format. In this case we will have to add functionality * that distinguishes by the BTS model which mode to use. */ verb_info->param.amr_octet_aligned = true; @@ -882,3 +928,8 @@ verb_info->param.amr_octet_aligned = lchan->conn->sccp.msc->amr_octet_aligned; } } + +bool mgcp_codec_is_picked(const struct mgcp_conn_peer *verb_info, enum mgcp_codecs codec) +{ + return verb_info->codecs0 == codec; +}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/lchan_select.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/lchan_select.c
Changed
@@ -2,7 +2,7 @@ * * (C) 2008 by Harald Welte <laforge@gnumonks.org> * (C) 2008, 2009 by Holger Hans Peter Freyther <zecke@selfish.org> - * (C) 2018 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> + * (C) 2018-2022 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> * * All Rights Reserved * @@ -21,6 +21,8 @@ * */ +#include <stdlib.h> + #include <osmocom/bsc/debug.h> #include <osmocom/bsc/gsm_data.h> @@ -30,6 +32,18 @@ #include <osmocom/bsc/lchan_select.h> #include <osmocom/bsc/bts.h> +struct lchan_select_ts_list { + struct gsm_bts_trx_ts **list; + unsigned int num; +}; + +const struct value_string lchan_select_reason_names = { + OSMO_VALUE_STRING(SELECT_FOR_MS_CHAN_REQ), + OSMO_VALUE_STRING(SELECT_FOR_ASSIGNMENT), + OSMO_VALUE_STRING(SELECT_FOR_HANDOVER), + {0, NULL} +}; + static struct gsm_lchan *pick_better_lchan(struct gsm_lchan *a, struct gsm_lchan *b) { if (!a) @@ -42,14 +56,13 @@ return a; } -static struct gsm_lchan * -_lc_find_trx(struct gsm_bts_trx *trx, enum gsm_phys_chan_config pchan, - enum gsm_phys_chan_config as_pchan, bool allow_pchan_switch, bool log) +static struct gsm_lchan *_lc_find(struct lchan_select_ts_list *ts_list, + enum gsm_phys_chan_config pchan, + enum gsm_phys_chan_config as_pchan, + bool allow_pchan_switch, bool log) { struct gsm_lchan *lchan; struct gsm_lchan *found_lchan = NULL; - struct gsm_bts_trx_ts *ts; - int j, start, stop, dir; #define LOGPLCHANALLOC(fmt, args...) do { \ if (log) \ @@ -61,28 +74,10 @@ ## args); \ } while (0) - if (!trx_is_usable(trx)) { - LOGPLCHANALLOC("%s trx not usable\n", gsm_trx_name(trx)); - return NULL; - } - - if (trx->bts->chan_alloc_reverse) { - /* check TS 7..0 */ - start = 7; - stop = -1; - dir = -1; - } else { - /* check TS 0..7 */ - start = 0; - stop = 8; - dir = 1; - } - - for (j = start; j != stop; j += dir) { + for (unsigned int tn = 0; tn < ts_list->num; tn++) { + struct gsm_bts_trx_ts *ts = ts_list->listtn; int lchans_as_pchan; - ts = &trx->tsj; - if (!ts_is_usable(ts)) - continue; + /* The caller first selects what kind of TS to search in, e.g. looking for exact * GSM_PCHAN_TCH_F, or maybe among dynamic GSM_PCHAN_OSMO_DYN... */ if (ts->pchan_on_init != pchan) { @@ -106,7 +101,7 @@ if (lchan->fi->state != LCHAN_ST_UNUSED) { LOGPLCHANALLOC("%s ss=%d in type=%s,state=%s not suitable\n", gsm_ts_and_pchan_name(ts), lchan->nr, - gsm_lchant_name(lchan->type), + gsm_chan_t_name(lchan->type), osmo_fsm_inst_state_name(lchan->fi)); continue; } @@ -125,7 +120,7 @@ /* When picking an lchan with least interference, continue to loop across all lchans. When * ignoring interference levels, return the first match. */ - if (found_lchan && !trx->bts->chan_alloc_avoid_interf) + if (found_lchan && !ts->trx->bts->chan_alloc_avoid_interf) return found_lchan; } } @@ -141,44 +136,31 @@ #undef LOGPLCHANALLOC } -static struct gsm_lchan * -_lc_dyn_find_bts(struct gsm_bts *bts, enum gsm_phys_chan_config pchan, - enum gsm_phys_chan_config dyn_as_pchan, bool log) +static struct gsm_lchan *lc_dyn_find(struct lchan_select_ts_list *ts_list, + enum gsm_phys_chan_config pchan, + enum gsm_phys_chan_config dyn_as_pchan, + bool log) { - struct gsm_bts_trx *trx; - struct gsm_lchan *lc; - int allow_pchan_switch; - bool try_pchan_switch; + struct gsm_lchan *lchan; /* First find an lchan that needs no change in its timeslot pchan mode. * In particular, this ensures that handover to a dynamic timeslot in TCH/H favors timeslots that are currently * using only one of two TCH/H, so that we don't switch more dynamic timeslots to TCH/H than necessary. * For non-dynamic timeslots, it is not necessary to do a second pass with allow_pchan_switch == * true, because they never switch anyway. */ - try_pchan_switch = (pchan != dyn_as_pchan); - for (allow_pchan_switch = 0; allow_pchan_switch <= (try_pchan_switch ? 1 : 0); allow_pchan_switch++) { - if (bts->chan_alloc_reverse) { - llist_for_each_entry_reverse(trx, &bts->trx_list, list) { - lc = _lc_find_trx(trx, pchan, dyn_as_pchan, (bool)allow_pchan_switch, log); - if (lc) - return lc; - } - } else { - llist_for_each_entry(trx, &bts->trx_list, list) { - lc = _lc_find_trx(trx, pchan, dyn_as_pchan, (bool)allow_pchan_switch, log); - if (lc) - return lc; - } - } - } + if ((lchan = _lc_find(ts_list, pchan, dyn_as_pchan, false, log))) + return lchan; + if ((lchan = _lc_find(ts_list, pchan, dyn_as_pchan, true, log))) + return lchan; return NULL; } -static struct gsm_lchan * -_lc_find_bts(struct gsm_bts *bts, enum gsm_phys_chan_config pchan, bool log) +static struct gsm_lchan *lc_find(struct lchan_select_ts_list *ts_list, + enum gsm_phys_chan_config pchan, + bool log) { - return _lc_dyn_find_bts(bts, pchan, pchan, log); + return _lc_find(ts_list, pchan, pchan, false, log); } enum gsm_chan_t chan_mode_to_chan_type(enum gsm48_chan_mode chan_mode, enum channel_rate chan_rate) @@ -215,26 +197,167 @@ } } +static int qsort_func(const void *_a, const void *_b) +{ + const struct gsm_bts_trx *trx_a = *(const struct gsm_bts_trx **)_a; + const struct gsm_bts_trx *trx_b = *(const struct gsm_bts_trx **)_b; + + int pwr_a = trx_a->nominal_power - trx_a->max_power_red; + int pwr_b = trx_b->nominal_power - trx_b->max_power_red; + + /* Sort in descending order */ + return pwr_b - pwr_a; +} + +static void populate_ts_list(struct lchan_select_ts_list *ts_list, + struct gsm_bts *bts, + bool chan_alloc_reverse, + bool sort_by_trx_power, + bool log) +{ + struct gsm_bts_trx **trx_list; + struct gsm_bts_trx *trx; + unsigned int num = 0; + + /* Allocate an array with pointers to all TRX instances of a BTS */ + trx_list = talloc_array_ptrtype(bts, trx_list, bts->num_trx); + OSMO_ASSERT(trx_list != NULL); + + llist_for_each_entry(trx, &bts->trx_list, list) + trx_listtrx->nr = trx; + + /* Sort by TRX power in descending order (if needed) */ + if (sort_by_trx_power) + qsort(&trx_list0, bts->num_trx, sizeof(trx), &qsort_func); + + for (unsigned int trxn = 0; trxn < bts->num_trx; trxn++) { + trx = trx_listtrxn; + for (unsigned int tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) { + struct gsm_bts_trx_ts *ts = &trx->tstn; + if (ts_is_usable(ts)) + ts_list->listnum++ = ts; + else if (log) + LOGP(DRLL, LOGL_DEBUG, "%s is not usable\n", gsm_ts_name(ts)); + } + } + + talloc_free(trx_list); + ts_list->num = num; + + /* Reverse the timeslot list if required */ + if (chan_alloc_reverse) { + for (unsigned int tn = 0; tn < num / 2; tn++) { + struct gsm_bts_trx_ts *temp = ts_list->listtn; + ts_list->listtn = ts_list->listnum - tn - 1; + ts_list->listnum - tn - 1 = temp; + } + } +} + +static bool chan_alloc_ass_dynamic_reverse(struct gsm_bts *bts, + void *ctx, bool log) +{ + const struct load_counter *ll = &bts->c0->lchan_load; + const struct gsm_lchan *old_lchan = ctx; + unsigned int lchan_load; + int avg_ul_rxlev; + + OSMO_ASSERT(old_lchan != NULL); + OSMO_ASSERT(old_lchan->ts->trx->bts == bts); + +#define LOG_COND(fmt, args...) do { \ + if (log) \ + LOG_LCHAN(old_lchan, LOGL_DEBUG, fmt, ## args); \ + } while (0) + + /* Condition a) Channel load on the C0 (BCCH carrier) */ + lchan_load = ll->total ? ll->used * 100 / ll->total : 0; + if (lchan_load < bts->chan_alloc_dyn_params.c0_chan_load_thresh) { + LOG_COND("C0 Channel Load %u%% < thresh %u%% => using ascending order\n", + lchan_load, bts->chan_alloc_dyn_params.c0_chan_load_thresh); + return false; + } + + /* Condition b) average Uplink RxLev */ + avg_ul_rxlev = get_meas_rep_avg(old_lchan, TDMA_MEAS_FIELD_RXLEV, + TDMA_MEAS_DIR_UL, TDMA_MEAS_SET_AUTO, + bts->chan_alloc_dyn_params.ul_rxlev_avg_num); + if (avg_ul_rxlev < 0) { + LOG_COND("Unknown AVG UL RxLev => using ascending order\n"); + return false; + } + if (avg_ul_rxlev < bts->chan_alloc_dyn_params.ul_rxlev_thresh) { + LOG_COND("AVG UL RxLev %u < thresh %u => using ascending order\n", + avg_ul_rxlev, bts->chan_alloc_dyn_params.ul_rxlev_thresh); + return false; + } + + LOG_COND("C0 Channel Load %u%% >= thresh %u%% and " + "AVG UL RxLev %u >= thresh %u => using descending order\n", + lchan_load, bts->chan_alloc_dyn_params.c0_chan_load_thresh, + avg_ul_rxlev, bts->chan_alloc_dyn_params.ul_rxlev_thresh); + +#undef LOG_COND + + return true; +} + struct gsm_lchan *lchan_select_by_chan_mode(struct gsm_bts *bts, - enum gsm48_chan_mode chan_mode, enum channel_rate chan_rate) + enum gsm48_chan_mode chan_mode, + enum channel_rate chan_rate, + enum lchan_select_reason reason, + void *ctx) { enum gsm_chan_t type = chan_mode_to_chan_type(chan_mode, chan_rate); if (type == GSM_LCHAN_NONE) return NULL; - return lchan_select_by_type(bts, type); + return lchan_select_by_type(bts, type, reason, ctx); } -struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, enum gsm_chan_t type, bool log) +struct gsm_lchan *lchan_avail_by_type(struct gsm_bts *bts, + enum gsm_chan_t type, + enum lchan_select_reason reason, + void *ctx, bool log) { struct gsm_lchan *lchan = NULL; enum gsm_phys_chan_config first, first_cbch, second, second_cbch; + struct lchan_select_ts_list ts_list; + bool sort_by_trx_power = false; + bool chan_alloc_reverse = false; + + if (log) { + LOG_BTS(bts, DRLL, LOGL_DEBUG, "lchan_avail_by_type(type=%s, reason=%s)\n", + gsm_chan_t_name(type), lchan_select_reason_name(reason)); + } + + switch (reason) { + case SELECT_FOR_MS_CHAN_REQ: + chan_alloc_reverse = bts->chan_alloc_chan_req_reverse; + break; + case SELECT_FOR_ASSIGNMENT: + if (bts->chan_alloc_assignment_dynamic) { + chan_alloc_reverse = chan_alloc_ass_dynamic_reverse(bts, ctx, log); + sort_by_trx_power = bts->chan_alloc_dyn_params.sort_by_trx_power; + } else { + chan_alloc_reverse = bts->chan_alloc_assignment_reverse; + } + break; + case SELECT_FOR_HANDOVER: + chan_alloc_reverse = bts->chan_alloc_handover_reverse; + break; + } - if (log) - LOG_BTS(bts, DRLL, LOGL_DEBUG, "lchan_avail_by_type(%s)\n", gsm_lchant_name(type)); + /* Allocate an array with pointers to all timeslots of a BTS */ + ts_list.list = talloc_array_ptrtype(bts, ts_list.list, bts->num_trx * 8); + if (OSMO_UNLIKELY(ts_list.list == NULL)) + return NULL; + + /* Populate this array with the actual pointers */ + populate_ts_list(&ts_list, bts, chan_alloc_reverse, sort_by_trx_power, log); switch (type) { case GSM_LCHAN_SDCCH: - if (bts->chan_alloc_reverse) { + if (chan_alloc_reverse) { first = GSM_PCHAN_SDCCH8_SACCH8C; first_cbch = GSM_PCHAN_SDCCH8_SACCH8C_CBCH; second = GSM_PCHAN_CCCH_SDCCH4; @@ -246,63 +369,66 @@ second_cbch = GSM_PCHAN_SDCCH8_SACCH8C_CBCH; } - lchan = _lc_find_bts(bts, first, log); + lchan = lc_find(&ts_list, first, log); if (lchan == NULL) - lchan = _lc_find_bts(bts, first_cbch, log); + lchan = lc_find(&ts_list, first_cbch, log); if (lchan == NULL) - lchan = _lc_find_bts(bts, second, log); + lchan = lc_find(&ts_list, second, log); if (lchan == NULL) - lchan = _lc_find_bts(bts, second_cbch, log); + lchan = lc_find(&ts_list, second_cbch, log); /* No dedicated SDCCH available -- try fully dynamic * TCH/F_TCH/H_SDCCH8_PDCH if BTS supports it: */ if (lchan == NULL && osmo_bts_has_feature(&bts->features, BTS_FEAT_DYN_TS_SDCCH8)) - lchan = _lc_dyn_find_bts(bts, - GSM_PCHAN_OSMO_DYN, - GSM_PCHAN_SDCCH8_SACCH8C, log); + lchan = lc_dyn_find(&ts_list, GSM_PCHAN_OSMO_DYN, + GSM_PCHAN_SDCCH8_SACCH8C, log); break; case GSM_LCHAN_TCH_F: - lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_F, log); + lchan = lc_find(&ts_list, GSM_PCHAN_TCH_F, log); /* If we don't have TCH/F available, try dynamic TCH/F_PDCH */ if (!lchan) - lchan = _lc_dyn_find_bts(bts, GSM_PCHAN_TCH_F_PDCH, - GSM_PCHAN_TCH_F, log); + lchan = lc_dyn_find(&ts_list, GSM_PCHAN_TCH_F_PDCH, + GSM_PCHAN_TCH_F, log); /* Try fully dynamic TCH/F_TCH/H_PDCH as TCH/F... */ if (!lchan && bts->network->dyn_ts_allow_tch_f) - lchan = _lc_dyn_find_bts(bts, - GSM_PCHAN_OSMO_DYN, - GSM_PCHAN_TCH_F, log); + lchan = lc_dyn_find(&ts_list, GSM_PCHAN_OSMO_DYN, + GSM_PCHAN_TCH_F, log); break; case GSM_LCHAN_TCH_H: - lchan = _lc_find_bts(bts, GSM_PCHAN_TCH_H, log); + lchan = lc_find(&ts_list, GSM_PCHAN_TCH_H, log); /* No dedicated TCH/x available -- try fully dynamic * TCH/F_TCH/H_PDCH */ if (!lchan) - lchan = _lc_dyn_find_bts(bts, - GSM_PCHAN_OSMO_DYN, - GSM_PCHAN_TCH_H, log); + lchan = lc_dyn_find(&ts_list, GSM_PCHAN_OSMO_DYN, + GSM_PCHAN_TCH_H, log); break; default: LOG_BTS(bts, DRLL, LOGL_ERROR, "Unknown gsm_chan_t %u\n", type); } + talloc_free(ts_list.list); + return lchan; } /* Return a matching lchan from a specific BTS that is currently available. The next logical step is * lchan_activate() on it, which would possibly cause dynamic timeslot pchan switching, taken care of by * the lchan and timeslot FSMs. */ -struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts, enum gsm_chan_t type) +struct gsm_lchan *lchan_select_by_type(struct gsm_bts *bts, + enum gsm_chan_t type, + enum lchan_select_reason reason, + void *ctx) { struct gsm_lchan *lchan = NULL; - LOG_BTS(bts, DRLL, LOGL_DEBUG, "lchan_select_by_type(%s)\n", gsm_lchant_name(type)); + LOG_BTS(bts, DRLL, LOGL_DEBUG, "lchan_select_by_type(type=%s, reason=%s)\n", + gsm_chan_t_name(type), lchan_select_reason_name(reason)); - lchan = lchan_avail_by_type(bts, type, true); + lchan = lchan_avail_by_type(bts, type, reason, ctx, true); if (!lchan) { - LOG_BTS(bts, DRLL, LOGL_NOTICE, "Failed to select %s channel\n", - gsm_lchant_name(type)); + LOG_BTS(bts, DRLL, LOGL_NOTICE, "Failed to select %s channel (%s)\n", + gsm_chan_t_name(type), lchan_select_reason_name(reason)); return NULL; }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/lcs_loc_req.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/lcs_loc_req.c
Changed
@@ -226,7 +226,7 @@ { struct lcs_loc_req *lcs_loc_req = conn->lcs.loc_req; struct bssap_le_pdu bssap_le; - struct osmo_bssap_le_err *err; + struct osmo_bssap_le_err *err = NULL; struct rate_ctr_group *ctrg = bsc_gsmnet->smlc->ctrs; if (!lcs_loc_req) { @@ -514,7 +514,8 @@ }; /* If we're paging this subscriber for LCS, stop paging. */ - paging_request_cancel(lcs_loc_req->conn->bsub, BSC_PAGING_FOR_LCS); + if (lcs_loc_req->conn->bsub) + paging_request_cancel(lcs_loc_req->conn->bsub, BSC_PAGING_FOR_LCS); /* Send Perform Location Abort to SMLC, only if we got started on the Lb */ if (lcs_loc_req->conn->lcs.lb.state == SUBSCR_SCCP_ST_CONNECTED)
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/meas_feed.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/meas_feed.c
Changed
@@ -20,6 +20,7 @@ #include <osmocom/bsc/vty.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/bts.h> +#include <osmocom/bsc/lchan.h> struct meas_feed_state { struct osmo_wqueue wqueue;
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/neighbor_ident.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/neighbor_ident.c
Changed
@@ -293,7 +293,7 @@ return true; } -int neighbors_check_cfg() +int neighbors_check_cfg(void) { /* A local neighbor can be configured by BTS number, or by a cell ID. A local neighbor can omit the ARFCN+BSIC, * in which case those are taken from that local BTS config. If a local neighbor has ARFCN+BSIC configured, it
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/neighbor_ident_ctrl.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/neighbor_ident_ctrl.c
Changed
@@ -21,6 +21,7 @@ */ #include <errno.h> +#include <inttypes.h> #include <time.h> #include <osmocom/ctrl/control_cmd.h> @@ -94,6 +95,44 @@ return verify_neighbor_bts(cmd, value, _data); } +static int get_neighbor_bts_list(struct ctrl_cmd *cmd, void *data) +{ + /* Max. 256 BTS neighbors (as of now, any bts can be its own neighbor per cfg) comma-separated -> + * max. 255 commas * + trailing '\0': 256 + * 10 of those numbers (0...9) are 1-digit numbers: + 10 = 266 + * 90 of those numbers are 2-digit numbers (10...99): + 90 = 356 + * 255 - 100 + 1 = 156 are 3-digit numbers (100...255): + 156 = 512 bytes + * Double BTS num entries are not possible (check exists and is being tested against in python tests). */ + char log_buf512; + struct osmo_strbuf reply = { .buf = log_buf, + .len = sizeof(log_buf), + .pos = log_buf + }; + struct gsm_bts *neighbor_bts, *bts = (struct gsm_bts *)cmd->node; + if (!bts) { + cmd->reply = "BTS not found"; + return CTRL_CMD_ERROR; + } + struct neighbor *n; + llist_for_each_entry(n, &bts->neighbors, entry) + if (resolve_local_neighbor(&neighbor_bts, bts, n) == 0) + OSMO_STRBUF_PRINTF(reply, "%" PRIu8 ",", neighbor_bts->nr); + if (reply.buf == reply.pos) + cmd->reply = ""; + else { /* Get rid of trailing comma */ + reply.pos-1 = '\0'; + if (!(cmd->reply = talloc_strdup(cmd, reply.buf))) + goto oom; + } + return CTRL_CMD_REPLY; + +oom: + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; +} + +CTRL_CMD_DEFINE_RO(neighbor_bts_list, "neighbor-bts list"); + static int set_neighbor_bts_add(struct ctrl_cmd *cmd, void *data) { struct gsm_bts *bts = cmd->node; @@ -705,6 +744,7 @@ rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_neighbor_lac_ci_del); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_neighbor_cgi_add); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_neighbor_cgi_del); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_neighbor_bts_list); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_neighbor_cgi_ps_add); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_neighbor_cgi_ps_del); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_neighbor_clear);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/neighbor_ident_vty.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/neighbor_ident_vty.c
Changed
@@ -154,7 +154,7 @@ LOGP(DLINP, LOGL_NOTICE, fmt "\n", ## args); \ } while (0) \ -/* Delete a neighbor from neighborlist. When the parameter *vty is set to NULL all error messages are redirected to the +/* Add a neighbor from neighborlist. When the parameter *vty is set to NULL all error messages are redirected to the * logtext. */ int neighbor_ident_add_neighbor(struct vty *vty, struct gsm_bts *bts, struct neighbor *n) { @@ -628,7 +628,7 @@ return CMD_SUCCESS; } -void neighbor_ident_vty_init() +void neighbor_ident_vty_init(void) { install_element(GSMNET_NODE, &cfg_neighbor_bind_cmd);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/net_init.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/net_init.c
Changed
@@ -25,38 +25,40 @@ #include <osmocom/bsc/handover_cfg.h> #include <osmocom/bsc/chan_alloc.h> #include <osmocom/bsc/neighbor_ident.h> +#include <osmocom/bsc/bts_setup_ramp.h> +#include <osmocom/bsc/paging.h> static struct osmo_tdef gsm_network_T_defs = { - { .T=4, .default_val=5, .desc="Timeout to receive BSSMAP RESET ACKNOWLEDGE from the MSC" }, - { .T=7, .default_val=10, .desc="inter-BSC/MSC Handover outgoing, BSSMAP HO Required to HO Command timeout" }, - { .T=8, .default_val=10, .desc="inter-BSC/MSC Handover outgoing, BSSMAP HO Command to final Clear timeout" }, - { .T=10, .default_val=6, .desc="RR Assignment" }, - { .T=101, .default_val=10, .desc="inter-BSC/MSC Handover incoming, BSSMAP HO Request to HO Accept" }, - { .T=3101, .default_val=3, .desc="RR Immediate Assignment" }, - { .T=3103, .default_val=5, .desc="Handover" }, - { .T=3105, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Physical Information" }, - { .T=3107, .default_val=5, .desc="(unused)" }, - { .T=3109, .default_val=5, .desc="RSL SACCH deactivation" }, - { .T=3111, .default_val=2, .desc="Wait time before RSL RF Channel Release" }, - { .T=3113, .default_val=7, .desc="Paging"}, - { .T=3115, .default_val=10, .desc="(unused)" }, - { .T=3117, .default_val=10, .desc="(unused)" }, - { .T=3119, .default_val=10, .desc="(unused)" }, - { .T=3122, .default_val=GSM_T3122_DEFAULT, .desc="Wait time after RR Immediate Assignment Reject" }, - { .T=3141, .default_val=10, .desc="(unused)" }, - { .T=3212, .default_val=5, .unit=OSMO_TDEF_CUSTOM, - .desc="Periodic Location Update timer, sent to MS (1 = 6 minutes)" }, - { .T=-4, .default_val=60, .desc="After Clear Request, wait for MSC to Clear Command (sanity)" }, - { .T=-5, .default_val=5, .desc="Timeout to switch dynamic timeslot PCHAN modes"}, - { .T=-6, .default_val=5, .desc="Timeout for RSL Channel Activate ACK after sending RSL Channel Activate" }, - { .T=-7, .default_val=5, .desc="Timeout for RSL IPA CRCX ACK after sending RSL IPA CRCX" }, - { .T=-8, .default_val=5, .desc="Timeout for RSL IPA MDCX ACK after sending RSL IPA MDCX" }, - { .T=-9, .default_val=5, .desc="Timeout for availability of MGW endpoint" }, - { .T=-10, .default_val=5, .desc="Timeout for fully configured MGW endpoint" }, - { .T=-11, .default_val=5, .desc="Timeout for Perform Location Response from SMLC" }, - { .T=-12, .default_val=5, .desc="Timeout for obtaining TA after BSSLAP TA Request" }, - { .T=-13, .default_val=5, .desc="Timeout for RR Channel Mode Modify ACK (BSC <-> MS)" }, - { .T=-14, .default_val=5, .desc="Timeout for RSL Channel Mode Modify ACK (BSC <-> BTS)" }, + { .T = 4, .default_val = 5, .desc = "Timeout to receive BSSMAP RESET ACKNOWLEDGE from the MSC" }, + { .T = 7, .default_val = 10, .desc = "inter-BSC/MSC Handover outgoing, BSSMAP HO Required to HO Command timeout" }, + { .T = 8, .default_val = 10, .desc = "inter-BSC/MSC Handover outgoing, BSSMAP HO Command to final Clear timeout" }, + { .T = 10, .default_val = 6, .desc = "RR Assignment" }, + { .T = 101, .default_val = 10, .desc = "inter-BSC/MSC Handover incoming, BSSMAP HO Request to HO Accept" }, + { .T = 3101, .default_val = 3, .desc = "RR Immediate Assignment" }, + { .T = 3103, .default_val = 5, .desc = "Handover" }, + { .T = 3105, .default_val = GSM_T3105_DEFAULT, .unit = OSMO_TDEF_MS, .desc = "Physical Information" }, + { .T = 3107, .default_val = 5, .desc = "(unused)" }, + { .T = 3109, .default_val = 5, .desc = "RSL SACCH deactivation" }, + { .T = 3111, .default_val = 2, .desc = "Wait time before RSL RF Channel Release" }, + { .T = 3113, .default_val = 7, .desc = "Paging"}, + { .T = 3115, .default_val = 10, .desc = "(unused)" }, + { .T = 3117, .default_val = 10, .desc = "(unused)" }, + { .T = 3119, .default_val = 10, .desc = "(unused)" }, + { .T = 3122, .default_val = GSM_T3122_DEFAULT, .desc = "Wait time after RR Immediate Assignment Reject" }, + { .T = 3141, .default_val = 10, .desc = "(unused)" }, + { .T = 3212, .default_val = 5, .unit = OSMO_TDEF_CUSTOM, + .desc = "Periodic Location Update timer, sent to MS (1 = 6 minutes)" }, + { .T = -4, .default_val = 60, .desc = "After Clear Request, wait for MSC to Clear Command (sanity)" }, + { .T = -5, .default_val = 5, .desc = "Timeout to switch dynamic timeslot PCHAN modes"}, + { .T = -6, .default_val = 5, .desc = "Timeout for RSL Channel Activate ACK after sending RSL Channel Activate" }, + { .T = -7, .default_val = 5, .desc = "Timeout for RSL IPA CRCX ACK after sending RSL IPA CRCX" }, + { .T = -8, .default_val = 5, .desc = "Timeout for RSL IPA MDCX ACK after sending RSL IPA MDCX" }, + { .T = -9, .default_val = 5, .desc = "Timeout for availability of MGW endpoint" }, + { .T = -10, .default_val = 5, .desc = "Timeout for fully configured MGW endpoint" }, + { .T = -11, .default_val = 5, .desc = "Timeout for Perform Location Response from SMLC" }, + { .T = -12, .default_val = 5, .desc = "Timeout for obtaining TA after BSSLAP TA Request" }, + { .T = -13, .default_val = 5, .desc = "Timeout for RR Channel Mode Modify ACK (BSC <-> MS)" }, + { .T = -14, .default_val = 5, .desc = "Timeout for RSL Channel Mode Modify ACK (BSC <-> BTS)" }, { .T = -16, .default_val = 1000, .unit = OSMO_TDEF_MS, .desc = "Granularity for all_allocated:* rate counters: amount of milliseconds that one counter increment" " represents. See also X17, X18" }, @@ -71,14 +73,22 @@ .desc = "Forget-sum period for all_allocated:* rate counters:" " after this amount of idle time, forget internally cumulated time remainders. Zero to always" " keep remainders. See also X16, X17." }, - { .T=-25, .default_val=5, .desc="Timeout for initial user data after an MSC initiated an SCCP connection to the BSS" }, - { .T=-3111, .default_val=4, .desc="Wait time after lchan was released in error (should be T3111 + 2s)" }, - { .T=-3210, .default_val=20, .desc="After L3 Complete, wait for MSC to confirm" }, + { .T = -25, .default_val = 5, .desc = "Timeout for initial user data after an MSC initiated an SCCP connection to the BSS" }, + { .T = -3105, .default_val = GSM_NY1_DEFAULT, .unit = OSMO_TDEF_CUSTOM, + .desc = "Ny1: Maximum number of Physical Information (re)transmissions" }, + { .T = -3111, .default_val = 4, .desc = "Wait time after lchan was released in error (should be T3111 + 2s)" }, + { .T = -3113, .default_val = PAGING_THRESHOLD_X3113_DEFAULT_SEC, + .desc = "Maximum Paging Request Transmit Delay Threshold: " \ + "If the estimated transmit delay of the messages in the paging queue surpasses this threshold, then new incoming " + "paging requests will if possible replace a request in retransmission state from the queue or otherwise be discarded, " + "hence limiting the size of the queue and maximum delay of its scheduled requests. " + "X3113 also serves as the upper boundary for dynamic T3113 when estimating the expected maximum delay to get a response" }, + { .T = -3210, .default_val = 20, .desc = "After L3 Complete, wait for MSC to confirm" }, {} }; struct osmo_tdef g_mgw_tdefs = { - { .T=-2427, .default_val=5, .desc="timeout for MGCP response from MGW" }, + { .T = -2427, .default_val = 5, .desc = "timeout for MGCP response from MGW" }, {} }; @@ -124,5 +134,7 @@ net->null_nri_ranges = osmo_nri_ranges_alloc(net); net->nri_bitlen = OSMO_NRI_BITLEN_DEFAULT; + bts_setup_ramp_init_network(net); + return net; }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_bb_transc_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_bb_transc_fsm.c
Changed
@@ -32,6 +32,7 @@ #include <osmocom/bsc/signal.h> #include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/bts_ipaccess_nanobts_omlattr.h> +#include <osmocom/bsc/ipaccess.h> #include <osmocom/bsc/nm_common_fsm.h> #include <osmocom/bsc/debug.h> @@ -63,6 +64,8 @@ bb_transc->mo.get_attr_sent = false; bb_transc->mo.get_attr_rep_received = false; bb_transc->mo.adm_unlock_sent = false; + bb_transc->mo.rsl_connect_sent = false; + bb_transc->mo.rsl_connect_ack_received = false; bb_transc->mo.opstart_sent = false; } @@ -73,6 +76,7 @@ switch (event) { case NM_EV_SW_ACT_REP: + case NM_EV_SETUP_RAMP_READY: break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -102,6 +106,9 @@ { struct gsm_bts_trx *trx = gsm_bts_bb_trx_get_trx(bb_transc); + if (bts_setup_ramp_wait(trx->bts)) + return; + /* Request TRX-level attributes */ if (!bb_transc->mo.get_attr_sent && !bb_transc->mo.get_attr_rep_received) { bb_transc->mo.get_attr_sent = true; @@ -125,14 +132,22 @@ NM_STATE_UNLOCKED); } + /* Provision BTS with RSL IP addr & port to connect to: */ if (allow_opstart && state->administrative == NM_STATE_UNLOCKED && - !bb_transc->mo.opstart_sent) { - bb_transc->mo.opstart_sent = true; - abis_nm_opstart(trx->bts, NM_OC_BASEB_TRANSC, trx->bts->bts_nr, trx->nr, 0xff); - /* TRX software is active, tell it to initiate RSL Link */ + !bb_transc->mo.rsl_connect_sent && !bb_transc->mo.rsl_connect_ack_received) { + bb_transc->mo.rsl_connect_sent = true; abis_nm_ipaccess_rsl_connect(trx, trx->bts->ip_access.rsl_ip, 3003, trx->rsl_tei_primary); } + + /* OPSTART after receiving RSL CONNECT ACK. We cannot delay until the + * RSL/IPA socket is connected to us because nanoBTS only attempts + * connection after receiving an OPSTART: */ + if (allow_opstart && state->administrative == NM_STATE_UNLOCKED && + bb_transc->mo.rsl_connect_ack_received && !bb_transc->mo.opstart_sent) { + bb_transc->mo.opstart_sent = true; + abis_nm_opstart(trx->bts, NM_OC_BASEB_TRANSC, trx->bts->bts_nr, trx->nr, 0xff); + } } static void st_op_disabled_dependency_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) @@ -150,6 +165,7 @@ static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct gsm_bts_bb_trx *bb_transc = (struct gsm_bts_bb_trx *)fi->priv; + struct gsm_bts_trx *trx = gsm_bts_bb_trx_get_trx(bb_transc); struct nm_statechg_signal_data *nsd; const struct gsm_nm_state *new_state; @@ -159,6 +175,14 @@ bb_transc->mo.get_attr_sent = false; configure_loop(bb_transc, &bb_transc->mo.nm_state, false); return; + case NM_EV_RSL_CONNECT_ACK: + bb_transc->mo.rsl_connect_ack_received = true; + bb_transc->mo.rsl_connect_sent = false; + configure_loop(bb_transc, &bb_transc->mo.nm_state, false); + break; + case NM_EV_RSL_CONNECT_NACK: + ipaccess_drop_oml_deferred(trx->bts); + break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; new_state = &nsd->new_state; @@ -182,6 +206,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(bb_transc, &bb_transc->mo.nm_state, false); + break; default: OSMO_ASSERT(0); } @@ -207,6 +234,14 @@ bb_transc->mo.get_attr_sent = false; configure_loop(bb_transc, &bb_transc->mo.nm_state, true); return; + case NM_EV_RSL_CONNECT_ACK: + bb_transc->mo.rsl_connect_ack_received = true; + bb_transc->mo.rsl_connect_sent = false; + configure_loop(bb_transc, &bb_transc->mo.nm_state, true); + break; + case NM_EV_RSL_CONNECT_NACK: + ipaccess_drop_oml_deferred(trx->bts); + break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; new_state = &nsd->new_state; @@ -238,6 +273,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(bb_transc, &bb_transc->mo.nm_state, true); + break; default: OSMO_ASSERT(0); } @@ -251,8 +289,10 @@ reused as soon as we move back to Disabled */ bb_transc->mo.get_attr_sent = false; bb_transc->mo.get_attr_rep_received = false; - bb_transc->mo.opstart_sent = false; bb_transc->mo.adm_unlock_sent = false; + bb_transc->mo.rsl_connect_ack_received = false; + bb_transc->mo.rsl_connect_sent = false; + bb_transc->mo.opstart_sent = false; nm_bb_transc_fsm_becomes_enabled(bb_transc); } @@ -318,7 +358,8 @@ NM_BB_TRANSC_ST_OP_DISABLED_NOTINSTALLED = { .in_event_mask = X(NM_EV_SW_ACT_REP) | - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BB_TRANSC_ST_OP_DISABLED_DEPENDENCY) | X(NM_BB_TRANSC_ST_OP_DISABLED_OFFLINE) | @@ -330,7 +371,10 @@ NM_BB_TRANSC_ST_OP_DISABLED_DEPENDENCY = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_GET_ATTR_REP), + X(NM_EV_GET_ATTR_REP) | + X(NM_EV_RSL_CONNECT_ACK) | + X(NM_EV_RSL_CONNECT_NACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BB_TRANSC_ST_OP_DISABLED_NOTINSTALLED) | X(NM_BB_TRANSC_ST_OP_DISABLED_OFFLINE) | @@ -342,7 +386,10 @@ NM_BB_TRANSC_ST_OP_DISABLED_OFFLINE = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_GET_ATTR_REP), + X(NM_EV_GET_ATTR_REP) | + X(NM_EV_RSL_CONNECT_ACK) | + X(NM_EV_RSL_CONNECT_NACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BB_TRANSC_ST_OP_DISABLED_NOTINSTALLED) | X(NM_BB_TRANSC_ST_OP_DISABLED_DEPENDENCY) |
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_bts_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_bts_fsm.c
Changed
@@ -63,6 +63,7 @@ switch (event) { case NM_EV_SW_ACT_REP: + case NM_EV_SETUP_RAMP_READY: break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -92,6 +93,9 @@ { struct msgb *msgb; + if (bts_setup_ramp_wait(bts)) + return; + /* Request generic BTS-level attributes */ if (!bts->mo.get_attr_sent && !bts->mo.get_attr_rep_received) { bts->mo.get_attr_sent = true; @@ -139,8 +143,11 @@ bts->mo.get_attr_sent = false; /* Announce bts_features are available to related NSVC MOs */ - nsvc = gsm_bts_sm_nsvc_num(bts->site_mgr, 0); /* we only support NSVC0 so far */ - osmo_fsm_inst_dispatch(nsvc->mo.fi, NM_EV_FEATURE_NEGOTIATED, NULL); + for (int i = 0; i < ARRAY_SIZE(bts->site_mgr->gprs.nsvc); i++) { + nsvc = gsm_bts_sm_nsvc_num(bts->site_mgr, i); + if (nsvc) + osmo_fsm_inst_dispatch(nsvc->mo.fi, NM_EV_FEATURE_NEGOTIATED, NULL); + } /* Move FSM forward */ configure_loop(bts, &bts->mo.nm_state, allow_opstart); @@ -198,6 +205,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(bts, &bts->mo.nm_state, false); + break; default: OSMO_ASSERT(0); } @@ -256,6 +266,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(bts, &bts->mo.nm_state, true); + break; default: OSMO_ASSERT(0); } @@ -329,7 +342,8 @@ NM_BTS_ST_OP_DISABLED_NOTINSTALLED = { .in_event_mask = X(NM_EV_SW_ACT_REP) | - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BTS_ST_OP_DISABLED_DEPENDENCY) | X(NM_BTS_ST_OP_DISABLED_OFFLINE) | @@ -342,7 +356,8 @@ .in_event_mask = X(NM_EV_STATE_CHG_REP) | X(NM_EV_GET_ATTR_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BTS_ST_OP_DISABLED_NOTINSTALLED) | X(NM_BTS_ST_OP_DISABLED_OFFLINE) | @@ -355,7 +370,8 @@ .in_event_mask = X(NM_EV_STATE_CHG_REP) | X(NM_EV_GET_ATTR_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BTS_ST_OP_DISABLED_NOTINSTALLED) | X(NM_BTS_ST_OP_DISABLED_DEPENDENCY) |
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_bts_sm_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_bts_sm_fsm.c
Changed
@@ -61,6 +61,7 @@ switch (event) { case NM_EV_SW_ACT_REP: + case NM_EV_SETUP_RAMP_READY: break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -99,12 +100,28 @@ } } +static void configure_loop(struct gsm_bts_sm *site_mgr, const struct gsm_nm_state *_state, bool allow_opstart) +{ + struct gsm_bts *bts = gsm_bts_sm_get_bts(site_mgr); + + if (bts_setup_ramp_wait(bts)) + return; + + if (allow_opstart && !site_mgr->mo.opstart_sent) { + site_mgr->mo.opstart_sent = true; + abis_nm_opstart(bts, NM_OC_SITE_MANAGER, 0xff, 0xff, 0xff); + } +} + + static void st_op_disabled_dependency(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; const struct gsm_nm_state *new_state; switch (event) { + case NM_EV_SETUP_RAMP_READY: + break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; new_state = &nsd->new_state; @@ -132,17 +149,15 @@ static void st_op_disabled_offline_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct gsm_bts_sm *site_mgr = (struct gsm_bts_sm *)fi->priv; - struct gsm_bts *bts = gsm_bts_sm_get_bts(site_mgr); - if (!site_mgr->mo.opstart_sent) { - site_mgr->mo.opstart_sent = true; - abis_nm_opstart(bts, NM_OC_SITE_MANAGER, 0xff, 0xff, 0xff); - } + + configure_loop(site_mgr, &site_mgr->mo.nm_state, true); } static void st_op_disabled_offline(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; const struct gsm_nm_state *new_state; + struct gsm_bts_sm *site_mgr = (struct gsm_bts_sm *)fi->priv; switch (event) { case NM_EV_STATE_CHG_REP: @@ -166,10 +181,14 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(site_mgr, &site_mgr->mo.nm_state, true); + break; default: OSMO_ASSERT(0); } } + static void st_op_enabled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nm_statechg_signal_data *nsd; @@ -224,7 +243,8 @@ NM_BTS_SM_ST_OP_DISABLED_NOTINSTALLED = { .in_event_mask = X(NM_EV_SW_ACT_REP) | - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BTS_SM_ST_OP_DISABLED_DEPENDENCY) | X(NM_BTS_SM_ST_OP_DISABLED_OFFLINE) | @@ -235,7 +255,8 @@ }, NM_BTS_SM_ST_OP_DISABLED_DEPENDENCY = { .in_event_mask = - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BTS_SM_ST_OP_DISABLED_NOTINSTALLED) | X(NM_BTS_SM_ST_OP_DISABLED_OFFLINE) | @@ -245,7 +266,8 @@ }, NM_BTS_SM_ST_OP_DISABLED_OFFLINE = { .in_event_mask = - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_BTS_SM_ST_OP_DISABLED_NOTINSTALLED) | X(NM_BTS_SM_ST_OP_DISABLED_DEPENDENCY) |
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_channel_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_channel_fsm.c
Changed
@@ -62,6 +62,7 @@ switch (event) { case NM_EV_SW_ACT_REP: + case NM_EV_SETUP_RAMP_READY: break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -92,6 +93,9 @@ enum abis_nm_chan_comb ccomb; struct gsm_bts_trx *trx = ts->trx; + if (bts_setup_ramp_wait(ts->trx->bts)) + return; + if (!ts->mo.set_attr_sent && !ts->mo.set_attr_ack_received) { ts->mo.set_attr_sent = true; ccomb = abis_nm_chcomb4pchan(ts->pchan_from_config); @@ -159,6 +163,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(ts, &ts->mo.nm_state, false); + break; default: OSMO_ASSERT(0); } @@ -214,6 +221,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(ts, &ts->mo.nm_state, true); + break; default: OSMO_ASSERT(0); } @@ -285,7 +295,8 @@ NM_CHAN_ST_OP_DISABLED_NOTINSTALLED = { .in_event_mask = X(NM_EV_SW_ACT_REP) | - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_CHAN_ST_OP_DISABLED_DEPENDENCY) | X(NM_CHAN_ST_OP_DISABLED_OFFLINE) | @@ -297,7 +308,8 @@ NM_CHAN_ST_OP_DISABLED_DEPENDENCY = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_CHAN_ST_OP_DISABLED_NOTINSTALLED) | X(NM_CHAN_ST_OP_DISABLED_OFFLINE) | @@ -309,7 +321,8 @@ NM_CHAN_ST_OP_DISABLED_OFFLINE = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_CHAN_ST_OP_DISABLED_NOTINSTALLED) | X(NM_CHAN_ST_OP_DISABLED_DEPENDENCY) |
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_common_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_common_fsm.c
Changed
@@ -20,6 +20,8 @@ * */ +#include <osmocom/core/linuxlist.h> +#include <osmocom/bsc/bts.h> #include <osmocom/bsc/nm_common_fsm.h> #include <osmocom/bsc/signal.h> @@ -33,6 +35,8 @@ { NM_EV_OML_DOWN, "OML_DOWN" }, { NM_EV_FORCE_LOCK, "FORCE_LOCK_CHG" }, { NM_EV_FEATURE_NEGOTIATED, "FEATURE_NEGOTIATED" }, + { NM_EV_RSL_CONNECT_ACK, "RSL_CONNECT_ACK" }, + { NM_EV_RSL_CONNECT_NACK, "RSL_CONNECT_NACK" }, { 0, NULL } }; @@ -49,3 +53,38 @@ osmo_signal_dispatch(SS_NM, S_NM_RUNNING_CHG, &nsd); } + +/* nm_configuring_fsm_inst_dispatch(struct gsm_abis_mo *mo, uint32_t event, void *data) */ +#define nm_configuring_fsm_inst_dispatch(mo, event, data) do { \ + if ((mo)->nm_state.operational != NM_OPSTATE_ENABLED) \ + _osmo_fsm_inst_dispatch((mo)->fi, event, data, __FILE__, __LINE__); \ + } while (0) + +/*! + * Dispatch an event to all configuring/non-enabled BTS NM fsms + * + * \paramin bts a pointer to the BTS instance + * \paramin event the FSM event. See \fn osmo_fsm_inst_dispatch + * \paramin data the private data of the event. + */ +void nm_fsm_dispatch_all_configuring(struct gsm_bts *bts, uint32_t event, void *data) +{ + struct gsm_bts_trx *trx; + + nm_configuring_fsm_inst_dispatch(&bts->site_mgr->mo, event, data); + nm_configuring_fsm_inst_dispatch(&bts->mo, event, data); + llist_for_each_entry(trx, &bts->trx_list, list) { + nm_configuring_fsm_inst_dispatch(&trx->mo, event, data); + nm_configuring_fsm_inst_dispatch(&trx->bb_transc.mo, event, data); + for (unsigned long i = 0; i < ARRAY_SIZE(trx->ts); i++) { + struct gsm_bts_trx_ts *ts = &trx->tsi; + nm_configuring_fsm_inst_dispatch(&ts->mo, event, data); + } + } + + /* GPRS MOs */ + nm_configuring_fsm_inst_dispatch(&bts->site_mgr->gprs.nse.mo, event, data); + for (unsigned long i = 0; i < ARRAY_SIZE(bts->site_mgr->gprs.nsvc); i++) + nm_configuring_fsm_inst_dispatch(&bts->site_mgr->gprs.nsvci.mo, event, data); + nm_configuring_fsm_inst_dispatch(&bts->gprs.cell.mo, event, data); +}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_gprs_cell_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_gprs_cell_fsm.c
Changed
@@ -61,6 +61,7 @@ switch (event) { case NM_EV_SW_ACT_REP: + case NM_EV_SETUP_RAMP_READY: break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -94,6 +95,9 @@ if (bts->gprs.mode == BTS_GPRS_NONE) return; + if (bts_setup_ramp_wait(bts)) + return; + if (!cell->mo.set_attr_sent && !cell->mo.set_attr_ack_received) { cell->mo.set_attr_sent = true; msgb = nanobts_gen_set_cell_attr(bts); @@ -169,6 +173,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(cell, &cell->mo.nm_state, false); + break; default: OSMO_ASSERT(0); } @@ -225,6 +232,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(cell, &cell->mo.nm_state, true); + break; default: OSMO_ASSERT(0); } @@ -303,7 +313,8 @@ NM_GPRS_CELL_ST_OP_DISABLED_NOTINSTALLED = { .in_event_mask = X(NM_EV_SW_ACT_REP) | - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_CELL_ST_OP_DISABLED_DEPENDENCY) | X(NM_GPRS_CELL_ST_OP_DISABLED_OFFLINE) | @@ -315,7 +326,8 @@ NM_GPRS_CELL_ST_OP_DISABLED_DEPENDENCY = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_CELL_ST_OP_DISABLED_NOTINSTALLED) | X(NM_GPRS_CELL_ST_OP_DISABLED_OFFLINE) | @@ -327,7 +339,8 @@ NM_GPRS_CELL_ST_OP_DISABLED_OFFLINE = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_CELL_ST_OP_DISABLED_NOTINSTALLED) | X(NM_GPRS_CELL_ST_OP_DISABLED_DEPENDENCY) |
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_gprs_nse_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_gprs_nse_fsm.c
Changed
@@ -62,6 +62,7 @@ switch (event) { case NM_EV_SW_ACT_REP: + case NM_EV_SETUP_RAMP_READY: break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -93,6 +94,9 @@ struct gsm_bts_sm *bts_sm = container_of(nse, struct gsm_bts_sm, gprs.nse); struct gsm_bts *bts = gsm_bts_sm_get_bts(bts_sm); + if (bts_setup_ramp_wait(bts)) + return; + if (!nse->mo.set_attr_sent && !nse->mo.set_attr_ack_received) { nse->mo.set_attr_sent = true; msgb = nanobts_gen_set_nse_attr(bts_sm); @@ -170,6 +174,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(nse, &nse->mo.nm_state, false); + break; default: OSMO_ASSERT(0); } @@ -226,6 +233,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(nse, &nse->mo.nm_state, true); + break; default: OSMO_ASSERT(0); } @@ -305,7 +315,8 @@ NM_GPRS_NSE_ST_OP_DISABLED_NOTINSTALLED = { .in_event_mask = X(NM_EV_SW_ACT_REP) | - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_NSE_ST_OP_DISABLED_DEPENDENCY) | X(NM_GPRS_NSE_ST_OP_DISABLED_OFFLINE) | @@ -317,7 +328,8 @@ NM_GPRS_NSE_ST_OP_DISABLED_DEPENDENCY = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_NSE_ST_OP_DISABLED_NOTINSTALLED) | X(NM_GPRS_NSE_ST_OP_DISABLED_OFFLINE) | @@ -329,7 +341,8 @@ NM_GPRS_NSE_ST_OP_DISABLED_OFFLINE = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_NSE_ST_OP_DISABLED_NOTINSTALLED) | X(NM_GPRS_NSE_ST_OP_DISABLED_DEPENDENCY) |
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_gprs_nsvc_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_gprs_nsvc_fsm.c
Changed
@@ -63,8 +63,8 @@ switch (event) { case NM_EV_FEATURE_NEGOTIATED: - break; case NM_EV_SW_ACT_REP: + case NM_EV_SETUP_RAMP_READY: break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -90,6 +90,17 @@ } } +static bool has_valid_nsvc(struct gsm_gprs_nsvc *nsvc) +{ + switch (nsvc->remote.u.sa.sa_family) { + case AF_INET: + case AF_INET6: + return (nsvc->local_port > 0 && !osmo_sockaddr_is_any(&nsvc->remote)); + default: + return false; + } +} + static void configure_loop(struct gsm_gprs_nsvc *nsvc, const struct gsm_nm_state *state, bool allow_opstart) { struct msgb *msgb; @@ -97,6 +108,9 @@ if (nsvc->bts->gprs.mode == BTS_GPRS_NONE) return; + if (bts_setup_ramp_wait(nsvc->bts)) + return; + /* We need to know BTS features in order to know if we can set IPv6 addresses */ if (gsm_bts_features_negotiated(nsvc->bts) && !nsvc->mo.set_attr_sent && !nsvc->mo.set_attr_ack_received) { @@ -107,8 +121,11 @@ nsvc->bts->nr); return; } + if (!has_valid_nsvc(nsvc)) + return; + nsvc->mo.set_attr_sent = true; - msgb = nanobts_gen_set_nsvc_attr(nsvc->bts); + msgb = nanobts_gen_set_nsvc_attr(nsvc); OSMO_ASSERT(msgb); abis_nm_ipaccess_set_attr(nsvc->bts, NM_OC_GPRS_NSVC, nsvc->bts->bts_nr, nsvc->id, 0xff, msgb->data, msgb->len); @@ -185,6 +202,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(nsvc, &nsvc->mo.nm_state, false); + break; default: OSMO_ASSERT(0); } @@ -243,6 +263,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(nsvc, &nsvc->mo.nm_state, true); + break; default: OSMO_ASSERT(0); } @@ -315,7 +338,8 @@ .in_event_mask = X(NM_EV_SW_ACT_REP) | X(NM_EV_FEATURE_NEGOTIATED) | - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_NSVC_ST_OP_DISABLED_DEPENDENCY) | X(NM_GPRS_NSVC_ST_OP_DISABLED_OFFLINE) | @@ -328,7 +352,8 @@ .in_event_mask = X(NM_EV_STATE_CHG_REP) | X(NM_EV_FEATURE_NEGOTIATED) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_NSVC_ST_OP_DISABLED_NOTINSTALLED) | X(NM_GPRS_NSVC_ST_OP_DISABLED_OFFLINE) | @@ -341,7 +366,8 @@ .in_event_mask = X(NM_EV_STATE_CHG_REP) | X(NM_EV_FEATURE_NEGOTIATED) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_GPRS_NSVC_ST_OP_DISABLED_NOTINSTALLED) | X(NM_GPRS_NSVC_ST_OP_DISABLED_DEPENDENCY) |
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/nm_rcarrier_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/nm_rcarrier_fsm.c
Changed
@@ -71,6 +71,7 @@ switch (event) { case NM_EV_SW_ACT_REP: + case NM_EV_SETUP_RAMP_READY: break; case NM_EV_STATE_CHG_REP: nsd = (struct nm_statechg_signal_data *)data; @@ -100,6 +101,9 @@ { struct msgb *msgb; + if (bts_setup_ramp_wait(trx->bts)) + return; + if (!trx->mo.set_attr_sent && !trx->mo.set_attr_ack_received) { trx->mo.set_attr_sent = true; msgb = nanobts_gen_set_radio_attr(trx->bts, trx); @@ -175,6 +179,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(trx, &trx->mo.nm_state, false); + break; default: OSMO_ASSERT(0); } @@ -221,6 +228,9 @@ default: return; } + case NM_EV_SETUP_RAMP_READY: + configure_loop(trx, &trx->mo.nm_state, true); + break; default: OSMO_ASSERT(0); } @@ -326,7 +336,8 @@ NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED = { .in_event_mask = X(NM_EV_SW_ACT_REP) | - X(NM_EV_STATE_CHG_REP), + X(NM_EV_STATE_CHG_REP) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY) | X(NM_RCARRIER_ST_OP_DISABLED_OFFLINE) | @@ -338,7 +349,8 @@ NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) | X(NM_RCARRIER_ST_OP_DISABLED_OFFLINE) | @@ -350,7 +362,8 @@ NM_RCARRIER_ST_OP_DISABLED_OFFLINE = { .in_event_mask = X(NM_EV_STATE_CHG_REP) | - X(NM_EV_SET_ATTR_ACK), + X(NM_EV_SET_ATTR_ACK) | + X(NM_EV_SETUP_RAMP_READY), .out_state_mask = X(NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) | X(NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY) | @@ -360,15 +373,15 @@ .action = st_op_disabled_offline, }, NM_RCARRIER_ST_OP_ENABLED = { - .in_event_mask = - X(NM_EV_STATE_CHG_REP), - .out_state_mask = - X(NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) | - X(NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY) | - X(NM_RCARRIER_ST_OP_DISABLED_OFFLINE), - .name = "ENABLED", - .onenter = st_op_enabled_on_enter, - .action = st_op_enabled, + .in_event_mask = + X(NM_EV_STATE_CHG_REP), + .out_state_mask = + X(NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED) | + X(NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY) | + X(NM_RCARRIER_ST_OP_DISABLED_OFFLINE), + .name = "ENABLED", + .onenter = st_op_enabled_on_enter, + .action = st_op_enabled, }, };
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/osmo_bsc_lcls.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/osmo_bsc_lcls.c
Changed
@@ -30,6 +30,7 @@ #include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/osmo_bsc_lcls.h> #include <osmocom/bsc/lchan_rtp_fsm.h> +#include <osmocom/bsc/lchan.h> #include <osmocom/mgcp_client/mgcp_client_endpoint_fsm.h> struct value_string lcls_event_names = { @@ -561,7 +562,7 @@ case LCLS_EV_UPDATE_CFG_CSC: if (lcls_handle_cfg_update(conn, data) != 0) return; - //FIXME osmo_fsm_inst_state_chg(fi, + //FIXME osmo_fsm_inst_state_chg(fi, return; case LCLS_EV_APPLY_CFG_CSC: if (lcls_perform_correlation(conn) != 0) {
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/osmo_bsc_main.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/osmo_bsc_main.c
Changed
@@ -91,12 +91,12 @@ static const char *rf_ctrl = NULL; static int daemonize = 0; -static void print_usage() +static void print_usage(void) { printf("Usage: osmo-bsc\n"); } -static void print_help() +static void print_help(void) { printf("Some useful options:\n"); printf(" -h --help This text.\n"); @@ -401,6 +401,8 @@ bts->si_common.chan_desc.ccch_conf = (n << 1); } + bts_setup_ramp_init_bts(bts); + /* ACC ramping is initialized from vty/config */ /* Initialize the BTS state */ @@ -486,8 +488,7 @@ } /* start telnet after reading config for vty_get_bind_addr() */ - rc = telnet_init_dynif(tall_bsc_ctx, bsc_gsmnet, vty_get_bind_addr(), - OSMO_VTY_PORT_NITB_BSC); + rc = telnet_init_default(tall_bsc_ctx, bsc_gsmnet, OSMO_VTY_PORT_NITB_BSC); if (rc < 0) return rc; @@ -518,6 +519,11 @@ vty->node = CONFIG_NODE; vty->index = NULL; break; + case MGW_NODE: + vty->node = GSMNET_NODE; + vty->index = bsc_gsmnet; + vty->index_sub = NULL; + break; case BTS_NODE: vty->node = GSMNET_NODE; { @@ -614,7 +620,9 @@ .copyright = "Copyright (C) 2008-2018 Harald Welte, Holger Freyther\r\n" "Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt\r\n" - "Dieter Spaar, Andreas Eversberg, Sylvain Munaut, Neels Hofmeyr\r\n\r\n" + "Dieter Spaar, Andreas Eversberg, Sylvain Munaut, Neels Hofmeyr\r\n" + "Copyright (C) 2013-2022 sysmocom - s.f.m.c. GmbH\r\n" + "\r\n" "License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html>\r\n" "This is free software: you are free to change and redistribute it.\r\n" "There is NO WARRANTY, to the extent permitted by law.\r\n", @@ -829,7 +837,7 @@ struct mgcp_client *mgcp_client_single; unsigned int pool_members_initalized; - /* Initalize MGW pool. This initalizes and connects all MGCP clients that are currently configured in + /* Initialize MGW pool. This initalizes and connects all MGCP clients that are currently configured in * the pool. Adding additional MGCP clients to the pool is possible but the user has to configure and * (re)connect them manually from the VTY. */ pool_members_initalized = mgcp_client_pool_connect(bsc_gsmnet->mgw.mgw_pool); @@ -843,7 +851,7 @@ /* Initialize and connect a single MGCP client. This MGCP client will appear as the one and only pool * member if there is no MGW pool configured. */ LOGP(DNM, LOGL_NOTICE, "No MGW pool configured, using MGW configuration in VTY node 'msc'\n"); - mgcp_client_single = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); + mgcp_client_single = mgcp_client_init(bsc_gsmnet, bsc_gsmnet->mgw.conf); if (!mgcp_client_single) { LOGP(DNM, LOGL_ERROR, "MGW (single) client initalization failed\n"); return -EINVAL; @@ -941,9 +949,7 @@ /* start control interface after reading config for * ctrl_vty_get_bind_addr() */ - bsc_gsmnet->ctrl = bsc_controlif_setup(bsc_gsmnet, - ctrl_vty_get_bind_addr(), - OSMO_CTRL_PORT_NITB_BSC); + bsc_gsmnet->ctrl = bsc_controlif_setup(bsc_gsmnet, OSMO_CTRL_PORT_NITB_BSC); if (!bsc_gsmnet->ctrl) { fprintf(stderr, "Failed to init the control interface. Exiting.\n"); exit(1); @@ -989,6 +995,9 @@ } } + if (bsc_mgw_setup() != 0) + exit(1); + llist_for_each_entry(msc, &bsc_gsmnet->mscs, entry) { if (osmo_bsc_msc_init(msc) != 0) { LOGP(DMSC, LOGL_ERROR, "Failed to start up. Exiting.\n"); @@ -996,9 +1005,6 @@ } } - if (bsc_mgw_setup() != 0) - exit(1); - if (osmo_bsc_sigtran_init(&bsc_gsmnet->mscs) != 0) { LOGP(DNM, LOGL_ERROR, "Failed to initialize sigtran backhaul.\n"); exit(1);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/osmo_bsc_msc.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/osmo_bsc_msc.c
Changed
@@ -40,6 +40,7 @@ #include <osmocom/abis/ipa.h> #include <osmocom/mgcp_client/mgcp_client.h> +#include <osmocom/mgcp_client/mgcp_client_pool.h> #include <sys/socket.h> #include <netinet/tcp.h> @@ -163,27 +164,32 @@ int osmo_bsc_msc_init(struct bsc_msc_data *msc) { struct gsm_network *net = msc->network; - uint16_t mgw_port; + struct mgcp_client *mgcp_cli; int rc; /* Everything below refers to SCCP-Lite MSC connections only. */ if (msc_is_aoip(msc)) return 0; - if (net->mgw.conf->remote_port >= 0) - mgw_port = net->mgw.conf->remote_port; - else - mgw_port = MGCP_CLIENT_REMOTE_PORT_DEFAULT; - + /* Note: MGW is preselected here at startup, which means currently + * osmo-bsc configured for SCCPLite doesn't support MGW pools with more + * than 1 MGW. + */ + mgcp_cli = mgcp_client_pool_get(net->mgw.mgw_pool); + OSMO_ASSERT(mgcp_cli); rc = osmo_sock_init2_ofd(&msc->mgcp_ipa.ofd, AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP, msc->mgcp_ipa.local_addr, msc->mgcp_ipa.local_port, - net->mgw.conf->remote_addr, mgw_port, + mgcp_client_remote_addr_str(mgcp_cli), + mgcp_client_remote_port(mgcp_cli), OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT); + mgcp_client_pool_put(mgcp_cli); if (rc < 0) { LOGP(DMSC, LOGL_ERROR, "msc %u: Could not create/connect/bind MGCP proxy socket: %d\n", msc->nr, rc); return rc; } + LOGP(DMSC, LOGL_INFO, "msc %u: Socket forwarding IPA-encapsulated MGCP messages towards MGW: %s\n", + msc->nr, osmo_sock_get_name2(msc->mgcp_ipa.ofd.fd)); return 0; }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/paging.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/paging.c
Changed
@@ -61,8 +61,6 @@ /* How many paging requests to Tx on RSL at max before going back to main loop */ #define MAX_PAGE_REQ_PER_ITER 10 -#define MAX_TX_DELAY_TIME_SEC 60 - /* How often to attempt sending new paging requests (initial, not retrans): 250ms */ static const struct timespec initial_period = { .tv_sec = 0, @@ -83,17 +81,25 @@ /* * Kill one paging request update the internal list... */ -static void paging_remove_request(struct gsm_bts_paging_state *paging_bts, - struct gsm_paging_request *to_be_deleted) +static void paging_remove_request(struct gsm_paging_request *req) { - to_be_deleted->bsub->active_paging_requests--; - osmo_timer_del(&to_be_deleted->T3113); - llist_del(&to_be_deleted->entry); - paging_bts->pending_requests_len--; - bsc_subscr_put(to_be_deleted->bsub, BSUB_USE_PAGING_REQUEST); - talloc_free(to_be_deleted); - if (llist_empty(&paging_bts->pending_requests)) - osmo_timer_del(&paging_bts->work_timer); + struct gsm_bts *bts = req->bts; + struct gsm_bts_paging_state *bts_pag_st = &bts->paging; + + osmo_timer_del(&req->T3113); + llist_del(&req->entry); + if (req->attempts == 0) { + bts_pag_st->initial_req_list_len--; + bts_pag_st->initial_req_pgroup_countsreq->pgroup--; + } else { + bts_pag_st->retrans_req_list_len--; + } + osmo_stat_item_dec(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_REQ_QUEUE_LENGTH), 1); + bsc_subscr_remove_active_paging_request(req->bsub, req); + talloc_free(req); + + if (llist_empty(&bts_pag_st->initial_req_list) && llist_empty(&bts_pag_st->retrans_req_list)) + osmo_timer_del(&bts_pag_st->work_timer); } static void page_ms(struct gsm_paging_request *request) @@ -136,6 +142,13 @@ paging_handle_pending_requests(paging_bts); } +/* Placeholder to set the value and update the related osmo_stat: */ +static void paging_set_available_slots(struct gsm_bts *bts, uint16_t available_slots) +{ + bts->paging.available_slots = available_slots; + osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_AVAILABLE_SLOTS), available_slots); +} + static void paging_give_credit(void *data) { struct gsm_bts_paging_state *paging_bts_st = data; @@ -145,7 +158,7 @@ LOG_BTS(bts, DPAG, LOGL_INFO, "Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots %u -> %u)\n", paging_bts_st->available_slots, estimated_slots); - paging_bts_st->available_slots = estimated_slots; + paging_set_available_slots(bts, estimated_slots); paging_schedule_if_needed(paging_bts_st); osmo_timer_schedule(&bts->paging.credit_timer, load_ind_timeout, 0); } @@ -200,95 +213,182 @@ return bts->paging.free_chans_need > count; } -/* - * This is kicked by the periodic PAGING LOAD Indicator - * coming from abis_rsl.c - * - * We attempt to iterate once over the list of items but - * only upto available_slots. +static void paging_req_timeout_retrans(struct gsm_paging_request *request, const struct timespec *now) +{ + struct gsm_bts_paging_state *bts_pag_st = &request->bts->paging; + page_ms(request); + paging_set_available_slots(request->bts, bts_pag_st->available_slots - 1); + + if (request->attempts == 0) { + /* req is removed from initial_req_list and inserted into retrans_req_list, update list lengths: */ + bts_pag_st->initial_req_list_len--; + bts_pag_st->initial_req_pgroup_countsrequest->pgroup--; + bts_pag_st->retrans_req_list_len++; + } + llist_del(&request->entry); + llist_add_tail(&request->entry, &bts_pag_st->retrans_req_list); + + request->last_attempt_ts = *now; + request->attempts++; +} + +/* Returns number of paged initial requests (up to max_page_req_per_iter). + * Returning work_done=false means the work timer has been scheduled internally and the caller should avoid processing + * further requests right now. */ -static void paging_handle_pending_requests(struct gsm_bts_paging_state *paging_bts) +static unsigned int step_page_initial_reqs(struct gsm_bts_paging_state *bts_pag_st, unsigned int max_page_req_per_iter, + const struct timespec *now, bool *work_done) { - struct gsm_paging_request *request, *initial_request; + struct gsm_paging_request *request, *request2; unsigned int num_paged = 0; - struct gsm_bts *bts = paging_bts->bts; - struct timespec now, retrans_ts; - /* - * Determine if the pending_requests list is empty and - * return then. - */ - if (llist_empty(&paging_bts->pending_requests)) { - /* since the list is empty, no need to reschedule the timer */ - return; + llist_for_each_entry_safe(request, request2, &bts_pag_st->initial_req_list, entry) { + /* We run out of available slots. Wait until next CCCH Load Ind + * arrives or credit_timer triggers to keep processing requests. + */ + if (bts_pag_st->available_slots == 0) { + LOG_PAGING_BTS(request, request->bts, DPAG, LOGL_INFO, + "Paging delayed: waiting for available slots at BTS\n"); + *work_done = false; + return num_paged; + } + + if (num_paged == max_page_req_per_iter) { + goto sched_next_iter; + } + + /* we need to determine the number of free channels */ + if (bts_pag_st->free_chans_need != -1 && + can_send_pag_req(request->bts, request->chan_type) != 0) { + LOG_PAGING_BTS(request, request->bts, DPAG, LOGL_INFO, + "Paging delayed: not enough free channels (<%d)\n", + bts_pag_st->free_chans_need); + goto sched_next_iter; + } + + /* handle the paging request now */ + paging_req_timeout_retrans(request, now); + num_paged++; } - osmo_clock_gettime(CLOCK_MONOTONIC, &now); - paging_bts->last_sched_ts = now; + *work_done = true; + return num_paged; + +sched_next_iter: + LOG_BTS(bts_pag_st->bts, DPAG, LOGL_DEBUG, "Scheduling next batch in %lld.%06lds (available_slots=%u)\n", + (long long)initial_period.tv_sec, initial_period.tv_nsec / 1000, + bts_pag_st->available_slots); + osmo_timer_schedule(&bts_pag_st->work_timer, initial_period.tv_sec, initial_period.tv_nsec / 1000); + *work_done = false; + return num_paged; +} - /* do while loop: Try send at most first MAX_PAGE_REQ_PER_ITER paging - * requests (or before if there are no more available slots). Since - * transmitted requests are re-appended at the end of the list, we check - * until we find the first req again, in order to avoid retransmitting - * repeated requests until next time paging is scheduled. */ - initial_request = llist_first_entry(&paging_bts->pending_requests, +static unsigned int step_page_retrans_reqs(struct gsm_bts_paging_state *bts_pag_st, unsigned int max_page_req_per_iter, + const struct timespec *now) +{ + struct gsm_paging_request *request, *initial_request; + unsigned int num_paged = 0; + struct timespec retrans_ts; + + /* do while loop: Try send at most first max_page_req_per_iter paging + * requests. Since transmitted requests are re-appended at the end of + * the list, we check until we find the first req again, in order to + * avoid retransmitting repeated requests until next time paging is + * scheduled. */ + initial_request = llist_first_entry_or_null(&bts_pag_st->retrans_req_list, struct gsm_paging_request, entry); + if (!initial_request) + return num_paged; + request = initial_request; do { /* We run out of available slots. Wait until next CCCH Load Ind * arrives or credit_timer triggers to keep processing requests. */ - if (paging_bts->available_slots == 0) { + if (bts_pag_st->available_slots == 0) { LOG_PAGING_BTS(request, request->bts, DPAG, LOGL_INFO, "Paging delayed: waiting for available slots at BTS\n"); - return; + return num_paged; } /* we need to determine the number of free channels */ - if (paging_bts->free_chans_need != -1 && + if (bts_pag_st->free_chans_need != -1 && can_send_pag_req(request->bts, request->chan_type) != 0) { LOG_PAGING_BTS(request, request->bts, DPAG, LOGL_INFO, "Paging delayed: not enough free channels (<%d)\n", - paging_bts->free_chans_need); + bts_pag_st->free_chans_need); goto sched_next_iter; } - /* If we reach around back of the queue (retransmitions), check - * if time to retransmit has elapsed. Otherwise, wait until its - * time to retransmit. */ - if (request->attempts > 0) { - timespecadd(&request->last_attempt_ts, &retrans_period, &retrans_ts); - if (timespeccmp(&now, &retrans_ts, <)) { - struct timespec tdiff; - timespecsub(&retrans_ts, &now, &tdiff); - LOG_PAGING_BTS(request, request->bts, DPAG, LOGL_DEBUG, - "Paging delayed: retransmission happens in %lld.%06lds\n", - (long long)tdiff.tv_sec, tdiff.tv_nsec / 1000); - osmo_timer_schedule(&paging_bts->work_timer, tdiff.tv_sec, tdiff.tv_nsec / 1000); - return; - } + /* Check if time to retransmit has elapsed. Otherwise, wait until its time to retransmit. */ + timespecadd(&request->last_attempt_ts, &retrans_period, &retrans_ts); + if (timespeccmp(now, &retrans_ts, <)) { + struct timespec tdiff; + timespecsub(&retrans_ts, now, &tdiff); + LOG_PAGING_BTS(request, request->bts, DPAG, LOGL_DEBUG, + "Paging delayed: retransmission happens in %lld.%06lds\n", + (long long)tdiff.tv_sec, tdiff.tv_nsec / 1000); + osmo_timer_schedule(&bts_pag_st->work_timer, tdiff.tv_sec, tdiff.tv_nsec / 1000); + return num_paged; } + if (num_paged >= max_page_req_per_iter) + goto sched_next_iter; + /* handle the paging request now */ - page_ms(request); - paging_bts->available_slots--; - request->last_attempt_ts = now; - request->attempts++; + paging_req_timeout_retrans(request, now); num_paged++; - llist_del(&request->entry); - llist_add_tail(&request->entry, &paging_bts->pending_requests); - request = llist_first_entry(&paging_bts->pending_requests, + request = llist_first_entry(&bts_pag_st->retrans_req_list, struct gsm_paging_request, entry); - } while (request != initial_request && num_paged < MAX_PAGE_REQ_PER_ITER); + } while (request != initial_request); + + /* Reaching this code paths means all retrans request have been scheduled (and intial_req_list is empty). + * Hence, reeschedule ourselves to now + retrans_period. */ + osmo_timer_schedule(&bts_pag_st->work_timer, retrans_period.tv_sec, retrans_period.tv_nsec / 1000); + return num_paged; - /* Once done iterating, prepare next scheduling: */ sched_next_iter: - LOG_BTS(bts, DPAG, LOGL_DEBUG, "Paged %u subscribers during last iteration. " - "Scheduling next batch in %lld.%06lds (available_slots=%u)\n", - num_paged, (long long)initial_period.tv_sec, initial_period.tv_nsec / 1000, - paging_bts->available_slots); - osmo_timer_schedule(&paging_bts->work_timer, initial_period.tv_sec, initial_period.tv_nsec / 1000); + LOG_BTS(bts_pag_st->bts, DPAG, LOGL_DEBUG, "Scheduling next batch in %lld.%06lds (available_slots=%u)\n", + (long long)initial_period.tv_sec, initial_period.tv_nsec / 1000, + bts_pag_st->available_slots); + osmo_timer_schedule(&bts_pag_st->work_timer, initial_period.tv_sec, initial_period.tv_nsec / 1000); + return num_paged; +} + +/* + * This is kicked by the periodic PAGING LOAD Indicator + * coming from abis_rsl.c + * + * We attempt to iterate once over the list of items but + * only upto available_slots. + */ +static void paging_handle_pending_requests(struct gsm_bts_paging_state *paging_bts) +{ + unsigned int num_paged_initial, num_paged_retrans = 0; + unsigned int max_page_req_per_iter = MAX_PAGE_REQ_PER_ITER; + struct timespec now; + bool work_done = false; + + /* + * Determine if the pending_requests list is empty and + * return then. + */ + if (llist_empty(&paging_bts->initial_req_list) && + llist_empty(&paging_bts->retrans_req_list)) { + /* since the lists are empty, no need to reschedule the timer */ + return; + } + + osmo_clock_gettime(CLOCK_MONOTONIC, &now); + paging_bts->last_sched_ts = now; + + num_paged_initial = step_page_initial_reqs(paging_bts, max_page_req_per_iter, &now, &work_done); + if (work_done) /* All work done for initial requests, work on retransmissions now: */ + num_paged_retrans = step_page_retrans_reqs(paging_bts, max_page_req_per_iter - num_paged_initial, &now); + + LOG_BTS(paging_bts->bts, DPAG, LOGL_DEBUG, "Paged %u subscribers (%u initial, %u retrans) during last iteration\n", + num_paged_initial + num_paged_retrans, num_paged_initial, num_paged_retrans); } static void paging_worker(void *data) @@ -303,8 +403,9 @@ { bts->paging.bts = bts; bts->paging.free_chans_need = -1; - bts->paging.available_slots = 0; - INIT_LLIST_HEAD(&bts->paging.pending_requests); + paging_set_available_slots(bts, 0); + INIT_LLIST_HEAD(&bts->paging.initial_req_list); + INIT_LLIST_HEAD(&bts->paging.retrans_req_list); osmo_timer_setup(&bts->paging.work_timer, paging_worker, &bts->paging); osmo_timer_setup(&bts->paging.credit_timer, paging_give_credit, &bts->paging); } @@ -331,11 +432,11 @@ /* If last BTS paging times out (active_paging_requests will be * decremented in paging_remove_request below): */ - if (req->bsub->active_paging_requests == 1) + if (req->bsub->active_paging_requests_len == 1) rate_ctr_inc(rate_ctr_group_get_ctr(bsc_gsmnet->bsc_ctrs, BSC_CTR_PAGING_EXPIRED)); /* destroy it now. Do not access req afterwards */ - paging_remove_request(&req->bts->paging, req); + paging_remove_request(req); log_set_context(LOG_CTX_BSC_SUBSCR, NULL); } @@ -345,7 +446,7 @@ unsigned int num_reqs_same_pgroup); static unsigned int calculate_timer_3113(struct gsm_paging_request *req, unsigned int reqs_before, - unsigned int reqs_before_same_pgroup) + unsigned int reqs_before_same_pgroup, unsigned int max_dynamic_value) { unsigned int to_us, estimated_to, to; struct gsm_bts *bts = req->bts; @@ -379,9 +480,9 @@ /* ceiling in seconds + extra time */ estimated_to = (to_us + 999999) / 1000000 + d->val; - /* upper bound: 60s (OS#5553) */ - if (estimated_to > MAX_TX_DELAY_TIME_SEC) - to = MAX_TX_DELAY_TIME_SEC; + /* upper bound: see X3113, PAGING_THRESHOLD_X3113_DEFAULT_SEC */ + if (estimated_to > max_dynamic_value) + to = max_dynamic_value; else to = estimated_to; @@ -389,7 +490,7 @@ "Paging request: T3113 expires in %u seconds (estimated %u)\n", to, estimated_to); ret: - osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_T3113), to); + osmo_stat_item_set(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_T3113), to); return to; } @@ -402,77 +503,66 @@ static int _paging_request(const struct bsc_paging_params *params, struct gsm_bts *bts) { struct gsm_bts_paging_state *bts_entry = &bts->paging; - struct gsm_paging_request *req, *last_initial_req = NULL; + struct gsm_paging_request *req; unsigned int t3113_timeout_s; - unsigned int reqs_before = 0, reqs_before_same_pgroup = 0; - uint8_t pgroup = gsm0502_calc_paging_group(&bts->si_common.chan_desc, - str_to_imsi(params->bsub->imsi)); + unsigned int x3113_s = osmo_tdef_get(bts->network->T_defs, -3113, OSMO_TDEF_S, -1); + uint8_t pgroup; + unsigned int reqs_before, reqs_before_same_pgroup; rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_ATTEMPTED)); - /* don't try to queue more requests than we can realistically handle within MAX_TX_DELAY_TIME_SEC seconds */ - if (paging_pending_requests_nr(bts) > paging_estimate_available_slots(bts, MAX_TX_DELAY_TIME_SEC)) { - rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_OVERLOAD)); - return -ENOSPC; + /* Find if we already have one for the given subscriber on this BTS: */ + if (bsc_subscr_find_req_by_bts(params->bsub, bts)) { + LOG_PAGING_BTS(params, bts, DPAG, LOGL_INFO, "Paging request already pending for this subscriber\n"); + rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_ALREADY)); + return -EEXIST; } - /* Iterate list of pending requests to find if we already have one for - * the given subscriber. While on it, find the last - * not-yet-ever-once-transmitted request; the new request will be added - * immediately after it, giving higher prio to initial transmissions - * (no retrans). This avoids new subscribers being paged to be delayed - * if the paging queue is full due to a lot of retranmissions. - * Retranmissions usually mean MS are not reachable/available, so the - * rationale here is to prioritize new subs which may be available. */ - llist_for_each_entry(req, &bts_entry->pending_requests, entry) { - if (params->bsub == req->bsub) { - LOG_PAGING_BTS(params, bts, DPAG, LOGL_INFO, "Paging request already pending for this subscriber\n"); - rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_ALREADY)); - return -EEXIST; - } - if (req->attempts == 0) { - last_initial_req = req; - reqs_before++; - if (req->pgroup == pgroup) - reqs_before_same_pgroup++; - } else if (last_initial_req == NULL) { - /* If no req with attempts=0 was found, we'll append to end of list, so keep counting. */ - reqs_before++; - if (req->pgroup == pgroup) - reqs_before_same_pgroup++; + /* Don't try to queue more requests than we can realistically handle within X3113 seconds, + * see PAGING_THRESHOLD_X3113_DEFAULT_SEC. */ + if (paging_pending_requests_nr(bts) > paging_estimate_available_slots(bts, x3113_s)) { + struct gsm_paging_request *first_retrans_req; + rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_OVERLOAD)); + /* Need to drop a retrans from the queue if possible, in order to make space for the new initial req. */ + if (bts_entry->retrans_req_list_len == 0) { + /* There are no retrans to be replaced by this initial request, discard it. */ + return -ENOSPC; } + first_retrans_req = llist_first_entry(&bts_entry->retrans_req_list, struct gsm_paging_request, entry); + paging_remove_request(first_retrans_req); } + pgroup = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(params->bsub->imsi)); + reqs_before = bts_entry->initial_req_list_len; + reqs_before_same_pgroup = bts_entry->initial_req_pgroup_countspgroup; + LOG_PAGING_BTS(params, bts, DPAG, LOGL_DEBUG, "Start paging\n"); - params->bsub->active_paging_requests++; req = talloc_zero(tall_paging_ctx, struct gsm_paging_request); OSMO_ASSERT(req); req->reason = params->reason; req->bsub = params->bsub; - bsc_subscr_get(req->bsub, BSUB_USE_PAGING_REQUEST); req->bts = bts; req->chan_type = params->chan_needed; req->pgroup = pgroup; req->msc = params->msc; osmo_timer_setup(&req->T3113, paging_T3113_expired, req); + bsc_subscr_add_active_paging_request(req->bsub, req); - bts_entry->pending_requests_len++; - /* there's no initial req (attempts==0), add to the start of the list */ - if (last_initial_req == NULL) - llist_add(&req->entry, &bts_entry->pending_requests); - else/* Add in the middle of the list after last_initial_req */ - __llist_add(&req->entry, &last_initial_req->entry, last_initial_req->entry.next); + bts_entry->initial_req_list_len++; + bts_entry->initial_req_pgroup_countsreq->pgroup++; + osmo_stat_item_inc(osmo_stat_item_group_get_item(bts->bts_statg, BTS_STAT_PAGING_REQ_QUEUE_LENGTH), 1); + llist_add_tail(&req->entry, &bts_entry->initial_req_list); - t3113_timeout_s = calculate_timer_3113(req, reqs_before, reqs_before_same_pgroup); + t3113_timeout_s = calculate_timer_3113(req, reqs_before, reqs_before_same_pgroup, x3113_s); osmo_timer_schedule(&req->T3113, t3113_timeout_s, 0); /* Trigger scheduler if needed: */ if (!osmo_timer_pending(&bts_entry->work_timer)) { paging_handle_pending_requests(bts_entry); - } else if (last_initial_req == NULL) { + } else if (bts_entry->initial_req_list_len == 1) { /* Worker timer is armed -> there was already one req before - * last_initial_req is NULL -> There were no initial requests in - * the list, aka the timer is waiting for retransmition, + * bts_entry->initial_req_list_len == 1 -> There were no initial requests + * in the list, aka the timer is waiting for retransmition, * which is a longer period. * Let's recaculate the time to adapt it to initial_period: */ struct timespec now, elapsed, tdiff; @@ -517,100 +607,80 @@ return 1; } -/*! Stop paging a given subscriber on a given BTS. - * \paramout returns the MSC that paged the subscriber, if any. - * \paramout returns the reason for a pending paging, if any. - * \paramin bts BTS which has received a paging response. - * \paramin bsub subscriber. - * \returns number of pending pagings. - */ -static int paging_request_stop_bts(struct bsc_msc_data **msc_p, enum bsc_paging_reason *reason_p, - struct gsm_bts *bts, struct bsc_subscr *bsub) -{ - struct gsm_bts_paging_state *bts_entry = &bts->paging; - struct gsm_paging_request *req, *req2; - - *msc_p = NULL; - *reason_p = BSC_PAGING_NONE; - - llist_for_each_entry_safe(req, req2, &bts_entry->pending_requests, - entry) { - if (req->bsub != bsub) - continue; - *msc_p = req->msc; - *reason_p = req->reason; - LOG_PAGING_BTS(req, bts, DPAG, LOGL_DEBUG, "Stop paging\n"); - paging_remove_request(&bts->paging, req); - return 1; - } - - return 0; -} - /*! Stop paging on all cells and return the MSC that paged (if any) and all pending paging reasons. * \paramout returns the MSC that paged the subscriber, if there was a pending request. * \paramout returns the ORed bitmask of all reasons of pending pagings. * \paramin bts BTS which has received a paging response * \paramin bsub subscriber - * \returns number of pending pagings. */ -int paging_request_stop(struct bsc_msc_data **msc_p, enum bsc_paging_reason *reasons_p, +void paging_request_stop(struct bsc_msc_data **msc_p, enum bsc_paging_reason *reasons_p, struct gsm_bts *bts, struct bsc_subscr *bsub) { - struct gsm_bts *bts_i; - struct bsc_msc_data *paged_from_msc; - int count; - enum bsc_paging_reason reasons; + struct bsc_msc_data *paged_from_msc = NULL; + enum bsc_paging_reason reasons = BSC_PAGING_NONE; OSMO_ASSERT(bts); + struct gsm_paging_request *req = bsc_subscr_find_req_by_bts(bsub, bts); - count = paging_request_stop_bts(&paged_from_msc, &reasons, bts, bsub); - if (paged_from_msc) { - count++; + /* Avoid accessing bsub after reaching 0 active_paging_request_len, + * since it could be freed during put(): */ + unsigned remaining = bsub->active_paging_requests_len; + + if (req) { + paged_from_msc = req->msc; + reasons = req->reason; + LOG_PAGING_BTS(req, bts, DPAG, LOGL_DEBUG, "Stop paging\n"); rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_RESPONDED)); rate_ctr_inc(rate_ctr_group_get_ctr(bts->network->bsc_ctrs, BSC_CTR_PAGING_RESPONDED)); + paging_remove_request(req); + remaining--; } - llist_for_each_entry(bts_i, &bsc_gsmnet->bts_list, list) { - struct bsc_msc_data *paged_from_msc2; - enum bsc_paging_reason reason2; - count += paging_request_stop_bts(&paged_from_msc2, &reason2, bts_i, bsub); - if (paged_from_msc2) { - reasons |= reason2; - if (!paged_from_msc) { - /* If this happened, it would be a bit weird: it means there was no Paging Request - * pending on the BTS that sent the Paging Reponse, but there *is* a Paging Request - * pending on a different BTS. But why not return an MSC when we found one. */ - paged_from_msc = paged_from_msc2; - } + while (remaining > 0) { + struct gsm_paging_request *req; + req = llist_first_entry(&bsub->active_paging_requests, + struct gsm_paging_request, bsub_entry); + LOG_PAGING_BTS(req, req->bts, DPAG, LOGL_DEBUG, "Stop paging\n"); + reasons |= req->reason; + if (!paged_from_msc) { + /* If this happened, it would be a bit weird: it means there was no Paging Request + * pending on the BTS that sent the Paging Response, but there *is* a Paging Request + * pending on a different BTS. But why not return an MSC when we found one. */ + paged_from_msc = req->msc; } + paging_remove_request(req); + remaining--; } *msc_p = paged_from_msc; *reasons_p = reasons; - - return count; } /* Remove all paging requests, for specific reasons only. */ -int paging_request_cancel(struct bsc_subscr *bsub, enum bsc_paging_reason reasons) +void paging_request_cancel(struct bsc_subscr *bsub, enum bsc_paging_reason reasons) { - struct gsm_bts *bts; - int count = 0; + struct gsm_paging_request *req, *req2; + OSMO_ASSERT(bsub); - llist_for_each_entry(bts, &bsc_gsmnet->bts_list, list) { - struct gsm_paging_request *req, *req2; + /* Avoid accessing bsub after reaching 0 active_paging_request_len, + * since it could be freed during put(): */ + unsigned remaining = bsub->active_paging_requests_len; - llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) { - if (req->bsub != bsub) - continue; - if (!(req->reason & reasons)) - continue; - LOG_PAGING_BTS(req, bts, DPAG, LOGL_DEBUG, "Cancel paging\n"); - paging_remove_request(&bts->paging, req); - count++; + llist_for_each_entry_safe(req, req2, &bsub->active_paging_requests, bsub_entry) { + if (!(req->reason & reasons)) + continue; + LOG_PAGING_BTS(req, req->bts, DPAG, LOGL_DEBUG, "Cancel paging reasons=0x%x\n", + reasons); + if (req->reason & ~reasons) { + /* Other reasons are active, simply drop the reasons from func arg: */ + req->reason &= ~reasons; + continue; } + /* No reason to keep the paging, remove it: */ + paging_remove_request(req); + remaining--; + if (remaining == 0) + break; } - return count; } /*! Update the BTS paging buffer slots on given BTS */ @@ -618,7 +688,7 @@ { LOG_BTS(bts, DPAG, LOGL_DEBUG, "Rx CCCH Load Indication from BTS (available_slots %u -> %u)\n", bts->paging.available_slots, free_slots); - bts->paging.available_slots = free_slots; + paging_set_available_slots(bts, free_slots); /* Re-arm credit_timer if needed */ if (trx_is_usable(bts->c0)) { paging_schedule_if_needed(&bts->paging); @@ -628,9 +698,9 @@ } /*! Count the number of pending paging requests on given BTS */ -unsigned int paging_pending_requests_nr(struct gsm_bts *bts) +unsigned int paging_pending_requests_nr(const struct gsm_bts *bts) { - return bts->paging.pending_requests_len; + return bts->paging.initial_req_list_len + bts->paging.retrans_req_list_len; } /*! Flush all paging requests at a given BTS for a given MSC (or NULL if all MSC should be flushed). */ @@ -638,14 +708,19 @@ { struct gsm_paging_request *req, *req2; int num_cancelled = 0; + int i; - llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) { - if (msc && req->msc != msc) - continue; - /* now give up the data structure */ - LOG_PAGING_BTS(req, bts, DPAG, LOGL_DEBUG, "Stop paging (flush)\n"); - paging_remove_request(&bts->paging, req); - num_cancelled++; + struct llist_head *lists = { &bts->paging.initial_req_list, &bts->paging.retrans_req_list }; + + for (i = 0; i < ARRAY_SIZE(lists); i++) { + llist_for_each_entry_safe(req, req2, listsi, entry) { + if (msc && req->msc != msc) + continue; + /* now give up the data structure */ + LOG_PAGING_BTS(req, bts, DPAG, LOGL_DEBUG, "Stop paging (flush)\n"); + paging_remove_request(req); + num_cancelled++; + } } rate_ctr_add(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_MSC_FLUSH), num_cancelled); @@ -660,10 +735,18 @@ paging_flush_bts(bts, msc); } +/* Shim to avoid problems when compiling against libosmocore <= 1.7.0, since + * gsm0502_get_n_pag_blocks() was not declared const despite being readonly. Once + * osmo-bsc depends on libosmocore > 1.7.0, this shim can be dropped. */ +static inline unsigned int _gsm0502_get_n_pag_blocks(const struct gsm48_control_channel_descr *chan_desc) +{ + return gsm0502_get_n_pag_blocks((struct gsm48_control_channel_descr *)chan_desc); +} + /*! Estimate available_slots credit over a time period, used when below CCCH Load Indication Threshold */ -uint16_t paging_estimate_available_slots(struct gsm_bts *bts, unsigned int time_span_s) +uint16_t paging_estimate_available_slots(const struct gsm_bts *bts, unsigned int time_span_s) { - unsigned int n_pag_blocks = gsm0502_get_n_pag_blocks(&bts->si_common.chan_desc); + unsigned int n_pag_blocks = _gsm0502_get_n_pag_blocks(&bts->si_common.chan_desc); uint16_t available_slots = n_pag_blocks * time_span_s * 1000000 / GSM51_MFRAME_DURATION_us; LOG_BTS(bts, DPAG, LOGL_DEBUG, "Estimated %u paging available_slots over %u seconds\n", available_slots, time_span_s); @@ -678,7 +761,7 @@ { unsigned int n_pag_blocks, n_mframes, time_us = 0; - n_pag_blocks = gsm0502_get_n_pag_blocks(&bts->si_common.chan_desc); + n_pag_blocks = _gsm0502_get_n_pag_blocks(&bts->si_common.chan_desc); /* First of all, we need to extend the timeout in relation to the amount * of paging requests in the BSC queue. In here we don't care about the @@ -711,6 +794,7 @@ struct gsm_bts *bts; struct gsm_bts_trx *trx; unsigned int load_ind_timeout; + uint16_t estimated_slots; if (signal != S_NM_RUNNING_CHG) return 0; @@ -738,7 +822,8 @@ LOG_BTS(bts, DPAG, LOGL_INFO, "C0 becomes available for paging\n"); /* Fill in initial credit */ load_ind_timeout = bts_no_ccch_load_ind_timeout_sec(bts); - bts->paging.available_slots = paging_estimate_available_slots(bts, load_ind_timeout); + estimated_slots = paging_estimate_available_slots(bts, load_ind_timeout); + paging_set_available_slots(bts, estimated_slots); /* Start scheduling credit_timer */ osmo_timer_schedule(&bts->paging.credit_timer, bts_no_ccch_load_ind_timeout_sec(bts), 0);
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/pcu_sock.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/pcu_sock.c
Changed
@@ -33,6 +33,7 @@ #include <osmocom/core/logging.h> #include <osmocom/gsm/l1sap.h> #include <osmocom/gsm/gsm0502.h> +#include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/pcu_if.h> @@ -45,8 +46,6 @@ #include <osmocom/bsc/bts_sm.h> static int pcu_sock_send(struct gsm_bts *bts, struct msgb *msg); -uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx); -int pcu_direct = 1; static const char *sapi_string = { PCU_IF_SAPI_RACH = "RACH", @@ -93,6 +92,20 @@ return msg; } +/* Check if the timeslot can be utilized as PDCH now + * (PDCH is currently active on BTS) */ +static bool ts_now_usable_as_pdch(const struct gsm_bts_trx_ts *ts) +{ + switch (ts->pchan_is) { + case GSM_PCHAN_PDCH: + /* NOTE: We currently only support Ericsson RBS as a BSC + * co-located BTS. This BTS only supports dynamic channels. */ + return true; + default: + return false; + } +} + /* Fill the frequency hopping parameter */ static void info_ind_fill_fhp(struct gsm_pcu_if_info_trx_ts *ts_info, const struct gsm_bts_trx_ts *ts) @@ -105,6 +118,48 @@ ts_info->ma_bit_len = ts->hopping.ma_len * 8 - ts->hopping.ma.cur_bit; } +/* Fill the TRX parameter */ +static void info_ind_fill_trx(struct gsm_pcu_if_info_trx *trx_info, const struct gsm_bts_trx *trx) +{ + unsigned int tn; + const struct gsm_bts_trx_ts *ts; + + trx_info->hlayer1 = 0x2342; + trx_info->pdch_mask = 0; + trx_info->arfcn = trx->arfcn; + + if (trx->mo.nm_state.operational != NM_OPSTATE_ENABLED || + trx->mo.nm_state.administrative != NM_STATE_UNLOCKED) { + LOG_TRX(trx, DPCU, LOGL_INFO, "unavailable for PCU (op=%s adm=%s)\n", + abis_nm_opstate_name(trx->mo.nm_state.operational), + abis_nm_admin_name(trx->mo.nm_state.administrative)); + return; + } + + for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) { + ts = &trx->tstn; + if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED) + continue; + if (!ts_now_usable_as_pdch(ts)) + continue; + + trx_info->pdch_mask |= (1 << tn); + trx_info->tstn.tsc = + (ts->tsc >= 0) ? ts->tsc : trx->bts->bsic & 7; + + if (ts->hopping.enabled) + info_ind_fill_fhp(&trx_info->tstn, ts); + + LOG_TRX(trx, DPCU, LOGL_INFO, "PDCH on ts=%u is available (tsc=%u ", ts->nr, + trx_info->tstn.tsc); + if (ts->hopping.enabled) + LOGPC(DPCU, LOGL_INFO, "hopping=yes hsn=%u maio=%u ma_bit_len=%u)\n", + ts->hopping.hsn, ts->hopping.maio, trx_info->tstn.ma_bit_len); + else + LOGPC(DPCU, LOGL_INFO, "hopping=no arfcn=%u)\n", trx->arfcn); + } +} + /* Send BTS properties to the PCU */ static int pcu_tx_info_ind(struct gsm_bts *bts) { @@ -115,16 +170,11 @@ struct gsm_bts_sm *bts_sm; struct gsm_gprs_nsvc *nsvc; struct gsm_bts_trx *trx; - struct gsm_bts_trx_ts *ts; - int i, tn; - - OSMO_ASSERT(bts); - OSMO_ASSERT(bts->network); - OSMO_ASSERT(bts->site_mgr); + int i; bts_sm = bts->site_mgr; - LOGP(DPCU, LOGL_INFO, "Sending info for BTS %d\n",bts->nr); + LOGP(DPCU, LOGL_INFO, "Sending info for BTS %d\n", bts->nr); rlcc = &bts->gprs.cell.rlc_cfg; @@ -136,9 +186,7 @@ info_ind = &pcu_prim->u.info_ind; info_ind->version = PCU_IF_VERSION; info_ind->flags |= PCU_IF_FLAG_ACTIVE; - - if (pcu_direct) - info_ind->flags |= PCU_IF_FLAG_SYSMO; + info_ind->flags |= PCU_IF_FLAG_SYSMO; /* RAI */ info_ind->mcc = bts->network->plmn.mcc; @@ -153,6 +201,7 @@ memcpy(info_ind->cell_timer, bts->gprs.cell.timer, 11); /* cell attributes */ + info_ind->bsic = bts->bsic; info_ind->cell_id = bts->cell_identity; info_ind->repeat_time = rlcc->paging.repeat_time; info_ind->repeat_count = rlcc->paging.repeat_count; @@ -211,14 +260,14 @@ case AF_INET: info_ind->address_typei = PCU_IF_ADDR_TYPE_IPV4; info_ind->remote_ipi.v4 = nsvc->remote.u.sin.sin_addr; - info_ind->remote_porti = nsvc->remote.u.sin.sin_port; + info_ind->remote_porti = ntohs(nsvc->remote.u.sin.sin_port); break; case AF_INET6: info_ind->address_typei = PCU_IF_ADDR_TYPE_IPV6; memcpy(&info_ind->remote_ipi.v6, &nsvc->remote.u.sin6.sin6_addr, sizeof(struct in6_addr)); - info_ind->remote_porti = nsvc->remote.u.sin6.sin6_port; + info_ind->remote_porti = ntohs(nsvc->remote.u.sin6.sin6_port); break; default: info_ind->address_typei = PCU_IF_ADDR_TYPE_UNSPEC; @@ -230,30 +279,13 @@ trx = gsm_bts_trx_num(bts, i); if (!trx) continue; - info_ind->trxi.hlayer1 = 0x2342; - info_ind->trxi.pdch_mask = 0; - info_ind->trxi.arfcn = trx->arfcn; - for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) { - ts = &trx->tstn; - if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED || - ts->pchan_is != GSM_PCHAN_PDCH) - continue; - - info_ind->trxi.pdch_mask |= (1 << tn); - info_ind->trxi.tstn.tsc = - (ts->tsc >= 0) ? ts->tsc : bts->bsic & 7; - - if (ts->hopping.enabled) - info_ind_fill_fhp(&info_ind->trxi.tstn, ts); - - LOGP(DPCU, LOGL_INFO, "trx=%d ts=%d: PDCH is available " - "(tsc=%u ", trx->nr, ts->nr, info_ind->trxi.tstn.tsc); - if (ts->hopping.enabled) - LOGPC(DPCU, LOGL_INFO, "hopping=yes hsn=%u maio=%u ma_bit_len=%u)\n", - ts->hopping.hsn, ts->hopping.maio, trx->tstn.hopping.ma.data_len - trx->tstn.hopping.ma.cur_bit); - else - LOGPC(DPCU, LOGL_INFO, "hopping=no arfcn=%u)\n", trx->arfcn); + if (trx->nr >= ARRAY_SIZE(info_ind->trx)) { + LOG_TRX(trx, DPCU, LOGL_NOTICE, "PCU interface (version %u) " + "cannot handle more than %zu transceivers => skipped\n", + PCU_IF_VERSION, ARRAY_SIZE(info_ind->trx)); + break; } + info_ind_fill_trx(&info_ind->trxtrx->nr, trx); } return pcu_sock_send(bts, msg); @@ -415,8 +447,8 @@ /* DT = direct tlli. A tlli is prefixed */ if (data_req->len < 5) { - LOGP(DPCU, LOGL_ERROR, "Received PCU data request with " - "invalid/small length %d\n", data_req->len); + LOGP(DPCU, LOGL_ERROR, "Received PCU data request with invalid/small length %d\n", + data_req->len); break; } memcpy(&tlli, data_req->data, 4); @@ -448,8 +480,17 @@ return rc; } +#define CHECK_IF_MSG_SIZE(prim_len, prim_msg) \ + do { \ + size_t _len = PCUIF_HDR_SIZE + sizeof(prim_msg); \ + if (prim_len < _len) { \ + LOGP(DPCU, LOGL_ERROR, "Received %zu bytes on PCU Socket, but primitive %s " \ + "size is %zu, discarding\n", prim_len, #prim_msg, _len); \ + return -EINVAL; \ + } \ + } while (0) static int pcu_rx(struct gsm_network *net, uint8_t msg_type, - struct gsm_pcu_if *pcu_prim) + struct gsm_pcu_if *pcu_prim, size_t prim_len) { int rc = 0; struct gsm_bts *bts; @@ -460,6 +501,7 @@ switch (msg_type) { case PCU_IF_MSG_DATA_REQ: case PCU_IF_MSG_PAG_REQ: + CHECK_IF_MSG_SIZE(prim_len, pcu_prim->u.data_req); rc = pcu_rx_data_req(bts, msg_type, &pcu_prim->u.data_req); break; default: @@ -556,7 +598,7 @@ struct msgb *msg; int rc; - msg = msgb_alloc(sizeof(*pcu_prim), "pcu_sock_rx"); + msg = msgb_alloc(sizeof(*pcu_prim) + 1000, "pcu_sock_rx"); if (!msg) return -ENOMEM; @@ -567,12 +609,21 @@ goto close; if (rc < 0) { - if (errno == EAGAIN) + if (errno == EAGAIN) { + msgb_free(msg); return 0; + } goto close; } - rc = pcu_rx(state->net, pcu_prim->msg_type, pcu_prim); + if (rc < PCUIF_HDR_SIZE) { + LOGP(DPCU, LOGL_ERROR, "Received %d bytes on PCU Socket, but primitive hdr size " + "is %zu, discarding\n", rc, PCUIF_HDR_SIZE); + msgb_free(msg); + return 0; + } + + rc = pcu_rx(state->net, pcu_prim->msg_type, pcu_prim, rc); /* as we always synchronously process the message in pcu_rx() and * its callbacks, we can free the message here. */
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/smscb.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/smscb.c
Changed
@@ -481,20 +481,15 @@ { struct osmo_cbsp_decoded *cbsp = osmo_cbsp_decoded_alloc(cbc, CBSP_MSGT_RESTART); struct osmo_cbsp_cell_ent cell_ent; + struct osmo_cell_global_id *cgi; if (is_emerg) cbsp->u.restart.bcast_msg_type = 0x01; cbsp->u.restart.recovery_ind = 0x00; /* message data available */ - cbsp->u.restart.cell_list.id_discr = CELL_IDENT_LAC_AND_CI; + cbsp->u.restart.cell_list.id_discr = CELL_IDENT_WHOLE_GLOBAL; - cell_ent = (struct osmo_cbsp_cell_ent){ - .cell_id = { - .lac_and_ci = { - .lac = bts->location_area_code, - .ci = bts->cell_identity, - } - } - }; + cgi = bts_get_cgi(bts); + cell_ent.cell_id.global = *cgi; llist_add(&cell_ent.list, &cbsp->u.restart.cell_list.list); return cbsp_tx_decoded(cbc, cbsp); @@ -505,20 +500,15 @@ { struct osmo_cbsp_decoded *cbsp = osmo_cbsp_decoded_alloc(cbc, CBSP_MSGT_FAILURE); struct osmo_cbsp_fail_ent fail_ent; + struct osmo_cell_global_id *cgi; if (is_emerg) cbsp->u.failure.bcast_msg_type = 0x01; - fail_ent = (struct osmo_cbsp_fail_ent){ - .id_discr = CELL_IDENT_LAC_AND_CI, - .cell_id = { - .lac_and_ci = { - .lac = bts->location_area_code, - .ci = bts->cell_identity, - } - }, - .cause = OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL - }; + cgi = bts_get_cgi(bts); + fail_ent.id_discr = CELL_IDENT_WHOLE_GLOBAL; + fail_ent.cell_id.global = *cgi; + fail_ent.cause = OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL; llist_add(&fail_ent.list, &cbsp->u.failure.fail_list); return cbsp_tx_decoded(cbc, cbsp); @@ -1141,6 +1131,7 @@ bts_cbch_timer_schedule(trx->bts); /* Start ETWS/PWS Primary Notification, if active */ bts_etws_bootstrap(trx->bts); + cbsp_tx_restart_bts(bts->network->cbc, true, bts); cbsp_tx_restart_bts(bts->network->cbc, false, bts); } } else { @@ -1148,6 +1139,7 @@ /* If timer is ongoing it means CBCH was available */ LOG_BTS(bts, DCBS, LOGL_INFO, "BTS becomes unavailable for CBCH\n"); osmo_timer_del(&bts->cbch_timer); + cbsp_tx_failure_bts(bts->network->cbc, true, bts); cbsp_tx_failure_bts(bts->network->cbc, false, bts); } /* else: CBCH was already unavailable before */ }
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/system_information.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/system_information.c
Changed
@@ -52,7 +52,7 @@ * array. DCS1800 and PCS1900 can not be used at the same time so conserve * memory and do the below. */ -static int band_compatible(const struct gsm_bts *bts, int arfcn) +int band_compatible(const struct gsm_bts *bts, int arfcn) { enum gsm_band band;
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/timeslot_fsm.c -> osmo-bsc_1.10.0.tar.xz/src/osmo-bsc/timeslot_fsm.c
Changed
@@ -29,6 +29,7 @@ #include <osmocom/bsc/abis_rsl.h> #include <osmocom/bsc/pcu_if.h> #include <osmocom/bsc/bts.h> +#include <osmocom/bsc/lchan.h> static struct osmo_fsm ts_fsm; @@ -633,7 +634,7 @@ if (!ok && lchan_state_is(lchan, LCHAN_ST_WAIT_TS_READY)) { LOG_TS(ts, LOGL_ERROR, "lchan activation of %s is not permitted for %s (%s)\n", - gsm_lchant_name(lchan->type), gsm_pchan_name(ts->pchan_on_init), + gsm_chan_t_name(lchan->type), gsm_pchan_name(ts->pchan_on_init), gsm_lchan_name(lchan)); lchan_dispatch(lchan, LCHAN_EV_TS_ERROR); } @@ -645,7 +646,7 @@ activating_type = lchan->type; else if (activating_type != lchan->type) { LOG_TS(ts, LOGL_ERROR, "lchan type %s mismatches %s (%s)\n", - gsm_lchant_name(lchan->type), gsm_lchant_name(activating_type), + gsm_chan_t_name(lchan->type), gsm_chan_t_name(activating_type), gsm_lchan_name(lchan)); lchan_dispatch(lchan, LCHAN_EV_TS_ERROR); } @@ -664,7 +665,7 @@ break; default: - LOG_TS(ts, LOGL_ERROR, "cannot use timeslot as %s\n", gsm_lchant_name(activating_type)); + LOG_TS(ts, LOGL_ERROR, "cannot use timeslot as %s\n", gsm_chan_t_name(activating_type)); ts_lchans_dispatch(ts, LCHAN_ST_WAIT_TS_READY, LCHAN_EV_TS_ERROR); break; } @@ -931,7 +932,6 @@ .out_state_mask = 0 | S(TS_ST_IN_USE) | S(TS_ST_UNUSED) - | S(TS_ST_BORKEN) | S(TS_ST_NOT_INITIALIZED) | S(TS_ST_BORKEN) ,
View file
osmo-bsc_1.9.0.tar.xz/src/utils/meas_json.c -> osmo-bsc_1.10.0.tar.xz/src/utils/meas_json.c
Changed
@@ -99,7 +99,7 @@ { printf("\"lchan_type\":\"%s\", \"pchan_type\":\"%s\", " "\"bts_nr\":%d, \"trx_nr\":%d, \"ts_nr\":%d, \"ss_nr\":%d", - gsm_lchant_name(mfm->lchan_type), gsm_pchan_name(mfm->pchan_type), + gsm_chan_t_name(mfm->lchan_type), gsm_pchan_name(mfm->pchan_type), mfm->bts_nr, mfm->trx_nr, mfm->ts_nr, mfm->ss_nr); }
View file
osmo-bsc_1.9.0.tar.xz/tests/acc/acc_test.c -> osmo-bsc_1.10.0.tar.xz/tests/acc/acc_test.c
Changed
@@ -58,10 +58,8 @@ #define bts_del(bts) _bts_del(bts, __func__) static inline void _bts_del(struct gsm_bts *bts, const char *msg) { - if (osmo_timer_pending(&bts->acc_mgr.rotate_timer)) - osmo_timer_del(&bts->acc_mgr.rotate_timer); - if (osmo_timer_pending(&bts->acc_ramp.step_timer)) - osmo_timer_del(&bts->acc_ramp.step_timer); + osmo_timer_del(&bts->acc_mgr.rotate_timer); + osmo_timer_del(&bts->acc_ramp.step_timer); /* no need to llist_del(&bts->list), we never registered the bts there. */ talloc_free(bts->site_mgr); fprintf(stderr, "BTS deallocated OK in %s()\n", msg);
View file
osmo-bsc_1.9.0.tar.xz/tests/ctrl/osmo-bsc-apply-config-file.cfg -> osmo-bsc_1.10.0.tar.xz/tests/ctrl/osmo-bsc-apply-config-file.cfg
Changed
@@ -3,13 +3,13 @@ type osmo-bts band DCS1800 cell_identity 123 - location_area_code 1 + location_area_code 0x0001 base_station_id_code 55 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 radio-link-timeout 32 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 channel-description attach 1
View file
osmo-bsc_1.9.0.tar.xz/tests/ctrl/osmo-bsc-neigh-test.cfg -> osmo-bsc_1.10.0.tar.xz/tests/ctrl/osmo-bsc-neigh-test.cfg
Changed
@@ -1,12 +1,3 @@ -! osmo-bsc default configuration -! (assumes STP to run on 127.0.0.1 and uses default point codes) -! -log file /tmp/osmo-bsc-neigh.log - logging filter all 1 - logging color 1 - logging print category 1 - logging timestamp 1 - logging level set-all debug e1_input e1_line 0 driver ipa network @@ -25,17 +16,21 @@ handover1 maximum distance 9999 periodic location update 30 neighbor-resolution bind 127.0.0.1 + mgw 0 + remote-ip 127.0.0.1 + remote-port 2427 + local-port 2727 bts 0 type osmo-bts band DCS1800 cell_identity 6969 - location_area_code 1 + location_area_code 0x0001 base_station_id_code 63 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 radio-link-timeout 32 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 channel-description attach 1 @@ -86,13 +81,13 @@ type osmo-bts band DCS1800 cell_identity 123 - location_area_code 1 + location_area_code 0x0001 base_station_id_code 55 ms max power 15 cell reselection hysteresis 4 rxlev access min 0 radio-link-timeout 32 - channel allocator ascending + channel allocator mode set-all ascending rach tx integer 9 rach max transmission 7 channel-description attach 1 @@ -105,6 +100,62 @@ gprs mode gprs gprs routing area 6 neighbor bts 0 + neighbor bts 1 + neighbor bts 2 + neighbor bts 2 + trx 0 + rf_locked 0 + arfcn 880 + nominal power 23 + ! to use full TRX power, set max_power_red 0 + max_power_red 20 + rsl e1 tei 0 + timeslot 0 + phys_chan_config CCCH+SDCCH4 + hopping enabled 0 + timeslot 1 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 2 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 3 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 4 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 5 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 6 + phys_chan_config TCH/F + hopping enabled 0 + timeslot 7 + phys_chan_config TCH/F + hopping enabled 0 + bts 2 + type osmo-bts + band DCS1800 + cell_identity 123 + location_area_code 0x0001 + base_station_id_code 55 + ms max power 15 + cell reselection hysteresis 4 + rxlev access min 0 + radio-link-timeout 32 + channel allocator mode set-all ascending + rach tx integer 9 + rach max transmission 7 + channel-description attach 1 + channel-description bs-pa-mfrms 5 + channel-description bs-ag-blks-res 1 + early-classmark-sending forbidden + ipa unit-id 55 0 + oml ipa stream-id 255 line 0 + codec-support fr + gprs mode gprs + gprs routing area 6 trx 0 rf_locked 0 arfcn 880 @@ -147,9 +198,5 @@ amr-config 5_90k allowed amr-config 5_15k forbidden amr-config 4_75k forbidden - mgw remote-ip 127.0.0.1 - mgw remote-port 2427 - mgw local-port 2727 - mgw endpoint-range 1 31 bsc mid-call-timeout 0
View file
osmo-bsc_1.9.0.tar.xz/tests/ctrl_test_runner.py -> osmo-bsc_1.10.0.tar.xz/tests/ctrl_test_runner.py
Changed
@@ -616,6 +616,25 @@ def ctrl_app(self): return (4249, "./src/osmo-bsc/osmo-bsc", "OsmoBSC", "bsc") + def testCtrlListBTS(self): + # Get BTS local neighbors (configured via 'neighbor cgi-ps ...') + r = self.do_get('bts.0.neighbor-bts.list') + self.assertEqual(r'mtype', 'GET_REPLY') + self.assertEqual(r'var', 'bts.0.neighbor-bts.list') + self.assertEqual(r'value', '1') + + # Get BTS locally configured neighbors (when none configured) + r = self.do_get('bts.2.neighbor-bts.list') + self.assertEqual(r'mtype', 'GET_REPLY') + self.assertEqual(r'var', 'bts.2.neighbor-bts.list') + self.assertEqual(r'value', None) + + # Get BTS locally configured neighbors + r = self.do_get('bts.1.neighbor-bts.list') + self.assertEqual(r'mtype', 'GET_REPLY') + self.assertEqual(r'var', 'bts.1.neighbor-bts.list') + self.assertEqual(r'value', '0,2') + def testCtrlAddDelBTS(self): r = self.do_set('bts.0.neighbor-bts.add', '1') print('respose: ' + str(r))
View file
osmo-bsc_1.9.0.tar.xz/tests/gsm0408/gsm0408_test.c -> osmo-bsc_1.10.0.tar.xz/tests/gsm0408/gsm0408_test.c
Changed
@@ -137,8 +137,7 @@ #define bts_del(bts) _bts_del(bts, __func__) static inline void _bts_del(struct gsm_bts *bts, const char *msg) { - if (osmo_timer_pending(&bts->acc_mgr.rotate_timer)) - osmo_timer_del(&bts->acc_mgr.rotate_timer); + osmo_timer_del(&bts->acc_mgr.rotate_timer); /* no need to llist_del(&bts->list), we never registered the bts there. */ talloc_free(bts->site_mgr); printf("BTS deallocated OK in %s()\n", msg);
View file
osmo-bsc_1.9.0.tar.xz/tests/handover/handover_test.c -> osmo-bsc_1.10.0.tar.xz/tests/handover/handover_test.c
Changed
@@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> #include <errno.h> +#include <inttypes.h> #include <assert.h> @@ -52,6 +53,7 @@ #include <osmocom/bsc/bts.h> #include <osmocom/bsc/paging.h> #include <osmocom/bsc/vty.h> +#include <osmocom/bsc/lchan.h> #include <osmocom/mgcp_client/mgcp_client_pool.h> #include "../../bscconfig.h" @@ -250,13 +252,13 @@ fprintf(stderr, "- Creating BTS %d, %d TRX\n", bsc_gsmnet->num_bts, num_trx); - bts = bsc_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_UNKNOWN, 0x3f); + bts = bsc_bts_alloc_register(bsc_gsmnet, GSM_BTS_TYPE_UNKNOWN, HARDCODED_BSIC); if (!bts) { fprintf(stderr, "No resource for bts1\n"); return NULL; } - bts->location_area_code = 23; + bts->location_area_code = 0x0017; bts->cell_identity = ci++; bts->c0->arfcn = arfcn++; @@ -488,7 +490,8 @@ { struct gsm_lchan *lchan; - lchan = lchan_select_by_type(bts, (full_rate) ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H); + lchan = lchan_select_by_type(bts, (full_rate) ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H, + SELECT_FOR_HANDOVER, NULL); if (!lchan) { fprintf(stderr, "No resource for lchan\n"); exit(EXIT_FAILURE); @@ -1431,6 +1434,59 @@ return CMD_SUCCESS; } +DEFUN(set_arfcn, set_arfcn_cmd, + "set-arfcn trx <0-255> <0-255> <0-1023>", + "Set the ARFCN for a BTS' TRX\n" + "Indicate a BTS and TRX\n" "BTS nr\n" "TRX nr\n" + "Absolute Radio Frequency Channel Number\n") +{ + enum gsm_band unused; + struct gsm_bts *bts = bts_by_num_str(argv0); + struct gsm_bts_trx *trx = trx_by_num_str(bts, argv1); + int arfcn = atoi(argv2); + VTY_ECHO(); + + if (gsm_arfcn2band_rc(arfcn, &unused) < 0) { + vty_out(vty, "%% Invalid arfcn %" PRIu16 " detected%s", arfcn, VTY_NEWLINE); + return CMD_WARNING; + } + + trx->arfcn = arfcn; + + if (generate_cell_chan_alloc(trx->bts) != 0) { + vty_out(vty, "%% Failed to re-generate Cell Allocation%s", VTY_NEWLINE); + return CMD_WARNING; + } + + for (int i = 0; i < bsc_gsmnet->num_bts; i++) { + if (gsm_generate_si(gsm_bts_num(bsc_gsmnet, i), SYSINFO_TYPE_2) <= 0) + fprintf(stderr, "Error generating SI2\n"); + } + + return CMD_SUCCESS; +} + +DEFUN(set_band, set_band_cmd, + "set-band bts <0-255> BAND", + "Set the frequency band for a BTS\n" + "Indicate a BTS\n" "BTS nr\n" + "Frequency band\n") +{ + struct gsm_bts *bts = bts_by_num_str(argv0); + int band = gsm_band_parse(argv1); + VTY_ECHO(); + + if (band < 0) { + vty_out(vty, "%% BAND %d is not a valid GSM band%s", + band, VTY_NEWLINE); + return CMD_WARNING; + } + + bts->band = band; + + return CMD_SUCCESS; +} + DEFUN(set_ts_use, set_ts_use_cmd, "set-ts-use trx <0-255> <0-255> states" TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE, "Put timeslots of a BTS' TRX into a specific state\n" @@ -1488,6 +1544,8 @@ install_element(CONFIG_NODE, &expect_ts_use_cmd); install_element(CONFIG_NODE, &codec_f_cmd); install_element(CONFIG_NODE, &codec_h_cmd); + install_element(CONFIG_NODE, &set_arfcn_cmd); + install_element(CONFIG_NODE, &set_band_cmd); install_element(CONFIG_NODE, &set_ts_use_cmd); install_element(CONFIG_NODE, &wait_cmd); }
View file
osmo-bsc_1.9.0.tar.xz/tests/handover/handover_tests.ok -> osmo-bsc_1.10.0.tar.xz/tests/handover/handover_tests.ok
Changed
@@ -42,6 +42,7 @@ pass test_keep_hr_codec.ho_vty pass test_max_handovers.ho_vty pass test_max_ta.ho_vty +pass test_meas_rep_multi_band.ho_vty pass test_min_rxlev_vs_congestion.ho_vty pass test_min_rxlev_vs_hysteresis.ho_vty pass test_neighbor_congested.ho_vty
View file
osmo-bsc_1.9.0.tar.xz/tests/handover/test_dyn_ts_favor_static_ts_as_target.ho_vty -> osmo-bsc_1.10.0.tar.xz/tests/handover/test_dyn_ts_favor_static_ts_as_target.ho_vty
Changed
@@ -3,7 +3,7 @@ network bts 0 - channel allocator ascending + channel allocator mode set-all ascending set-ts-use trx 0 0 states * TCH/-H TCH/-H TCH/-H TCH/-H TCH/-H TCH/-H *
View file
osmo-bsc_1.10.0.tar.xz/tests/handover/test_meas_rep_multi_band.ho_vty
Added
@@ -0,0 +1,47 @@ +# Test ARFCN parsing from measurement report in multi-band BSS (OS#5717) + +create-n-bts 5 + +set-band bts 0 1800 +set-arfcn trx 0 0 600 + +set-band bts 1 900 +set-arfcn trx 1 0 1000 + +set-band bts 2 850 +set-arfcn trx 2 0 200 + +set-band bts 3 900 +set-arfcn trx 3 0 0 + +set-band bts 4 1800 +set-arfcn trx 4 0 800 + +# Attach MS to BTS 0, BTS 1-4 are neighbors +create-ms bts 0 TCH/F AMR + +expect-ts-use trx 0 0 states * TCH/F - - - - - - +expect-ts-use trx 1 0 states * - - - - - - - +expect-ts-use trx 2 0 states * - - - - - - - +expect-ts-use trx 3 0 states * - - - - - - - +expect-ts-use trx 4 0 states * - - - - - - - + +# Send a measurement report where TRX with ARFCN=800 has the best rxqual. If +# the BSC resolved the indexes in the measurement report correctly according to +# 3GPP TS 04.08 § 10.5.2.20, then the neighbors are the following: +# Sub list 1 (band == 1800, same band as the TRX where MS is attached): +# IDX=0 ARFCN=800 BSIC=63 RXLEV=-75dBm (BTS 4) +# Sub list 2 (other bands): +# IDX=1 ARFCN=200 BSIC=63 RXLEV=-110dBm (BTS 2) +# IDX=2 ARFCN=1000 BSIC=63 RXLEV=-110dBm (BTS 1) +# IDX=3 ARFCN=0 BSIC=63 RXLEV=-110dBm (BTS 3; at the end because ARFCN=0) +meas-rep lchan 0 0 1 0 rxlev 20 rxqual 0 ta 0 neighbors 35 0 0 0 + +# If the BSC parsed the list correctly, it will request a handover to BTS 4. +expect-ho from lchan 0 0 1 0 to lchan 4 0 1 0 + +expect-ts-use trx 0 0 states * - - - - - - - +expect-ts-use trx 1 0 states * - - - - - - - +expect-ts-use trx 2 0 states * - - - - - - - +expect-ts-use trx 3 0 states * - - - - - - - +expect-ts-use trx 4 0 states * TCH/F - - - - - -
View file
osmo-bsc_1.9.0.tar.xz/tests/nanobts_omlattr/nanobts_omlattr_test.c -> osmo-bsc_1.10.0.tar.xz/tests/nanobts_omlattr/nanobts_omlattr_test.c
Changed
@@ -25,6 +25,7 @@ #include <osmocom/bsc/bts.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/tdef.h> #include <osmocom/core/utils.h> #include <osmocom/core/application.h> #include <osmocom/core/sockaddr_str.h> @@ -88,7 +89,7 @@ printf("Testing nanobts_gen_set_nsvc_attr()...\n"); - msgb = nanobts_gen_set_nsvc_attr(bts); + msgb = nanobts_gen_set_nsvc_attr(&bts->site_mgr->gprs.nsvc0); printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len)); @@ -125,9 +126,11 @@ }; static struct osmo_tdef gsm_network_T_defs = { - { .T=3105, .default_val=100, .val=13, .unit=OSMO_TDEF_MS, .desc="Physical Information" }, - { .T=3212, .default_val=5, .unit=OSMO_TDEF_CUSTOM, - .desc="Periodic Location Update timer, sent to MS (1 = 6 minutes)" }, + { .T = 3105, .default_val = GSM_T3105_DEFAULT, .val = GSM_T3105_DEFAULT, .min_val = 0, .max_val = UINT8_MAX, .unit = OSMO_TDEF_MS, .desc = "Physical Information" }, + { .T = 3212, .default_val = 5, .unit = OSMO_TDEF_CUSTOM, .min_val = 0, .max_val = UINT8_MAX, + .desc = "Periodic Location Update timer, sent to MS (1 = 6 minutes)" }, + { .T = -3105, .default_val = GSM_NY1_DEFAULT, .val = GSM_NY1_DEFAULT, .min_val = 0, .max_val = UINT8_MAX, .unit = OSMO_TDEF_CUSTOM, + .desc = "Ny1: Maximum number of Physical Information (re)transmissions" }, {} }; @@ -160,17 +163,34 @@ bts->c0->arfcn = 866; bts->cell_identity = 1337; bts->network->plmn = (struct osmo_plmn_id){ .mcc=1, .mnc=1 }; - bts->location_area_code = 1; + bts->location_area_code = 0x0001; bts->gprs.rac = 0; uint8_t attr_bts_expected = - { 0x19, 0x73, 0x6d, 0x67, 0x61, 0x5b, 0x55, 0x18, 0x06, 0x0e, 0x00, - 0x02, 0x01, 0x20, 0x33, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, - 0xa8, 0x1f, 0x3f, 0x25, - 0x00, 0x01, 0x0a, 0x0c, 0x0a, 0x0b, 0x01, 0x2a, 0x5a, 0x2b, - 0x03, 0xe8, 0x0a, 0x01, - 0x23, 0x0a, 0x08, 0x03, 0x62, 0x09, 0x3f, 0x99, 0x00, 0x07, - 0x00, 0xf1, 0x10, 0x00, - 0x01, 0x05, 0x39 + { 0x19, 0x73, 0x6d, 0x67, 0x61, 0x5b, 0x55, + /* 0x18 Intave Parameter */ + 0x18, 0x06, + /* 0x0e: Connection Failure Criterion, rlt == 0x20 */ + 0x0e, 0x00, 0x02, 0x01, 0x20, + /* 0x33: T200 */ + 0x33, 0x1e, 0x24, 0x24, 0xa8, 0x34, 0x21, 0xa8, + /* 0x1f: Max Timing Advance */ + 0x1f, 0x3f, + /* 0x25: Overload Period */ + 0x25, 0x00, 0x01, 0x0a, + /* 0x0c CCCH Load Threshold */ + 0x0c, 0x0a, + /* 0x0b CCCH Load Indication Period */ + 0x0b, 0x01, + /* 0x2a: RACH Busy Threshold */ + 0x2a, 0x5a, + /* 0x2b: RACH Load Averaging Slots */ + 0x2b, 0x03, 0xe8, + /* 0x0a: BTS Air Timer */ + 0x0a, 0x0a, + /* Ny1 */ + 0x23, 0x11, + 0x08, 0x03, 0x62, 0x09, 0x3f, 0x99, 0x00, 0x07, + 0x00, 0xf1, 0x10, 0x00, 0x01, 0x05, 0x39 }; /* Parameters needed to test nanobts_gen_set_nse_attr() */
View file
osmo-bsc_1.9.0.tar.xz/tests/nanobts_omlattr/nanobts_omlattr_test.ok -> osmo-bsc_1.10.0.tar.xz/tests/nanobts_omlattr/nanobts_omlattr_test.ok
Changed
@@ -1,6 +1,6 @@ Testing nanobts_gen_set_bts_attr()... -result= 19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a01230a080362093f99000700f11000010539 -expected=19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a01230a080362093f99000700f11000010539 +result= 19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a0a2311080362093f99000700f11000010539 +expected=19736d67615b5518060e00020120331e2424a83421a81f3f2500010a0c0a0b012a5a2b03e80a0a2311080362093f99000700f11000010539 ok. Testing nanobts_gen_set_nse_attr()...
View file
osmo-bsc_1.9.0.tar.xz/tests/neighbor_ident.vty -> osmo-bsc_1.10.0.tar.xz/tests/neighbor_ident.vty
Changed
@@ -21,7 +21,7 @@ OsmoBSC(config-net)# bts 0 OsmoBSC(config-net-bts)# type osmo-bts OsmoBSC(config-net-bts)# base_station_id_code 10 -OsmoBSC(config-net-bts)# location_area_code 20 +OsmoBSC(config-net-bts)# location_area_code 0x0014 OsmoBSC(config-net-bts)# cell_identity 30 OsmoBSC(config-net-bts)# trx 0 OsmoBSC(config-net-bts-trx)# arfcn 40 @@ -31,7 +31,7 @@ OsmoBSC(config-net)# bts 1 OsmoBSC(config-net-bts)# type osmo-bts OsmoBSC(config-net-bts)# base_station_id_code 11 -OsmoBSC(config-net-bts)# location_area_code 21 +OsmoBSC(config-net-bts)# location_area_code 0x0015 OsmoBSC(config-net-bts)# cell_identity 31 OsmoBSC(config-net-bts)# trx 0 OsmoBSC(config-net-bts-trx)# arfcn 41 @@ -41,7 +41,7 @@ OsmoBSC(config-net)# bts 2 OsmoBSC(config-net-bts)# type osmo-bts OsmoBSC(config-net-bts)# base_station_id_code 12 -OsmoBSC(config-net-bts)# location_area_code 22 +OsmoBSC(config-net-bts)# location_area_code 0x0016 OsmoBSC(config-net-bts)# cell_identity 65535 OsmoBSC(config-net-bts)# trx 0 OsmoBSC(config-net-bts-trx)# arfcn 42 @@ -53,7 +53,7 @@ bts 0 ... cell_identity 30 - location_area_code 20 + location_area_code 0x0014 base_station_id_code 10 ... trx 0 @@ -63,7 +63,7 @@ bts 1 ... cell_identity 31 - location_area_code 21 + location_area_code 0x0015 base_station_id_code 11 ... trx 0 @@ -73,7 +73,7 @@ bts 2 ... cell_identity 65535 - location_area_code 22 + location_area_code 0x0016 base_station_id_code 12 ... trx 0
View file
osmo-bsc_1.9.0.tar.xz/tests/osmo-bsc.vty -> osmo-bsc_1.10.0.tar.xz/tests/osmo-bsc.vty
Changed
@@ -46,6 +46,7 @@ <0-255> BTS Number OsmoBSC# bts 0 ? + unblock-setup-ramping Unblock and allow to configure a BTS if kept back by BTS ramping resend-system-information Re-generate + re-send BCCH SYSTEM INFORMATION resend-power-control-defaults Re-generate + re-send default MS/BS Power control parameters c0-power-reduction BCCH carrier power reduction operation @@ -166,11 +167,46 @@ allocator Channel Allocator OsmoBSC(config-net-bts)# channel allocator ? - ascending Allocate Timeslots and Transceivers in ascending order - descending Allocate Timeslots and Transceivers in descending order + mode Channel allocation mode + dynamic-param Parameters for dynamic channel allocation mode avoid-interference Configure whether reported interference levels from RES IND are used in channel allocation tch-signalling-policy Configure when TCH/H or TCH/F channels can be used to serve signalling if SDCCHs are exhausted +OsmoBSC(config-net-bts)# channel allocator mode ? + set-all Set a single mode for all variants + chan-req Channel allocation for CHANNEL REQUEST (RACH) + assignment Channel allocation for assignment + handover Channel allocation for handover + +OsmoBSC(config-net-bts)# channel allocator mode set-all ? + ascending Allocate Timeslots and Transceivers in ascending order + descending Allocate Timeslots and Transceivers in descending order + +OsmoBSC(config-net-bts)# channel allocator mode handover ? + ascending Allocate Timeslots and Transceivers in ascending order + descending Allocate Timeslots and Transceivers in descending order + +OsmoBSC(config-net-bts)# channel allocator mode assignment ? + ascending Allocate Timeslots and Transceivers in ascending order + descending Allocate Timeslots and Transceivers in descending order + dynamic Dynamic lchan selection based on configured parameters + +OsmoBSC(config-net-bts)# channel allocator dynamic-param ? + sort-by-trx-power Whether to sort TRX instances by their respective power levels + ul-rxlev Uplink RxLev + c0-chan-load C0 (BCCH carrier) channel load + +OsmoBSC(config-net-bts)# channel allocator dynamic-param sort-by-trx-power ? + 0 Do not sort, use the same order as in the configuration file + 1 Sort TRX instances by their power levels in descending order + +OsmoBSC(config-net-bts)# channel allocator dynamic-param ul-rxlev thresh ? + <0-63> Uplink RxLev threshold +OsmoBSC(config-net-bts)# channel allocator dynamic-param ul-rxlev thresh 50 avg-num ? + <1-10> Minimum number of RxLev samples for averaging +OsmoBSC(config-net-bts)# channel allocator dynamic-param c0-chan-load thresh ? + <0-100> Channel load threshold (in %) + OsmoBSC(config-net-bts)# channel allocator avoid-interference ? 0 Ignore interference levels (default). Always assign lchans in a deterministic order. 1 In channel allocation, prefer lchans with less interference.
View file
osmo-bsc_1.9.0.tar.xz/tests/paging/paging_test.c -> osmo-bsc_1.10.0.tar.xz/tests/paging/paging_test.c
Changed
@@ -142,7 +142,7 @@ clock_inc(0, nearest_ms*1000); clock_debug("select()"); osmo_select_main_ctx(0); - if (llist_empty(&bts->paging.pending_requests)) { + if (llist_empty(&bts->paging.initial_req_list) && llist_empty(&bts->paging.retrans_req_list)) { fprintf(stderr, "ERROR: some request timed out before being sent! %u\n", _sent_pg_cmd_rsl); OSMO_ASSERT(0); } @@ -174,7 +174,7 @@ clock_inc(0, nearest_ms*1000); clock_debug("select()"); osmo_select_main_ctx(0); - if (llist_empty(&bts->paging.pending_requests)) { + if (llist_empty(&bts->paging.initial_req_list) && llist_empty(&bts->paging.retrans_req_list)) { fprintf(stderr, "ERROR: some request timed out before being sent! %u\n", _sent_pg_cmd_rsl); OSMO_ASSERT(0); } @@ -208,7 +208,7 @@ clock_inc(0, nearest_ms*1000); clock_debug("select()"); osmo_select_main_ctx(0); - if (llist_empty(&bts->paging.pending_requests)) { + if (llist_empty(&bts->paging.initial_req_list) && llist_empty(&bts->paging.retrans_req_list)) { fprintf(stderr, "ERROR: some request timed out before being sent! %u\n", _sent_pg_cmd_rsl); OSMO_ASSERT(0); }
View file
osmo-bsc_1.9.0.tar.xz/tests/paging/paging_test.ok -> osmo-bsc_1.10.0.tar.xz/tests/paging/paging_test.ok
Changed
@@ -7,7 +7,8 @@ (msc=-1) Paging: subscr-IMSI-1234000000: (bts=0) Paging request: T3113 expires in 9 seconds (estimated 9) (msc=-1) Paging: subscr-IMSI-1234000000: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000000 -(bts=0) Paged 1 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=66) +(msc=-1) Paging: subscr-IMSI-1234000000: (bts=0) Paging delayed: retransmission happens in 0.500000s +(bts=0) Paged 1 subscribers (1 initial, 0 retrans) during last iteration (bts=0) Estimated 2039 paging available_slots over 60 seconds (msc=-1) Paging: subscr-IMSI-1234000001: (bts=0) Start paging (msc=-1) Paging: subscr-IMSI-1234000001: (bts=0) Paging request: T3113 expires in 9 seconds (estimated 9) @@ -1527,7 +1528,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000009 (msc=-1) Paging: subscr-IMSI-1234000010: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000010 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=56) +(bts=0) Scheduling next batch in 0.250000s (available_slots=56) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={0.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000011: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000011 @@ -1549,7 +1551,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000019 (msc=-1) Paging: subscr-IMSI-1234000020: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000020 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=46) +(bts=0) Scheduling next batch in 0.250000s (available_slots=46) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={0.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000021: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000021 @@ -1571,7 +1574,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000029 (msc=-1) Paging: subscr-IMSI-1234000030: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000030 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=36) +(bts=0) Scheduling next batch in 0.250000s (available_slots=36) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000031: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000031 @@ -1593,7 +1597,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000039 (msc=-1) Paging: subscr-IMSI-1234000040: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000040 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=26) +(bts=0) Scheduling next batch in 0.250000s (available_slots=26) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000041: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000041 @@ -1615,7 +1620,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000049 (msc=-1) Paging: subscr-IMSI-1234000050: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000050 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=16) +(bts=0) Scheduling next batch in 0.250000s (available_slots=16) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000051: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000051 @@ -1637,7 +1643,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000059 (msc=-1) Paging: subscr-IMSI-1234000060: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000060 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000061: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000061 @@ -1652,6 +1659,7 @@ (msc=-1) Paging: subscr-IMSI-1234000066: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000066 (msc=-1) Paging: subscr-IMSI-1234000067: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={2.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -1675,7 +1683,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000075 (msc=-1) Paging: subscr-IMSI-1234000076: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000076 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={2.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000077: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000077 @@ -1697,7 +1706,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000085 (msc=-1) Paging: subscr-IMSI-1234000086: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000086 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={2.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000087: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000087 @@ -1719,7 +1729,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000095 (msc=-1) Paging: subscr-IMSI-1234000096: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000096 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={2.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000097: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000097 @@ -1741,7 +1752,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000105 (msc=-1) Paging: subscr-IMSI-1234000106: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000106 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={3.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000107: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000107 @@ -1763,7 +1775,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000115 (msc=-1) Paging: subscr-IMSI-1234000116: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000116 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={3.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000117: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000117 @@ -1785,7 +1798,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000125 (msc=-1) Paging: subscr-IMSI-1234000126: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000126 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={3.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000127: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000127 @@ -1802,6 +1816,7 @@ (msc=-1) Paging: subscr-IMSI-1234000133: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000133 (msc=-1) Paging: subscr-IMSI-1234000134: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={4.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -1825,7 +1840,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000142 (msc=-1) Paging: subscr-IMSI-1234000143: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000143 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={4.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000144: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000144 @@ -1847,7 +1863,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000152 (msc=-1) Paging: subscr-IMSI-1234000153: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000153 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={4.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000154: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000154 @@ -1869,7 +1886,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000162 (msc=-1) Paging: subscr-IMSI-1234000163: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000163 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={4.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000164: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000164 @@ -1891,7 +1909,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000172 (msc=-1) Paging: subscr-IMSI-1234000173: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000173 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={5.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000174: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000174 @@ -1913,7 +1932,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000182 (msc=-1) Paging: subscr-IMSI-1234000183: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000183 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={5.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000184: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000184 @@ -1935,7 +1955,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000192 (msc=-1) Paging: subscr-IMSI-1234000193: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000193 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={5.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000194: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000194 @@ -1952,6 +1973,7 @@ (msc=-1) Paging: subscr-IMSI-1234000200: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000200 (msc=-1) Paging: subscr-IMSI-1234000201: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={6.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -1975,7 +1997,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000209 (msc=-1) Paging: subscr-IMSI-1234000210: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000210 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={6.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000211: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000211 @@ -1997,7 +2020,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000219 (msc=-1) Paging: subscr-IMSI-1234000220: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000220 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={6.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000221: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000221 @@ -2019,7 +2043,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000229 (msc=-1) Paging: subscr-IMSI-1234000230: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000230 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={6.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000231: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000231 @@ -2041,7 +2066,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000239 (msc=-1) Paging: subscr-IMSI-1234000240: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000240 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={7.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000241: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000241 @@ -2063,7 +2089,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000249 (msc=-1) Paging: subscr-IMSI-1234000250: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000250 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={7.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000251: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000251 @@ -2085,7 +2112,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000259 (msc=-1) Paging: subscr-IMSI-1234000260: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000260 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={7.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000261: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000261 @@ -2102,6 +2130,7 @@ (msc=-1) Paging: subscr-IMSI-1234000267: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000267 (msc=-1) Paging: subscr-IMSI-1234000268: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={8.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -2125,7 +2154,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000276 (msc=-1) Paging: subscr-IMSI-1234000277: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000277 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={8.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000278: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000278 @@ -2147,7 +2177,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000286 (msc=-1) Paging: subscr-IMSI-1234000287: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000287 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={8.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000288: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000288 @@ -2169,7 +2200,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000296 (msc=-1) Paging: subscr-IMSI-1234000297: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000297 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={8.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000298: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000298 @@ -2191,7 +2223,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000306 (msc=-1) Paging: subscr-IMSI-1234000307: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000307 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={9.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000308: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000308 @@ -2213,7 +2246,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000316 (msc=-1) Paging: subscr-IMSI-1234000317: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000317 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000015: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000014: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000013: (bts=0) T3113 expired @@ -2251,7 +2285,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000326 (msc=-1) Paging: subscr-IMSI-1234000327: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000327 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={9.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000328: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000328 @@ -2268,6 +2303,7 @@ (msc=-1) Paging: subscr-IMSI-1234000334: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000334 (msc=-1) Paging: subscr-IMSI-1234000335: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={10.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -2291,7 +2327,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000343 (msc=-1) Paging: subscr-IMSI-1234000344: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000344 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000042: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000041: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000040: (bts=0) T3113 expired @@ -2340,7 +2377,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000353 (msc=-1) Paging: subscr-IMSI-1234000354: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000354 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={10.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000355: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000355 @@ -2362,7 +2400,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000363 (msc=-1) Paging: subscr-IMSI-1234000364: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000364 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={10.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000365: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000365 @@ -2384,7 +2423,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000373 (msc=-1) Paging: subscr-IMSI-1234000374: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000374 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={11.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000375: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000375 @@ -2406,7 +2446,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000383 (msc=-1) Paging: subscr-IMSI-1234000384: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000384 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000076: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000075: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000074: (bts=0) T3113 expired @@ -2462,7 +2503,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000393 (msc=-1) Paging: subscr-IMSI-1234000394: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000394 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={11.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000395: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000395 @@ -2479,6 +2521,7 @@ (msc=-1) Paging: subscr-IMSI-1234000401: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000401 (msc=-1) Paging: subscr-IMSI-1234000402: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={12.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -2502,7 +2545,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000410 (msc=-1) Paging: subscr-IMSI-1234000411: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000411 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000111: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000110: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000109: (bts=0) T3113 expired @@ -2559,7 +2603,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000420 (msc=-1) Paging: subscr-IMSI-1234000421: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000421 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={12.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000422: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000422 @@ -2581,7 +2626,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000430 (msc=-1) Paging: subscr-IMSI-1234000431: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000431 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={12.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000432: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000432 @@ -2603,7 +2649,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000440 (msc=-1) Paging: subscr-IMSI-1234000441: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000441 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={13.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000442: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000442 @@ -2625,7 +2672,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000450 (msc=-1) Paging: subscr-IMSI-1234000451: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000451 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000146: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000145: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000144: (bts=0) T3113 expired @@ -2682,7 +2730,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000460 (msc=-1) Paging: subscr-IMSI-1234000461: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000461 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={13.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000462: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000462 @@ -2699,6 +2748,7 @@ (msc=-1) Paging: subscr-IMSI-1234000468: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000468 (msc=-1) Paging: subscr-IMSI-1234000469: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={14.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -2722,7 +2772,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000477 (msc=-1) Paging: subscr-IMSI-1234000478: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000478 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000181: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000180: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000179: (bts=0) T3113 expired @@ -2779,7 +2830,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000487 (msc=-1) Paging: subscr-IMSI-1234000488: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000488 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={14.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000489: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000489 @@ -2801,7 +2853,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000497 (msc=-1) Paging: subscr-IMSI-1234000498: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000498 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={14.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000499: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000499 @@ -2823,7 +2876,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000189 (msc=-1) Paging: subscr-IMSI-1234000190: (bts=0) Going to send paging command for ch. type 0 (attempt 1) abis_rsl_sendmsg: Paging CMD IMSI-1234000190 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (1 initial, 9 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000191: (bts=0) Stop paging (flush) (msc=-1) Paging: subscr-IMSI-1234000192: (bts=0) Stop paging (flush) (msc=-1) Paging: subscr-IMSI-1234000193: (bts=0) Stop paging (flush) @@ -3153,7 +3207,8 @@ (msc=-1) Paging: subscr-IMSI-123400000000: (bts=0) Paging request: T3113 expires in 9 seconds (estimated 9) (msc=-1) Paging: subscr-IMSI-123400000000: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400000000 -(bts=0) Paged 1 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=66) +(msc=-1) Paging: subscr-IMSI-123400000000: (bts=0) Paging delayed: retransmission happens in 0.500000s +(bts=0) Paged 1 subscribers (1 initial, 0 retrans) during last iteration (bts=0) Estimated 2039 paging available_slots over 60 seconds (msc=-1) Paging: subscr-IMSI-123400000040: (bts=0) Start paging (msc=-1) Paging: subscr-IMSI-123400000040: (bts=0) Paging request: T3113 expires in 9 seconds (estimated 9) @@ -4673,7 +4728,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400000360 (msc=-1) Paging: subscr-IMSI-123400000400: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400000400 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=56) +(bts=0) Scheduling next batch in 0.250000s (available_slots=56) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={0.500000}: select() (msc=-1) Paging: subscr-IMSI-123400000440: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400000440 @@ -4695,7 +4751,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400000760 (msc=-1) Paging: subscr-IMSI-123400000800: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400000800 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=46) +(bts=0) Scheduling next batch in 0.250000s (available_slots=46) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={0.750000}: select() (msc=-1) Paging: subscr-IMSI-123400000840: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400000840 @@ -4717,7 +4774,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400001160 (msc=-1) Paging: subscr-IMSI-123400001200: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400001200 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=36) +(bts=0) Scheduling next batch in 0.250000s (available_slots=36) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.000000}: select() (msc=-1) Paging: subscr-IMSI-123400001240: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400001240 @@ -4739,7 +4797,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400001560 (msc=-1) Paging: subscr-IMSI-123400001600: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400001600 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=26) +(bts=0) Scheduling next batch in 0.250000s (available_slots=26) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.250000}: select() (msc=-1) Paging: subscr-IMSI-123400001640: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400001640 @@ -4761,7 +4820,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400001960 (msc=-1) Paging: subscr-IMSI-123400002000: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400002000 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=16) +(bts=0) Scheduling next batch in 0.250000s (available_slots=16) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.500000}: select() (msc=-1) Paging: subscr-IMSI-123400002040: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400002040 @@ -4783,7 +4843,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400002360 (msc=-1) Paging: subscr-IMSI-123400002400: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400002400 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.750000}: select() (msc=-1) Paging: subscr-IMSI-123400002440: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400002440 @@ -4798,6 +4859,7 @@ (msc=-1) Paging: subscr-IMSI-123400002640: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400002640 (msc=-1) Paging: subscr-IMSI-123400002680: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={2.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -4821,7 +4883,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400003000 (msc=-1) Paging: subscr-IMSI-123400003040: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400003040 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={2.250000}: select() (msc=-1) Paging: subscr-IMSI-123400003080: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400003080 @@ -4843,7 +4906,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400003400 (msc=-1) Paging: subscr-IMSI-123400003440: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400003440 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={2.500000}: select() (msc=-1) Paging: subscr-IMSI-123400003480: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400003480 @@ -4865,7 +4929,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400003800 (msc=-1) Paging: subscr-IMSI-123400003840: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400003840 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={2.750000}: select() (msc=-1) Paging: subscr-IMSI-123400003880: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400003880 @@ -4887,7 +4952,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400004200 (msc=-1) Paging: subscr-IMSI-123400004240: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400004240 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={3.000000}: select() (msc=-1) Paging: subscr-IMSI-123400004280: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400004280 @@ -4909,7 +4975,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400004600 (msc=-1) Paging: subscr-IMSI-123400004640: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400004640 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={3.250000}: select() (msc=-1) Paging: subscr-IMSI-123400004680: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400004680 @@ -4931,7 +4998,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400005000 (msc=-1) Paging: subscr-IMSI-123400005040: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400005040 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={3.500000}: select() (msc=-1) Paging: subscr-IMSI-123400005080: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400005080 @@ -4948,6 +5016,7 @@ (msc=-1) Paging: subscr-IMSI-123400005320: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400005320 (msc=-1) Paging: subscr-IMSI-123400005360: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={4.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -4971,7 +5040,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400005680 (msc=-1) Paging: subscr-IMSI-123400005720: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400005720 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={4.250000}: select() (msc=-1) Paging: subscr-IMSI-123400005760: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400005760 @@ -4993,7 +5063,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400006080 (msc=-1) Paging: subscr-IMSI-123400006120: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400006120 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={4.500000}: select() (msc=-1) Paging: subscr-IMSI-123400006160: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400006160 @@ -5015,7 +5086,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400006480 (msc=-1) Paging: subscr-IMSI-123400006520: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400006520 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={4.750000}: select() (msc=-1) Paging: subscr-IMSI-123400006560: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400006560 @@ -5037,7 +5109,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400006880 (msc=-1) Paging: subscr-IMSI-123400006920: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400006920 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={5.000000}: select() (msc=-1) Paging: subscr-IMSI-123400006960: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400006960 @@ -5059,7 +5132,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400007280 (msc=-1) Paging: subscr-IMSI-123400007320: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400007320 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={5.250000}: select() (msc=-1) Paging: subscr-IMSI-123400007360: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400007360 @@ -5081,7 +5155,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400007680 (msc=-1) Paging: subscr-IMSI-123400007720: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400007720 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={5.500000}: select() (msc=-1) Paging: subscr-IMSI-123400007760: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400007760 @@ -5098,6 +5173,7 @@ (msc=-1) Paging: subscr-IMSI-123400008000: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400008000 (msc=-1) Paging: subscr-IMSI-123400008040: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={6.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -5121,7 +5197,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400008360 (msc=-1) Paging: subscr-IMSI-123400008400: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400008400 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={6.250000}: select() (msc=-1) Paging: subscr-IMSI-123400008440: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400008440 @@ -5143,7 +5220,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400008760 (msc=-1) Paging: subscr-IMSI-123400008800: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400008800 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={6.500000}: select() (msc=-1) Paging: subscr-IMSI-123400008840: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400008840 @@ -5165,7 +5243,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400009160 (msc=-1) Paging: subscr-IMSI-123400009200: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400009200 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={6.750000}: select() (msc=-1) Paging: subscr-IMSI-123400009240: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400009240 @@ -5187,7 +5266,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400009560 (msc=-1) Paging: subscr-IMSI-123400009600: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400009600 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={7.000000}: select() (msc=-1) Paging: subscr-IMSI-123400009640: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400009640 @@ -5209,7 +5289,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400009960 (msc=-1) Paging: subscr-IMSI-123400010000: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400010000 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={7.250000}: select() (msc=-1) Paging: subscr-IMSI-123400010040: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400010040 @@ -5231,7 +5312,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400010360 (msc=-1) Paging: subscr-IMSI-123400010400: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400010400 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={7.500000}: select() (msc=-1) Paging: subscr-IMSI-123400010440: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400010440 @@ -5248,6 +5330,7 @@ (msc=-1) Paging: subscr-IMSI-123400010680: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400010680 (msc=-1) Paging: subscr-IMSI-123400010720: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={8.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -5271,7 +5354,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400011040 (msc=-1) Paging: subscr-IMSI-123400011080: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400011080 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={8.250000}: select() (msc=-1) Paging: subscr-IMSI-123400011120: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400011120 @@ -5293,7 +5377,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400011440 (msc=-1) Paging: subscr-IMSI-123400011480: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400011480 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={8.500000}: select() (msc=-1) Paging: subscr-IMSI-123400011520: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400011520 @@ -5315,7 +5400,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400011840 (msc=-1) Paging: subscr-IMSI-123400011880: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400011880 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={8.750000}: select() (msc=-1) Paging: subscr-IMSI-123400011920: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400011920 @@ -5337,7 +5423,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400012240 (msc=-1) Paging: subscr-IMSI-123400012280: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400012280 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={9.000000}: select() (msc=-1) Paging: subscr-IMSI-123400012320: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400012320 @@ -5359,7 +5446,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400012640 (msc=-1) Paging: subscr-IMSI-123400012680: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400012680 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-123400000360: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-123400000320: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-123400000280: (bts=0) T3113 expired @@ -5391,7 +5479,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400013040 (msc=-1) Paging: subscr-IMSI-123400013080: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400013080 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={9.500000}: select() (msc=-1) Paging: subscr-IMSI-123400013120: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400013120 @@ -5408,6 +5497,7 @@ (msc=-1) Paging: subscr-IMSI-123400013360: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400013360 (msc=-1) Paging: subscr-IMSI-123400013400: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={10.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -5431,7 +5521,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400013720 (msc=-1) Paging: subscr-IMSI-123400013760: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400013760 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={10.250000}: select() (msc=-1) Paging: subscr-IMSI-123400013800: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400013800 @@ -5453,7 +5544,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400014120 (msc=-1) Paging: subscr-IMSI-123400014160: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400014160 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={10.500000}: select() (msc=-1) Paging: subscr-IMSI-123400014200: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400014200 @@ -5475,7 +5567,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400014520 (msc=-1) Paging: subscr-IMSI-123400014560: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400014560 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={10.750000}: select() (msc=-1) Paging: subscr-IMSI-123400014600: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400014600 @@ -5497,7 +5590,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400014920 (msc=-1) Paging: subscr-IMSI-123400014960: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400014960 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={11.000000}: select() (msc=-1) Paging: subscr-IMSI-123400015000: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400015000 @@ -5519,7 +5613,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400015320 (msc=-1) Paging: subscr-IMSI-123400015360: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400015360 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-123400000680: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-123400000640: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-123400000600: (bts=0) T3113 expired @@ -5549,7 +5644,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400015720 (msc=-1) Paging: subscr-IMSI-123400015760: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400015760 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={11.500000}: select() (msc=-1) Paging: subscr-IMSI-123400015800: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400015800 @@ -5566,6 +5662,7 @@ (msc=-1) Paging: subscr-IMSI-123400016040: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400016040 (msc=-1) Paging: subscr-IMSI-123400016080: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={12.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -5589,7 +5686,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400016400 (msc=-1) Paging: subscr-IMSI-123400016440: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400016440 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-123400001000: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-123400000960: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-123400000920: (bts=0) T3113 expired @@ -5619,7 +5717,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400016800 (msc=-1) Paging: subscr-IMSI-123400016840: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400016840 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={12.500000}: select() (msc=-1) Paging: subscr-IMSI-123400016880: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400016880 @@ -5641,7 +5740,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400017200 (msc=-1) Paging: subscr-IMSI-123400017240: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400017240 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={12.750000}: select() (msc=-1) Paging: subscr-IMSI-123400017280: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400017280 @@ -5663,7 +5763,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400017600 (msc=-1) Paging: subscr-IMSI-123400017640: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400017640 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={13.000000}: select() (msc=-1) Paging: subscr-IMSI-123400017680: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400017680 @@ -5685,7 +5786,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400018000 (msc=-1) Paging: subscr-IMSI-123400018040: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400018040 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Scheduling next batch in 0.250000s (available_slots=17) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={13.250000}: select() (msc=-1) Paging: subscr-IMSI-123400018080: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400018080 @@ -5707,7 +5809,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400018400 (msc=-1) Paging: subscr-IMSI-123400018440: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400018440 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Scheduling next batch in 0.250000s (available_slots=7) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={13.500000}: select() (msc=-1) Paging: subscr-IMSI-123400018480: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400018480 @@ -5724,6 +5827,7 @@ (msc=-1) Paging: subscr-IMSI-123400018720: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400018720 (msc=-1) Paging: subscr-IMSI-123400018760: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 7 subscribers (7 initial, 0 retrans) during last iteration sys={14.000000}: select() (bts=0) Estimated 67 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 67) @@ -5747,7 +5851,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400019080 (msc=-1) Paging: subscr-IMSI-123400019120: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400019120 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Scheduling next batch in 0.250000s (available_slots=57) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-123400001320: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-123400001280: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-123400001240: (bts=0) T3113 expired @@ -5777,7 +5882,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400019480 (msc=-1) Paging: subscr-IMSI-123400019520: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400019520 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Scheduling next batch in 0.250000s (available_slots=47) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={14.500000}: select() (msc=-1) Paging: subscr-IMSI-123400019560: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400019560 @@ -5799,7 +5905,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400019880 (msc=-1) Paging: subscr-IMSI-123400019920: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400019920 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Scheduling next batch in 0.250000s (available_slots=37) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={14.750000}: select() (msc=-1) Paging: subscr-IMSI-123400019960: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-123400019960 @@ -5821,7 +5928,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-123400001640 (msc=-1) Paging: subscr-IMSI-123400001680: (bts=0) Going to send paging command for ch. type 0 (attempt 1) abis_rsl_sendmsg: Paging CMD IMSI-123400001680 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Scheduling next batch in 0.250000s (available_slots=27) +(bts=0) Paged 10 subscribers (1 initial, 9 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-123400001720: (bts=0) Stop paging (flush) (msc=-1) Paging: subscr-IMSI-123400001760: (bts=0) Stop paging (flush) (msc=-1) Paging: subscr-IMSI-123400001800: (bts=0) Stop paging (flush) @@ -6298,7 +6406,8 @@ (msc=-1) Paging: subscr-IMSI-1234000000: (bts=0) Paging request: T3113 expires in 9 seconds (estimated 9) (msc=-1) Paging: subscr-IMSI-1234000000: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000000 -(bts=0) Paged 1 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=66) +(msc=-1) Paging: subscr-IMSI-1234000000: (bts=0) Paging delayed: retransmission happens in 0.500000s +(bts=0) Paged 1 subscribers (1 initial, 0 retrans) during last iteration (bts=0) Estimated 509 paging available_slots over 60 seconds (msc=-1) Paging: subscr-IMSI-1234000001: (bts=0) Start paging (msc=-1) Paging: subscr-IMSI-1234000001: (bts=0) Paging request: T3113 expires in 9 seconds (estimated 9) @@ -7818,7 +7927,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000009 (msc=-1) Paging: subscr-IMSI-1234000010: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000010 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=56) +(bts=0) Scheduling next batch in 0.250000s (available_slots=56) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={0.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000011: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000011 @@ -7840,7 +7950,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000019 (msc=-1) Paging: subscr-IMSI-1234000020: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000020 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=46) +(bts=0) Scheduling next batch in 0.250000s (available_slots=46) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={0.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000021: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000021 @@ -7862,7 +7973,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000029 (msc=-1) Paging: subscr-IMSI-1234000030: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000030 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=36) +(bts=0) Scheduling next batch in 0.250000s (available_slots=36) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000031: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000031 @@ -7884,7 +7996,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000039 (msc=-1) Paging: subscr-IMSI-1234000040: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000040 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=26) +(bts=0) Scheduling next batch in 0.250000s (available_slots=26) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000041: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000041 @@ -7906,7 +8019,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000049 (msc=-1) Paging: subscr-IMSI-1234000050: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000050 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=16) +(bts=0) Scheduling next batch in 0.250000s (available_slots=16) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.500000}: select() (msc=-1) Paging: subscr-IMSI-1234000051: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000051 @@ -7928,7 +8042,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000059 (msc=-1) Paging: subscr-IMSI-1234000060: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000060 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={1.750000}: select() (msc=-1) Paging: subscr-IMSI-1234000061: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000061 @@ -7943,6 +8058,7 @@ (msc=-1) Paging: subscr-IMSI-1234000066: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000066 (msc=-1) Paging: subscr-IMSI-1234000067: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={2.000000}: select() (bts=0) Estimated 16 paging available_slots over 2 seconds (bts=0) Timeout waiting for CCCH Load Indication, assuming BTS is below Load Threshold (available_slots 0 -> 16) @@ -7966,7 +8082,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000075 (msc=-1) Paging: subscr-IMSI-1234000076: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000076 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={2.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000077: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000077 @@ -7981,6 +8098,7 @@ (msc=-1) Paging: subscr-IMSI-1234000082: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000082 (msc=-1) Paging: subscr-IMSI-1234000083: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={3.1000000}: select() sys={4.000000}: select() (bts=0) Estimated 16 paging available_slots over 2 seconds @@ -8005,7 +8123,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000091 (msc=-1) Paging: subscr-IMSI-1234000092: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000092 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={4.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000093: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000093 @@ -8020,6 +8139,7 @@ (msc=-1) Paging: subscr-IMSI-1234000098: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000098 (msc=-1) Paging: subscr-IMSI-1234000099: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={5.1000000}: select() sys={6.000000}: select() (bts=0) Estimated 16 paging available_slots over 2 seconds @@ -8044,7 +8164,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000107 (msc=-1) Paging: subscr-IMSI-1234000108: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000108 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={6.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000109: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000109 @@ -8059,6 +8180,7 @@ (msc=-1) Paging: subscr-IMSI-1234000114: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000114 (msc=-1) Paging: subscr-IMSI-1234000115: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={7.1000000}: select() sys={8.000000}: select() (bts=0) Estimated 16 paging available_slots over 2 seconds @@ -8083,7 +8205,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000123 (msc=-1) Paging: subscr-IMSI-1234000124: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000124 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={8.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000125: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000125 @@ -8098,6 +8221,7 @@ (msc=-1) Paging: subscr-IMSI-1234000130: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000130 (msc=-1) Paging: subscr-IMSI-1234000131: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={9.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000004: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000003: (bts=0) T3113 expired @@ -8127,7 +8251,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000139 (msc=-1) Paging: subscr-IMSI-1234000140: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000140 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000012: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000011: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000010: (bts=0) T3113 expired @@ -8150,6 +8275,7 @@ (msc=-1) Paging: subscr-IMSI-1234000146: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000146 (msc=-1) Paging: subscr-IMSI-1234000147: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={11.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000021: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000020: (bts=0) T3113 expired @@ -8183,7 +8309,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000155 (msc=-1) Paging: subscr-IMSI-1234000156: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000156 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000030: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000029: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000028: (bts=0) T3113 expired @@ -8207,6 +8334,7 @@ (msc=-1) Paging: subscr-IMSI-1234000162: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000162 (msc=-1) Paging: subscr-IMSI-1234000163: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={13.1000000}: select() sys={14.000000}: select() (bts=0) Estimated 16 paging available_slots over 2 seconds @@ -8231,7 +8359,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000171 (msc=-1) Paging: subscr-IMSI-1234000172: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000172 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000036: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000035: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000034: (bts=0) T3113 expired @@ -8252,6 +8381,7 @@ (msc=-1) Paging: subscr-IMSI-1234000178: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000178 (msc=-1) Paging: subscr-IMSI-1234000179: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={15.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000045: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000044: (bts=0) T3113 expired @@ -8285,7 +8415,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000187 (msc=-1) Paging: subscr-IMSI-1234000188: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000188 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000050: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000049: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000048: (bts=0) T3113 expired @@ -8305,6 +8436,7 @@ (msc=-1) Paging: subscr-IMSI-1234000194: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000194 (msc=-1) Paging: subscr-IMSI-1234000195: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={17.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000051: (bts=0) T3113 expired sys={18.000000}: select() @@ -8330,7 +8462,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000203 (msc=-1) Paging: subscr-IMSI-1234000204: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000204 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000061: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000060: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000059: (bts=0) T3113 expired @@ -8355,6 +8488,7 @@ (msc=-1) Paging: subscr-IMSI-1234000210: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000210 (msc=-1) Paging: subscr-IMSI-1234000211: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={19.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000069: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000068: (bts=0) T3113 expired @@ -8387,7 +8521,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000219 (msc=-1) Paging: subscr-IMSI-1234000220: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000220 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000070: (bts=0) T3113 expired sys={20.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000221: (bts=0) Going to send paging command for ch. type 0 (attempt 0) @@ -8403,6 +8538,7 @@ (msc=-1) Paging: subscr-IMSI-1234000226: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000226 (msc=-1) Paging: subscr-IMSI-1234000227: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={21.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000075: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000074: (bts=0) T3113 expired @@ -8432,7 +8568,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000235 (msc=-1) Paging: subscr-IMSI-1234000236: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000236 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000085: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000084: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000083: (bts=0) T3113 expired @@ -8457,6 +8594,7 @@ (msc=-1) Paging: subscr-IMSI-1234000242: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000242 (msc=-1) Paging: subscr-IMSI-1234000243: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={23.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000090: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000089: (bts=0) T3113 expired @@ -8486,7 +8624,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000251 (msc=-1) Paging: subscr-IMSI-1234000252: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000252 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000091: (bts=0) T3113 expired sys={24.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000253: (bts=0) Going to send paging command for ch. type 0 (attempt 0) @@ -8502,6 +8641,7 @@ (msc=-1) Paging: subscr-IMSI-1234000258: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000258 (msc=-1) Paging: subscr-IMSI-1234000259: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={25.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000099: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000098: (bts=0) T3113 expired @@ -8534,7 +8674,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000267 (msc=-1) Paging: subscr-IMSI-1234000268: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000268 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000109: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000108: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000107: (bts=0) T3113 expired @@ -8559,6 +8700,7 @@ (msc=-1) Paging: subscr-IMSI-1234000274: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000274 (msc=-1) Paging: subscr-IMSI-1234000275: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={27.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000110: (bts=0) T3113 expired sys={28.000000}: select() @@ -8584,7 +8726,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000283 (msc=-1) Paging: subscr-IMSI-1234000284: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000284 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000115: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000114: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000113: (bts=0) T3113 expired @@ -8604,6 +8747,7 @@ (msc=-1) Paging: subscr-IMSI-1234000290: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000290 (msc=-1) Paging: subscr-IMSI-1234000291: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={29.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000124: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000123: (bts=0) T3113 expired @@ -8637,7 +8781,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000299 (msc=-1) Paging: subscr-IMSI-1234000300: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000300 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000130: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000129: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000128: (bts=0) T3113 expired @@ -8658,6 +8803,7 @@ (msc=-1) Paging: subscr-IMSI-1234000306: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000306 (msc=-1) Paging: subscr-IMSI-1234000307: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={31.000000}: select() sys={32.000000}: select() (bts=0) Estimated 16 paging available_slots over 2 seconds @@ -8682,7 +8828,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000315 (msc=-1) Paging: subscr-IMSI-1234000316: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000316 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000139: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000138: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000137: (bts=0) T3113 expired @@ -8706,6 +8853,7 @@ (msc=-1) Paging: subscr-IMSI-1234000322: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000322 (msc=-1) Paging: subscr-IMSI-1234000323: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={33.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000148: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000147: (bts=0) T3113 expired @@ -8739,7 +8887,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000331 (msc=-1) Paging: subscr-IMSI-1234000332: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000332 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000150: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000149: (bts=0) T3113 expired sys={34.250000}: select() @@ -8756,6 +8905,7 @@ (msc=-1) Paging: subscr-IMSI-1234000338: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000338 (msc=-1) Paging: subscr-IMSI-1234000339: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={35.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000154: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000153: (bts=0) T3113 expired @@ -8784,7 +8934,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000347 (msc=-1) Paging: subscr-IMSI-1234000348: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000348 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000164: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000163: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000162: (bts=0) T3113 expired @@ -8809,6 +8960,7 @@ (msc=-1) Paging: subscr-IMSI-1234000354: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000354 (msc=-1) Paging: subscr-IMSI-1234000355: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={37.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000170: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000169: (bts=0) T3113 expired @@ -8839,7 +8991,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000363 (msc=-1) Paging: subscr-IMSI-1234000364: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000364 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={38.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000365: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000365 @@ -8854,6 +9007,7 @@ (msc=-1) Paging: subscr-IMSI-1234000370: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000370 (msc=-1) Paging: subscr-IMSI-1234000371: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={39.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000178: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000177: (bts=0) T3113 expired @@ -8886,7 +9040,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000379 (msc=-1) Paging: subscr-IMSI-1234000380: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000380 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000188: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000187: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000186: (bts=0) T3113 expired @@ -8911,6 +9066,7 @@ (msc=-1) Paging: subscr-IMSI-1234000386: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000386 (msc=-1) Paging: subscr-IMSI-1234000387: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={41.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000190: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000189: (bts=0) T3113 expired @@ -8937,7 +9093,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000395 (msc=-1) Paging: subscr-IMSI-1234000396: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000396 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000194: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000193: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000192: (bts=0) T3113 expired @@ -8956,6 +9113,7 @@ (msc=-1) Paging: subscr-IMSI-1234000402: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000402 (msc=-1) Paging: subscr-IMSI-1234000403: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={43.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000203: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000202: (bts=0) T3113 expired @@ -8989,7 +9147,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000411 (msc=-1) Paging: subscr-IMSI-1234000412: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000412 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000210: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000209: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000208: (bts=0) T3113 expired @@ -9011,6 +9170,7 @@ (msc=-1) Paging: subscr-IMSI-1234000418: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000418 (msc=-1) Paging: subscr-IMSI-1234000419: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={45.000000}: select() sys={46.000000}: select() (bts=0) Estimated 16 paging available_slots over 2 seconds @@ -9035,7 +9195,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000427 (msc=-1) Paging: subscr-IMSI-1234000428: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000428 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000218: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000217: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000216: (bts=0) T3113 expired @@ -9058,6 +9219,7 @@ (msc=-1) Paging: subscr-IMSI-1234000434: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000434 (msc=-1) Paging: subscr-IMSI-1234000435: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={47.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000227: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000226: (bts=0) T3113 expired @@ -9091,7 +9253,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000443 (msc=-1) Paging: subscr-IMSI-1234000444: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000444 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000230: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000229: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000228: (bts=0) T3113 expired @@ -9109,6 +9272,7 @@ (msc=-1) Paging: subscr-IMSI-1234000450: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000450 (msc=-1) Paging: subscr-IMSI-1234000451: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={49.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000233: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000232: (bts=0) T3113 expired @@ -9136,7 +9300,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000459 (msc=-1) Paging: subscr-IMSI-1234000460: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000460 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000243: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000242: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000241: (bts=0) T3113 expired @@ -9161,6 +9326,7 @@ (msc=-1) Paging: subscr-IMSI-1234000466: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000466 (msc=-1) Paging: subscr-IMSI-1234000467: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={51.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000250: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000249: (bts=0) T3113 expired @@ -9192,7 +9358,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000475 (msc=-1) Paging: subscr-IMSI-1234000476: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000476 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration sys={52.250000}: select() (msc=-1) Paging: subscr-IMSI-1234000477: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000477 @@ -9207,6 +9374,7 @@ (msc=-1) Paging: subscr-IMSI-1234000482: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000482 (msc=-1) Paging: subscr-IMSI-1234000483: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={53.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000257: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000256: (bts=0) T3113 expired @@ -9238,7 +9406,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000491 (msc=-1) Paging: subscr-IMSI-1234000492: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000492 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (10 initial, 0 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000267: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000266: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000265: (bts=0) T3113 expired @@ -9263,6 +9432,7 @@ (msc=-1) Paging: subscr-IMSI-1234000498: (bts=0) Going to send paging command for ch. type 0 (attempt 0) abis_rsl_sendmsg: Paging CMD IMSI-1234000498 (msc=-1) Paging: subscr-IMSI-1234000499: (bts=0) Paging delayed: waiting for available slots at BTS +(bts=0) Paged 6 subscribers (6 initial, 0 retrans) during last iteration sys={55.000000}: select() (msc=-1) Paging: subscr-IMSI-1234000270: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000269: (bts=0) T3113 expired @@ -9290,7 +9460,8 @@ abis_rsl_sendmsg: Paging CMD IMSI-1234000278 (msc=-1) Paging: subscr-IMSI-1234000279: (bts=0) Going to send paging command for ch. type 0 (attempt 1) abis_rsl_sendmsg: Paging CMD IMSI-1234000279 -(bts=0) Paged 10 subscribers during last iteration. Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Scheduling next batch in 0.250000s (available_slots=6) +(bts=0) Paged 10 subscribers (1 initial, 9 retrans) during last iteration (msc=-1) Paging: subscr-IMSI-1234000273: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000272: (bts=0) T3113 expired (msc=-1) Paging: subscr-IMSI-1234000271: (bts=0) T3113 expired
View file
osmo-bsc_1.9.0.tar.xz/tests/timer.vty -> osmo-bsc_1.10.0.tar.xz/tests/timer.vty
Changed
@@ -34,7 +34,9 @@ net: X17 = 0 ms Rounding threshold for all_allocated:* rate counters: round up to the next counter increment after this many milliseconds. If set to half of X16 (or 0), employ the usual round() behavior: round up after half of a granularity period. If set to 1, behave like ceil(): already increment the counter immediately when all channels are allocated. If set >= X16, behave like floor(): only increment after a full X16 period of all channels being occupied. See also X16, X18 (default: 0 ms) net: X18 = 60000 ms Forget-sum period for all_allocated:* rate counters: after this amount of idle time, forget internally cumulated time remainders. Zero to always keep remainders. See also X16, X17. (default: 60000 ms) net: X25 = 5 s Timeout for initial user data after an MSC initiated an SCCP connection to the BSS (default: 5 s) +net: X3105 = 17 Ny1: Maximum number of Physical Information (re)transmissions (default: 17) net: X3111 = 4 s Wait time after lchan was released in error (should be T3111 + 2s) (default: 4 s) +net: X3113 = 60 s Maximum Paging Request Transmit Delay Threshold: If the estimated transmit delay of the messages in the paging queue surpasses this threshold, then new incoming paging requests will if possible replace a request in retransmission state from the queue or otherwise be discarded, hence limiting the size of the queue and maximum delay of its scheduled requests. X3113 also serves as the upper boundary for dynamic T3113 when estimating the expected maximum delay to get a response (default: 60 s) net: X3210 = 20 s After L3 Complete, wait for MSC to confirm (default: 20 s) mgw: X2427 = 5 s timeout for MGCP response from MGW (default: 5 s) @@ -88,7 +90,9 @@ net: X17 = 0 ms Rounding threshold for all_allocated:* rate counters: round up to the next counter increment after this many milliseconds. If set to half of X16 (or 0), employ the usual round() behavior: round up after half of a granularity period. If set to 1, behave like ceil(): already increment the counter immediately when all channels are allocated. If set >= X16, behave like floor(): only increment after a full X16 period of all channels being occupied. See also X16, X18 (default: 0 ms) net: X18 = 60000 ms Forget-sum period for all_allocated:* rate counters: after this amount of idle time, forget internally cumulated time remainders. Zero to always keep remainders. See also X16, X17. (default: 60000 ms) net: X25 = 5 s Timeout for initial user data after an MSC initiated an SCCP connection to the BSS (default: 5 s) +net: X3105 = 17 Ny1: Maximum number of Physical Information (re)transmissions (default: 17) net: X3111 = 4 s Wait time after lchan was released in error (should be T3111 + 2s) (default: 4 s) +net: X3113 = 60 s Maximum Paging Request Transmit Delay Threshold: If the estimated transmit delay of the messages in the paging queue surpasses this threshold, then new incoming paging requests will if possible replace a request in retransmission state from the queue or otherwise be discarded, hence limiting the size of the queue and maximum delay of its scheduled requests. X3113 also serves as the upper boundary for dynamic T3113 when estimating the expected maximum delay to get a response (default: 60 s) net: X3210 = 20 s After L3 Complete, wait for MSC to confirm (default: 20 s) mgw: X2427 = 5 s timeout for MGCP response from MGW (default: 5 s)
View file
osmo-bsc_1.9.0.tar.xz/doc/manuals/chapters/mgwpool.adoc
Deleted
@@ -1,252 +0,0 @@ -mgw_pooling -== MGW Pooling - -OsmoBSC is able to use a pool of media gateway (MGW) instances since mid 2021. -The aim of MGW pooling is to evenly distribute the RTP voice stream load across -multiple MGW instances. This can help to scale out over multiple VMs or physical -machines. Until osmo-mgw includes multithreading support, it may also be used to -scale-out to multiple cores on a single host. - -The load distribution is managed in such a way that when a new call is placed, -the pool will automatically assign the call to the MGW with the lowest load. - -MGW pooling is recommended for larger RAN installations. For small networks and -lab installations the classic method with one MGW per BSC offers sufficient -performance. - -=== VTY configuration - -In OsmoBSC the MGW is controlled via an MGCP-Client. The VTY commands to -configure the MGCP-Client are part of the 'msc' node due to historical reasons. -Unfortunately this concept does not allow to configure multiple MGCP-Client -instances as required by MGW pooling. In order to support MGW pooling a new -'mgw' node has been added under the 'network' node. - -=== Existing configuration files - -Existing OsmoBSC configuration files will continue to work, but as soon as an -MGW pool is configured the 'mgw' settings under the 'msc' node will be ignored. - -Example configuration with only one MGCP-Client under the 'msc' node: ----- -msc 0 - mgw remote-ip 127.0.0.1 - mgw remote-port 2428 ----- - -=== MGW pool configuration - -To setup an MGW pool, the user must first install multiple OsmoMGW instances, so -that they won’t interfere with each other. This can be done using different -local host IP addresses or different ports. When OsmoMGW is installed from -packages, the systemd configuration may also require adjustment. - -The VTY settings under the 'mgw' node works the same way as the VTY settings for -the MGW under the 'msc' node. - -Example configuration with two MGCP-Client instances in a pool: ----- - mgw 0 - description media-gw-0 <2> - mgw remote-ip 127.0.0.1 - mgw remote-port 2432 - mgw local-ip 127.0.0.1 - mgw local-port 2431 - mgw endpoint-domain mgw0 <1> - mgw 1 - description media-gw-1 <2> - mgw remote-ip 127.0.0.1 - mgw remote-port 2430 - mgw local-ip 127.0.0.1 - mgw local-port 2429 - mgw endpoint-domain mgw1 <1> ----- - -<1> When working with multiple MGW / MGCP-Client instances, the domain name for -each MGW should be different. Otherwise it won't be possible to distinguish the -endpoint names in the log. It should also be noted that the domain name must -match the configuration of the related OsmoMGW instance. - -<2> It is also possible to assign a descriptive name to each MGW instance. The -MGCP client specific log lines will then use this name as logging context. If -no description is set, the domain name will be used. - -=== MGW pool management - -While it was not possible to change the MGCP-Client configuration under the -“msc” node at runtime, the pool is fully runtime-manageable. The only limitation -is that an MGCP-Client can not be restarted or removed as long as it is serving -calls (see also: <<mgw_pooling_blocking>>). - -==== MGW pool status - -The VTY implements a 'show mgw-pool' command that lists the currently configured -MGW pool members, their status and call utilization. - ----- -OsmoBSC> show mgw-pool -% MGW-Pool: -% MGW 0:media-gw-0 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 1 -% MGW 1:media-gw-1 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 0 ----- - -==== Adding an MGW / MGCP-Client to the MGW pool - -To add a new MGCP-Client to the pool, the 'mgw' node is used. Like with the -'bts' or the 'msc' node a reference number is used that usually starts at 0. -However it is still possible to assign any number from 0-255. The enumeration -also may contain gaps. - ----- -OsmoBSC> enable -OsmoBSC# configure terminal -OsmoBSC(config)# network -OsmoBSC(config-net)# mgw 2 -OsmoBSC(config-mgw)# mgw - local-ip local bind to connect to MGW from - local-port local port to connect to MGW from - remote-ip remote IP address to reach the MGW at - remote-port remote port to reach the MGW at - endpoint-domain Set the domain name to send in MGCP messages, e.g. the part 'foo' in 'rtpbridge/*@foo'. - reset-endpoint Add an endpoint name that should be reset (DLCX) on connect to the reset-endpoint list,e.g. 'rtpbridge/*' ----- - -The newly added MGW will immediately appear in the mgw-pool list but it won't -be used until its configuration finished by reconnecting it. - ----- -% MGW-Pool: -% MGW 0:media-gw-0 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 2 -% MGW 1:media-gw-1 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 3 -% MGW 2:mgw <1> -% mgcp-client: disconnected -% service: unblocked -% ongoing calls: 0 ----- - -<1> In this example a description is not set yet, so the domain name ("mgw") -is displayed. - -==== Reconnecting an MGW / MGCP-Client - -It may become necessary to reconnect an MGCP-Client. This is the case when the -VTY configuration was changed at runtime. In order to make the changes effective -the MGW configuration must be reloaded by reconnecting the MGW connection. Also -newly created MGW instances require a reconnect once their configuration is -done. - -To reconnect an MGCP-Client use the 'reconnect' VTY command: ----- -OsmoBSC# mgw 2 reconnect ----- - -The mgcp-client status should immediately change to 'connected'. The MGW is now -ready to be used for new calls. - ----- -OsmoBSC# show mgw-pool -% MGW-Pool: -% MGW 0:media-gw-0 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 2 -% MGW 1:media-gw-1 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 3 -% MGW 2:mgw -% mgcp-client: connected -% service: unblocked -% ongoing calls: 0 ----- - -It should be noted that MGCP a protocol is used via UDP, the connect only -happens locally to forward the UDP datagrams properly. Also (unless a reset -endpoint is configured like in the example config above) there will be no -immediate interaction with the MGW. However, the log should at least confirm -the the connect worked and the MGCP client has been created successfully. - ----- -Mon Aug 2 17:15:00 2021 DLMGCP mgcp_client.c:788 MGCP client: using endpoint domain '@mgw' -Mon Aug 2 17:15:00 2021 DLMGCP mgcp_client.c:908 MGCP GW connection: r=127.0.0.1:2427<->l=127.0.0.1:2727 ----- - -It is strongly advised to check the activity on the related MGW and to follow -the log in order to see that the communication between OsmoBSC and the MGW is -working correctly. - -mgw_pooling_blocking -==== Blocking an MGW / MGCP-Client - -If it becomes apparent that an MGCP-Client must be restarted or removed from -the config (maintenance) the operator can put that MGCP-Client into a blocked -mode. A blocked MGCP-Client will still serve the ongoing calls but it will not -be picked for the assignment of new calls. - -To block an MGCP-Client use the 'block' VTY command: ----- -OsmoBSC# mgw 2 block -OsmoBSC# show mgw-pool -% MGW-Pool: -% MGW 0:media-gw-0 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 11 -% MGW 1:media-gw-1 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 12 -% MGW 2:mgw -% mgcp-client: connected -% service: blocked -% ongoing calls: 10 ----- - -When the number of ongoing calls has tapered off, the MGW / MGCP-Client can be -restarted or removed if necessary. - ----- -OsmoBSC# show mgw-pool -% MGW-Pool: -% MGW 0:media-gw-0 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 15 -% MGW 1:media-gw-1 -% mgcp-client: connected -% service: unblocked -% ongoing calls: 14 -% MGW 2:mgw -% mgcp-client: connected -% service: blocked -% ongoing calls: 0 ----- - -If the blockade should be reverted, the 'unblock' VTY command can be used in -the same way to remove the blockade. (Reconnecting will not remove the -blockade.) - -==== Removing an MGW / MGCP-Client - -An MGCP-Client is removed from the pool using the 'no mgw' command from the -configure terminal. The MGCP-Client instance will automatically be terminated -and the related resources are freed. The only requirement is that there are no -ongoing calls on the selected instance. - ----- -OsmoBSC# configure terminal -OsmoBSC(config)# network -OsmoBSC(config-net)# no mgw 2 -----
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/bsc_ctrl_commands.c
Deleted
@@ -1,820 +0,0 @@ -/* - * (C) 2013-2015 by Holger Hans Peter Freyther - * (C) 2013-2015 by sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -#include <errno.h> -#include <time.h> - -#include <osmocom/ctrl/control_cmd.h> - -#include <osmocom/vty/command.h> -#include <osmocom/vty/misc.h> - -#include <osmocom/gsm/gsm48.h> -#include <osmocom/bsc/ipaccess.h> -#include <osmocom/bsc/gsm_data.h> -#include <osmocom/bsc/abis_nm.h> -#include <osmocom/bsc/debug.h> -#include <osmocom/bsc/chan_alloc.h> -#include <osmocom/bsc/osmo_bsc_rf.h> -#include <osmocom/bsc/bsc_msc_data.h> -#include <osmocom/bsc/bts.h> -#include <osmocom/bsc/neighbor_ident.h> - -static int verify_net_apply_config_file(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - FILE *cfile; - - if (!cmd->value || cmd->value0 == '\0') - return -1; - - cfile = fopen(cmd->value, "r"); - if (!cfile) - return -1; - - fclose(cfile); - - return 0; -} -static int set_net_apply_config_file(struct ctrl_cmd *cmd, void *_data) -{ - int rc; - FILE *cfile; - unsigned cmd_ret = CTRL_CMD_ERROR; - - LOGP(DCTRL, LOGL_NOTICE, "Applying VTY snippet from %s...\n", cmd->value); - cfile = fopen(cmd->value, "r"); - if (!cfile) { - LOGP(DCTRL, LOGL_NOTICE, "Applying VTY snippet from %s: fopen() failed: %d\n", - cmd->value, errno); - cmd->reply = "NoFile"; - return cmd_ret; - } - - rc = vty_read_config_filep(cfile, NULL); - LOGP(DCTRL, LOGL_NOTICE, "Applying VTY snippet from %s returned %d\n", cmd->value, rc); - if (rc) { - cmd->reply = talloc_asprintf(cmd, "ParseError=%d", rc); - if (!cmd->reply) - cmd->reply = "OOM"; - goto close_ret; - } - - cmd->reply = "OK"; - cmd_ret = CTRL_CMD_REPLY; -close_ret: - fclose(cfile); - return cmd_ret; -} -CTRL_CMD_DEFINE_WO(net_apply_config_file, "apply-config-file"); - -static int verify_net_write_config_file(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - return 0; -} -static int set_net_write_config_file(struct ctrl_cmd *cmd, void *_data) -{ - const char *cfile_name; - unsigned cmd_ret = CTRL_CMD_ERROR; - - if (strcmp(cmd->value, "overwrite")) - host_config_set(cmd->value); - - cfile_name = host_config_file(); - - LOGP(DCTRL, LOGL_NOTICE, "Writing VTY config to file %s...\n", cfile_name); - if (osmo_vty_write_config_file(cfile_name) < 0) - goto ret; - - cmd->reply = "OK"; - cmd_ret = CTRL_CMD_REPLY; -ret: - return cmd_ret; -} -CTRL_CMD_DEFINE_WO(net_write_config_file, "write-config-file"); - -CTRL_CMD_DEFINE(net_mcc, "mcc"); -static int get_net_mcc(struct ctrl_cmd *cmd, void *_data) -{ - struct gsm_network *net = cmd->node; - cmd->reply = talloc_asprintf(cmd, "%s", osmo_mcc_name(net->plmn.mcc)); - if (!cmd->reply) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } - return CTRL_CMD_REPLY; -} -static int set_net_mcc(struct ctrl_cmd *cmd, void *_data) -{ - struct gsm_network *net = cmd->node; - uint16_t mcc; - if (osmo_mcc_from_str(cmd->value, &mcc)) - return -1; - net->plmn.mcc = mcc; - return get_net_mcc(cmd, _data); -} -static int verify_net_mcc(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - if (osmo_mcc_from_str(value, NULL)) - return -1; - return 0; -} - -CTRL_CMD_DEFINE(net_mnc, "mnc"); -static int get_net_mnc(struct ctrl_cmd *cmd, void *_data) -{ - struct gsm_network *net = cmd->node; - cmd->reply = talloc_asprintf(cmd, "%s", osmo_mnc_name(net->plmn.mnc, net->plmn.mnc_3_digits)); - if (!cmd->reply) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } - return CTRL_CMD_REPLY; -} -static int set_net_mnc(struct ctrl_cmd *cmd, void *_data) -{ - struct gsm_network *net = cmd->node; - struct osmo_plmn_id plmn = net->plmn; - if (osmo_mnc_from_str(cmd->value, &plmn.mnc, &plmn.mnc_3_digits)) { - cmd->reply = "Error while decoding MNC"; - return CTRL_CMD_ERROR; - } - net->plmn = plmn; - return get_net_mnc(cmd, _data); -} -static int verify_net_mnc(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - if (osmo_mnc_from_str(value, NULL, NULL)) - return -1; - return 0; -} - -static int set_net_apply_config(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_network *net = cmd->node; - struct gsm_bts *bts; - - llist_for_each_entry(bts, &net->bts_list, list) { - if (!is_ipaccess_bts(bts)) - continue; - - /* - * The ip.access nanoBTS seems to be unrelaible on BSSGP - * so let's us just reboot it. For the sysmoBTS we can just - * restart the process as all state is gone. - */ - if (!is_osmobts(bts) && strcmp(cmd->value, "restart") == 0) { - struct gsm_bts_trx *trx; - llist_for_each_entry_reverse(trx, &bts->trx_list, list) - abis_nm_ipaccess_restart(trx); - } else - ipaccess_drop_oml(bts, "ctrl net.apply-configuration"); - } - - cmd->reply = "Tried to drop the BTS"; - return CTRL_CMD_REPLY; -} - -CTRL_CMD_DEFINE_WO_NOVRF(net_apply_config, "apply-configuration"); - -static int verify_net_mcc_mnc_apply(struct ctrl_cmd *cmd, const char *value, void *d) -{ - char *tmp, *saveptr, *mcc, *mnc; - int rc = 0; - - tmp = talloc_strdup(cmd, value); - if (!tmp) - return 1; - - mcc = strtok_r(tmp, ",", &saveptr); - mnc = strtok_r(NULL, ",", &saveptr); - - if (osmo_mcc_from_str(mcc, NULL) || osmo_mnc_from_str(mnc, NULL, NULL)) - rc = -1; - - talloc_free(tmp); - return rc; -} - -static int set_net_mcc_mnc_apply(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_network *net = cmd->node; - char *tmp, *saveptr, *mcc_str, *mnc_str; - struct osmo_plmn_id plmn; - - tmp = talloc_strdup(cmd, cmd->value); - if (!tmp) - goto oom; - - mcc_str = strtok_r(tmp, ",", &saveptr); - mnc_str = strtok_r(NULL, ",", &saveptr); - - if (osmo_mcc_from_str(mcc_str, &plmn.mcc)) { - cmd->reply = "Error while decoding MCC"; - talloc_free(tmp); - return CTRL_CMD_ERROR; - } - - if (osmo_mnc_from_str(mnc_str, &plmn.mnc, &plmn.mnc_3_digits)) { - cmd->reply = "Error while decoding MNC"; - talloc_free(tmp); - return CTRL_CMD_ERROR; - } - - talloc_free(tmp); - - if (!osmo_plmn_cmp(&net->plmn, &plmn)) { - cmd->reply = "Nothing changed"; - return CTRL_CMD_REPLY; - } - - net->plmn = plmn; - - return set_net_apply_config(cmd, data); - -oom: - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; -} -CTRL_CMD_DEFINE_WO(net_mcc_mnc_apply, "mcc-mnc-apply"); - -/* BTS related commands below */ -CTRL_CMD_DEFINE_RANGE(bts_lac, "location-area-code", struct gsm_bts, location_area_code, 0, 65535); -CTRL_CMD_DEFINE_RANGE(bts_ci, "cell-identity", struct gsm_bts, cell_identity, 0, 65535); - -static int set_bts_apply_config(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts *bts = cmd->node; - - if (!is_ipaccess_bts(bts)) { - cmd->reply = "BTS is not IP based"; - return CTRL_CMD_ERROR; - } - - ipaccess_drop_oml(bts, "ctrl bts.apply-configuration"); - cmd->reply = "Tried to drop the BTS"; - return CTRL_CMD_REPLY; -} - -CTRL_CMD_DEFINE_WO_NOVRF(bts_apply_config, "apply-configuration"); - -static int set_bts_si(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts *bts = cmd->node; - int rc; - - rc = gsm_bts_set_system_infos(bts); - if (rc != 0) { - cmd->reply = "Failed to generate SI"; - return CTRL_CMD_ERROR; - } - - cmd->reply = "Generated new System Information"; - return CTRL_CMD_REPLY; -} -CTRL_CMD_DEFINE_WO_NOVRF(bts_si, "send-new-system-informations"); - -static int get_bts_chan_load(struct ctrl_cmd *cmd, void *data) -{ - int i; - struct pchan_load pl; - struct gsm_bts *bts; - const char *space = ""; - - bts = cmd->node; - memset(&pl, 0, sizeof(pl)); - bts_chan_load(&pl, bts); - - cmd->reply = talloc_strdup(cmd, ""); - - for (i = 0; i < ARRAY_SIZE(pl.pchan); ++i) { - const struct load_counter *lc = &pl.pchani; - - /* These can never have user load */ - if (i == GSM_PCHAN_NONE) - continue; - if (i == GSM_PCHAN_CCCH) - continue; - if (i == GSM_PCHAN_PDCH) - continue; - if (i == GSM_PCHAN_UNKNOWN) - continue; - - cmd->reply = talloc_asprintf_append(cmd->reply, - "%s%s,%u,%u", - space, gsm_pchan_name(i), lc->used, lc->total); - if (!cmd->reply) - goto error; - space = " "; - } - - return CTRL_CMD_REPLY; - -error: - cmd->reply = "Memory allocation failure"; - return CTRL_CMD_ERROR; -} - -CTRL_CMD_DEFINE_RO(bts_chan_load, "channel-load"); - -static int get_bts_oml_conn(struct ctrl_cmd *cmd, void *data) -{ - const struct gsm_bts *bts = cmd->node; - - cmd->reply = get_model_oml_status(bts); - - return CTRL_CMD_REPLY; -} - -CTRL_CMD_DEFINE_RO(bts_oml_conn, "oml-connection-state"); - -static int get_bts_oml_up(struct ctrl_cmd *cmd, void *data) -{ - const struct gsm_bts *bts = cmd->node; - - cmd->reply = talloc_asprintf(cmd, "%llu", bts_uptime(bts)); - if (!cmd->reply) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } - - return CTRL_CMD_REPLY; -} - -CTRL_CMD_DEFINE_RO(bts_oml_up, "oml-uptime"); - -static int verify_bts_gprs_mode(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - int valid; - enum bts_gprs_mode mode; - struct gsm_bts *bts = cmd->node; - - mode = bts_gprs_mode_parse(value, &valid); - if (!valid) { - cmd->reply = "Mode is not known"; - return 1; - } - - if (!bts_gprs_mode_is_compat(bts, mode)) { - cmd->reply = "bts does not support this mode"; - return 1; - } - - return 0; -} - -static int get_bts_gprs_mode(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts *bts = cmd->node; - - cmd->reply = talloc_strdup(cmd, bts_gprs_mode_name(bts->gprs.mode)); - return CTRL_CMD_REPLY; -} - -static int set_bts_gprs_mode(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts *bts = cmd->node; - - bts->gprs.mode = bts_gprs_mode_parse(cmd->value, NULL); - return get_bts_gprs_mode(cmd, data); -} - -CTRL_CMD_DEFINE(bts_gprs_mode, "gprs-mode"); - -static int get_bts_rf_state(struct ctrl_cmd *cmd, void *data) -{ - const char *oper, *admin, *policy; - struct gsm_bts *bts = cmd->node; - - if (!bts) { - cmd->reply = "bts not found."; - return CTRL_CMD_ERROR; - } - - oper = osmo_bsc_rf_get_opstate_name(osmo_bsc_rf_get_opstate_by_bts(bts)); - admin = osmo_bsc_rf_get_adminstate_name(osmo_bsc_rf_get_adminstate_by_bts(bts)); - policy = osmo_bsc_rf_get_policy_name(osmo_bsc_rf_get_policy_by_bts(bts)); - - cmd->reply = talloc_asprintf(cmd, "%s,%s,%s", oper, admin, policy); - if (!cmd->reply) { - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; - } - - return CTRL_CMD_REPLY; -} -CTRL_CMD_DEFINE_RO(bts_rf_state, "rf_state"); - -/* Return a list of the states of each TRX for a given BTS. - * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>;<bts_nr>,<trx_nr>,...;...; - * For details on the string, see bsc_rf_states_c(); - */ -static int get_bts_rf_states(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts *bts = cmd->node; - - if (!bts) { - cmd->reply = "bts not found."; - return CTRL_CMD_ERROR; - } - - cmd->reply = bsc_rf_states_of_bts_c(cmd, bts); - if (!cmd->reply) { - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; - } - - return CTRL_CMD_REPLY; -} -CTRL_CMD_DEFINE_RO(bts_rf_states, "rf_states"); - -/* Return a list of the states of each TRX for all BTS: - * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>;<bts_nr>,<trx_nr>,...;...; - * For details on the string, see bsc_rf_states_c(); - */ -static int get_net_rf_states(struct ctrl_cmd *cmd, void *data) -{ - cmd->reply = bsc_rf_states_c(cmd); - if (!cmd->reply) { - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; - } - return CTRL_CMD_REPLY; -} -CTRL_CMD_DEFINE_RO(net_rf_states, "rf_states"); - -static int get_net_rf_lock(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_network *net = cmd->node; - struct gsm_bts *bts; - const char *policy_name; - - policy_name = osmo_bsc_rf_get_policy_name(net->rf_ctrl->policy); - - llist_for_each_entry(bts, &net->bts_list, list) { - struct gsm_bts_trx *trx; - - /* Exclude the BTS from the global lock */ - if (bts->excl_from_rf_lock) - continue; - - llist_for_each_entry(trx, &bts->trx_list, list) { - if (trx->mo.nm_state.availability == NM_AVSTATE_OK && - trx->mo.nm_state.operational != NM_OPSTATE_DISABLED) { - cmd->reply = talloc_asprintf(cmd, - "state=on,policy=%s,bts=%u,trx=%u", - policy_name, bts->nr, trx->nr); - return CTRL_CMD_REPLY; - } - } - } - - cmd->reply = talloc_asprintf(cmd, "state=off,policy=%s", - policy_name); - return CTRL_CMD_REPLY; -} - -#define TIME_FORMAT_RFC2822 "%a, %d %b %Y %T %z" - -static int set_net_rf_lock(struct ctrl_cmd *cmd, void *data) -{ - int locked = atoi(cmd->value); - struct gsm_network *net = cmd->node; - time_t now = time(NULL); - char now_buf64; - struct osmo_bsc_rf *rf; - - if (!net) { - cmd->reply = "net not found."; - return CTRL_CMD_ERROR; - } - - rf = net->rf_ctrl; - - if (!rf) { - cmd->reply = "RF Ctrl is not enabled in the BSC Configuration"; - return CTRL_CMD_ERROR; - } - - talloc_free(rf->last_rf_lock_ctrl_command); - strftime(now_buf, sizeof(now_buf), TIME_FORMAT_RFC2822, gmtime(&now)); - rf->last_rf_lock_ctrl_command = - talloc_asprintf(rf, "rf_locked %u (%s)", locked, now_buf); - - osmo_bsc_rf_schedule_lock(rf, locked == 1 ? '0' : '1'); - - cmd->reply = talloc_asprintf(cmd, "%u", locked); - if (!cmd->reply) { - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; - } - - return CTRL_CMD_REPLY; -} - -static int verify_net_rf_lock(struct ctrl_cmd *cmd, const char *value, void *data) -{ - int locked = atoi(cmd->value); - - if ((locked != 0) && (locked != 1)) - return 1; - - return 0; -} -CTRL_CMD_DEFINE(net_rf_lock, "rf_locked"); - -static int get_trx_rf_locked(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts_trx *trx = cmd->node; - /* Return rf_locked = 1 only if it is explicitly locked. If it is in shutdown or null state, do not "trick" the - * caller into thinking that sending "rf_locked 0" is necessary to bring the TRX up. */ - cmd->reply = (trx->mo.nm_state.administrative == NM_STATE_LOCKED) ? "1" : "0"; - return CTRL_CMD_REPLY; -} - -static int set_trx_rf_locked(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts_trx *trx = cmd->node; - int locked; - if (osmo_str_to_int(&locked, cmd->value, 10, 0, 1)) { - cmd->reply = "Invalid value"; - return CTRL_CMD_ERROR; - } - - gsm_trx_lock_rf(trx, locked, "ctrl"); - - /* Let's not assume the nm FSM has already switched its state, just return the intended rf_locked value. */ - cmd->reply = locked ? "1" : "0"; - return CTRL_CMD_REPLY; -} - -static int verify_trx_rf_locked(struct ctrl_cmd *cmd, const char *value, void *data) -{ - return osmo_str_to_int(NULL, value, 10, 0, 1); -} -CTRL_CMD_DEFINE(trx_rf_locked, "rf_locked"); - -static int get_net_bts_num(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_network *net = cmd->node; - - cmd->reply = talloc_asprintf(cmd, "%u", net->num_bts); - return CTRL_CMD_REPLY; -} -CTRL_CMD_DEFINE_RO(net_bts_num, "number-of-bts"); - -/* TRX related commands below here */ -CTRL_HELPER_GET_INT(trx_max_power, struct gsm_bts_trx, max_power_red); -static int verify_trx_max_power(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - int tmp = atoi(value); - - if (tmp < 0 || tmp > 22) { - cmd->reply = "Value must be between 0 and 22"; - return -1; - } - - if (tmp & 1) { - cmd->reply = "Value must be even"; - return -1; - } - - return 0; -} -CTRL_CMD_DEFINE_RANGE(trx_arfcn, "arfcn", struct gsm_bts_trx, arfcn, 0, 1023); - -static int set_trx_max_power(struct ctrl_cmd *cmd, void *_data) -{ - struct gsm_bts_trx *trx = cmd->node; - int old_power; - - /* remember the old value, set the new one */ - old_power = trx->max_power_red; - trx->max_power_red = atoi(cmd->value); - - /* Maybe update the value */ - if (old_power != trx->max_power_red) { - LOGP(DCTRL, LOGL_NOTICE, - "%s updating max_pwr_red(%d)\n", - gsm_trx_name(trx), trx->max_power_red); - abis_nm_update_max_power_red(trx); - } - - return get_trx_max_power(cmd, _data); -} -CTRL_CMD_DEFINE(trx_max_power, "max-power-reduction"); - -static int verify_bts_c0_power_red(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - const int red = atoi(value); - - if (red < 0 || red > 6) { - cmd->reply = "Value is out of range"; - return 1; - } else if (red % 2 != 0) { - cmd->reply = "Value must be even"; - return 1; - } - - return 0; -} - -static int get_bts_c0_power_red(struct ctrl_cmd *cmd, void *data) -{ - const struct gsm_bts *bts = cmd->node; - - cmd->reply = talloc_asprintf(cmd, "%u", bts->c0_max_power_red_db); - if (!cmd->reply) { - cmd->reply = "OOM."; - return CTRL_CMD_ERROR; - } - - return CTRL_CMD_REPLY; -} - -static int set_bts_c0_power_red(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts *bts = cmd->node; - const int red = atoi(cmd->value); - int rc; - - rc = gsm_bts_set_c0_power_red(bts, red); - if (rc == -ENOTSUP) { - cmd->reply = "BCCH carrier power reduction is not supported"; - return CTRL_CMD_ERROR; - } else if (rc != 0) { - cmd->reply = "Failed to enable BCCH carrier power reduction"; - return CTRL_CMD_ERROR; - } - - return get_bts_c0_power_red(cmd, data); -} - -CTRL_CMD_DEFINE(bts_c0_power_red, "c0-power-reduction"); - -static int verify_bts_neighbor_list_add_del(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - int arfcn; - - if (osmo_str_to_int(&arfcn, value, 10, 0, 1023) < 0) { - cmd->reply = "Invalid ARFCN value"; - return 1; - } - - return 0; -} - -static int set_bts_neighbor_list_add_del(struct ctrl_cmd *cmd, void *data, bool add) -{ - struct gsm_bts *bts = cmd->node; - struct bitvec *bv = &bts->si_common.neigh_list; - int arfcn_int; - uint16_t arfcn; - enum gsm_band unused; - - if (osmo_str_to_int(&arfcn_int, cmd->value, 10, 0, 1023) < 0) { - cmd->reply = "Failed to parse ARFCN value"; - return CTRL_CMD_ERROR; - } - arfcn = (uint16_t) arfcn_int; - - if (bts->neigh_list_manual_mode == NL_MODE_AUTOMATIC) { - cmd->reply = "Neighbor list not in manual mode"; - return CTRL_CMD_ERROR; - } - - if (gsm_arfcn2band_rc(arfcn, &unused) < 0) { - cmd->reply = "Invalid arfcn detected"; - return CTRL_CMD_ERROR; - } - - if (add) - bitvec_set_bit_pos(bv, arfcn, 1); - else - bitvec_set_bit_pos(bv, arfcn, 0); - - cmd->reply = "OK"; - return CTRL_CMD_REPLY; -} - -static int verify_bts_neighbor_list_add(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - return verify_bts_neighbor_list_add_del(cmd, value, _data); -} - -static int set_bts_neighbor_list_add(struct ctrl_cmd *cmd, void *data) -{ - return set_bts_neighbor_list_add_del(cmd, data, true); -} - -CTRL_CMD_DEFINE_WO(bts_neighbor_list_add, "neighbor-list add"); - -static int verify_bts_neighbor_list_del(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - return verify_bts_neighbor_list_add_del(cmd, value, _data); -} - -static int set_bts_neighbor_list_del(struct ctrl_cmd *cmd, void *data) -{ - return set_bts_neighbor_list_add_del(cmd, data, false); -} - -CTRL_CMD_DEFINE_WO(bts_neighbor_list_del, "neighbor-list del"); - -static int verify_bts_neighbor_list_mode(struct ctrl_cmd *cmd, const char *value, void *_data) -{ - if (!strcmp(value, "automatic")) - return 0; - if (!strcmp(value, "manual")) - return 0; - if (!strcmp(value, "manual-si5")) - return 0; - - cmd->reply = "Invalid mode"; - return 1; -} - -static int set_bts_neighbor_list_mode(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts *bts = cmd->node; - int mode = NL_MODE_AUTOMATIC; - - if (!strcmp(cmd->value, "automatic")) - mode = NL_MODE_AUTOMATIC; - else if (!strcmp(cmd->value, "manual")) - mode = NL_MODE_MANUAL; - else if (!strcmp(cmd->value, "manual-si5")) - mode = NL_MODE_MANUAL_SI5SEP; - - switch (mode) { - case NL_MODE_MANUAL_SI5SEP: - case NL_MODE_MANUAL: - /* make sure we clear the current list when switching to - * manual mode */ - if (bts->neigh_list_manual_mode == 0) - memset(&bts->si_common.data.neigh_list, 0, sizeof(bts->si_common.data.neigh_list)); - break; - default: - break; - } - - bts->neigh_list_manual_mode = mode; - - cmd->reply = "OK"; - return CTRL_CMD_REPLY; -} - -CTRL_CMD_DEFINE_WO(bts_neighbor_list_mode, "neighbor-list mode"); - -int bsc_base_ctrl_cmds_install(void) -{ - int rc = 0; - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config_file); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_write_config_file); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_bts_num); - rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_states); - - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_lac); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_ci); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_apply_config); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_si); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_chan_load); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_oml_conn); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_oml_up); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_gprs_mode); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_rf_state); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_rf_states); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_c0_power_red); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_add); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_del); - rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_mode); - - rc |= neighbor_ident_ctrl_init(); - - rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_max_power); - rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_arfcn); - rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_rf_locked); - - return rc; -}
View file
osmo-bsc_1.9.0.tar.xz/src/osmo-bsc/osmo_bsc_ctrl.c
Deleted
@@ -1,742 +0,0 @@ -/* (C) 2011 by Daniel Willmann <daniel@totalueberwachung.de> - * (C) 2011 by Holger Hans Peter Freyther - * (C) 2011 by On-Waves - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ - -#include <osmocom/ctrl/control_cmd.h> -#include <osmocom/bsc/ctrl.h> -#include <osmocom/bsc/debug.h> -#include <osmocom/bsc/gsm_data.h> -#include <osmocom/bsc/osmo_bsc.h> -#include <osmocom/bsc/osmo_bsc_rf.h> -#include <osmocom/bsc/bsc_msc_data.h> -#include <osmocom/bsc/signal.h> -#include <osmocom/bsc/a_reset.h> -#include <osmocom/bsc/bts.h> -#include <osmocom/bsc/handover_ctrl.h> - -#include <osmocom/core/linuxlist.h> -#include <osmocom/core/signal.h> - -#include <osmocom/ctrl/control_if.h> - -#include <osmocom/gsm/protocol/ipaccess.h> -#include <osmocom/gsm/ipa.h> - -#include <stdio.h> -#include <stdlib.h> -#include <time.h> -#include <unistd.h> - -/* Obtain SS7 application server currently handling given MSC (DPC) */ -static struct osmo_ss7_as *msc_get_ss7_as(struct bsc_msc_data *msc) -{ - struct osmo_ss7_route *rt; - struct osmo_ss7_instance *ss7 = osmo_sccp_get_ss7(msc->a.sccp); - rt = osmo_ss7_route_lookup(ss7, msc->a.msc_addr.pc); - if (!rt) - return NULL; - return rt->dest.as; -} - -static int _ss7_as_send(struct osmo_ss7_as *as, struct msgb *msg) -{ - struct osmo_ss7_asp *asp; - unsigned int i; - - /* FIXME: unify with xua_as_transmit_msg() and perform proper ASP lookup */ - for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { - asp = as->cfg.aspsi; - if (!asp) - continue; - /* FIXME: deal with multiple ASPs per AS */ - return osmo_ss7_asp_send(asp, msg); - } - msgb_free(msg); - return -1; -} - -int bsc_sccplite_msc_send(struct bsc_msc_data *msc, struct msgb *msg) -{ - struct osmo_ss7_as *as; - - as = msc_get_ss7_as(msc); - if (!as) { - msgb_free(msg); - return -1; - } - - /* don't attempt to send CTRL on a non-SCCPlite AS */ - if (as->cfg.proto != OSMO_SS7_ASP_PROT_IPA) - return 0; - - return _ss7_as_send(as, msg); -} - -/* Encode a CTRL command and send it to the given ASP - * \paramin asp ASP through which we shall send the encoded message - * \paramin cmd decoded CTRL command to be encoded and sent. Ownership is *NOT* - * transferred, to permit caller to send the same CMD to several ASPs. - * Caller must hence free 'cmd' itself. - * \returns 0 on success; negative on error */ -static int sccplite_asp_ctrl_cmd_send(struct osmo_ss7_asp *asp, struct ctrl_cmd *cmd) -{ - /* this is basically like libosmoctrl:ctrl_cmd_send(), not for a dedicated - * CTRL connection but for the CTRL piggy-back on the IPA/SCCPlite link */ - struct msgb *msg; - - /* don't attempt to send CTRL on a non-SCCPlite ASP */ - if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA) - return 0; - - msg = ctrl_cmd_make(cmd); - if (!msg) - return -1; - - ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_CTRL); - ipa_prepend_header(msg, IPAC_PROTO_OSMO); - - return osmo_ss7_asp_send(asp, msg); -} - -/* Ownership of 'cmd' is *NOT* transferred, to permit caller to send the same CMD to several ASPs. - * Caller must hence free 'cmd' itself. */ -static int sccplite_msc_ctrl_cmd_send(struct bsc_msc_data *msc, struct ctrl_cmd *cmd) -{ - struct msgb *msg; - - msg = ctrl_cmd_make(cmd); - if (!msg) - return -1; - - ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_CTRL); - ipa_prepend_header(msg, IPAC_PROTO_OSMO); - - return bsc_sccplite_msc_send(msc, msg); -} - -/* receive + process a CTRL command from the piggy-back on the IPA/SCCPlite link. - * Transfers msg ownership. */ -int bsc_sccplite_rx_ctrl(struct osmo_ss7_asp *asp, struct msgb *msg) -{ - struct ctrl_cmd *cmd; - bool parse_failed; - int rc; - - /* caller has already ensured ipaccess_head + ipaccess_head_ext */ - OSMO_ASSERT(msg->l2h); - - /* prase raw (ASCII) CTRL command into ctrl_cmd */ - cmd = ctrl_cmd_parse3(asp, msg, &parse_failed); - OSMO_ASSERT(cmd); - msgb_free(msg); - if (cmd->type == CTRL_TYPE_ERROR && parse_failed) - goto send_reply; - - /* handle the CTRL command */ - ctrl_cmd_handle(bsc_gsmnet->ctrl, cmd, bsc_gsmnet); - -send_reply: - rc = sccplite_asp_ctrl_cmd_send(asp, cmd); - talloc_free(cmd); - return rc; -} - - -void osmo_bsc_send_trap(struct ctrl_cmd *cmd, struct bsc_msc_data *msc_data) -{ - struct ctrl_cmd *trap; - struct ctrl_handle *ctrl; - - ctrl = msc_data->network->ctrl; - - trap = ctrl_cmd_trap(cmd); - if (!trap) { - - LOGP(DCTRL, LOGL_ERROR, "Failed to create trap.\n"); - return; - } - - ctrl_cmd_send_to_all(ctrl, trap); - sccplite_msc_ctrl_cmd_send(msc_data, trap); - - talloc_free(trap); -} - -CTRL_CMD_DEFINE_RO(msc_connection_status, "connection_status"); -static int get_msc_connection_status(struct ctrl_cmd *cmd, void *data) -{ - struct bsc_msc_data *msc = (struct bsc_msc_data *)cmd->node; - - if (msc == NULL) { - cmd->reply = "msc not found"; - return CTRL_CMD_ERROR; - } - if (a_reset_conn_ready(msc)) - cmd->reply = "connected"; - else - cmd->reply = "disconnected"; - return CTRL_CMD_REPLY; -} - -/* Backwards compat. */ -CTRL_CMD_DEFINE_RO(msc0_connection_status, "msc_connection_status"); - -static int get_msc0_connection_status(struct ctrl_cmd *cmd, void *data) -{ - struct bsc_msc_data *msc = osmo_msc_data_find(bsc_gsmnet, 0); - void *old_node = cmd->node; - int rc; - - cmd->node = msc; - rc = get_msc_connection_status(cmd, data); - cmd->node = old_node; - - return rc; -} - -static int msc_connection_status_trap_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) -{ - struct ctrl_cmd *cmd; - struct gsm_network *gsmnet = (struct gsm_network *)handler_data; - struct bsc_msc_data *msc = (struct bsc_msc_data *)signal_data; - - if (signal == S_MSC_LOST) { - LOGP(DCTRL, LOGL_DEBUG, "MSC connection lost, sending TRAP.\n"); - } else if (signal == S_MSC_CONNECTED) { - LOGP(DCTRL, LOGL_DEBUG, "MSC connection (re)established, sending TRAP.\n"); - } else { - return 0; - } - - cmd = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); - if (!cmd) { - LOGP(DCTRL, LOGL_ERROR, "Trap creation failed.\n"); - return 0; - } - - cmd->id = "0"; - cmd->variable = talloc_asprintf(cmd, "msc.%d.connection_status", msc->nr); - cmd->node = msc; - - get_msc_connection_status(cmd, NULL); - - ctrl_cmd_send_to_all(gsmnet->ctrl, cmd); - - if (msc->nr == 0) { - /* Backwards compat. */ - cmd->variable = "msc_connection_status"; - ctrl_cmd_send_to_all(gsmnet->ctrl, cmd); - } - - talloc_free(cmd); - - return 0; -} - -CTRL_CMD_DEFINE_RO(bts_connection_status, "bts_connection_status"); -static int bts_connection_status = 0; - -static int get_bts_connection_status(struct ctrl_cmd *cmd, void *data) -{ - if (bts_connection_status) - cmd->reply = "connected"; - else - cmd->reply = "disconnected"; - return CTRL_CMD_REPLY; -} - -static int bts_connection_status_trap_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) -{ - struct ctrl_cmd *cmd; - struct gsm_network *gsmnet = (struct gsm_network *)handler_data; - struct gsm_bts *bts; - int bts_current_status; - - if (signal != S_L_INP_TEI_DN && signal != S_L_INP_TEI_UP) { - return 0; - } - - bts_current_status = 0; - /* Check if OML on at least one BTS is up */ - llist_for_each_entry(bts, &gsmnet->bts_list, list) { - if (bts->oml_link) { - bts_current_status = 1; - break; - } - } - if (bts_connection_status == 0 && bts_current_status == 1) { - LOGP(DCTRL, LOGL_DEBUG, "BTS connection (re)established, sending TRAP.\n"); - } else if (bts_connection_status == 1 && bts_current_status == 0) { - LOGP(DCTRL, LOGL_DEBUG, "No more BTS connected, sending TRAP.\n"); - } else { - return 0; - } - - cmd = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); - if (!cmd) { - LOGP(DCTRL, LOGL_ERROR, "Trap creation failed.\n"); - return 0; - } - - bts_connection_status = bts_current_status; - - cmd->id = "0"; - cmd->variable = "bts_connection_status"; - - get_bts_connection_status(cmd, NULL); - - ctrl_cmd_send_to_all(gsmnet->ctrl, cmd); - - talloc_free(cmd); - - return 0; -} - -static int get_bts_loc(struct ctrl_cmd *cmd, void *data); - -static void generate_location_state_trap(struct gsm_bts *bts, struct bsc_msc_data *msc) -{ - struct ctrl_cmd *cmd; - const char *oper, *admin, *policy; - - cmd = ctrl_cmd_create(msc, CTRL_TYPE_TRAP); - if (!cmd) { - LOGP(DCTRL, LOGL_ERROR, "Failed to create TRAP command.\n"); - return; - } - - cmd->id = "0"; - cmd->variable = talloc_asprintf(cmd, "bts.%i.location-state", bts->nr); - - /* Prepare the location reply */ - cmd->node = bts; - get_bts_loc(cmd, NULL); - - oper = osmo_bsc_rf_get_opstate_name(osmo_bsc_rf_get_opstate_by_bts(bts)); - admin = osmo_bsc_rf_get_adminstate_name(osmo_bsc_rf_get_adminstate_by_bts(bts)); - policy = osmo_bsc_rf_get_policy_name(osmo_bsc_rf_get_policy_by_bts(bts)); - - cmd->reply = talloc_asprintf_append(cmd->reply, - ",%s,%s,%s,%s,%s", - oper, admin, policy, - osmo_mcc_name(bts->network->plmn.mcc), - osmo_mnc_name(bts->network->plmn.mnc, - bts->network->plmn.mnc_3_digits)); - - osmo_bsc_send_trap(cmd, msc); - talloc_free(cmd); -} - -void bsc_gen_location_state_trap(struct gsm_bts *bts) -{ - struct bsc_msc_data *msc; - - llist_for_each_entry(msc, &bts->network->mscs, entry) - generate_location_state_trap(bts, msc); -} - -static int location_equal(struct bts_location *a, struct bts_location *b) -{ - return ((a->tstamp == b->tstamp) && (a->valid == b->valid) && (a->lat == b->lat) && - (a->lon == b->lon) && (a->height == b->height)); -} - -static void cleanup_locations(struct llist_head *locations) -{ - struct bts_location *myloc, *tmp; - int invalpos = 0, i = 0; - - LOGP(DCTRL, LOGL_DEBUG, "Checking position list.\n"); - llist_for_each_entry_safe(myloc, tmp, locations, list) { - i++; - if (i > 3) { - LOGP(DCTRL, LOGL_DEBUG, "Deleting old position.\n"); - llist_del(&myloc->list); - talloc_free(myloc); - } else if (myloc->valid == BTS_LOC_FIX_INVALID) { - /* Only capture the newest of subsequent invalid positions */ - invalpos++; - if (invalpos > 1) { - LOGP(DCTRL, LOGL_DEBUG, "Deleting subsequent invalid position.\n"); - invalpos--; - i--; - llist_del(&myloc->list); - talloc_free(myloc); - } - } else { - invalpos = 0; - } - } - LOGP(DCTRL, LOGL_DEBUG, "Found %i positions.\n", i); -} - -CTRL_CMD_DEFINE(bts_loc, "location"); -static int get_bts_loc(struct ctrl_cmd *cmd, void *data) -{ - struct bts_location *curloc; - struct gsm_bts *bts = (struct gsm_bts *) cmd->node; - if (!bts) { - cmd->reply = "bts not found."; - return CTRL_CMD_ERROR; - } - - if (llist_empty(&bts->loc_list)) { - cmd->reply = talloc_asprintf(cmd, "0,invalid,0,0,0"); - return CTRL_CMD_REPLY; - } else { - curloc = llist_entry(bts->loc_list.next, struct bts_location, list); - } - - cmd->reply = talloc_asprintf(cmd, "%lu,%s,%f,%f,%f", curloc->tstamp, - get_value_string(bts_loc_fix_names, curloc->valid), curloc->lat, curloc->lon, curloc->height); - if (!cmd->reply) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } - - return CTRL_CMD_REPLY; -} - -static int set_bts_loc(struct ctrl_cmd *cmd, void *data) -{ - char *saveptr, *lat, *lon, *height, *tstamp, *valid, *tmp; - struct bts_location *curloc, *lastloc; - int ret; - struct gsm_bts *bts = (struct gsm_bts *) cmd->node; - if (!bts) { - cmd->reply = "bts not found."; - return CTRL_CMD_ERROR; - } - - tmp = talloc_strdup(cmd, cmd->value); - if (!tmp) - goto oom; - - tstamp = strtok_r(tmp, ",", &saveptr); - valid = strtok_r(NULL, ",", &saveptr); - lat = strtok_r(NULL, ",", &saveptr); - lon = strtok_r(NULL, ",", &saveptr); - height = strtok_r(NULL, "\0", &saveptr); - - /* Check if one of the strtok results was NULL. This will probably never occur since we will only see verified - * input in this code path */ - if ((tstamp == NULL) || (valid == NULL) || (lat == NULL) || (lon == NULL) || (height == NULL)) { - talloc_free(tmp); - cmd->reply = "parse error"; - return CTRL_CMD_ERROR; - } - - curloc = talloc_zero(tall_bsc_ctx, struct bts_location); - if (!curloc) { - talloc_free(tmp); - goto oom; - } - INIT_LLIST_HEAD(&curloc->list); - - curloc->tstamp = atol(tstamp); - curloc->valid = get_string_value(bts_loc_fix_names, valid); - curloc->lat = atof(lat); - curloc->lon = atof(lon); - curloc->height = atof(height); - talloc_free(tmp); - - lastloc = llist_entry(bts->loc_list.next, struct bts_location, list); - - /* Add location to the end of the list */ - llist_add(&curloc->list, &bts->loc_list); - - ret = get_bts_loc(cmd, data); - - if (!location_equal(curloc, lastloc)) - bsc_gen_location_state_trap(bts); - - cleanup_locations(&bts->loc_list); - - return ret; - -oom: - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; -} - -static int verify_bts_loc(struct ctrl_cmd *cmd, const char *value, void *data) -{ - char *saveptr, *latstr, *lonstr, *heightstr, *tstampstr, *validstr, *tmp; - time_t tstamp; - int valid; - double lat, lon, height __attribute__((unused)); - - tmp = talloc_strdup(cmd, value); - if (!tmp) - return 1; - - tstampstr = strtok_r(tmp, ",", &saveptr); - validstr = strtok_r(NULL, ",", &saveptr); - latstr = strtok_r(NULL, ",", &saveptr); - lonstr = strtok_r(NULL, ",", &saveptr); - heightstr = strtok_r(NULL, "\0", &saveptr); - - if ((tstampstr == NULL) || (validstr == NULL) || (latstr == NULL) || - (lonstr == NULL) || (heightstr == NULL)) - goto err; - - tstamp = atol(tstampstr); - valid = get_string_value(bts_loc_fix_names, validstr); - lat = atof(latstr); - lon = atof(lonstr); - height = atof(heightstr); - talloc_free(tmp); - tmp = NULL; - - if (((tstamp == 0) && (valid != BTS_LOC_FIX_INVALID)) || (lat < -90) || (lat > 90) || - (lon < -180) || (lon > 180) || (valid < 0)) { - goto err; - } - - return 0; - -err: - talloc_free(tmp); - cmd->reply = talloc_strdup(cmd, "The format is <unixtime>,(invalid|fix2d|fix3d),<lat>,<lon>,<height>"); - return 1; -} - -CTRL_CMD_DEFINE(net_timezone, "timezone"); -static int get_net_timezone(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_network *net = (struct gsm_network*)cmd->node; - - struct gsm_tz *tz = &net->tz; - if (tz->override) - cmd->reply = talloc_asprintf(cmd, "%d,%d,%d", - tz->hr, tz->mn, tz->dst); - else - cmd->reply = talloc_asprintf(cmd, "off"); - - if (!cmd->reply) { - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; - } - - return CTRL_CMD_REPLY; -} - -static int set_net_timezone(struct ctrl_cmd *cmd, void *data) -{ - char *saveptr, *hourstr, *minstr, *dststr, *tmp = 0; - int override = 0; - struct gsm_network *net = (struct gsm_network*)cmd->node; - struct gsm_tz *tz = &net->tz; - - tmp = talloc_strdup(cmd, cmd->value); - if (!tmp) - goto oom; - - hourstr = strtok_r(tmp, ",", &saveptr); - minstr = strtok_r(NULL, ",", &saveptr); - dststr = strtok_r(NULL, ",", &saveptr); - - if (hourstr != NULL) { - override = strcasecmp(hourstr, "off") != 0; - if (override) { - tz->hr = atol(hourstr); - tz->mn = minstr ? atol(minstr) : 0; - tz->dst = dststr ? atol(dststr) : 0; - } - } - - tz->override = override; - - - talloc_free(tmp); - tmp = NULL; - - return get_net_timezone(cmd, data); - -oom: - cmd->reply = "OOM"; - return CTRL_CMD_ERROR; -} - -static int verify_net_timezone(struct ctrl_cmd *cmd, const char *value, void *data) -{ - char *saveptr, *hourstr, *minstr, *dststr, *tmp; - int override, tz_hours, tz_mins, tz_dst; - - tmp = talloc_strdup(cmd, value); - if (!tmp) - return 1; - - hourstr = strtok_r(tmp, ",", &saveptr); - minstr = strtok_r(NULL, ",", &saveptr); - dststr = strtok_r(NULL, ",", &saveptr); - - if (hourstr == NULL) - goto err; - - override = strcasecmp(hourstr, "off") != 0; - - if (!override) { - talloc_free(tmp); - return 0; - } - - if (minstr == NULL || dststr == NULL) - goto err; - - tz_hours = atol(hourstr); - tz_mins = atol(minstr); - tz_dst = atol(dststr); - - talloc_free(tmp); - tmp = NULL; - - if ((tz_hours < -19) || (tz_hours > 19) || - (tz_mins < 0) || (tz_mins >= 60) || (tz_mins % 15 != 0) || - (tz_dst < 0) || (tz_dst > 2)) - goto err; - - return 0; - -err: - talloc_free(tmp); - cmd->reply = talloc_strdup(cmd, "The format is <hours>,<mins>,<dst> or 'off' where -19 <= hours <= 19, mins in {0, 15, 30, 45}, and 0 <= dst <= 2"); - return 1; -} - -CTRL_CMD_DEFINE_WO_NOVRF(net_notification, "notification"); -static int set_net_notification(struct ctrl_cmd *cmd, void *data) -{ - struct ctrl_cmd *trap; - struct gsm_network *net; - - net = cmd->node; - - trap = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); - if (!trap) { - LOGP(DCTRL, LOGL_ERROR, "Trap creation failed\n"); - goto handled; - } - - trap->id = "0"; - trap->variable = "notification"; - trap->reply = talloc_strdup(trap, cmd->value); - - /* - * This should only be sent to local systems. In the future - * we might even ask for systems to register to receive - * the notifications. - */ - ctrl_cmd_send_to_all(net->ctrl, trap); - talloc_free(trap); - -handled: - return CTRL_CMD_HANDLED; -} - -CTRL_CMD_DEFINE_WO_NOVRF(net_inform_msc, "inform-msc-v1"); -static int set_net_inform_msc(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_network *net; - struct bsc_msc_data *msc; - - net = cmd->node; - llist_for_each_entry(msc, &net->mscs, entry) { - struct ctrl_cmd *trap; - - trap = ctrl_cmd_create(tall_bsc_ctx, CTRL_TYPE_TRAP); - if (!trap) { - LOGP(DCTRL, LOGL_ERROR, "Trap creation failed\n"); - continue; - } - - trap->id = "0"; - trap->variable = "inform-msc-v1"; - trap->reply = talloc_strdup(trap, cmd->value); - sccplite_msc_ctrl_cmd_send(msc, trap); - talloc_free(trap); - } - - - return CTRL_CMD_HANDLED; -} - -static int msc_signal_handler(unsigned int subsys, unsigned int signal, - void *handler_data, void *signal_data) -{ - struct msc_signal_data *msc; - struct gsm_network *net; - struct gsm_bts *bts; - - if (subsys != SS_MSC) - return 0; - if (signal != S_MSC_AUTHENTICATED) - return 0; - - msc = signal_data; - - net = msc->data->network; - llist_for_each_entry(bts, &net->bts_list, list) - generate_location_state_trap(bts, msc->data); - - return 0; -} - -int bsc_ctrl_cmds_install(struct gsm_network *net) -{ - int rc; - - rc = bsc_base_ctrl_cmds_install(); - if (rc) - goto end; - rc = bsc_ho_ctrl_cmds_install(net); - if (rc) - goto end; - rc = ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_loc); - if (rc) - goto end; - rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_timezone); - if (rc) - goto end; - rc = ctrl_cmd_install(CTRL_NODE_MSC, &cmd_msc_connection_status); - if (rc) - goto end; - rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_msc0_connection_status); - if (rc) - goto end; - rc = osmo_signal_register_handler(SS_MSC, &msc_connection_status_trap_cb, net); - if (rc) - goto end; - rc = osmo_signal_register_handler(SS_MSC, msc_signal_handler, NULL); - if (rc) - goto end; - rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_bts_connection_status); - if (rc) - goto end; - rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_notification); - if (rc) - goto end; - rc = ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_inform_msc); - if (rc) - goto end; - rc = osmo_signal_register_handler(SS_L_INPUT, &bts_connection_status_trap_cb, net); - -end: - return rc; -}
View file
rpmlintrc
Added
@@ -0,0 +1,5 @@ +# Don't abort the build when finding a library that depends on a package with +# a specific version. This is intentional for nightly builds, we don't want +# libraries from different build dates to be mixed as they might have ABI +# incompatibilities. +setBadness('shlib-fixed-dependency', 0)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.