aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2018-02-06make it possible to enable/disable rumping at startupStefan Sperling1-5/+10
Change-Id: If72dd56d376d4ce0a362896e44b350d3b251b507
2018-02-06initial acc ramping implementation (untested)Stefan Sperling2-5/+55
Change-Id: I2b1868765346c7aba966cecd7b8db9aae9b047bb
2018-02-06Add skeleton for an acc ramp implementation.Stefan Sperling1-0/+5
Change-Id: I49bd1bf6c0ef0441b6d5d3dec6b7c39545eedeec
2018-02-06Move ACC data structures to their own header file.Stefan Sperling2-51/+78
Change-Id: I6bdcac5d8c358320f953a0a3cd06876ae571be23
2018-02-06Add data structure definitions for Access Control Class ramping.Stefan Sperling1-0/+53
Change-Id: I0a5ac3a08f992f326435944f17e0a9171911afb0
2018-02-05Add stat items for the BTS's channel load average and T3122.Stefan Sperling2-0/+7
In addition to logging the current values of a BTS's channel load average and T3122 override, maintain stat items for these values. This allows for plotting these values over time, for instance. These values show up in the VTY under 'show stats' like this: base transceiver station: Channel load average.: 25 % T3122 IMMEDIATE ASSIGNMENT REJECT wait indicator.: 32 s Change-Id: Icace0176e8b1d23d7c7b4816f7c67c65312844fa Suggested-by: laforge
2018-02-05gsm_data_shared.h: Remove unused sacch_deact member fieldHarald Welte1-1/+0
Change-Id: I806b957b7f6fbbb1206d29ceeccd401c98c26990
2018-02-05Make "waiting indicator" of IMMEDIATE ASSIGN REJECT dynamic.Stefan Sperling3-5/+17
The IMMEDIATE ASSIGN REJECT message contains a wait indicator which tells an MS requesting a channel to wait for a specified amount of time before trying to request a channel again, i.e. the wait indicator controls the T3122 timeout value in the MS. Previously, the wait indicator was fixed to 10 seconds. This is not sufficient if there are a lot of MS requesting channels because the MS will retry too soon. Instead of using a fixed value, maintain a dynamic wait indicator value based on average channel load. The load (used vs. available channels on a BTS) is sampled once per second, and once 8 samples have been collected we update a BTS-specific T3122 wait indicator based on the measured load. While the wait indicator could go up to 255 seconds, this initial implementation keeps it in the range from 10 to 128 seconds. Further experimentation and testing will show whether higher wait indicator values are desirable, if the sampling rate needs to change, or if the function mapping the load measurement to a wait indicator value should change (currently we map the load average linearly into the range [10, 128] inclusive). Change-Id: I57e38f6d6ba3b23cc6e1f9520b90261dbb1f1cec Related: OS#2592
2018-01-28remove obsolete gsm_subscriber_connection.bts memberHarald Welte1-7/+5
This member was merely a cache for conn->lchan->ts->trx->bts, so let's avoid having to keep copies of the same data (which needs to be kept up to date). Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0
2018-01-22HO: Add a penalty timer list to the subscriber connection entityAndreas Eversberg1-0/+10
This penalty timer is used to temporarily block cells where handover or assignment failed or where handover is not allowed. This is usefull to prevent repeated handover attempts to broken cells or cells that have limited allowed distance. Change-Id: I95cb7e3211b2470b773965e7aa94d8eb6c8c1a3a
2018-01-19HO: add queue to cache DTAP messages during handover/assignmentAndreas Eversberg1-0/+4
Add ho_dtap_cache to gsm_subscriber_connection, a stock msgb queue to be used with msgb_enqueue() and msgb_dequeue(). Keep a counter of queue length, to enforce a sane maximum counter for cached messages. So far a hardcoded maximum of 23 messages will be cached. Have balanced ho_dtap_cache_add() and ho_dtap_cache_flush() functions. The original patch was by jolly, but I have basically completely replaced it with the simpler msgb queue pattern. Change-Id: I6e4d93628befb3d97e5cee0343cd9f8ba0b8620c
2018-01-19HO: make bts_by_arfcn_bsic() publicNeels Hofmeyr1-0/+2
Change-Id: Ie746f76433f6b46a71a91b7714cc034c4355d993
2018-01-19HO: Count number of free timeslot on a given BTSAndreas Eversberg1-0/+3
This is needed for handover algorithm to balance free slots and to prevent congestion of one cell, while other cells still have free capacities. Change-Id: Ic8bee8a515ee8aa9a99af71756fe60b8dd8f868b
2018-01-19HO: add handover algo 2 parameters; skip HO 1 if HO 2 is configuredNeels Hofmeyr1-0/+115
Change-Id: I8811ee8a75be09048042b511ee4bd9bc1de63976
2018-01-19HO: enable handover by initializing at startup; rename init functionNeels Hofmeyr1-6/+2
Change-Id: I224884c84895ebf6c8cf498c16616214cb2b5779
2018-01-19HO: fix: increase the number of measurement report history to 10Andreas Eversberg2-1/+3
If we want to average over up to 10 measurement reports (as configurable at VTY), we need a history of at least 10 measurements. Change-Id: Ia7cfac073bdc464092ca3e51dec319ac30401dd1
2018-01-19HO: Add handover decision debugging categoryAndreas Eversberg1-0/+1
Change-Id: Iaf99d4e9ae08c38bf364dbb37d42098f976f6b8c
2018-01-19HO: If handover logic is used to do assignment, signal assignment resultAndreas Eversberg1-0/+2
Change-Id: I465caef03626e67d9b3a21bdf730589b9852c211
2018-01-19HO: Changed availablilty of ts_is_usable() from static to externAndreas Eversberg1-0/+1
Change-Id: I3471e38327c4b98490faed9b604fb76438ba9954
2018-01-19HO: Count the actual meas.rep. get_meas_rep_avg fails if not reachedAndreas Eversberg1-0/+1
get_meas_rep_avg will return -EINVAL, if the required number of measurements are not reached. There will be no handover possible until the given number of measurements are available. Change-Id: Ibc4410b4e162cdb6c070128d2c63946bb79d6d65
2018-01-19HO: Add function to count currently ongoing handovers to a given BTSAndreas Eversberg1-0/+2
In order to keep processing power at BTS at a defined level, the handover decision might want to limit maximum number of slots that require RACH detection. Change-Id: I8908e37fe0d8d2eda906cc6301ba0969b25a5575
2018-01-19HO prep: introduce per-BTS handover config, with defaults on net nodeNeels Hofmeyr5-16/+124
It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. (Needs recent addition of '... !' wildcard to osmo_interact_common.py.) I considered leaving parts of this more readable, but in the end decided for heavy use of macros to define and declare the API, because more values will be added in upcoming patches and I want to prevent myself from messing them up. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Depends: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 (osmo-python-tests) Change-Id: I79d35f6d3c0fbee67904378ad7f216df34fde79a
2018-01-19HO: fix recovery from failed handoverNeels Hofmeyr1-1/+0
Do not instruct the MGW to move the RTP to the new lchan before we have received a HANDOVER DETECT. Before: Chan Activ Chan Activ Ack IPACC-CRCX -ACK IPACC-MDCX -ACK MGCP MDCX --> MGW ... HANDOVER DETECT Call continues on new lchan In above sequence, if the HANDOVER DETECT times out, the MGW has moved to the new lchan which never becomes used and is released. Furthermore, from the IPACC MDCX until the HANDOVER DETECT, the RTP stream would break off momentarily. After: Chan Activ Chan Activ Ack IPACC-CRCX -ACK IPACC-MDCX -ACK ... HANDOVER DETECT MGCP MDCX --> MGW Call continues on new lchan If the HANDOVER DETECT times out, the call happily continues on the old lchan. This change is inspired by Ivan Kluchnikov's HO work, who implemented a similar fix in the openbsc.git codebase (branch fairwaves/master-rebase): his patch moves ipacc_mdcx() to connect RTP to the new lchan from switch_for_handover() (which triggered on S_ABISIP_CRCX_ACK, i.e. creation of the new lchan) to later on in ho_detect() a.k.a. the S_LCHAN_HANDOVER_DETECT signal handler: http://git.osmocom.org/openbsc/commit/?h=fairwaves/master-rebase&id=9507a7a1ea627e07370c9d264816bb190b3b91b8 This patch does essentially the same: remove the mgcp_handover() call from the MDCX-ACK handling (creation of the new lchan), and add a signal handler for S_LCHAN_HANDOVER_DETECT to osmo_bsc_mgcp.c to effect the MGW switchover. Note, it would have been possible to call mgcp_handover() directly from rx of the HANDOVER DETECT message, but that produces linking fallout in some utils/ projects, which then need to link the mgcp code as well. That is because those aren't properly separated from the more complex parts of libbsc. Using the signal is a bit bloaty, but saves the linking hell for now. I've faced a similar problem twice recently, it would pay off to separate out the simpler utils/ and ipaccess/ tools so that they don't need to link all of libbsc and osmo-bsc, at some point (TM). Change-Id: Iec58c5fcc5697f1775da7ec0111135108ed1fc8f
2018-01-19osmo_bsc_mgcp: cosmetic: introduce mgcp_init(), soak up fsm initNeels Hofmeyr1-0/+2
A subsequent patch will add registration of a signal; cosmetically prepare by creating a common mgcp_init() function. It makes sense for the FSM registration to move to it. Change-Id: I510e1081171706eb3d9fb2db50a9aa4f768929b5
2018-01-16Move BTS selection for paging from osmo_bsc_grace.c into osmo_bsc_bssap.c.Stefan Sperling1-2/+0
We can now either page an invidual BTS directly or page several BTS in a given location area. This decision is taken based on the contents of the cell identifier list in the paging request. Select a set of BTS for paging while processing the cell identifier list, rather than requiring the paging layer to loop over all BTS in the MSC. This change requires some adjustment in bssap_test. In particular, this test must now add a BTS to its network in order to pass. The purpose of this change is to make the layering a bit cleaner. There is one functional change: We no longer abort paging if paging fails for a particular BTS. Instead, we keep trying to page on other BTS. Change-Id: Ic1c72c7f83e53988eb9fedf314b1dc459836833d Suggested-by: Harald Welte Depends: Ic7772e75c3d7fb0df6e17e118bb33b3248352d4d Related: OS#2753
2018-01-15Make libcommon, libcommon-cs, libfilter, utils depend on mgcp/sigtranHarald Welte1-1/+3
The stow-enabled jenkins builds are currently failing like below: make[3]: Entering directory '/build/src/libcommon' CC bsc_version.o CC common_vty.o CC debug.o CC gsm_data.o In file included from debug.c:34:0: ../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory #include <osmocom/sigtran/sccp_sap.h> ^ compilation terminated. In file included from common_vty.c:27:0: ../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory #include <osmocom/sigtran/sccp_sap.h> ^ compilation terminated. In file included from gsm_data.c:37:0: ../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory #include <osmocom/sigtran/sccp_sap.h> ^ compilation terminated. Let's make sure the common gsm_data.h have all required CFLAGS to compile. Change-Id: I30b75db6ffba227b05b5413b84b15f69e0c213f2
2018-01-15Implement support for paging based on CI (cell identifier).Stefan Sperling1-1/+2
This builds upon https://gerrit.osmocom.org/#/c/5698/ which implements support for paging by LAI. The ttcn3 test TC_paging_imsi_nochan_ci passes with this code when run in isolation. It does not pass if another paging test (such as TC_paging_imsi_nochan_lai) is executed beforehand. This problem looks similar to the scenario tested in TC_paging_imsi_a_reset. Change-Id: Ic7772e75c3d7fb0df6e17e118bb33b3248352d4d Depends: Ic3c62ff0fccea586794ea4b3c275a0685cc9326e Related: OS#2753
2018-01-12bsc/gsm_04_80.h: clean up useless declarationsVadim Yanitskiy1-15/+0
This change removes a few USSD specific declarations, which are not actually used now, and probably accidentally migrated from legacy OpenBSC. Change-Id: I060223349971a7fce169a018bf16eb91f0e20342
2018-01-12bsc/gsm_04_80.h: use '#pragma once' instead of includesVadim Yanitskiy1-4/+1
This is a common include guard way for Osmocom projects. Change-Id: Iee73e24a2438b6081a5d569db7d48725b564ee3a
2018-01-09Support control connection status query for a particular MSC.Stefan Sperling1-0/+7
Add a new control command 'msc.N.connection_status' which can be used to query the connection status of a particular MSC with number N. Keep the old control command 'msc_connection_status', which always queries MSC 0, for backwards compatibility. Change-Id: Ibd41474a1be80e782b19ec337c856b5efc593fa8 Related: OS#2729
2018-01-04Reduce T3109 default from 19s to 5sHarald Welte1-1/+1
T3109 is started when the BSS sends a RR CHAN REL to the MS and stops downlink SACCH generation. Stopped when the MS successfully releases the LAPDm link. After stop or timeout, the radio channel is released using RSL RF CHAN REL. Recommended values in literature are 1-2s + RadioLinkTimeout*0.48s or 5s, while we had the absurdly high 19s timeout. This means we occupy the radio channel way longer than needed in situations where the MS is no longer able to properly release Layer2 (LAPDm DISC) due to loss of signal or the like. See also: https://osmocom.org/projects/osmobsc/wiki/Timers Change-Id: I7416b4118e5b73c6ffb98e3546bc62a36c7a967a Closes: OS#2734
2017-12-23cosmetic: Hide all accesses to conn->bts behind conn_get_bts()Harald Welte1-0/+4
This is a new inline function that hides all accesses to conn->bts. A follow-up patch will then point this to conn->lchan->ts->trx->bts to get rid of the bts field. Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33
2017-12-20mgcp: cancel transactions on timeoutPhilipp Maier1-0/+2
when a transaction to the MGW times out, then the context information is freed. Unfortunately the client is not informed about this and will try to execute the callback anyway. explicitly cancel the transaction in order to prevent access to already freed data structures. Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf
2017-12-19remove unused 'lac' member of 'struct gsm_subscriber_connection'Harald Welte1-2/+0
This field was used in write-pnly mode, i.e. set but never read. Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256
2017-12-19gsm_data.h: Document all fields of gsm_subscriber_connectionHarald Welte1-8/+14
Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0
2017-12-19osmo-bsc: Move user plane/voice related bits into sub-structureHarald Welte1-17/+17
This clarifies which members of the struct are for what. Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412
2017-12-19osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'Harald Welte1-0/+5
Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6
2017-12-19Remove unused struct osmo_bsc_sccp_con member sccp_queue_sizeHarald Welte1-3/+0
Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f
2017-12-19remove libosmo-sccp dependency for osmo-bscHarald Welte1-4/+0
libosmo-sccp is the old sccp-lite-focused SCCP implementation that we used before libosmo-sigtran was created. The new osmo-bsc in this repository is using libosmo-sigtran and shouldn't be using parts of libosmo-sccp anymore. We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat, which is not even built in this repository anymore (or 'again yet'?) Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d
2017-12-19Remove some more dead codeHarald Welte2-134/+0
Change-Id: I919bffe88babd90227c89abd4434322965c32ebb
2017-12-19Remove bogus MM INFO configurationHarald Welte1-2/+0
The network name and other MM INFO is controlled by the MSC, not the BSC. Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58
2017-12-19Remove bogus vty config for LU reject causeHarald Welte1-1/+0
The LU reject cause (like anything MM related) is under control of OsmoMSC, not BSC. Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6
2017-12-19Remove unused RRLP options/codecHarald Welte4-24/+0
RRLP is handled in OsmoMSC after the split from NITB, so let's remove any bogus VTY commands left over in the BSC. Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38
2017-12-19Remove dead code left over from NITB splitHarald Welte22-813/+6
There still is a lot of dead code that we inherited from the NITB days, let's remove more of it. libtrau will be re-introduced as part of osmo-mgw later. Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8
2017-12-14Add new "chan:mode_modify_nack" counter to count RSL MODE MODIFY NACKHarald Welte1-0/+2
Those NACKs shouldn't happen in production, and if they do, you probably want to have a more persistent figure than a line in the log file about it. Having counters allows the user to monitor this efficiently. Change-Id: Ic82c6baaf4cb88d07bc5cdc200f8279cf130f396
2017-12-14Add a new counter "rsl:ipa_nack" to count number of IPA related NACKsHarald Welte1-0/+2
Those NACKs (CRCX/MDCX/PDCH_ACT) shouldn't happen in production, and if they do, you probably want to have a more persistent figure than a line in the log file about it. Having counters allows the user to monitor this efficiently. Change-Id: I5edf979c9a2b4c9a5a60eef9f66c26da54f2bddf
2017-12-14Add new per-BTS "rsl:unknown" counter to count unknown RSL messagesHarald Welte1-0/+2
Change-Id: I268f222140fa5783e1d19f81fbd45614aaa4b8c4
2017-12-14Add per-BTS rate_ctr for total + failed number of RSL CHAN_ACTHarald Welte1-0/+4
Change-Id: I471b598af194dee78ebaa3414b6290c72d9bbcff
2017-12-14Reduce T3113 default from 60s to 10sHarald Welte1-1/+1
Our T3113 timer default of 60s was set early in the development of OpenBSC, where we didn't really know what values to use and used excessively large/safe values. Paging the same MS for 60 seconds (even if there's no paging response) will however create a lot of PCH load for no good reason. It seems there's no clear guidance as to what the value should be. Other implementations use something in the order of 10 seconds (OpenBTS, yateBTS), which seems more realistic. THe Siemens BS-11 has a default of 5 seconds. Let's be conservative and go to 10s as a default, which is already 6 times less potential PCH usage than our default so far... Closes: OS#2756 Change-Id: If9c8441939c6fdcf6e2b9ede8cc576eb86296209
2017-12-14libbsc: paging: more reasonable (and detailed) paging statisticsHarald Welte1-5/+13
Counting the number of T3113 expirations (one per subscriber per BTS) vs the number of paging attempts (Bsc global) is a ueseless figure, as you cannot relate each other. We count on the BSC level: * how many PAGING we received from the MSC (total) * how many of those were for cells/LACs we don't serve * how many of those resulted in PAGING RESPONSE We count on the BTS leve: * how many PAGING CMD we sent to the BTS (total) * how many of those we ignored as we were already paging * how many of those resulted in PAGING RESPONSE * how many were expired due to T3113 expiring Change-Id: I410bbcbb2621f95f11238f7a5da01ab438f5fee1