diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-11-10 19:09:10 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-11-15 11:40:07 +0100 |
commit | 0dcbc076823fc23b3212df600903de0493a7cc8d (patch) | |
tree | 11d838e0dff36d8148b0e27aecea1987a9281a11 /src/bts.h | |
parent | 5deac1404d2fb1c805218b19efcbaeedeb3ec23b (diff) |
bts: Add counter availablePDCHAllocatedTime
We basically want to probe whether it's possible to allocate TBFs, or
whether we know it will fail due to all main resources being already in
use (TFI, USF).
Having bts_all_pdch_allocated() return false doesn't mean though that an
MS will be able to allocate a TBF for sure. That's because further
restrictions are applied based on MS: whether it was already attached to
a specific TRX, whether the ms_class allows for a certain multislot
combination, etc. However, it should provide a general idea on whether
for sure the PCU is unable to provide more allocations. More fine
grained state about failures can still be followed by looking at
tbf:alloc:failed:* rate counters.
Related: SYS#4878
Depends: Iabb17a08e6e1a86f168cdb008fba05ecd4776bdd (libosmocore)
Change-Id: Ie0f0c451558817bddc3fe1a0f0df531f14c9f1d3
Diffstat (limited to 'src/bts.h')
-rw-r--r-- | src/bts.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -32,6 +32,7 @@ extern "C" { #include <osmocom/core/rate_ctr.h> #include <osmocom/core/stat_item.h> #include <osmocom/core/tdef.h> +#include <osmocom/core/time_cc.h> #include <osmocom/gprs/gprs_ns2.h> #include <osmocom/gsm/l1sap.h> #include <osmocom/gsm/protocol/gsm_04_08.h> @@ -84,6 +85,7 @@ void bts_update_tbf_ta(struct gprs_rlcmac_bts *bts, const char *p, uint32_t fn, enum { + CTR_PDCH_ALL_ALLOCATED, CTR_TBF_DL_ALLOCATED, CTR_TBF_DL_FREED, CTR_TBF_DL_ABORTED, @@ -278,6 +280,8 @@ struct gprs_rlcmac_bts { /* List of struct bts_pch_timer for active PCH pagings */ struct llist_head pch_timer; + + struct osmo_time_cc all_allocated_pdch; }; #ifdef __cplusplus @@ -381,6 +385,7 @@ void bts_set_max_mcs_ul(struct gprs_rlcmac_bts *bts, uint8_t mcs_ul); bool bts_cs_dl_is_supported(const struct gprs_rlcmac_bts *bts, enum CodingScheme cs); const struct llist_head* bts_ms_list(struct gprs_rlcmac_bts *bts); uint8_t bts_get_ms_pwr_alpha(const struct gprs_rlcmac_bts *bts); +bool bts_all_pdch_allocated(const struct gprs_rlcmac_bts *bts); #ifdef __cplusplus } #endif |