aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc/acc.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-07-23 19:13:56 +0200
committerpespin <pespin@sysmocom.de>2020-07-31 09:56:46 +0000
commit1e5e7004dc7987b23f5791366efdf374675e346b (patch)
tree106ae49cf9b677d82f07984607b838d41d232d94 /include/osmocom/bsc/acc.h
parentb764f449a23f130ce1b2157f8231317b12df0413 (diff)
Introduce support for ACC ramping during whole BTS life cycle
Prior to this patch, ACC ramping was only used to go 0->N in the number of allowed ACCs during BTS startup. It could optionally dynamically stretch or extend the ramping time based on channel load. With this patch, ACC ramping is kept alive during the entire time the BTS is active, and subset of allowed ACCs can now be incresed or decreased based on channel load. A new VTY command "access-control-class-ramping-chan-load" is added to configure a lower and an upper threshold. Channel load under the low threshold will potentially trigger an increment of the subset size of allowed ACCs, while a channel load over the upper threshold will potentially trigger the opposite (a decrease in size). The time between checks is kept fixed per VTY command (reusing old "access-control-class-ramping-step-size"), but the "dynamic" option is deprecated and ignored from now on since it provides nothing valuable in the new implementation, because the size always dynamically changes based on channel load (configured thresholds). Related: SYS#4912 Change-Id: Id17f947c92cdfc0eb9541a9bf066338169caaeb5
Diffstat (limited to 'include/osmocom/bsc/acc.h')
-rw-r--r--include/osmocom/bsc/acc.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/include/osmocom/bsc/acc.h b/include/osmocom/bsc/acc.h
index bd75f9599..c7be38cb3 100644
--- a/include/osmocom/bsc/acc.h
+++ b/include/osmocom/bsc/acc.h
@@ -71,9 +71,12 @@ void acc_mgr_apply_acc(struct acc_mgr *acc_mgr, struct gsm48_rach_control *rach_
#define ACC_RAMP_STEP_SIZE_DEFAULT ACC_RAMP_STEP_SIZE_MIN
#define ACC_RAMP_STEP_SIZE_MAX 10 /* allow all ACC in one step (effectively disables ramping) */
-#define ACC_RAMP_STEP_INTERVAL_MIN 30 /* 30 seconds */
+#define ACC_RAMP_STEP_INTERVAL_MIN 5 /* 5 seconds */
#define ACC_RAMP_STEP_INTERVAL_MAX 600 /* 10 minutes */
+#define ACC_RAMP_CHAN_LOAD_THRESHOLD_LOW 71
+#define ACC_RAMP_CHAN_LOAD_THRESHOLD_UP 89
+
/*!
* Data structure used to manage ACC ramping. Please avoid setting or reading fields
* in this structure directly. Use the accessor functions below instead.
@@ -97,8 +100,17 @@ struct acc_ramp {
* it has been overridden by VTY configuration.
*/
unsigned int step_interval_sec;
- bool step_interval_is_fixed;
struct osmo_timer_list step_timer;
+
+ /*!
+ * Channel Load Upper/Lower Thresholds:
+ * They control how ramping subset size of allowed ACCs changes in
+ * relation to current channel load (%, 0-100): Under the lower
+ * threshold, subset size may be increased; above the upper threshold,
+ * subset size may be decreased.
+ */
+ unsigned int chan_load_lower_threshold;
+ unsigned int chan_load_upper_threshold;
};
/*!
@@ -141,17 +153,17 @@ static inline unsigned int acc_ramp_get_step_interval(struct acc_ramp *acc_ramp)
}
/*!
- * If the step interval is dynamic, return true, else return false.
+ * Return the current ACC ramp step interval (in seconds)
* \param[in] acc_ramp Pointer to acc_ramp structure.
*/
-static inline bool acc_ramp_step_interval_is_dynamic(struct acc_ramp *acc_ramp)
+static inline unsigned int acc_ramp_is_running(struct acc_ramp *acc_ramp)
{
- return !(acc_ramp->step_interval_is_fixed);
+ return acc_ramp->step_interval_sec;
}
void acc_ramp_init(struct acc_ramp *acc_ramp, struct gsm_bts *bts);
int acc_ramp_set_step_size(struct acc_ramp *acc_ramp, unsigned int step_size);
int acc_ramp_set_step_interval(struct acc_ramp *acc_ramp, unsigned int step_interval);
-void acc_ramp_set_step_interval_dynamic(struct acc_ramp *acc_ramp);
+int acc_ramp_set_chan_load_thresholds(struct acc_ramp *acc_ramp, unsigned int low_threshold, unsigned int up_threshold);
void acc_ramp_trigger(struct acc_ramp *acc_ramp);
void acc_ramp_abort(struct acc_ramp *acc_ramp);