aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-10 13:33:26 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-10 13:33:26 +0100
commitd863f9cbeaac2b16a226021bc9817e51550a3329 (patch)
treedcb8739366d253f129c6e5e5266c3d744ce2ead3 /include
parent20f542280330d1181d04ea34ef876358f710d6c8 (diff)
parent4fcda92d7be7dd2df1870156206fea30cd02d3cc (diff)
Merge branch 'jerlbeck/agch-queue'
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/bts.h2
-rw-r--r--include/osmo-bts/gsm_data.h20
-rw-r--r--include/osmo-bts/paging.h3
3 files changed, 24 insertions, 1 deletions
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 49ef617c..d27eef0e 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -26,6 +26,8 @@ void bts_setup_slot(struct gsm_bts_trx_ts *slot, uint8_t comb);
int bts_agch_enqueue(struct gsm_bts *bts, struct msgb *msg);
struct msgb *bts_agch_dequeue(struct gsm_bts *bts);
+void bts_update_agch_max_queue_length(struct gsm_bts *bts);
+int bts_agch_max_queue_length(int T, int bcch_conf);
int bts_ccch_copy_msg(struct gsm_bts *bts, uint8_t *out_buf, struct gsm_time *gt,
int is_ag_res);
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index aee56a9a..c7a0fc61 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -7,6 +7,11 @@
#include <osmo-bts/paging.h>
+#define GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DEFAULT 41
+#define GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DISABLE 999999
+#define GSM_BTS_AGCH_QUEUE_LOW_LEVEL_DEFAULT 41
+#define GSM_BTS_AGCH_QUEUE_HIGH_LEVEL_DEFAULT 91
+
struct pcu_sock_state;
struct gsm_network {
@@ -48,8 +53,23 @@ struct gsm_bts_role_bts {
} load;
uint8_t ny1;
uint8_t max_ta;
+
+ /* AGCH queuing */
struct llist_head agch_queue;
int agch_queue_length;
+ int agch_max_queue_length;
+
+ int agch_queue_thresh_level; /* Cleanup threshold in percent of max len */
+ int agch_queue_low_level; /* Low water mark in percent of max len */
+ int agch_queue_high_level; /* High water mark in percent of max len */
+
+ /* TODO: Use a rate counter group instead */
+ uint64_t agch_queue_dropped_msgs;
+ uint64_t agch_queue_merged_msgs;
+ uint64_t agch_queue_rejected_msgs;
+ uint64_t agch_queue_agch_msgs;
+ uint64_t agch_queue_pch_msgs;
+
struct paging_state *paging_state;
char *bsc_oml_host;
unsigned int rtp_jitter_buf_ms;
diff --git a/include/osmo-bts/paging.h b/include/osmo-bts/paging.h
index d31f5c12..38accd72 100644
--- a/include/osmo-bts/paging.h
+++ b/include/osmo-bts/paging.h
@@ -40,7 +40,8 @@ int paging_add_imm_ass(struct paging_state *ps, const uint8_t *data,
uint8_t len);
/* generate paging message for given gsm time */
-int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt);
+int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt,
+ int *is_empty);
/* inspection methods below */