aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-02-06fix logging for ACC 8 and 9Stefan Sperling1-5/+10
Change-Id: I54ebb1330ea783af1fe48eb999cecbb71aa8857a
2018-02-06add more logging and fix step loop termination conditionStefan Sperling1-10/+19
Change-Id: I00a47d825a7b1b3b66f6df654c19676a86ae8b9f
2018-02-06rename a functionStefan Sperling1-3/+3
Change-Id: Ib99996834ee668f7c998bb846b1a45efa2d7bcf8
2018-02-06initial acc ramping implementation (untested)Stefan Sperling6-17/+163
Change-Id: I2b1868765346c7aba966cecd7b8db9aae9b047bb
2018-02-06Add skeleton for an acc ramp implementation.Stefan Sperling4-0/+57
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 Sperling4-2/+28
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-05vty: print RTP IP of lchan if actually bound; print remote (mgw) IPHarald Welte1-5/+15
Change-Id: I87840aa0f5b9c04d7736bf5f649142219853711a
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 Sperling11-30/+143
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-28update.gitignore with 'tags' files and 'deps' directoryHarald Welte1-0/+2
Change-Id: I2b51bbb4dce9757be7f2430b83b7879e24aa0df1
2018-01-28remove obsolete gsm_subscriber_connection.bts memberHarald Welte4-11/+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-28bssmap_handle_assignm_req(): Decode channel type as first stepHarald Welte1-17/+16
The decision on how to further process the request depends significantly on the contents of the only mandatory IE of the ASSIGNMENT REQ. Let's decode it first. Change-Id: I030b5ad6f4fc33da9155c8a6061fd982312b20fb
2018-01-28cosmetic: Remove data/len variables in bssmap_handle_assignm_req()Harald Welte1-11/+6
There's nothing wrong with passing the TLVP_VAL/TLVP_LEN directly into the gsm0808 decoder functions, let's avoid variables that get assigned and used only once - particularly with such generic names. Change-Id: I8557b4a9ff4de28b76c7d618631a4700176a8669
2018-01-26Improve an error message in page_lai_and_lac()Stefan Sperling2-2/+2
This error message is now contained in a loop, and the current iteration does not know whether paging will fail entirely or if later iterations will succeed. Update the error message accordingly. This also makes the error message consistent with the one in page_cgi(). Change-Id: I8ec229702343343dedcbb242b6d0ed170c858511
2018-01-25Remove an unused variable.Stefan Sperling1-7/+0
Local variable is_lu in rsl_rx_chan_rqd() has been unused since commit 6082a377f57901302816a2e57e75a3f262b7b7e6. Change-Id: I67594afcfa4104e91352d50f40ae9f2bc20f4cd1
2018-01-24cosmetic: log prim operation as textMax1-1/+2
When logging SCCP error, log failed primitive operation as text. Change-Id: I91f739cea9f518a24fff6870f7dceab8175c9646 Related: OS#2851
2018-01-22HO: Add a penalty timer list to the subscriber connection entityAndreas Eversberg2-0/+20
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-21Fix: meas_rep.c will only use valid DL measurement reportsAndreas Eversberg1-4/+19
When averaging measurements, only the valid reports are used. If there is no valid report in the averaging window at all, an error is returned. Change-Id: I33056225ead788340755e98113d72e1cbf3ebce6
2018-01-19HO: add queue to cache DTAP messages during handover/assignmentAndreas Eversberg2-0/+77
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 Hofmeyr2-2/+4
Change-Id: Ie746f76433f6b46a71a91b7714cc034c4355d993
2018-01-19HO: rename gsm_bts_neighbor() to bts_by_arfcn_bsic()Neels Hofmeyr1-14/+13
The name sounds like it is looking up neighbors, instead it simply traverses the global list of BTSes. Rename to reflect what it does. Move FIXME comment to its logical place: at the invocation of bts_by_arfcn_bsic(). Change-Id: I063870d09f782a4f18e85d87c7cd17fe660cb3fd
2018-01-19HO: Count number of free timeslot on a given BTSAndreas Eversberg2-0/+67
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: Change debug category at handover decision: DHO -> DHODECAndreas Eversberg1-8/+8
Change-Id: I7322b790f647b681bfe3a9c95b04516fbc7cbf88
2018-01-19HO: add handover algo 2 parameters; skip HO 1 if HO 2 is configuredNeels Hofmeyr3-12/+336
Change-Id: I8811ee8a75be09048042b511ee4bd9bc1de63976
2018-01-19HO: enable handover by initializing at startup; rename init functionNeels Hofmeyr3-7/+6
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-19Correctly set T3105 for ipaccess BTS typeAndreas Eversberg3-5/+5
The given value is 10 * ms, so 13 is used instead of 128. If T3105 is set at config to something greater 0, it is used instead of the default value. Adjusst nanobts_omlattr_test.c accordingly. Change-Id: I3d9687619ba4de35f5d2eff3026d903534b2bbd4
2018-01-19Allow assignment to TCH channel with signalling only modeAndreas Eversberg1-3/+2
This makes sense, if silent call is used. Assignment allows to change from SDCCH (or whatever was available) to given TCH rate. Change-Id: I2efe9d7ab429e902581ebb9e0e006f2aec6d8972
2018-01-19Do not perform assignment, if the new channel equals the current oneAndreas Eversberg1-1/+12
This can happen, if a TCH/H was requested, but because it is not available, a TCH/F is allocated. If the old channel was TCH/F already, it makes no sense to assign it. Change-Id: I284125483fc14b8f82e32ee61aa3866746238eae
2018-01-19HO: Add handover decision debugging categoryAndreas Eversberg2-1/+9
Change-Id: Iaf99d4e9ae08c38bf364dbb37d42098f976f6b8c
2018-01-19HO: If handover logic is used to do assignment, signal assignment resultAndreas Eversberg2-0/+31
Change-Id: I465caef03626e67d9b3a21bdf730589b9852c211
2018-01-19HO: Always update rqd_ta after receiving measurement reportAndreas Eversberg1-0/+2
The up-to-date rqd_ta is required for assignment command. If the phone moves, the timing advance might change. The rqd_ta will be updated by each measurement report. Change-Id: If1a592e590cfed55ff3dca5be89e2946e8017a22
2018-01-19HO: Changed availablilty of ts_is_usable() from static to externAndreas Eversberg2-1/+2
Change-Id: I3471e38327c4b98490faed9b604fb76438ba9954
2018-01-19fixup: neigh_meas_avg: fix condition to reduce window sizeNeels Hofmeyr1-1/+1
Change-Id: Ia2269be448436d676289c84b9b05da7f51ee4a85
2018-01-19fixup: neigh_meas_avg: detect invalid window size as <=0, log if invalidNeels Hofmeyr1-1/+3
Change-Id: I8c5d0642aeb4fbee73a035b9f73cf3a09b1bcf90
2018-01-19HO: Count neighbor measurements and reduce window of neigh_meas_avgAndreas Eversberg1-0/+8
Always start with a counter of 0 for a new measurement report. If the neigh_meas_avg is caluclated over the given window, the window is reduced, if there are less measurement reports received so far. Change-Id: I1c74f27f9663a3083610c985a080fca331c19bd3
2018-01-19HO: Count the actual meas.rep. get_meas_rep_avg fails if not reachedAndreas Eversberg4-2/+18
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-19Fix of checking TCH rate at chan_compat_with_modeAndreas Eversberg1-1/+5
In case of current channel equals TCH/F and we request half rate, we must return 0, so the calling function will trigger assignment. Change-Id: Ibb4cb9aef1a1146f984d7c969bfba53c647cae07
2018-01-19HO: Assign SDCCH on channel requestAndreas Eversberg1-2/+20
This is needed, so channel can be negotiated before the actual channel type is assigned. In case there is no SDCCH available, try to assign what ever the MS requested. If this is not possible try to assign TCH/F. If this is still not possible, reject channel request. Change-Id: I10fc9f60c58c6b7ed424a86ce23bf6b9802c9eb1
2018-01-19Fix: If paging for half rate was requested, use hr, if supported by MSAndreas Eversberg1-1/+1
Change-Id: I6d1c9701808ee542771fee145250927019a2f5f6
2018-01-19cosmetic: explicitly init ho_ref start valueNeels Hofmeyr1-1/+1
The static ho_ref seems to be implicitly initialized to zero, but let's make it explicit for code readability. Change-Id: I00493bcb7ef3e38fb8e0077c60c5bac7199f1073
2018-01-19HO: Add function to count currently ongoing handovers to a given BTSAndreas Eversberg2-0/+20
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: add indicators for inter-cell and async ho, use for chan act typeNeels Hofmeyr1-1/+12
Change-Id: I2d91765c1f9719c64fd99426a872cecc724215db
2018-01-19HO: Send Channel Mode and Multirate IE along with handover commandAndreas Eversberg1-0/+7
This is needed, if the channel mode should change when doing handover. A change in channel mode makes sense, if available resources at the new BTS are different. Change-Id: Ib6b17a9be252f1655006ab6773483868017d7926
2018-01-19HO prep: introduce per-BTS handover config, with defaults on net nodeNeels Hofmeyr16-150/+653
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 Hofmeyr4-16/+66
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 Hofmeyr3-7/+10
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-19vty: add various manual handover and assignment trigger commandsNeels Hofmeyr1-25/+192
Change-Id: I9745609f2620baa09a693b713d76e355e798abc7