diff options
-rw-r--r-- | include/osmocom/bsc/acc.h | 24 | ||||
-rw-r--r-- | src/osmo-bsc/acc.c | 100 | ||||
-rw-r--r-- | src/osmo-bsc/bsc_vty.c | 55 | ||||
-rw-r--r-- | tests/acc/acc_test.c | 122 | ||||
-rw-r--r-- | tests/acc/acc_test.ok | 727 |
5 files changed, 875 insertions, 153 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); diff --git a/src/osmo-bsc/acc.c b/src/osmo-bsc/acc.c index 72b4591ee..74ebe9952 100644 --- a/src/osmo-bsc/acc.c +++ b/src/osmo-bsc/acc.c @@ -362,40 +362,42 @@ void acc_mgr_apply_acc(struct acc_mgr *acc_mgr, struct gsm48_rach_control *rach_ ////////////////////////// // acc_ramp ////////////////////////// -static unsigned int get_next_step_interval(struct acc_ramp *acc_ramp) -{ - struct gsm_bts *bts = acc_ramp->bts; - uint64_t load; - - if (acc_ramp->step_interval_is_fixed) - return acc_ramp->step_interval_sec; - - /* Scale the step interval to current channel load average. */ - load = (bts->chan_load_avg << 8); /* convert to fixed-point */ - acc_ramp->step_interval_sec = ((load * ACC_RAMP_STEP_INTERVAL_MAX) / 100) >> 8; - if (acc_ramp->step_interval_sec < ACC_RAMP_STEP_SIZE_MIN) - acc_ramp->step_interval_sec = ACC_RAMP_STEP_INTERVAL_MIN; - else if (acc_ramp->step_interval_sec > ACC_RAMP_STEP_INTERVAL_MAX) - acc_ramp->step_interval_sec = ACC_RAMP_STEP_INTERVAL_MAX; - - LOG_BTS(bts, DRSL, LOGL_DEBUG, - "ACC RAMP: step interval set to %u seconds based on %u%% channel load average\n", - acc_ramp->step_interval_sec, bts->chan_load_avg); - return acc_ramp->step_interval_sec; -} - static void do_acc_ramping_step(void *data) { struct acc_ramp *acc_ramp = data; - struct acc_mgr *acc_mgr = &acc_ramp->bts->acc_mgr; - uint8_t old_len = acc_mgr_get_len_allowed_ramp(acc_mgr); - uint8_t new_len = OSMO_MIN(10, old_len + acc_ramp->step_size); + struct gsm_bts *bts = acc_ramp->bts; + struct acc_mgr *acc_mgr = &bts->acc_mgr; - acc_mgr_set_len_allowed_ramp(acc_mgr, new_len); + uint8_t old_len = acc_mgr_get_len_allowed_ramp(acc_mgr); + uint8_t new_len = old_len; + + /* Remark dec: Never decrease back to 0, it is desirable to always allow at + * least 1 ACC at ramping lvl to allow subscribers to eventually use the + * network. If total barring is desired, it can be controlled by the + * adminsitrative subset length through VTY. + * Remark inc: Never try going over the admin subset size, since it + * wouldn't change final subset size anyway and it would create a fake + * sense of safe load handling capacity. If then load became high, being + * on upper size would mean the BTS requires more time to effectively + * drop down the final subset size, hence delaying recovery. + */ + if (bts->chan_load_avg > acc_ramp->chan_load_upper_threshold) + new_len = (uint8_t)OSMO_MAX(1, (int)(old_len - acc_ramp->step_size)); + else if (bts->chan_load_avg < acc_ramp->chan_load_lower_threshold) + new_len = OSMO_MIN(acc_mgr_get_len_allowed_adm(acc_mgr), + old_len + acc_ramp->step_size); + else + new_len = old_len; + + if (new_len != old_len) { + LOG_BTS(bts, DRSL, LOGL_DEBUG, + "ACC RAMP: changing ramping subset size %" PRIu8 + " -> %" PRIu8 ", chan_load_avg=%" PRIu8 "%%\n", + old_len, new_len, bts->chan_load_avg); + acc_mgr_set_len_allowed_ramp(acc_mgr, new_len); + } - /* If we have not allowed all ACCs yet, schedule another ramping step. */ - if (new_len != 10) - osmo_timer_schedule(&acc_ramp->step_timer, get_next_step_interval(acc_ramp), 0); + osmo_timer_schedule(&acc_ramp->step_timer, acc_ramp->step_interval_sec, 0); } /* Implements osmo_signal_cbfn() -- trigger or abort ACC ramping upon changes RF lock state. */ @@ -533,7 +535,8 @@ void acc_ramp_init(struct acc_ramp *acc_ramp, struct gsm_bts *bts) acc_ramp_set_enabled(acc_ramp, false); acc_ramp->step_size = ACC_RAMP_STEP_SIZE_DEFAULT; acc_ramp->step_interval_sec = ACC_RAMP_STEP_INTERVAL_MIN; - acc_ramp->step_interval_is_fixed = false; + acc_ramp->chan_load_lower_threshold = ACC_RAMP_CHAN_LOAD_THRESHOLD_LOW; + acc_ramp->chan_load_upper_threshold = ACC_RAMP_CHAN_LOAD_THRESHOLD_UP; osmo_timer_setup(&acc_ramp->step_timer, do_acc_ramping_step, acc_ramp); osmo_signal_register_handler(SS_NM, acc_ramp_nm_sig_cb, acc_ramp); } @@ -566,21 +569,30 @@ int acc_ramp_set_step_interval(struct acc_ramp *acc_ramp, unsigned int step_inte return -ERANGE; acc_ramp->step_interval_sec = step_interval; - acc_ramp->step_interval_is_fixed = true; LOG_BTS(acc_ramp->bts, DRSL, LOGL_DEBUG, "ACC RAMP: ramping step interval set to %u seconds\n", step_interval); return 0; } /*! - * Clear a previously set fixed ramping step interval, so that the interval - * is again automatically scaled to the BTS channel load average. + * Change the ramping channel load 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. * \param[in] acc_ramp Pointer to acc_ramp structure. + * \param[in] low_threshold The new minimum threshold: values under it allow for increasing the ramping subset size. + * \param[in] up_threshold The new maximum threshold: values under it allow for increasing the ramping subset size. */ -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) { - acc_ramp->step_interval_is_fixed = false; - LOG_BTS(acc_ramp->bts, DRSL, LOGL_DEBUG, "ACC RAMP: ramping step interval set to 'dynamic'\n"); + /* for instance, high=49 and lower=50 makes sense: + [50-100] -> decrease, [0-49] -> increase */ + if ((int)up_threshold - (int)low_threshold < -1) + return -ERANGE; + + acc_ramp->chan_load_lower_threshold = low_threshold; + acc_ramp->chan_load_upper_threshold = up_threshold; + return 0; } /*! @@ -593,13 +605,23 @@ void acc_ramp_set_step_interval_dynamic(struct acc_ramp *acc_ramp) */ void acc_ramp_trigger(struct acc_ramp *acc_ramp) { - /* Abort any previously running ramping process and allow all available ACCs. */ - acc_ramp_abort(acc_ramp); - if (acc_ramp_is_enabled(acc_ramp)) { + if (osmo_timer_pending(&acc_ramp->step_timer)) + return; /* Already started, nothing to do */ + /* Set all available ACCs to barred and start ramping up. */ acc_mgr_set_len_allowed_ramp(&acc_ramp->bts->acc_mgr, 0); + if (acc_ramp->chan_load_lower_threshold == 0 && + acc_ramp->chan_load_upper_threshold == 100) { + LOG_BTS(acc_ramp->bts, DRSL, LOGL_ERROR, + "ACC RAMP: starting ramp up with 0 ACCs and " + "no possibility to grow the allowed subset size! " + "Check VTY cmd access-control-class-ramping-chan-load\n"); + } do_acc_ramping_step(acc_ramp); + } else { + /* Abort any previously running ramping process and allow all available ACCs. */ + acc_ramp_abort(acc_ramp); } } diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 0be4e6d45..e4842f724 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -409,11 +409,11 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) vty_out(vty, " Access Control Class ramping: %senabled%s", acc_ramp_is_enabled(&bts->acc_ramp) ? "" : "not ", VTY_NEWLINE); if (acc_ramp_is_enabled(&bts->acc_ramp)) { - if (!acc_ramp_step_interval_is_dynamic(&bts->acc_ramp)) - vty_out(vty, " Access Control Class ramping step interval: %u seconds%s", - acc_ramp_get_step_interval(&bts->acc_ramp), VTY_NEWLINE); - else - vty_out(vty, " Access Control Class ramping step interval: dynamic%s", VTY_NEWLINE); + vty_out(vty, " Access Control Class ramping step interval: %u seconds%s", + acc_ramp_get_step_interval(&bts->acc_ramp), VTY_NEWLINE); + vty_out(vty, " Access Control Class channel load thresholds: (%" PRIu8 ", %" PRIu8 ")%s", + bts->acc_ramp.chan_load_lower_threshold, + bts->acc_ramp.chan_load_upper_threshold, VTY_NEWLINE); vty_out(vty, " enabling %u Access Control Class%s per ramping step%s", acc_ramp_get_step_size(&bts->acc_ramp), acc_ramp_get_step_size(&bts->acc_ramp) > 1 ? "es" : "", VTY_NEWLINE); @@ -955,14 +955,12 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts) if (bts->acc_mgr.rotation_time_sec != ACC_MGR_QUANTUM_DEFAULT) vty_out(vty, " access-control-class-rotate-quantum %" PRIu32 "%s", bts->acc_mgr.rotation_time_sec, VTY_NEWLINE); vty_out(vty, " %saccess-control-class-ramping%s", acc_ramp_is_enabled(&bts->acc_ramp) ? "" : "no ", VTY_NEWLINE); - if (!acc_ramp_step_interval_is_dynamic(&bts->acc_ramp)) { - vty_out(vty, " access-control-class-ramping-step-interval %u%s", - acc_ramp_get_step_interval(&bts->acc_ramp), VTY_NEWLINE); - } else { - vty_out(vty, " access-control-class-ramping-step-interval dynamic%s", VTY_NEWLINE); - } + vty_out(vty, " access-control-class-ramping-step-interval %u%s", + acc_ramp_get_step_interval(&bts->acc_ramp), VTY_NEWLINE); vty_out(vty, " access-control-class-ramping-step-size %u%s", acc_ramp_get_step_size(&bts->acc_ramp), VTY_NEWLINE); + vty_out(vty, " access-control-class-ramping-chan-load %u %u%s", + bts->acc_ramp.chan_load_lower_threshold, bts->acc_ramp.chan_load_upper_threshold, VTY_NEWLINE); if (!bts->si_unused_send_empty) vty_out(vty, " no system-information unused-send-empty%s", VTY_NEWLINE); for (i = SYSINFO_TYPE_1; i < _MAX_SYSINFO_TYPE; i++) { @@ -3679,9 +3677,18 @@ DEFUN(cfg_bts_acc_ramping, "Enable Access Control Class ramping\n") { struct gsm_bts *bts = vty->index; + struct gsm_bts_trx *trx; - if (!acc_ramp_is_enabled(&bts->acc_ramp)) + if (!acc_ramp_is_enabled(&bts->acc_ramp)) { acc_ramp_set_enabled(&bts->acc_ramp, true); + /* Start ramping if at least one TRX is usable */ + llist_for_each_entry(trx, &bts->trx_list, list) { + if (trx_is_usable(trx)) { + acc_ramp_trigger(&bts->acc_ramp); + break; + } + } + } /* * ACC ramping takes effect either when the BTS reconnects RSL, @@ -3713,14 +3720,14 @@ DEFUN(cfg_bts_acc_ramping_step_interval, OSMO_STRINGIFY_VAL(ACC_RAMP_STEP_INTERVAL_MAX) ">|dynamic)", "Configure Access Control Class ramping step interval\n" "Set a fixed step interval (in seconds)\n" - "Use dynamic step interval based on BTS channel load\n") + "Use dynamic step interval based on BTS channel load (deprecated, don't use, ignored)\n") { struct gsm_bts *bts = vty->index; bool dynamic = (strcmp(argv[0], "dynamic") == 0); int error; if (dynamic) { - acc_ramp_set_step_interval_dynamic(&bts->acc_ramp); + vty_out(vty, "%% access-control-class-ramping-step-interval 'dynamic' value is deprecated, ignoring it%s", VTY_NEWLINE); return CMD_SUCCESS; } @@ -3759,6 +3766,25 @@ DEFUN(cfg_bts_acc_ramping_step_size, return CMD_SUCCESS; } +DEFUN(cfg_bts_acc_ramping_chan_load, + cfg_bts_acc_ramping_chan_load_cmd, + "access-control-class-ramping-chan-load <0-100> <0-100>", + "Configure Access Control Class ramping channel load thresholds\n" + "Lower Channel load threshold (%) below which subset size of allowed broadcast ACCs can be increased\n" + "Upper channel load threshold (%) above which subset size of allowed broadcast ACCs can be decreased\n") +{ + struct gsm_bts *bts = vty->index; + int rc; + + rc = acc_ramp_set_chan_load_thresholds(&bts->acc_ramp, atoi(argv[0]), atoi(argv[1])); + if (rc < 0) { + vty_out(vty, "Unable to set ACC channel load thresholds%s", VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + #define EXCL_RFLOCK_STR "Exclude this BTS from the global RF Lock\n" DEFUN(cfg_bts_excl_rf_lock, @@ -6532,6 +6558,7 @@ int bsc_vty_init(struct gsm_network *network) install_element(BTS_NODE, &cfg_bts_no_acc_ramping_cmd); install_element(BTS_NODE, &cfg_bts_acc_ramping_step_interval_cmd); install_element(BTS_NODE, &cfg_bts_acc_ramping_step_size_cmd); + install_element(BTS_NODE, &cfg_bts_acc_ramping_chan_load_cmd); install_element(BTS_NODE, &cfg_bts_t3113_dynamic_cmd); install_element(BTS_NODE, &cfg_bts_no_t3113_dynamic_cmd); neighbor_ident_vty_init(network, network->neighbor_bss_cells); diff --git a/tests/acc/acc_test.c b/tests/acc/acc_test.c index 54f3de1fa..72d3212f1 100644 --- a/tests/acc/acc_test.c +++ b/tests/acc/acc_test.c @@ -63,6 +63,8 @@ static inline void _bts_del(struct gsm_bts *bts, const char *msg) rate_ctr_group_free(bts->bts_ctrs); if (osmo_timer_pending(&bts->acc_mgr.rotate_timer)) osmo_timer_del(&bts->acc_mgr.rotate_timer); + if (osmo_timer_pending(&bts->acc_ramp.step_timer)) + osmo_timer_del(&bts->acc_ramp.step_timer); /* no need to llist_del(&bts->list), we never registered the bts there. */ talloc_free(bts); fprintf(stderr, "BTS deallocated OK in %s()\n", msg); @@ -230,7 +232,7 @@ static void test_acc_mgr_rotate(struct gsm_network *net) bts_del(bts); } -static void test_acc_ramp_fixed(struct gsm_network *net) +static void test_acc_ramp(struct gsm_network *net) { fprintf(stderr, "===%s===\n", __func__); int i; @@ -242,14 +244,13 @@ static void test_acc_ramp_fixed(struct gsm_network *net) OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false); OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT); OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN); - OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true); /* Set super high rotation time so it doesn't interfer here: */ acc_mgr_set_rotation_time(acc_mgr, 5000); - //acc_ramp_set_step_interval_dynamic(acc_ramp); OSMO_ASSERT(acc_ramp_set_step_interval(acc_ramp, 1) == -ERANGE); OSMO_ASSERT(acc_ramp_set_step_interval(acc_ramp, 50) == 0); + OSMO_ASSERT(acc_ramp_set_chan_load_thresholds(acc_ramp, 100, 100) == 0); acc_ramp_set_step_size(acc_ramp, 1); acc_ramp_set_enabled(acc_ramp, true); @@ -265,7 +266,7 @@ static void test_acc_ramp_fixed(struct gsm_network *net) bts_del(bts); } -static void test_acc_ramp_fixed2(struct gsm_network *net) +static void test_acc_ramp2(struct gsm_network *net) { fprintf(stderr, "===%s===\n", __func__); int i; @@ -277,7 +278,6 @@ static void test_acc_ramp_fixed2(struct gsm_network *net) OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false); OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT); OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN); - OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true); /* Set super high rotation time so it doesn't interfer here: */ acc_mgr_set_rotation_time(acc_mgr, 5000); @@ -299,7 +299,7 @@ static void test_acc_ramp_fixed2(struct gsm_network *net) bts_del(bts); } -static void test_acc_ramp_fixed3(struct gsm_network *net) +static void test_acc_ramp3(struct gsm_network *net) { fprintf(stderr, "===%s===\n", __func__); int i; @@ -311,7 +311,6 @@ static void test_acc_ramp_fixed3(struct gsm_network *net) OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false); OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT); OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN); - OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true); /* Set super high rotation time so it doesn't interfer here: */ acc_mgr_set_rotation_time(acc_mgr, 5000); @@ -336,58 +335,77 @@ static void test_acc_ramp_fixed3(struct gsm_network *net) bts_del(bts); } -static void test_acc_ramp_dynamic(struct gsm_network *net) +static void test_acc_ramp_up_rotate(struct gsm_network *net, unsigned int chan_load, unsigned int low_threshold, unsigned int up_threshold) { - fprintf(stderr, "===%s===\n", __func__); - char buf[128]; - unsigned int step_sec; + fprintf(stderr, "===%s(%u, %u, %u)===\n", + __func__, chan_load, low_threshold, up_threshold); struct gsm_bts *bts = bts_init(net); struct acc_mgr *acc_mgr = &bts->acc_mgr; struct acc_ramp *acc_ramp = &bts->acc_ramp; + int n; /* Validate are all allowed by default after allocation: */ OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false); OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT); OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN); - OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true); - /* Set super high rotation time so it doesn't interfer here: */ - acc_mgr_set_rotation_time(acc_mgr, 5000); + OSMO_ASSERT(acc_ramp_set_step_interval(acc_ramp, 250) == 0); + acc_mgr_set_rotation_time(acc_mgr, 100); + /* Test that ramping + rotation won't go over permanently barred ACC*/ + fprintf(stderr, "*** Barring one ACC ***\n"); + bts->si_common.rach_control.t2 |= 0x02; + acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control); - acc_ramp_set_step_interval_dynamic(acc_ramp); - acc_ramp_set_step_size(acc_ramp, 1); + OSMO_ASSERT(acc_ramp_set_step_size(acc_ramp, 1) == 0); + OSMO_ASSERT(acc_ramp_set_chan_load_thresholds(acc_ramp, low_threshold, up_threshold) == 0); acc_ramp_set_enabled(acc_ramp, true); - bts->chan_load_avg = 0; /*set 70% channel load */ + bts->chan_load_avg = chan_load; /*set % channel load */ osmo_gettimeofday_override_time = (struct timeval) {0, 0}; acc_ramp_trigger(acc_ramp); - while (osmo_timer_pending(&acc_ramp->step_timer)) { - bts->chan_load_avg += 10; - step_sec = ((bts->chan_load_avg * ACC_RAMP_STEP_INTERVAL_MAX) / 100); - osmo_gettimeofday_override_time.tv_sec += step_sec; - snprintf(buf, sizeof(buf), "select(): load=%" PRIu8 " -> step_sec=%u", - bts->chan_load_avg, step_sec); - clock_debug(buf); + n = 5; + while (true) { + OSMO_ASSERT(osmo_timer_pending(&acc_ramp->step_timer)); + if (osmo_timer_pending(&acc_mgr->rotate_timer)) { + if ((osmo_gettimeofday_override_time.tv_sec + 50) % 250 == 0) + osmo_gettimeofday_override_time.tv_sec += 50; + else + osmo_gettimeofday_override_time.tv_sec += 100; + } else { + /* Once ramping is done, adm level is big enough and hence + * rotation is not needed and will be disabled. Run + * ramping a bit more and we are then done */ + osmo_gettimeofday_override_time.tv_sec -= osmo_gettimeofday_override_time.tv_sec % 250; + osmo_gettimeofday_override_time.tv_sec += 250; + if (n-- == 0) + break; + } + clock_debug("select()"); osmo_select_main(0); } bts_del(bts); } -static void test_acc_ramp_fixed_rotate(struct gsm_network *net) +static void test_acc_ramp_updown_rotate(struct gsm_network *net, unsigned int low_threshold, unsigned int up_threshold, + unsigned int min_load, unsigned int max_load, unsigned load_step) { - fprintf(stderr, "===%s===\n", __func__); + fprintf(stderr, "===%s(%u, %u, %u, %u, %u)===\n", + __func__, low_threshold, up_threshold, + min_load, max_load, load_step); struct gsm_bts *bts = bts_init(net); struct acc_mgr *acc_mgr = &bts->acc_mgr; struct acc_ramp *acc_ramp = &bts->acc_ramp; + int i; + char buf[256]; + bool up = true; /* Validate are all allowed by default after allocation: */ OSMO_ASSERT(acc_ramp_is_enabled(acc_ramp) == false); OSMO_ASSERT(acc_ramp_get_step_size(acc_ramp) == ACC_RAMP_STEP_SIZE_DEFAULT); OSMO_ASSERT(acc_ramp_get_step_interval(acc_ramp) == ACC_RAMP_STEP_INTERVAL_MIN); - OSMO_ASSERT(acc_ramp_step_interval_is_dynamic(acc_ramp) == true); OSMO_ASSERT(acc_ramp_set_step_interval(acc_ramp, 250) == 0); acc_mgr_set_rotation_time(acc_mgr, 100); @@ -396,29 +414,46 @@ static void test_acc_ramp_fixed_rotate(struct gsm_network *net) bts->si_common.rach_control.t2 |= 0x02; acc_mgr_perm_subset_changed(acc_mgr, &bts->si_common.rach_control); - acc_ramp_set_step_size(acc_ramp, 1); + OSMO_ASSERT(acc_ramp_set_step_size(acc_ramp, 1) == 0); + OSMO_ASSERT(acc_ramp_set_chan_load_thresholds(acc_ramp, low_threshold, up_threshold) == 0); acc_ramp_set_enabled(acc_ramp, true); + bts->chan_load_avg = min_load; /* set % channel load */ + osmo_gettimeofday_override_time = (struct timeval) {0, 0}; acc_ramp_trigger(acc_ramp); - while (true) { + /* 50 ev loop iterations */ + for (i = 0; i < 50; i++) { + OSMO_ASSERT(osmo_timer_pending(&acc_ramp->step_timer)); if (osmo_timer_pending(&acc_mgr->rotate_timer)) { if ((osmo_gettimeofday_override_time.tv_sec + 50) % 250 == 0) osmo_gettimeofday_override_time.tv_sec += 50; else osmo_gettimeofday_override_time.tv_sec += 100; - } else if (osmo_timer_pending(&acc_ramp->step_timer)) { - osmo_gettimeofday_override_time.tv_sec -= osmo_gettimeofday_override_time.tv_sec % 250; - osmo_gettimeofday_override_time.tv_sec += 250; } else { /* Once ramping is done, adm level is big enough and hence - * rotation is not needed and will be disabled. We are then done - */ - break; + * rotation is not needed and will be disabled. */ + osmo_gettimeofday_override_time.tv_sec -= osmo_gettimeofday_override_time.tv_sec % 250; + osmo_gettimeofday_override_time.tv_sec += 250; } - clock_debug("select()"); + snprintf(buf, sizeof(buf), "select(%d): chan_load_avg=%" PRIu8, i, bts->chan_load_avg); + clock_debug(buf); osmo_select_main(0); + + if (up) { + bts->chan_load_avg += load_step; + if (bts->chan_load_avg >= max_load) + up = false; + if (bts->chan_load_avg > max_load) + bts->chan_load_avg = max_load; + } else { + bts->chan_load_avg = (uint8_t)OSMO_MAX((int)(bts->chan_load_avg - load_step), 0); + if (bts->chan_load_avg <= min_load) + up = true; + if (bts->chan_load_avg < min_load) + bts->chan_load_avg = max_load; + } } bts_del(bts); @@ -460,11 +495,16 @@ int main(int argc, char **argv) test_acc_mgr_no_ramp(net); test_acc_mgr_manual_ramp(net); test_acc_mgr_rotate(net); - test_acc_ramp_fixed(net); - test_acc_ramp_fixed2(net); - test_acc_ramp_fixed3(net); - test_acc_ramp_dynamic(net); - test_acc_ramp_fixed_rotate(net); + test_acc_ramp(net); + test_acc_ramp2(net); + test_acc_ramp3(net); + test_acc_ramp_up_rotate(net, 0, 100, 100); + test_acc_ramp_up_rotate(net, 0, 20, 50); + test_acc_ramp_up_rotate(net, 70, 80, 90); + test_acc_ramp_updown_rotate(net, 80, 90, 0, 100, 15); + test_acc_ramp_updown_rotate(net, 30, 50, 10, 100, 15); + test_acc_ramp_updown_rotate(net, 50, 49, 0, 100, 10); + test_acc_ramp_updown_rotate(net, 30, 80, 30, 80, 5); return EXIT_SUCCESS; } diff --git a/tests/acc/acc_test.ok b/tests/acc/acc_test.ok index f377651ef..bb6fe10af 100644 --- a/tests/acc/acc_test.ok +++ b/tests/acc/acc_test.ok @@ -413,9 +413,9 @@ sys={40.000000}: select() (bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x0c3 (active_len=4, ramp_len=10, adm_len=4, perm_len=9, rotation=on) pcu_info_update(): t2=0x03 t3=0x3c BTS deallocated OK in test_acc_mgr_rotate() -===test_acc_ramp_fixed=== +===test_acc_ramp=== (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) -BTS allocation OK in test_acc_ramp_fixed() +BTS allocation OK in test_acc_ramp() (bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off) pcu_info_update(): t2=0x03 t3=0xff (bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=10, rotation=on) @@ -447,27 +447,27 @@ pcu_info_update(): t2=0x02 t3=0x00 sys={450.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) pcu_info_update(): t2=0x00 t3=0x00 -BTS deallocated OK in test_acc_ramp_fixed() -===test_acc_ramp_fixed2=== +BTS deallocated OK in test_acc_ramp() +===test_acc_ramp2=== (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) -BTS allocation OK in test_acc_ramp_fixed2() +BTS allocation OK in test_acc_ramp2() (bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x3f8 (active_len=7, ramp_len=10, adm_len=7, perm_len=10, rotation=on) pcu_info_update(): t2=0x00 t3=0x07 (bts=0) ACC: update ACC allowed active subset 0x3f8 -> 0x000 (active_len=0, ramp_len=0, adm_len=7, perm_len=10, rotation=off) pcu_info_update(): t2=0x03 t3=0xff (bts=0) ACC: New ACC allowed subset 0x007 (active_len=3, ramp_len=3, adm_len=7, perm_len=10, rotation=on) pcu_info_update(): t2=0x03 t3=0xf8 -sys={30.000000}: select() +sys={5.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x007 -> 0x03f (active_len=6, ramp_len=6, adm_len=7, perm_len=10, rotation=on) pcu_info_update(): t2=0x03 t3=0xc0 -sys={60.000000}: select() -(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=9, adm_len=7, perm_len=10, rotation=on) +sys={10.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=7, adm_len=7, perm_len=10, rotation=on) pcu_info_update(): t2=0x03 t3=0x80 -sys={90.000000}: select() -BTS deallocated OK in test_acc_ramp_fixed2() -===test_acc_ramp_fixed3=== +sys={15.000000}: select() +BTS deallocated OK in test_acc_ramp2() +===test_acc_ramp3=== (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) -BTS allocation OK in test_acc_ramp_fixed3() +BTS allocation OK in test_acc_ramp3() *** Barring some ACCs *** (bts=0) ACC: New ACC allowed subset 0x15a (active_len=5, ramp_len=10, adm_len=10, perm_len=5, rotation=off) pcu_info_update(): t2=0x02 t3=0xa5 @@ -475,67 +475,121 @@ pcu_info_update(): t2=0x02 t3=0xa5 pcu_info_update(): t2=0x03 t3=0xff (bts=0) ACC: New ACC allowed subset 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=5, rotation=on) pcu_info_update(): t2=0x03 t3=0xfd -sys={30.000000}: select() +sys={5.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x002 -> 0x00a (active_len=2, ramp_len=2, adm_len=10, perm_len=5, rotation=on) pcu_info_update(): t2=0x03 t3=0xf5 -sys={60.000000}: select() +sys={10.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x00a -> 0x01a (active_len=3, ramp_len=3, adm_len=10, perm_len=5, rotation=on) pcu_info_update(): t2=0x03 t3=0xe5 -sys={90.000000}: select() +sys={15.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x01a -> 0x05a (active_len=4, ramp_len=4, adm_len=10, perm_len=5, rotation=on) pcu_info_update(): t2=0x03 t3=0xa5 -sys={120.000000}: select() +sys={20.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x05a -> 0x15a (active_len=5, ramp_len=5, adm_len=10, perm_len=5, rotation=off) pcu_info_update(): t2=0x02 t3=0xa5 -sys={150.000000}: select() +sys={25.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=6, adm_len=10, perm_len=5, rotation=off) -sys={180.000000}: select() +sys={30.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=7, adm_len=10, perm_len=5, rotation=off) -sys={210.000000}: select() +sys={35.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=8, adm_len=10, perm_len=5, rotation=off) -sys={240.000000}: select() +sys={40.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=9, adm_len=10, perm_len=5, rotation=off) -sys={270.000000}: select() +sys={45.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x15a -> 0x15a (active_len=5, ramp_len=10, adm_len=10, perm_len=5, rotation=off) -BTS deallocated OK in test_acc_ramp_fixed3() -===test_acc_ramp_dynamic=== +BTS deallocated OK in test_acc_ramp3() +===test_acc_ramp_up_rotate(0, 100, 100)=== (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) -BTS allocation OK in test_acc_ramp_dynamic() -(bts=0) ACC: update ACC allowed active subset 0x3ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=10, rotation=off) +BTS allocation OK in test_acc_ramp_up_rotate() +*** Barring one ACC *** +(bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x02 t3=0x00 +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=9, rotation=off) pcu_info_update(): t2=0x03 t3=0xff -(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=10, rotation=on) +(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) pcu_info_update(): t2=0x03 t3=0xfe -sys={60.000000}: select(): load=10 -> step_sec=60 -(bts=0) ACC: update ACC allowed active subset 0x001 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=10, rotation=on) -pcu_info_update(): t2=0x03 t3=0xfc -sys={180.000000}: select(): load=20 -> step_sec=120 -(bts=0) ACC: update ACC allowed active subset 0x003 -> 0x007 (active_len=3, ramp_len=3, adm_len=10, perm_len=10, rotation=on) -pcu_info_update(): t2=0x03 t3=0xf8 -sys={360.000000}: select(): load=30 -> step_sec=180 -(bts=0) ACC: update ACC allowed active subset 0x007 -> 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=10, rotation=on) -pcu_info_update(): t2=0x03 t3=0xf0 -sys={600.000000}: select(): load=40 -> step_sec=240 -(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=10, rotation=on) +sys={100.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfd +sys={200.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x002 -> 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfb +sys={250.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x004 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf3 +sys={350.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe7 +sys={450.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x018 -> 0x030 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xcf +sys={500.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x030 -> 0x070 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x8f +sys={600.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x070 -> 0x0e0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x1f +sys={700.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x0e0 -> 0x1c0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x3f +sys={750.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x1c0 -> 0x1c1 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x3e +sys={850.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x0c3 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x3c +sys={950.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x0c3 -> 0x047 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xb8 +sys={1000.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x047 -> 0x0c7 (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x38 +sys={1100.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x0c7 -> 0x04f (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xb0 +sys={1200.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x04f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) pcu_info_update(): t2=0x03 t3=0xe0 -sys={900.000000}: select(): load=50 -> step_sec=300 -(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=6, adm_len=10, perm_len=10, rotation=on) +sys={1250.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) pcu_info_update(): t2=0x03 t3=0xc0 -sys={1260.000000}: select(): load=60 -> step_sec=360 -(bts=0) ACC: update ACC allowed active subset 0x03f -> 0x07f (active_len=7, ramp_len=7, adm_len=10, perm_len=10, rotation=on) -pcu_info_update(): t2=0x03 t3=0x80 -sys={1680.000000}: select(): load=70 -> step_sec=420 -(bts=0) ACC: update ACC allowed active subset 0x07f -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=10, rotation=on) +sys={1350.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x03f -> 0x07e (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x81 +sys={1450.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x07e -> 0x0fc (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x03 +sys={1500.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x0fc -> 0x1fc (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x03 +sys={1600.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x1fc -> 0x1f9 (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x06 +sys={1700.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x1f9 -> 0x0fb (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x04 +sys={1750.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x0fb -> 0x1fb (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x04 +sys={1850.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x1fb -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) pcu_info_update(): t2=0x03 t3=0x00 -sys={2160.000000}: select(): load=80 -> step_sec=480 -(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=10, rotation=on) +sys={1950.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x0ff -> 0x1fe (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x01 +sys={2000.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x1fe -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=9, rotation=off) pcu_info_update(): t2=0x02 t3=0x00 -sys={2700.000000}: select(): load=90 -> step_sec=540 -(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) -pcu_info_update(): t2=0x00 t3=0x00 -BTS deallocated OK in test_acc_ramp_dynamic() -===test_acc_ramp_fixed_rotate=== +sys={2250.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +sys={2500.000000}: select() +sys={2750.000000}: select() +sys={3000.000000}: select() +sys={3250.000000}: select() +BTS deallocated OK in test_acc_ramp_up_rotate() +===test_acc_ramp_up_rotate(0, 20, 50)=== (bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) -BTS allocation OK in test_acc_ramp_fixed_rotate() +BTS allocation OK in test_acc_ramp_up_rotate() *** Barring one ACC *** (bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) pcu_info_update(): t2=0x02 t3=0x00 @@ -617,4 +671,571 @@ sys={2000.000000}: select() pcu_info_update(): t2=0x02 t3=0x00 sys={2250.000000}: select() (bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) -BTS deallocated OK in test_acc_ramp_fixed_rotate() +sys={2500.000000}: select() +sys={2750.000000}: select() +sys={3000.000000}: select() +sys={3250.000000}: select() +BTS deallocated OK in test_acc_ramp_up_rotate() +===test_acc_ramp_up_rotate(70, 80, 90)=== +(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) +BTS allocation OK in test_acc_ramp_up_rotate() +*** Barring one ACC *** +(bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x02 t3=0x00 +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x03 t3=0xff +(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfe +sys={100.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfd +sys={200.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x002 -> 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfb +sys={250.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x004 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf3 +sys={350.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe7 +sys={450.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x018 -> 0x030 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xcf +sys={500.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x030 -> 0x070 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x8f +sys={600.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x070 -> 0x0e0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x1f +sys={700.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x0e0 -> 0x1c0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x3f +sys={750.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x1c0 -> 0x1c1 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x3e +sys={850.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x0c3 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x3c +sys={950.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x0c3 -> 0x047 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xb8 +sys={1000.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x047 -> 0x0c7 (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x38 +sys={1100.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x0c7 -> 0x04f (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xb0 +sys={1200.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x04f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe0 +sys={1250.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x01f -> 0x03f (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xc0 +sys={1350.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x03f -> 0x07e (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x81 +sys={1450.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x07e -> 0x0fc (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x03 +sys={1500.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x0fc -> 0x1fc (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x03 +sys={1600.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x1fc -> 0x1f9 (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x06 +sys={1700.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x1f9 -> 0x0fb (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x04 +sys={1750.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x0fb -> 0x1fb (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x04 +sys={1850.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x1fb -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x00 +sys={1950.000000}: select() +(bts=0) ACC: rotate ACC allowed active subset 0x0ff -> 0x1fe (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x01 +sys={2000.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x1fe -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x02 t3=0x00 +sys={2250.000000}: select() +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +sys={2500.000000}: select() +sys={2750.000000}: select() +sys={3000.000000}: select() +sys={3250.000000}: select() +BTS deallocated OK in test_acc_ramp_up_rotate() +===test_acc_ramp_updown_rotate(80, 90, 0, 100, 15)=== +(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) +BTS allocation OK in test_acc_ramp_updown_rotate() +*** Barring one ACC *** +(bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x02 t3=0x00 +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x03 t3=0xff +(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfe +sys={100.000000}: select(0): chan_load_avg=0 +(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfd +sys={200.000000}: select(1): chan_load_avg=15 +(bts=0) ACC: rotate ACC allowed active subset 0x002 -> 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfb +sys={250.000000}: select(2): chan_load_avg=30 +(bts=0) ACC: update ACC allowed active subset 0x004 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf3 +sys={350.000000}: select(3): chan_load_avg=45 +(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe7 +sys={450.000000}: select(4): chan_load_avg=60 +(bts=0) ACC: rotate ACC allowed active subset 0x018 -> 0x030 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xcf +sys={500.000000}: select(5): chan_load_avg=75 +(bts=0) ACC: update ACC allowed active subset 0x030 -> 0x070 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x8f +sys={600.000000}: select(6): chan_load_avg=90 +(bts=0) ACC: rotate ACC allowed active subset 0x070 -> 0x0e0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x1f +sys={700.000000}: select(7): chan_load_avg=100 +(bts=0) ACC: rotate ACC allowed active subset 0x0e0 -> 0x1c0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x3f +sys={750.000000}: select(8): chan_load_avg=85 +sys={850.000000}: select(9): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x1c0 -> 0x181 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x7e +sys={950.000000}: select(10): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x181 -> 0x083 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x7c +sys={1000.000000}: select(11): chan_load_avg=40 +(bts=0) ACC: update ACC allowed active subset 0x083 -> 0x183 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x7c +sys={1100.000000}: select(12): chan_load_avg=25 +(bts=0) ACC: rotate ACC allowed active subset 0x183 -> 0x087 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x78 +sys={1200.000000}: select(13): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x087 -> 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf0 +sys={1250.000000}: select(14): chan_load_avg=0 +(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x01f (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe0 +sys={1350.000000}: select(15): chan_load_avg=15 +(bts=0) ACC: rotate ACC allowed active subset 0x01f -> 0x03e (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xc1 +sys={1450.000000}: select(16): chan_load_avg=30 +(bts=0) ACC: rotate ACC allowed active subset 0x03e -> 0x07c (active_len=5, ramp_len=5, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x83 +sys={1500.000000}: select(17): chan_load_avg=45 +(bts=0) ACC: update ACC allowed active subset 0x07c -> 0x0fc (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x03 +sys={1600.000000}: select(18): chan_load_avg=60 +(bts=0) ACC: rotate ACC allowed active subset 0x0fc -> 0x1f8 (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x07 +sys={1700.000000}: select(19): chan_load_avg=75 +(bts=0) ACC: rotate ACC allowed active subset 0x1f8 -> 0x1f1 (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x0e +sys={1750.000000}: select(20): chan_load_avg=90 +sys={1850.000000}: select(21): chan_load_avg=100 +(bts=0) ACC: rotate ACC allowed active subset 0x1f1 -> 0x0f3 (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x0c +sys={1950.000000}: select(22): chan_load_avg=85 +(bts=0) ACC: rotate ACC allowed active subset 0x0f3 -> 0x077 (active_len=6, ramp_len=6, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x88 +sys={2000.000000}: select(23): chan_load_avg=70 +(bts=0) ACC: update ACC allowed active subset 0x077 -> 0x0f7 (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x08 +sys={2100.000000}: select(24): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x0f7 -> 0x07f (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x80 +sys={2200.000000}: select(25): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x07f -> 0x0fe (active_len=7, ramp_len=7, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x01 +sys={2250.000000}: select(26): chan_load_avg=25 +(bts=0) ACC: update ACC allowed active subset 0x0fe -> 0x1fe (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x01 +sys={2350.000000}: select(27): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x1fe -> 0x1fd (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x02 +sys={2450.000000}: select(28): chan_load_avg=0 +(bts=0) ACC: rotate ACC allowed active subset 0x1fd -> 0x0ff (active_len=8, ramp_len=8, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x00 +sys={2500.000000}: select(29): chan_load_avg=15 +(bts=0) ACC: update ACC allowed active subset 0x0ff -> 0x1ff (active_len=9, ramp_len=9, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x02 t3=0x00 +sys={2750.000000}: select(30): chan_load_avg=30 +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +sys={3000.000000}: select(31): chan_load_avg=45 +sys={3250.000000}: select(32): chan_load_avg=60 +sys={3500.000000}: select(33): chan_load_avg=75 +sys={3750.000000}: select(34): chan_load_avg=90 +sys={4000.000000}: select(35): chan_load_avg=100 +sys={4250.000000}: select(36): chan_load_avg=85 +sys={4500.000000}: select(37): chan_load_avg=70 +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +sys={4750.000000}: select(38): chan_load_avg=55 +sys={5000.000000}: select(39): chan_load_avg=40 +sys={5250.000000}: select(40): chan_load_avg=25 +sys={5500.000000}: select(41): chan_load_avg=10 +sys={5750.000000}: select(42): chan_load_avg=0 +sys={6000.000000}: select(43): chan_load_avg=15 +sys={6250.000000}: select(44): chan_load_avg=30 +sys={6500.000000}: select(45): chan_load_avg=45 +sys={6750.000000}: select(46): chan_load_avg=60 +sys={7000.000000}: select(47): chan_load_avg=75 +sys={7250.000000}: select(48): chan_load_avg=90 +sys={7500.000000}: select(49): chan_load_avg=100 +BTS deallocated OK in test_acc_ramp_updown_rotate() +===test_acc_ramp_updown_rotate(30, 50, 10, 100, 15)=== +(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) +BTS allocation OK in test_acc_ramp_updown_rotate() +*** Barring one ACC *** +(bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x02 t3=0x00 +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x03 t3=0xff +(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfe +sys={100.000000}: select(0): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfd +sys={200.000000}: select(1): chan_load_avg=25 +(bts=0) ACC: rotate ACC allowed active subset 0x002 -> 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfb +sys={250.000000}: select(2): chan_load_avg=40 +sys={350.000000}: select(3): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x004 -> 0x008 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf7 +sys={450.000000}: select(4): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x008 -> 0x010 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xef +sys={500.000000}: select(5): chan_load_avg=85 +sys={600.000000}: select(6): chan_load_avg=100 +(bts=0) ACC: rotate ACC allowed active subset 0x010 -> 0x020 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xdf +sys={700.000000}: select(7): chan_load_avg=85 +(bts=0) ACC: rotate ACC allowed active subset 0x020 -> 0x040 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xbf +sys={750.000000}: select(8): chan_load_avg=70 +sys={850.000000}: select(9): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x040 -> 0x080 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x7f +sys={950.000000}: select(10): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x080 -> 0x100 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xff +sys={1000.000000}: select(11): chan_load_avg=25 +(bts=0) ACC: update ACC allowed active subset 0x100 -> 0x101 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xfe +sys={1100.000000}: select(12): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x101 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfc +sys={1200.000000}: select(13): chan_load_avg=25 +(bts=0) ACC: rotate ACC allowed active subset 0x003 -> 0x006 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf9 +sys={1250.000000}: select(14): chan_load_avg=40 +sys={1350.000000}: select(15): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x006 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf3 +sys={1450.000000}: select(16): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe7 +sys={1500.000000}: select(17): chan_load_avg=85 +(bts=0) ACC: update ACC allowed active subset 0x018 -> 0x010 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xef +sys={1600.000000}: select(18): chan_load_avg=100 +(bts=0) ACC: rotate ACC allowed active subset 0x010 -> 0x020 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xdf +sys={1700.000000}: select(19): chan_load_avg=85 +(bts=0) ACC: rotate ACC allowed active subset 0x020 -> 0x040 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xbf +sys={1750.000000}: select(20): chan_load_avg=70 +sys={1850.000000}: select(21): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x040 -> 0x080 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x7f +sys={1950.000000}: select(22): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x080 -> 0x100 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xff +sys={2000.000000}: select(23): chan_load_avg=25 +(bts=0) ACC: update ACC allowed active subset 0x100 -> 0x101 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xfe +sys={2100.000000}: select(24): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x101 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfc +sys={2200.000000}: select(25): chan_load_avg=25 +(bts=0) ACC: rotate ACC allowed active subset 0x003 -> 0x006 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf9 +sys={2250.000000}: select(26): chan_load_avg=40 +sys={2350.000000}: select(27): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x006 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf3 +sys={2450.000000}: select(28): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe7 +sys={2500.000000}: select(29): chan_load_avg=85 +(bts=0) ACC: update ACC allowed active subset 0x018 -> 0x010 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xef +sys={2600.000000}: select(30): chan_load_avg=100 +(bts=0) ACC: rotate ACC allowed active subset 0x010 -> 0x020 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xdf +sys={2700.000000}: select(31): chan_load_avg=85 +(bts=0) ACC: rotate ACC allowed active subset 0x020 -> 0x040 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xbf +sys={2750.000000}: select(32): chan_load_avg=70 +sys={2850.000000}: select(33): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x040 -> 0x080 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x7f +sys={2950.000000}: select(34): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x080 -> 0x100 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xff +sys={3000.000000}: select(35): chan_load_avg=25 +(bts=0) ACC: update ACC allowed active subset 0x100 -> 0x101 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xfe +sys={3100.000000}: select(36): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x101 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfc +sys={3200.000000}: select(37): chan_load_avg=25 +(bts=0) ACC: rotate ACC allowed active subset 0x003 -> 0x006 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf9 +sys={3250.000000}: select(38): chan_load_avg=40 +sys={3350.000000}: select(39): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x006 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf3 +sys={3450.000000}: select(40): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe7 +sys={3500.000000}: select(41): chan_load_avg=85 +(bts=0) ACC: update ACC allowed active subset 0x018 -> 0x010 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xef +sys={3600.000000}: select(42): chan_load_avg=100 +(bts=0) ACC: rotate ACC allowed active subset 0x010 -> 0x020 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xdf +sys={3700.000000}: select(43): chan_load_avg=85 +(bts=0) ACC: rotate ACC allowed active subset 0x020 -> 0x040 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xbf +sys={3750.000000}: select(44): chan_load_avg=70 +sys={3850.000000}: select(45): chan_load_avg=55 +(bts=0) ACC: rotate ACC allowed active subset 0x040 -> 0x080 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x7f +sys={3950.000000}: select(46): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x080 -> 0x100 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xff +sys={4000.000000}: select(47): chan_load_avg=25 +(bts=0) ACC: update ACC allowed active subset 0x100 -> 0x101 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xfe +sys={4100.000000}: select(48): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x101 -> 0x003 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfc +sys={4200.000000}: select(49): chan_load_avg=25 +(bts=0) ACC: rotate ACC allowed active subset 0x003 -> 0x006 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf9 +BTS deallocated OK in test_acc_ramp_updown_rotate() +===test_acc_ramp_updown_rotate(50, 49, 0, 100, 10)=== +(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) +BTS allocation OK in test_acc_ramp_updown_rotate() +*** Barring one ACC *** +(bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x02 t3=0x00 +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x03 t3=0xff +(bts=0) ACC: New ACC allowed subset 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfe +sys={100.000000}: select(0): chan_load_avg=0 +(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfd +sys={200.000000}: select(1): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x002 -> 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfb +sys={250.000000}: select(2): chan_load_avg=20 +(bts=0) ACC: update ACC allowed active subset 0x004 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf3 +sys={350.000000}: select(3): chan_load_avg=30 +(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe7 +sys={450.000000}: select(4): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x018 -> 0x030 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xcf +sys={500.000000}: select(5): chan_load_avg=50 +(bts=0) ACC: update ACC allowed active subset 0x030 -> 0x020 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xdf +sys={600.000000}: select(6): chan_load_avg=60 +(bts=0) ACC: rotate ACC allowed active subset 0x020 -> 0x040 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xbf +sys={700.000000}: select(7): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x040 -> 0x080 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x7f +sys={750.000000}: select(8): chan_load_avg=80 +sys={850.000000}: select(9): chan_load_avg=90 +(bts=0) ACC: rotate ACC allowed active subset 0x080 -> 0x100 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xff +sys={950.000000}: select(10): chan_load_avg=100 +(bts=0) ACC: rotate ACC allowed active subset 0x100 -> 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfe +sys={1000.000000}: select(11): chan_load_avg=90 +sys={1100.000000}: select(12): chan_load_avg=80 +(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfd +sys={1200.000000}: select(13): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x002 -> 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfb +sys={1250.000000}: select(14): chan_load_avg=60 +sys={1350.000000}: select(15): chan_load_avg=50 +(bts=0) ACC: rotate ACC allowed active subset 0x004 -> 0x008 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf7 +sys={1450.000000}: select(16): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x008 -> 0x010 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xef +sys={1500.000000}: select(17): chan_load_avg=30 +(bts=0) ACC: update ACC allowed active subset 0x010 -> 0x030 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xcf +sys={1600.000000}: select(18): chan_load_avg=20 +(bts=0) ACC: rotate ACC allowed active subset 0x030 -> 0x060 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x9f +sys={1700.000000}: select(19): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x060 -> 0x0c0 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x3f +sys={1750.000000}: select(20): chan_load_avg=0 +(bts=0) ACC: update ACC allowed active subset 0x0c0 -> 0x1c0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x3f +sys={1850.000000}: select(21): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x1c0 -> 0x181 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x7e +sys={1950.000000}: select(22): chan_load_avg=20 +(bts=0) ACC: rotate ACC allowed active subset 0x181 -> 0x083 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x7c +sys={2000.000000}: select(23): chan_load_avg=30 +(bts=0) ACC: update ACC allowed active subset 0x083 -> 0x183 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x7c +sys={2100.000000}: select(24): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x183 -> 0x087 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x78 +sys={2200.000000}: select(25): chan_load_avg=50 +(bts=0) ACC: rotate ACC allowed active subset 0x087 -> 0x00f (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf0 +sys={2250.000000}: select(26): chan_load_avg=60 +(bts=0) ACC: update ACC allowed active subset 0x00f -> 0x00e (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf1 +sys={2350.000000}: select(27): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x00e -> 0x01c (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe3 +sys={2450.000000}: select(28): chan_load_avg=80 +(bts=0) ACC: rotate ACC allowed active subset 0x01c -> 0x038 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xc7 +sys={2500.000000}: select(29): chan_load_avg=90 +(bts=0) ACC: update ACC allowed active subset 0x038 -> 0x030 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xcf +sys={2600.000000}: select(30): chan_load_avg=100 +(bts=0) ACC: rotate ACC allowed active subset 0x030 -> 0x060 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x9f +sys={2700.000000}: select(31): chan_load_avg=90 +(bts=0) ACC: rotate ACC allowed active subset 0x060 -> 0x0c0 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x3f +sys={2750.000000}: select(32): chan_load_avg=80 +(bts=0) ACC: update ACC allowed active subset 0x0c0 -> 0x080 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x7f +sys={2850.000000}: select(33): chan_load_avg=70 +(bts=0) ACC: rotate ACC allowed active subset 0x080 -> 0x100 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0xff +sys={2950.000000}: select(34): chan_load_avg=60 +(bts=0) ACC: rotate ACC allowed active subset 0x100 -> 0x001 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfe +sys={3000.000000}: select(35): chan_load_avg=50 +sys={3100.000000}: select(36): chan_load_avg=40 +(bts=0) ACC: rotate ACC allowed active subset 0x001 -> 0x002 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfd +sys={3200.000000}: select(37): chan_load_avg=30 +(bts=0) ACC: rotate ACC allowed active subset 0x002 -> 0x004 (active_len=1, ramp_len=1, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xfb +sys={3250.000000}: select(38): chan_load_avg=20 +(bts=0) ACC: update ACC allowed active subset 0x004 -> 0x00c (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf3 +sys={3350.000000}: select(39): chan_load_avg=10 +(bts=0) ACC: rotate ACC allowed active subset 0x00c -> 0x018 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe7 +sys={3450.000000}: select(40): chan_load_avg=0 +(bts=0) ACC: rotate ACC allowed active subset 0x018 -> 0x030 (active_len=2, ramp_len=2, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xcf +sys={3500.000000}: select(41): chan_load_avg=10 +(bts=0) ACC: update ACC allowed active subset 0x030 -> 0x070 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x8f +sys={3600.000000}: select(42): chan_load_avg=20 +(bts=0) ACC: rotate ACC allowed active subset 0x070 -> 0x0e0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x1f +sys={3700.000000}: select(43): chan_load_avg=30 +(bts=0) ACC: rotate ACC allowed active subset 0x0e0 -> 0x1c0 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x3f +sys={3750.000000}: select(44): chan_load_avg=40 +(bts=0) ACC: update ACC allowed active subset 0x1c0 -> 0x1c1 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x02 t3=0x3e +sys={3850.000000}: select(45): chan_load_avg=50 +(bts=0) ACC: rotate ACC allowed active subset 0x1c1 -> 0x0c3 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0x3c +sys={3950.000000}: select(46): chan_load_avg=60 +(bts=0) ACC: rotate ACC allowed active subset 0x0c3 -> 0x047 (active_len=4, ramp_len=4, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xb8 +sys={4000.000000}: select(47): chan_load_avg=70 +(bts=0) ACC: update ACC allowed active subset 0x047 -> 0x046 (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xb9 +sys={4100.000000}: select(48): chan_load_avg=80 +(bts=0) ACC: rotate ACC allowed active subset 0x046 -> 0x00e (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xf1 +sys={4200.000000}: select(49): chan_load_avg=90 +(bts=0) ACC: rotate ACC allowed active subset 0x00e -> 0x01c (active_len=3, ramp_len=3, adm_len=10, perm_len=9, rotation=on) +pcu_info_update(): t2=0x03 t3=0xe3 +BTS deallocated OK in test_acc_ramp_updown_rotate() +===test_acc_ramp_updown_rotate(30, 80, 30, 80, 5)=== +(bts=0) ACC: New ACC allowed subset 0x3ff (active_len=10, ramp_len=10, adm_len=10, perm_len=10, rotation=off) +BTS allocation OK in test_acc_ramp_updown_rotate() +*** Barring one ACC *** +(bts=0) ACC: New ACC allowed subset 0x1ff (active_len=9, ramp_len=10, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x02 t3=0x00 +(bts=0) ACC: update ACC allowed active subset 0x1ff -> 0x000 (active_len=0, ramp_len=0, adm_len=10, perm_len=9, rotation=off) +pcu_info_update(): t2=0x03 t3=0xff +sys={250.000000}: select(0): chan_load_avg=30 +sys={500.000000}: select(1): chan_load_avg=35 +sys={750.000000}: select(2): chan_load_avg=40 +sys={1000.000000}: select(3): chan_load_avg=45 +sys={1250.000000}: select(4): chan_load_avg=50 +sys={1500.000000}: select(5): chan_load_avg=55 +sys={1750.000000}: select(6): chan_load_avg=60 +sys={2000.000000}: select(7): chan_load_avg=65 +sys={2250.000000}: select(8): chan_load_avg=70 +sys={2500.000000}: select(9): chan_load_avg=75 +sys={2750.000000}: select(10): chan_load_avg=80 +sys={3000.000000}: select(11): chan_load_avg=75 +sys={3250.000000}: select(12): chan_load_avg=70 +sys={3500.000000}: select(13): chan_load_avg=65 +sys={3750.000000}: select(14): chan_load_avg=60 +sys={4000.000000}: select(15): chan_load_avg=55 +sys={4250.000000}: select(16): chan_load_avg=50 +sys={4500.000000}: select(17): chan_load_avg=45 +sys={4750.000000}: select(18): chan_load_avg=40 +sys={5000.000000}: select(19): chan_load_avg=35 +sys={5250.000000}: select(20): chan_load_avg=30 +sys={5500.000000}: select(21): chan_load_avg=35 +sys={5750.000000}: select(22): chan_load_avg=40 +sys={6000.000000}: select(23): chan_load_avg=45 +sys={6250.000000}: select(24): chan_load_avg=50 +sys={6500.000000}: select(25): chan_load_avg=55 +sys={6750.000000}: select(26): chan_load_avg=60 +sys={7000.000000}: select(27): chan_load_avg=65 +sys={7250.000000}: select(28): chan_load_avg=70 +sys={7500.000000}: select(29): chan_load_avg=75 +sys={7750.000000}: select(30): chan_load_avg=80 +sys={8000.000000}: select(31): chan_load_avg=75 +sys={8250.000000}: select(32): chan_load_avg=70 +sys={8500.000000}: select(33): chan_load_avg=65 +sys={8750.000000}: select(34): chan_load_avg=60 +sys={9000.000000}: select(35): chan_load_avg=55 +sys={9250.000000}: select(36): chan_load_avg=50 +sys={9500.000000}: select(37): chan_load_avg=45 +sys={9750.000000}: select(38): chan_load_avg=40 +sys={10000.000000}: select(39): chan_load_avg=35 +sys={10250.000000}: select(40): chan_load_avg=30 +sys={10500.000000}: select(41): chan_load_avg=35 +sys={10750.000000}: select(42): chan_load_avg=40 +sys={11000.000000}: select(43): chan_load_avg=45 +sys={11250.000000}: select(44): chan_load_avg=50 +sys={11500.000000}: select(45): chan_load_avg=55 +sys={11750.000000}: select(46): chan_load_avg=60 +sys={12000.000000}: select(47): chan_load_avg=65 +sys={12250.000000}: select(48): chan_load_avg=70 +sys={12500.000000}: select(49): chan_load_avg=75 +BTS deallocated OK in test_acc_ramp_updown_rotate() |