aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_bssgp_pcu.h
AgeCommit message (Collapse)AuthorFilesLines
2021-12-14treewide: remove FSF address2021q4Oliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I4a49dbeeec89b22624c968152118aecf8886dac6
2021-08-10Add counters: pcu.sgsn.N.rx_paging_{cs,ps}Oliver Smith1-0/+7
Related: SYS#4878 Change-Id: Iefba6f3d29c69fd4865c084bd9cf1a3a78f5c202
2021-03-23gprs_bssgp_pcu: add comments to the pcu statesAlexander Couzens1-0/+4
Related: OS#3879 Change-Id: Iccf6508ce46162e6dfd6b00abd44e24cb425b346
2021-02-16gprs_bssgp: rename gprs_ns_config -> gprs_ns_update_configAlexander Couzens1-1/+1
Improve the naming of the function to match it's purpose. Related: SYS#5354 Change-Id: Ib8e4ae734503fd6f6695d9d6767d809e1bf79d22
2021-01-21Get rid of singleton gprs_bssgp_pcu_current_bctx()Pau Espin Pedrol1-1/+0
Access it from existing pointers instead. Change-Id: I77455da5221090ebea142ecd49d5dba0065bfc5c
2021-01-19Convert gprs_bssgp_pcu.cpp to CPau Espin Pedrol1-1/+1
There's no real use of C++ in that file, and it causes problems when using llist_head entry macros in future patches adding initial support for multiple BTS in PCU object, so let's move it to plain C. Change-Id: Ic771a89fd78b5e66151a5384f0ff6a8895589466
2021-01-18Split PCU global PCU object from BTS objectPau Espin Pedrol1-10/+14
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold both PCU global fields and BTS specific fields, all mangled together. The BTS is even accessed in lots of places by means of a singleton. This patch introduces a new struct gprs_pcu object aimed at holding all global state, and several fields are already moved from BTS to it. The new object can be accessed as global variable "the_pcu", reusing and including an already exisitng "the_pcu" global variable only used for bssgp related purposes so far. This is only a first step towards having a complete split global pcu and BTS, some fields are still kept in BTS and will be moved over follow-up smaller patches in the future (since this patch is already quite big). So far, the code still only supports one BTS, which can be accessed using the_pcu->bts. In the future that field will be replaced with a list, and the BTS singletons will be removed. The cur_fn output changes in TbfTest are actually a side effect fix, since the singleton main_bts() now points internally to the_pcu->bts, hence the same we allocate and assign in the test. Beforehand, "the_bts" was allocated in the stack while main_bts() still returned an unrelated singleton BTS object instance. Related: OS#4935 Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2020-10-13Rework NS configuration over the info indicationAlexander Couzens1-4/+4
Add support of the second NSVC in the info indication. Add support to update a previous NS configuration. Allow to update of a NS-VC while the NSE is still available over the second. Depends-on: I917f25ebd1239eae5855d973ced15b93731e33a0 (libosmocore) Depends-on: I3a0cd305fd73b3cb9ec70246ec15ac70b83e57f2 (libosmocore) Depends-on: I5a2bb95d05d06d909347e2fb084a446ead888cb3 (libosmocore) Depends-on: I54f110acc3acccb362f6e554324d08cc42b7c328 (libosmocore) Depends-on: Ia00753a64b7622a0864341f51ea49b6963543755 (libosmocore) Depends-on: Ic8f6f8aca10da23a18fab8870be7806065a34b47 (libosmocore) Depends-on: I5f67e6a9bf4cb322bd169061fee0a528012ed54d (libosmocore) Change-Id: I589ebaa2a2b7de55b7e4e975d8fd6412dd5f214b
2020-10-09gprs_bssgp_pcu: make osmo_sockaddr local/sgsn arguments constVadim Yanitskiy1-4/+4
Change-Id: I40e51de300533cfcbb3c9f90a0858a489a3c2b6b Depends: I0df6a00ac1830bd64a10b9336b827e113fa772bb
2020-10-06Use the new NS2 libAlexander Couzens1-9/+13
Depends: Id7edb8feb96436ba170383fc62d43ceb16955d53 (libosmocore) Depends: I2a9dcd14f4ad16211c0f6d98812ad4a13e910c2a (libosmocore) Change-Id: Ib389925cf5c9f18951af6242c31ea70476218e9a
2020-03-16Use clock_gettime(CLOCK_MONOTONIC) and timespec everywherePau Espin Pedrol1-3/+5
We should really be using monotonic clock in all places that gettimeofday is used right now. Since clock_gettime() uses timespec, let's move all code to use timespecs instead to avoid having to convert in several places between timespec and timeval. Actually use osmo_clock_gettime() shim everywhere to be able to control the time everywhere from unit tests. Change-Id: Ie265d70f8ffa7dbf7efbef6030505d9fcb5dc338
2019-05-25gprs_bssgp_pcu: make gprs_bssgp_ns_cb publicAlexander Couzens1-0/+3
rename the function sgsn_ns_cb -> gprs_bssgp_ns_cb. To allow writing and reading the same configuration, the pcu needs to register all vty commands before reading the configuration. This callback is required to register NS based vty commands Related: OS#4024 Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51
2019-02-26Mark gprs_ns_reconnect() as static (not used outside of C file)Harald Welte1-1/+0
Change-Id: I95138adedacdc2d953284cff57f79ecb33616f0f
2018-03-11implement support for 3-digit MNC with leading zerosNeels Hofmeyr1-1/+1
Receive the mnc_3_digits flag from the PCU interface. Bump the PCU interface to 9. This is one part of the three identical pcuif_proto.h patches: - I49cd762c3c9d7ee6a82451bdf3ffa2a060767947 (osmo-bts) - I787fed84a7b613158a5618dd5cffafe4e4927234 (osmo-pcu) - I78f30aef7aa224b2e9db54c3a844d8f520b3aee0 (osmo-bsc) Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout the code base to be able to handle an MNC < 100 that has three digits (leading zeros). Depends: Id2240f7f518494c9df6c8bda52c0d5092f90f221 (libosmocore), Ib7176b1d65a03b76f41f94bc9d3293a8a07d24c6 (libosmocore) Change-Id: I787fed84a7b613158a5618dd5cffafe4e4927234
2018-02-19Update header includesMax1-2/+0
Many files include unnecessary headers and don't include headers which are actually used. Because of that combined with the fact that OsmoPCU is a mixture of C and C++, it makes it hard to modularize code. Fix this (using iwyu [1] tool): * add missing headers * remove unused headers [1] https://include-what-you-use.org/ Related: OS#1539 Change-Id: I8c9f488a43b099c72b2d30d3245e7ba50872fc00
2015-09-11bssgp: Use measured leak rate for flow controlJacob Erlbeck1-0/+5
The leak rate sent to the SGSN does not reflect the current CS level, lost frames, and control message overhead. So the SGSN cannot do proper queue control under non-optimal conditions. This commit computes the leak rate for the last flow control interval by computing the maximum theoretical leak rate and basically substracting control blocks, nacked blocks, and reduced block sizes due to CS downgrade. By using this approach, the value will by more stable on low load, where the value will tend to be near the value derived from the configuration. On full load the transmitted value is completely derived from the measurements. Note that the MS default values are no adapted to the adapted BVC leak rate, since a single MS which has a lower link quality would otherwise be reducing the rate of another MS with good radio conditions, which would not make much sense if they did not share any PDCH. Sponsored-by: On-Waves ehf
2015-08-17ns: Reconnect NSVC after timeoutJacob Erlbeck1-0/+1
Currently the signal S_NS_ALIVE_EXP emitted by the NS layer if the alive check has timed out too often is ignored. This prevents the PCU from reconnecting to the SGSN if it has not been accessible for some time. This commit modifies nsvc_signal_cb to reset the NSCV if S_NS_ALIVE_EXP is sent, so that the PCU continues to send NS RESET message if that happened. Sponsored-by: On-Waves ehf
2015-06-22llc: Make timeval arguments constJacob Erlbeck1-2/+2
Some struct timeval pointer arguments do not have the const qualifier, albeit the methods do not write to the structures. The next commit will change related pointers to const, so this commit provides the required constness. Sponsored-by: On-Waves ehf
2015-05-06bssgp: Increment BSSGP flow control tag valueJacob Erlbeck1-0/+1
Currently the tag value in FLOW CONTROL BVC messages is always 1. This commit changes the implementation to increment that value with each of the FLOW CONTROL BVC messages that is sent to the SGSN. Sponsored-by: On-Waves ehf
2015-05-06bssgp: Compute and transmit queue delayJacob Erlbeck1-0/+7
The specification 28.018, allows to transmit the average LLC downlink queueing delay in FLOW CONTROL BVC messages (BVC Measurement IE, see GSM 28.018, 10.4.4 and 11.3.7). This commit extends gprs_bssgp_pcu.cpp to compute the average delay time between two subsequent FLOW CONTROL BVC messages. The average is implemented as an arithmetic average without any weighting. Ticket: OW#1432 Sponsored-by: On-Waves ehf
2014-06-15Always exit and don't try to recoverDaniel Willmann1-3/+1
The current code tries to recover from dropped connections and resets the pcu state so it can keep running. However, this never worked correctly which is why the -e option is used. This option exits the pcu as soon as the internal state needs to be reset. This patch removes this option and makes this behaviour default. Ticket: SYS#390 Sponsored-by: On-Waves ehf
2013-10-30bts: Move struct gprs_rlcmac_bts and other structs into a bts.hHolger Hans Peter Freyther1-0/+2
Begin to make the BTS a real C++ object with real responsibilities. The biggest issue will be the pcu_vty.c that might not like C++ at all.
2013-09-04bssgp: Add callback UNITDATA.DL messaes with the dataHolger Hans Peter Freyther1-0/+4
2013-09-04bssgp: Add callbacks for certain BSSGP eventsHolger Hans Peter Freyther1-0/+6
Add a callback called when Unblock Ack is received. This can be used by a supervisor or the emulation test.
2013-09-04bssgp: Return the gprs_bssgp_pcu instance from create/connectHolger Hans Peter Freyther1-1/+18
This can be used to install handlers/testcases to register callbacks and other data.
2013-09-04rlcmac: Reduce the depedency on the global gprs_rlcmac_bts variableHolger Hans Peter Freyther1-4/+4
For mocking/unit-testing/emulation (and a dual trx-systems) having global state is quite bad. Cut back on the usage of the global struct gprs_rlcmac_bts. It also makes the complexity of certain routines more clear.
2013-09-04bssgp: These routines are not public API.. make them static for nowHolger Hans Peter Freyther1-8/+0
2013-08-02bssgp: The method creates and the connects.. reflect that in the nameHolger Hans Peter Freyther1-1/+1
Call things by what they do. This method is creating and then connecting a BSSGP..
2013-07-30misc: Move the struct bssgp_bvc_ctx into the struct osmo_pcuHolger Hans Peter Freyther1-2/+2
2013-07-27misc: Add an option exit/quit when the BSSGP is supposed to be destroyedHolger Hans Peter Freyther1-1/+2
The PCU does not properly re-set the state when the connection to the BTS is lost (and the SGSN potentially is re-started during that). This results in the BSSGP BVCI > 1 remaining blocked and no data will be accepted by the SGSN. Add the '-e' option and exit the PCU when the BSSGP/NS are getting destroyed.
2013-03-10PCU: respect the PCU-side "local port" as configured via L1 IFHarald Welte1-3/+4
This makes sure that the UDP local port of the Gb link is actually set to what is configured via OML from OpenBSC.
2012-09-23Replace local definitions by header gprs_bssgp_bss.hAndreas Eversberg1-5/+2
2012-07-06Cleanup of BSSGP code.Andreas Eversberg1-13/+0
The hack for resetting BSSGP instance is removed and now performed whenever the NS state changes to UNBLOCKED. The BSSGP instance is now created only once, as it should be. Received STATUS messages are ignored as they should be. The creation and destruction of BSSGP/NS instances is now handled by layer 1 interface alone.
2012-07-06Move BSSGP/NS instances creation and desctruction to gprs_bssgp_pcu.cppAndreas Eversberg1-0/+6
2012-07-06remove dependencies to openbsc/osmoggsn internalsHarald Welte1-3/+4
...and link against libosmogb (part of libosmocore.git)
2012-06-27Work on RLCMAC layer. Integration of scheduler and new packet transferAndreas Eversberg1-2/+2
2012-06-23Hack to slow down uplink transferAndreas Eversberg1-5/+5
2012-06-14move everything to src/ subdirectoryHarald Welte1-0/+69
The code corresponds to commit a9aa4777cc1144897a77dfb6c5c3d7325705251e in openbts-p2.8.git (Tue Jun 12 18:14:49 2012 +0400)