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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: HO: Add a penalty timer list to the subscriber connection entity ...................................................................... HO: Add a penalty timer list to the subscriber connection entity This penalty timer is used to temporarily block cells where handover or assignment failed or where handover is not allowed. This is usefull to prevent repeated handover attempts to broken cells or cells that have limited allowed distance. Change-Id: I95cb7e3211b2470b773965e7aa94d8eb6c8c1a3a --- M include/osmocom/bsc/gsm_data.h M src/libbsc/bsc_api.c 2 files changed, 20 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 4e07f26..d9dd2d4 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -71,6 +71,13 @@ uint8_t classmark3[14]; /* if cm3 gets extended by spec, it will be truncated */ }; +/* penalty timers for handover */ +struct ho_penalty_timer { + struct llist_head entry; + uint8_t bts; + time_t timeout; +}; + /* active radio connection of a mobile subscriber */ struct gsm_subscriber_connection { /* global linked list of subscriber_connections */ @@ -104,6 +111,9 @@ /* Cache DTAP messages during handover/assignment (msgb_enqueue()/msgb_dequeue())*/ struct llist_head ho_dtap_cache; unsigned int ho_dtap_cache_len; + + /* penalty timers for handover */ + struct llist_head ho_penalty_timers; }; static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection *conn) { diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 9c60af9..27bf739 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -277,6 +277,7 @@ conn->bts = lchan->ts->trx->bts; lchan->conn = conn; INIT_LLIST_HEAD(&conn->ho_dtap_cache); + INIT_LLIST_HEAD(&conn->ho_penalty_timers); llist_add_tail(&conn->entry, &net->subscr_conns); return conn; } @@ -326,6 +327,8 @@ void bsc_subscr_con_free(struct gsm_subscriber_connection *conn) { + struct ho_penalty_timer *penalty; + if (!conn) return; @@ -350,6 +353,13 @@ /* drop pending messages */ ho_dtap_cache_flush(conn, 0); + /* flush handover penalty timers */ + while ((penalty = llist_first_entry_or_null(&conn->ho_penalty_timers, + struct ho_penalty_timer, entry))) { + llist_del(&penalty->entry); + talloc_free(penalty); + } + llist_del(&conn->entry); talloc_free(conn); } -- To view, visit https://gerrit.osmocom.org/5920 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95cb7e3211b2470b773965e7aa94d8eb6c8c1a3a Gerrit-PatchSet: 7 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder