aboutsummaryrefslogtreecommitdiffstats
path: root/src/sba.cpp
diff options
context:
space:
mode:
authoraravind sirsikar <arvind.sirsikar@radisys.com>2016-12-30 12:24:38 +0530
committeraravind sirsikar <arvind.sirsikar@radisys.com>2016-12-30 12:24:38 +0530
commit9ddc3c7845b094911b3eba1d17e6a74d7e7503ee (patch)
tree035d753a3f4770dbc6c7a2ffb551fae78d27276b /src/sba.cpp
parentd3ae14c18f44d24c0a5c592fa9bdc9350b90cfd3 (diff)
PDCH allocation across two TRXradisys/egprs_features
Implementation: PCU keeps track of number PDCH across all the TRXs at BTS context and also keeps number of active PDCHs in each TRX context. This ratio gives the CAPACITY of each TRX. 1st Phase: While selection of TRX, functions get_possible_trxs(for multiple TS) and get_possible_trxs_sba(Single block allocation, Ex: during RACH) gets possible TRXs based on TFIs availability. 2nd Phase: outcome of TRXs(from get_possible_trxs, get_possible_trxs_sba) will be fed to get_suitable_trx function. Which does actual load balancing on each TRX. And selects the best fit TRX, based on below equation PROBABILITY = MAX_PROBABILITY – ((LOAD * 100)/CAPACITY); If same PROBABILITY Select the one with higher capacity Else Find the TRX with higher PROBABILITY MAX_PROBABILITY = 65535; LOAD: Initialized to 0, Later gets incremented with number of TS allocated. and decremented whle TBF deletion, based on number of TS allocated Below are the test executed on Unit test environment 1) 2 TRXs, with same Capacity 2) 2 TRX with ½ capacity 3) 2 TRXs with ¼ capacity 4) 2 TRX with UL and DL allocation to ensure Tbfs on both direction is hosted on same TRX 5) 2 TRX with same Capacity and DL TBF creation and deletion scenarios to ensure proper load balancing criteria for actual Load. Below are the Test executed on Integration setup with Ettus B200 setup with 2 TRXs with same CAPACITY. 1) TRX allocation during RACH procedure(SBA allocation) 2) TRX allocation during DL TBF creation with multi time slots(4 time slots) 3) TRX allocation while Ping Test 4) TRX allocation while UDP test 5) TRX allocation for web browsing. 6) 2 MS test with each TRX sharing 1 MS. Received aggregate throughput of 446 kbps(223 Kbps each) Limitation: 1) BSSGP flow control needs to be tuned since test with 2 MS with each MS on different TRX runs for 20 mins 2) USF resource availibility is not checked while selecting the TRX as existing implementation Change-Id: Ifb61a7862d55af828383b6dfe728628e546ed12b Related: OS# 1775
Diffstat (limited to 'src/sba.cpp')
-rw-r--r--src/sba.cpp42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/sba.cpp b/src/sba.cpp
index 46c1431..117aa34 100644
--- a/src/sba.cpp
+++ b/src/sba.cpp
@@ -49,8 +49,27 @@ int SBAController::alloc(
struct gprs_rlcmac_pdch *pdch;
struct gprs_rlcmac_sba *sba;
- int8_t trx, ts;
+ int8_t ts;
uint32_t fn;
+ bool trxs[8];
+ int selected_trx;
+ int ret;
+
+ ret = m_bts.get_possible_trxs_sba(trxs);
+
+ if (ret == -EINVAL)
+ return -EINVAL;
+
+ selected_trx = m_bts.get_suitable_trx(trxs);
+
+ for (ts = 7; ts >= 0; ts--) {
+ pdch = &m_bts.bts_data()->trx[selected_trx].pdch[ts];
+ if (!pdch->is_enabled())
+ continue;
+ break;
+ }
+ if (ts < 0)
+ return -EINVAL;
sba = talloc_zero(tall_pcu_ctx, struct gprs_rlcmac_sba);
if (!sba)
@@ -59,25 +78,10 @@ int SBAController::alloc(
if (!gsm48_ta_is_valid(ta))
return -EINVAL;
- for (trx = 0; trx < 8; trx++) {
- for (ts = 7; ts >= 0; ts--) {
- pdch = &m_bts.bts_data()->trx[trx].pdch[ts];
- if (!pdch->is_enabled())
- continue;
- break;
- }
- if (ts >= 0)
- break;
- }
- if (trx == 8) {
- LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH available.\n");
- talloc_free(sba);
- return -EINVAL;
- }
fn = (pdch->last_rts_fn + AGCH_START_OFFSET) % 2715648;
- sba->trx_no = trx;
+ sba->trx_no = selected_trx;
sba->ts_no = ts;
sba->fn = fn;
sba->ta = ta;
@@ -85,9 +89,11 @@ int SBAController::alloc(
llist_add(&sba->list, &m_sbas);
m_bts.sba_allocated();
- *_trx = trx;
+ *_trx = selected_trx;
*_ts = ts;
*_fn = fn;
+ LOGP(DRLCMAC, LOGL_DEBUG, " sba fn=%d ts = %d trx = %d\n", fn, ts, selected_trx);
+
return 0;
}