aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/paging.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-09paging: add todo comments for paging and mscsplitNeels Hofmeyr1-0/+6
Change-Id: I7e72c9db2837ea5edf45f6037cb0288a264d492c
2017-03-09Use libvlr in libmsc (large refactoring)Neels Hofmeyr1-0/+1
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of development collapsed in one patch. The original history may still be available as branch neels/vlr_orig. TODO: This commit may be split in several smaller changes before merging to master. Related: OS#1592 Change-Id: I702ba504ce2de93507312c28eca8d11f09f4ee8b
2017-03-08add struct bsc_subscr, separating libbsc from gsm_subscriberNeels Hofmeyr1-42/+46
In a future commit, gsm_subscriber will be replaced by vlr_subscr, and it will not make sense to use vlr_subscr in libbsc. Thus we need a dedicated BSC subscriber: struct bsc_subscr. Add rf_policy arg to bsc_grace_paging_request() because the bsc_subscr will no longer have a backpointer to gsm_network (used to be via subscr->group). Create a separate logging filter for the new BSC subscriber. The implementation of adjusting the filter context is added in libbsc to not introduce bsc_subscr_get/_put() dependencies to libcommon. During Paging Response, fetch a bsc_subscr from the mobile identity, like we do for the gsm_subscriber. It looks like a duplication now, but will make sense for the VLR as well as for future MSC split patches. Naming: it was requested to not name the new struct bsc_sub, because 'sub' is too ambiguous. At the same time it would be fine to have 'bsc_sub_' as function prefix. Instead of struct bsc_subscriber and bsc_sub_ prefix, I decided to match both up as struct bsc_subscr and bsc_subscr_ function prefix. It's fast to type, relatively short, unambiguous, and the naming is consistent. Add bsc_subscr unit test. Related: OS#1592, OS#1594 Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e
2017-02-23logging fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_*Neels Hofmeyr1-4/+4
In libosmocore, my patch was merged to master a bit too soon. To accomodate the request for naming that matches the general "LOG" prefix instead of "LOGGING", a fixup was committed to libosmocore. Adjust for that. Original patch: change-id I5c343630020f4b108099696fd96c2111614c8067 The fixup: change-id I424fe3f12ea620338902b2bb8230544bde3f1a93 Change-Id: Ib2ec5e4884aa90f48051ee2f832af557aa525991
2017-02-22logging: use central filter and ctx consts from libosmocoreNeels Hofmeyr1-4/+4
The LCHAN and BTS filter contexts are actually never used, so drop them until someone adds them properly. For now use only LOGGING_{FILTER,CTX}_VLR_SUBSCR. Some of these will change to _BSC_SUBSCR once struct bsc_subscriber is introduced, and later on, struct gsm_subscriber will be replaced by vlr_subscriber so that the names will match. Depends: libosmocore change-id I5c343630020f4b108099696fd96c2111614c8067 Change-Id: Ifa82f6a461ad4c0eeddb8a38fb3833460432d16b
2017-02-09Expand chan allocation loggingMax1-4/+5
Log more data related to channel allocation: - channel type - number of paging attempts - timers fired Change-Id: Ib417a9c942c17b902dd80ff555cd9da5f91bff48
2016-09-28Revert "bts: extend bts_chan_load to allow counting tch only"Neels Hofmeyr1-1/+1
This reverts commit 308cb0719dca3ba8eed1eff2a2124d44f34d9a28. Problems in this commit: openbsc/src/libbsc/chan_alloc.c:523: case GSM_PCHAN_TCH_F_PDCH: This is actually wrong, GSM_PCHAN_TCH_F_PDCH use ts->flags, not ts->dyn below (due to historical reasons and could be unified). 560: if (only_count_tch && !chan_is_tch(ts)) This has exactly one effect: it excludes GSM_PCHAN_TCH_F_PDCH when in PDCH mode, because for all other PDCH (plain PDCH and TCH/F_TCH/H_PDCH in PDCH mode) below ts_subslots() returns 0 and skips the for() loop. I consider this a bug in TCH/F_PDCH, to be fixed in an upcoming commit. I don't see why we need the only_count_tch argument, because this should normally only count TCH, weren't it for the TCH/F_PDCH bug. If dyn TS should be counted differently, we should do this in a different way. Change-Id: I34dbbaf53a800115e3d03bd44028cad675f3b525
2016-09-23bts: extend bts_chan_load to allow counting tch onlyAlexander Couzens1-1/+1
Change-Id: I86f1d502649747b6b9aefcb39081b14110e8f494
2016-08-29libmsc/bsc: split rate counters into bsc and msc groupAlexander Couzens1-3/+3
Tweaked-By: Neels Hofmeyr <nhofmeyr@sysmocom.de> Change-Id: I7361033cd1eb919ec3c2ea2652f40ab8c75b2f99
2016-08-27libbsc/libmsc: convert old osmo counter into rate_ctrgsAlexander Couzens1-3/+3
rate counters support the export to statsd and can have a delta value. Change-Id: Ie749cebd53a0bb618d0e23d375885712078bf8dd
2015-08-03paging: Go through all BTS to stop pagingHolger Hans Peter Freyther1-16/+9
As the comment says we should not rely that the paging occurs on the current LAC. We might page at more BTS. Walk all the BTS to stop paging. No callbacks will be issued by this stop operation.
2015-08-03paging: In case paging failed stop it everywhereHolger Hans Peter Freyther1-1/+3
In case we can't page on a BTS then stop it everywhere. The callers of paging_request assume that this is kind of an atomic operation and we should help with that.
2015-04-29sub: Remove paging requests before dispatchingHolger Hans Peter Freyther1-4/+10
The dispatching might lead to the removal of more paging requests and makes "request" invalid. Remove it before calling the callback.
2015-01-02logging: Only compare the subscr addressHolger Hans Peter Freyther1-4/+1
Move the "logging filter imsi IMSI" into the BTS/NITB code to allow to set the gsm_subscriber and only compare it. This way we simply compare the subscriber address and don't have to care if the subscriber data is still valid.
2015-01-02logging: Set the context for paging requests as well.Holger Hans Peter Freyther1-0/+11
2014-12-05msc: Add and use gsm_subscriber_groupJacob Erlbeck1-1/+1
Currently every subcriber object directly refers to the gsm_network which contains a flag shared by every related subscriber (keep_subscr). This adds a dependency on gsm_network even if only the function defined in gsm_subscriber_base.c are used. This patch adds a new struct gsm_subscriber_group which contains the keep_subscr flag and a back reference to the network object. The latter is not dereferenced in gsm_subscriber_base.c, so it can safely be set to NULL when only that part of the gsm_subscriber API is being used. It also changes that API to use gsm_subscriber_group instead of gsm_network parameters. Since there are some places where a pointer to the gsm_network is needed but where only a gsm_subscriber is available, a 'net' back pointer is added to the group struct, too. Nevertheless subscr group and network could be separated completely, but this is not the topic of this commit. Sponsored-by: On-Waves ehf
2013-01-28bsc: Allow to page a BTS that is excluded from the RF lockHolger Hans Peter Freyther1-12/+23
The RF lock excluded BTS was not paged at all. Now forward the paging message to the handler and call a function that will check if this LAC can be paged right now. Introduce a new paging method that allows to page on a dedicated bts, refactor the code to use this method for paging.
2012-12-22paging: Do not page when there is no OML linkHolger Hans Peter Freyther1-0/+4
Avoid printing error messages when paging while the BTS is down. In case a BTS is going down it is best to just let the timers expire normally. We can not expire them right away as multiple BTS could be paged and we do not want to interfere with that. There is no need to stop the queue right now.
2011-07-19paging: Add method to find the paging data for a given subscriberHolger Hans Peter Freyther1-0/+14
2011-06-26move gsm0502_calc_paging_group() to libosmocoreHarald Welte1-17/+0
2011-06-26generalize function for calculation of the paging groupHarald Welte1-7/+10
2011-06-26move gsm 05.02 related calculations into libosmocoreHarald Welte1-2/+3
2011-06-26use new gsm48_number_of_paging_subchannels from libosmocoreHarald Welte1-2/+4
2011-05-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-3/+3
Summary of changes: s/struct counter/struct osmo_counter/g s/counter_inc/osmo_counter_inc/g s/counter_get/osmo_counter_get/g s/counter_reset/osmo_counter_reset/g s/counter_alloc/osmo_counter_alloc/g s/counter_free/osmo_counter_free
2011-05-06src: use namespace prefix osmo_timer* for timer functionsPablo Neira Ayuso1-7/+7
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2011-05-02paging: Provide the number of pending requestsHolger Hans Peter Freyther1-0/+13
Address the FIXME and take code from the on-waves/bsc-master branch. This will count the number of requests.
2011-05-02paging: Initialize structs internally to avoid a crashHolger Hans Peter Freyther1-1/+11
The code to create the struct gsm_bts is in libcommon right now and we can not call paging_init from there. Right now it appears to be the easiest of doing the init internally.
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-2/+2
This was done with sed on the files.
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-1/+1
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte1-0/+395
... and make sure tests work again after restructuring