From 590b23ce3c78d8cca5baa15f92019edf74a9323c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 21 May 2019 02:38:43 +0200 Subject: cbch: Add counters; queue length limits and CBCH LOAD reporting This adds the final missing part to full CBCH support: * keep a tab on the current queue length for basic + extended CBCH * keep rate counters about the number of sent / transmitted SMSCB * send CBCH LOAD information via RSL to the BSC Change-Id: I7068c7937a60a900c40439115bb84dc3ee0d061f --- include/osmo-bts/cbch.h | 8 ++++++++ include/osmo-bts/gsm_data_shared.h | 4 ++++ include/osmo-bts/rsl.h | 2 ++ 3 files changed, 14 insertions(+) (limited to 'include') diff --git a/include/osmo-bts/cbch.h b/include/osmo-bts/cbch.h index af5fd9a3..6bba5fa2 100644 --- a/include/osmo-bts/cbch.h +++ b/include/osmo-bts/cbch.h @@ -6,6 +6,14 @@ #include #include +enum { + CBCH_CTR_RCVD_QUEUED, + CBCH_CTR_RCVD_DROPPED, + CBCH_CTR_SENT_SINGLE, + CBCH_CTR_SENT_DEFAULT, + CBCH_CTR_SENT_NULL, +}; + /* incoming SMS broadcast command from RSL */ int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type, bool extended_cbch, uint8_t msg_len, const uint8_t *msg); diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 860c296c..415e6bc0 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -542,6 +542,7 @@ struct gprs_rlc_cfg { struct bts_smscb_state { struct llist_head queue; /* list of struct smscb_msg */ int queue_len; + struct rate_ctr_group *ctrs; struct smscb_msg *cur_msg; /* current SMS-CB */ struct smscb_msg *default_msg; /* default broadcast message; NULL if none */ }; @@ -744,6 +745,9 @@ struct gsm_bts { /* State for SMSCB (Cell Broadcast) for BASIC and EXTENDED channel */ struct bts_smscb_state smscb_basic; struct bts_smscb_state smscb_extended; + int smscb_queue_tgt_len; /* ideal/target queue length */ + int smscb_queue_max_len; /* maximum queue length */ + int smscb_queue_hyst; /* hysteresis for CBCH laod indications */ float min_qual_rach; /* minimum quality for RACH bursts */ float min_qual_norm; /* minimum quality for normal daata */ diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h index 0361841d..186018eb 100644 --- a/include/osmo-bts/rsl.h +++ b/include/osmo-bts/rsl.h @@ -43,4 +43,6 @@ void cb_ts_disconnected(struct gsm_bts_trx_ts *ts); void cb_ts_connected(struct gsm_bts_trx_ts *ts, int rc); void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc); +int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount); + #endif // _RSL_H */ -- cgit v1.2.3