diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-11-22 14:02:48 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-11-22 19:53:17 +0100 |
commit | 70a1d60a836431eb64367a0d08b95d43a42ea37c (patch) | |
tree | c56cd143b4129fc1dd97f04f319b6464790baae2 /include | |
parent | 27096140117767c46a702e439b7ae97459fb79e9 (diff) |
paging: Store list of gsm_paging_request in bsc_subscr
This allows havily decreasing the algorithmic cost of removing all
pending active paging requests for a given subscriber once it answers
on a given BTS.
Beforehand, the whole paging queue of all BTS were iterated. Now, only
the active requests for that subscriber are iterated.
Related: SYS#6200
Change-Id: I831d0fe01d7812c34500362b90f47cd65645b666
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/bsc/bsc_subscriber.h | 10 | ||||
-rw-r--r-- | include/osmocom/bsc/paging.h | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/include/osmocom/bsc/bsc_subscriber.h b/include/osmocom/bsc/bsc_subscriber.h index f9e8eb2a8..32f589e9d 100644 --- a/include/osmocom/bsc/bsc_subscriber.h +++ b/include/osmocom/bsc/bsc_subscriber.h @@ -10,6 +10,7 @@ #include <osmocom/gsm/gsm48.h> struct log_target; +struct gsm_bts; struct bsc_subscr { struct llist_head entry; @@ -18,7 +19,8 @@ struct bsc_subscr { char imsi[GSM23003_IMSI_MAX_DIGITS+1]; uint32_t tmsi; - uint32_t active_paging_requests; + uint32_t active_paging_requests_len; + struct llist_head active_paging_requests; }; const char *bsc_subscr_name(struct bsc_subscr *bsub); @@ -51,3 +53,9 @@ void bsc_subscr_set_imsi(struct bsc_subscr *bsub, const char *imsi); 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(struct bsc_subscr *bsub, const struct gsm_bts *bts); diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h index bd84f248b..ccee2d4d2 100644 --- a/include/osmocom/bsc/paging.h +++ b/include/osmocom/bsc/paging.h @@ -69,9 +69,10 @@ struct bsc_paging_params { 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 */ |