aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac_ts_alloc.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-30 13:40:18 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-07 10:29:12 +0200
commit16c6ecc3657f62728845764731c189b3cb8daca2 (patch)
tree58c2b0747081ef600a4fe049a124179dc61e5360 /src/gprs_rlcmac_ts_alloc.cpp
parent5f494b8415ff4e5c9bf323ea7bc8326ad423c7ae (diff)
alloc: Skip common TS without free USF when rating
Currently the search of the "best" slot combination is done separately from the UL slot selection, which can lead to an allocation failure due to USF exhaustion even if another combination had been possible. This commit reduces the probability for this event by skipping UL slots without free USF while calculation the capacity. Note that the implementation is rather inefficient which will be fixed by the following commits. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_rlcmac_ts_alloc.cpp')
-rw-r--r--src/gprs_rlcmac_ts_alloc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 338362c6..1819b5b5 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -551,9 +551,11 @@ static int find_multi_slots(struct gprs_rlcmac_bts *bts,
}
/* Only consider common slots for UL */
if (tx_window & rx_window & (1 << ts)) {
- c = 32 - pdch->num_reserved(GPRS_RLCMAC_UL_TBF);
- c = OSMO_MAX(c, 1);
- capacity += c;
+ if (find_free_usf(pdch) >= 0) {
+ c = 32 - pdch->num_reserved(GPRS_RLCMAC_UL_TBF);
+ c = OSMO_MAX(c, 1);
+ capacity += c;
+ }
}
}