This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18904 ) Change subject: Implement tx power ramp down during BTS shutdown ...................................................................... Implement tx power ramp down during BTS shutdown Upon BTS shutdown (for instance because the Abis link against BSC was lost), stop the operation in an ordered manner (cell soft lock). This means slowly decrease tx power so that MS have time to handover to other neighbour cells. Related: SYS#4920 Change-Id: I70e34dda8974ebd94aea33bd9fb1d99f9063cc55 --- M include/osmo-bts/bts_shutdown_fsm.h M src/common/bts_shutdown_fsm.c M src/common/gsm_data.c 3 files changed, 43 insertions(+), 7 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/bts_shutdown_fsm.h b/include/osmo-bts/bts_shutdown_fsm.h index 1268b2b..42f953a 100644 --- a/include/osmo-bts/bts_shutdown_fsm.h +++ b/include/osmo-bts/bts_shutdown_fsm.h @@ -33,6 +33,7 @@ enum bts_shutdown_fsm_events { BTS_SHUTDOWN_EV_START, + BTS_SHUTDOWN_EV_TRX_RAMP_COMPL, }; extern struct osmo_fsm bts_shutdown_fsm; diff --git a/src/common/bts_shutdown_fsm.c b/src/common/bts_shutdown_fsm.c index 50ef652..faa92a0 100644 --- a/src/common/bts_shutdown_fsm.c +++ b/src/common/bts_shutdown_fsm.c @@ -47,17 +47,41 @@ } } +static void ramp_down_compl_cb(struct gsm_bts_trx *trx) { + osmo_fsm_inst_dispatch(trx->bts->shutdown_fi, BTS_SHUTDOWN_EV_TRX_RAMP_COMPL, trx); +} + static void st_wait_ramp_down_compl_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) { - /* TODO: here power ramp down will be started on all TRX, prior to changing state */ + struct gsm_bts *bts = (struct gsm_bts *)fi->priv; + struct gsm_bts_trx *trx; + + llist_for_each_entry(trx, &bts->trx_list, list) + power_ramp_start(trx, to_mdB(-10), 1, ramp_down_compl_cb); } static void st_wait_ramp_down_compl(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - /* TODO: In here once we have ramp down implemented we'll transit to - regular exit. For now we simply wait for state timeout - bts_shutdown_fsm_state_chg(fi, BTS_SHUTDOWN_ST_EXIT); - */ + struct gsm_bts *bts = (struct gsm_bts *)fi->priv; + struct gsm_bts_trx *src_trx; + unsigned int remaining = 0; + struct gsm_bts_trx *trx; + + switch(event) { + case BTS_SHUTDOWN_EV_TRX_RAMP_COMPL: + src_trx = (struct gsm_bts_trx *)data; + + llist_for_each_entry(trx, &bts->trx_list, list) { + if (trx->power_params.p_total_cur_mdBm > 0) + remaining++; + } + + LOGPFSML(fi, LOGL_INFO, "%s Ramping down complete, %u TRX remaining\n", + gsm_trx_name(src_trx), remaining); + if (remaining == 0) + bts_shutdown_fsm_state_chg(fi, BTS_SHUTDOWN_ST_EXIT); + break; + } } static void st_exit_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) @@ -82,7 +106,8 @@ .action = st_none, }, [BTS_SHUTDOWN_ST_WAIT_RAMP_DOWN_COMPL] = { - .in_event_mask = 0, + .in_event_mask = + X(BTS_SHUTDOWN_EV_TRX_RAMP_COMPL), .out_state_mask = X(BTS_SHUTDOWN_ST_EXIT), .name = "WAIT_RAMP_DOWN_COMPL", @@ -97,6 +122,7 @@ const struct value_string bts_shutdown_fsm_event_names[] = { OSMO_VALUE_STRING(BTS_SHUTDOWN_EV_START), + OSMO_VALUE_STRING(BTS_SHUTDOWN_EV_TRX_RAMP_COMPL), { 0, NULL } }; diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c index 18d5b66..ae604ec 100644 --- a/src/common/gsm_data.c +++ b/src/common/gsm_data.c @@ -40,7 +40,16 @@ #include <osmo-bts/bts_shutdown_fsm.h> static struct osmo_tdef bts_T_defs[] = { - { .T=-1, .default_val=1, .desc="Time after which osmo-bts exits if regular ramp down during shut down process does not finish (s)" }, + /* T-1: FIXME: Ideally should be dynamically calculated per trx at + * shutdown start based on params below, and highest trx value taken: + * + VTY's power-ramp step-interval. + * + Amount of steps needed (taking into account how many dB each step moves). + * + Extra time to get response back for each step. + * For now we simply give 5 mins, which should be enough for any + * acceptable setup, while still ensuring will timeout at some point if + * something fails in the ramp down procedure. + */ + { .T=-1, .default_val=300, .desc="Time after which osmo-bts exits if regular ramp down during shut down process does not finish (s)" }, { .T=-2, .default_val=3, .desc="Time after which osmo-bts exits if requesting transceivers to stop during shut down process does not finish (s)" }, {} }; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18904 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I70e34dda8974ebd94aea33bd9fb1d99f9063cc55 Gerrit-Change-Number: 18904 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-CC: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200623/8259ed56/attachment.htm>