aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-29 13:45:05 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-03 13:17:22 +0200
commitccc34e4d30b962a2963c004d003d3851801ffb3b (patch)
tree63ab4167148ae54cc8858e5cc6a5821e569e9a57 /src/bts.h
parentc6d4ceeda6e6b96cc5bbc07fb9489587ed181f60 (diff)
tbf: Maintain the number of TBF per PDCH
Currently the PDCH object do not know anything about the TBFs using them. To make the slot allocation load dependant, at least some numbers are required. This commit adds TBF counters (one per direction) and the related methods attach_tbf, detach_tbf, and num_tbfs to gprs_rlcmac_pdch. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/bts.h')
-rw-r--r--src/bts.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bts.h b/src/bts.h
index 7e34db5..f6cc88f 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -66,6 +66,11 @@ struct gprs_rlcmac_pdch {
struct gprs_rlcmac_ul_tbf *ul_tbf_by_tfi(uint8_t tfi);
struct gprs_rlcmac_dl_tbf *dl_tbf_by_tfi(uint8_t tfi);
+
+ void attach_tbf(gprs_rlcmac_tbf *tbf);
+ void detach_tbf(gprs_rlcmac_tbf *tbf);
+
+ unsigned num_tbfs(enum gprs_rlcmac_tbf_direction dir) const;
#endif
uint8_t m_is_enabled; /* TS is enabled */
@@ -93,6 +98,8 @@ private:
gprs_rlcmac_tbf *tbf_from_list_by_tfi(struct llist_head *tbf_list, uint8_t tfi,
enum gprs_rlcmac_tbf_direction dir);
#endif
+
+ uint8_t m_num_tbfs[2];
};
struct gprs_rlcmac_trx {
@@ -299,6 +306,11 @@ inline BTS *gprs_rlcmac_pdch::bts() const
return trx->bts;
}
+inline unsigned gprs_rlcmac_pdch::num_tbfs(enum gprs_rlcmac_tbf_direction dir) const
+{
+ return m_num_tbfs[dir];
+}
+
inline struct rate_ctr_group *BTS::rate_counters() const
{
return m_ratectrs;