aboutsummaryrefslogtreecommitdiffstats
path: root/src/sba.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-02 13:19:49 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-07 10:41:44 +0200
commit506f156f7a4aebb52dace00a760f86b2b4f5e19a (patch)
treecba8fdab469c752492c0f64ddf0dd3ba8c298f2e /src/sba.cpp
parent1653f837e3be32d94eeaabf29ae89fdf1dc66bac (diff)
sba: Reverse TS search order
Currently the search for an enabled PDCH slot for SBA start with the first TS. If there are more than 2 PDCH slots enabled, this slot will conflict with an existing multislot reservation for most multislot classes. This were less likely if the search were reversed and started with the last slot due to the 3 slot shift between Tx and Rx. When multislot allocation is enabled and several MS are connected, and increased rate of poll timeouts can be observed. This commit tries to reduce the number of poll timeouts by reverting the slot search order for SBA allocation. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/sba.cpp')
-rw-r--r--src/sba.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sba.cpp b/src/sba.cpp
index 6eec235..8db057b 100644
--- a/src/sba.cpp
+++ b/src/sba.cpp
@@ -48,7 +48,7 @@ int SBAController::alloc(
struct gprs_rlcmac_pdch *pdch;
struct gprs_rlcmac_sba *sba;
- uint8_t trx, ts;
+ int8_t trx, ts;
uint32_t fn;
sba = talloc_zero(tall_pcu_ctx, struct gprs_rlcmac_sba);
@@ -56,7 +56,7 @@ int SBAController::alloc(
return -ENOMEM;
for (trx = 0; trx < 8; trx++) {
- for (ts = 0; ts < 8; ts++) {
+ for (ts = 7; ts >= 0; ts--) {
pdch = &m_bts.bts_data()->trx[trx].pdch[ts];
if (!pdch->is_enabled())
continue;