aboutsummaryrefslogtreecommitdiffstats
path: root/src/bts.h
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/bts.h
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/bts.h')
-rw-r--r--src/bts.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/bts.h b/src/bts.h
index 2932154..f022e5b 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -44,6 +44,7 @@ extern "C" {
#define LLC_CODEL_USE_DEFAULT (-1)
#define MAX_GPRS_CS 9
+#define MAX_LOAD_PROBABILITY 0xffffffff
struct BTS;
struct GprsMs;
@@ -136,7 +137,8 @@ struct gprs_rlcmac_trx {
/* back pointers */
struct BTS *bts;
uint8_t trx_no;
-
+ uint8_t current_load;
+ uint8_t num_pdch;
#ifdef __cplusplus
void reserve_slots(enum gprs_rlcmac_tbf_direction dir, uint8_t slots);
void unreserve_slots(enum gprs_rlcmac_tbf_direction dir, uint8_t slots);
@@ -345,6 +347,9 @@ public:
gprs_rlcmac_ul_tbf *ul_tbf_by_tfi(uint8_t tfi, uint8_t trx, uint8_t ts);
int tfi_find_free(enum gprs_rlcmac_tbf_direction dir, uint8_t *_trx, int8_t use_trx);
+ int get_possible_trxs(enum gprs_rlcmac_tbf_direction dir,
+ bool *_trx, int8_t use_trx);
+ int get_suitable_trx(bool *suitable_trx);
int rcv_imm_ass_cnf(const uint8_t *data, uint32_t fn);
uint8_t is_single_block(uint16_t ra, enum ph_burst_type burst_type,
@@ -451,6 +456,10 @@ public:
void ms_present(int32_t n);
int32_t ms_present_get();
+ void increment_num_pdch();
+ void decrement_num_pdch();
+ uint8_t get_num_pdch() const;
+ int get_possible_trxs_sba(bool *_trx);
/*
* Below for C interface for the VTY
@@ -476,6 +485,8 @@ private:
/* list of downlink TBFs */
LListHead<gprs_rlcmac_tbf> m_dl_tbfs;
+ /* The summation of all the PDCH across all TRX for this BTS*/
+ uint8_t m_total_pdch;
private:
/* disable copying to avoid slicing */
BTS(const BTS&);
@@ -487,6 +498,21 @@ inline int BTS::current_frame_number() const
return m_cur_fn;
}
+inline void BTS::increment_num_pdch()
+{
+ m_total_pdch++;
+}
+
+inline void BTS::decrement_num_pdch()
+{
+ m_total_pdch--;
+}
+
+inline uint8_t BTS::get_num_pdch() const
+{
+ return m_total_pdch;
+}
+
inline SBAController *BTS::sba()
{
return &m_sba;