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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/22527 ) Change subject: hodec2: fix intra-cell congestion balancing with source lchan on dyn TS ...................................................................... hodec2: fix intra-cell congestion balancing with source lchan on dyn TS Related: SYS#5301 Change-Id: I332477cbddf32cf6f057007b45cda8477227f0b1 --- M src/osmo-bsc/handover_decision_2.c M tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty M tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty 3 files changed, 34 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c index 0bfae9b..2cb7a54 100644 --- a/src/osmo-bsc/handover_decision_2.c +++ b/src/osmo-bsc/handover_decision_2.c @@ -682,7 +682,18 @@ current_overbooked = load_above_congestion(c->current.free_tch, c->current.min_free_tch); if (requirement & REQUIREMENT_A_TCHF) { bool ok; - int32_t target_overbooked = load_above_congestion(c->target.free_tchf - 1, c->target.min_free_tchf); + int32_t target_overbooked; + int target_free_tchf_after_ho; + + /* To evaluate whether a handover improves or worsens congestion on TCH/F, first figure out how many + * TCH/F lchans will be occupied on the target after the handover. If the target is a different cell, + * then we obviously reduce by one TCH/F. If source and target cell are the same (re-assignment), then + * the source lchan may also free a TCH/F at the same time. Add up all of these effects to figure out + * the congestion percentages before and after handover. */ + target_free_tchf_after_ho = c->target.free_tchf - 1; + if (c->current.bts == c->target.bts) + target_free_tchf_after_ho += c->current.lchan_frees_tchf; + target_overbooked = load_above_congestion(target_free_tchf_after_ho, c->target.min_free_tchf); LOGPHOLCHANTOBTS(c->current.lchan, c->target.bts, LOGL_DEBUG, "current overbooked = %s%%, TCH/F target overbooked after HO = %s%%\n", osmo_int_to_float_str_c(OTC_SELECT, current_overbooked, LOAD_PRECISION - 2), @@ -718,7 +729,18 @@ } if (requirement & REQUIREMENT_A_TCHH) { bool ok; - int32_t target_overbooked = load_above_congestion(c->target.free_tchh - 1, c->target.min_free_tchh); + int32_t target_overbooked; + int target_free_tchh_after_ho; + + /* To evaluate whether a handover improves or worsens congestion on TCH/H, first figure out how many + * TCH/H lchans will be occupied on the target after the handover. If the target is a different cell, + * then we obviously reduce by one TCH/H. If source and target cell are the same (re-assignment), then + * the source lchan may also free one or two TCH/H at the same time. Add up all of these effects to + * figure out the congestion percentages before and after handover. */ + target_free_tchh_after_ho = c->target.free_tchh - 1; + if (c->current.bts == c->target.bts) + target_free_tchh_after_ho += c->current.lchan_frees_tchh; + target_overbooked = load_above_congestion(target_free_tchh_after_ho, c->target.min_free_tchh); LOGPHOLCHANTOBTS(c->current.lchan, c->target.bts, LOGL_DEBUG, "current overbooked = %s%%, TCH/H target overbooked after HO = %s%%\n", osmo_int_to_float_str_c(OTC_SELECT, current_overbooked, LOAD_PRECISION - 2), diff --git a/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty b/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty index 6194596..a798457 100644 --- a/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty +++ b/tests/handover/test_dyn_ts_amr_tch_f_to_h_congestion_assignment_2.ho_vty @@ -14,16 +14,15 @@ # (there must be at least one measurement report on each lchan for congestion check to work) meas-rep lchan * * * * rxlev 40 rxqual 0 ta 0 neighbors 30 congestion-check -# FAIL: after the handover from the dyn TS to TCH/H, the dyn TS has freed two TCH/H, while the static TCH/H has reduced -# the TCH/H count by one. So the resulting free slots are 3 TCH/H, which means no congestion. A handover should occur. -expect-no-chan +expect-ho from lchan 0 0 1 0 to lchan 0 0 4 0 +expect-ts-use trx 0 0 states * pdch - - TCH/H- * * * # Again with one more TCH/H occupied, there will still be two free TCH/H after HO on the dyn TS set-ts-use trx 0 0 states * TCH/F - - TCH/H- * * * meas-rep lchan * * * * rxlev 40 rxqual 0 ta 0 neighbors 30 congestion-check -# FAIL: resulting free slots are 2 TCH/H, which means no congestion. A handover should occur. -expect-no-chan +expect-ho from lchan 0 0 1 0 to lchan 0 0 4 1 +expect-ts-use trx 0 0 states * pdch - - TCH/HH * * * # Again, with the target being a dyn TS create-bts trx-count 1 timeslots c+s4 dyn TCH/F TCH/F dyn PDCH PDCH PDCH @@ -37,13 +36,12 @@ set-ts-use trx 1 0 states * TCH/F TCH/F - pdch * * * meas-rep lchan 1 * * * rxlev 40 rxqual 0 ta 0 neighbors 30 congestion-check -# FAIL: after the handover from the dyn TS to TCH/H, the dyn TS has freed two TCH/H, while the static TCH/H has reduced -# the TCH/H count by one. So the resulting free slots are 3 TCH/H, which means no congestion. A handover should occur. -expect-no-chan +expect-ho from lchan 1 0 1 0 to lchan 1 0 4 0 +expect-ts-use trx 1 0 states * pdch TCH/F - TCH/H- * * * # Again with one more TCH/H occupied, there will still be two free TCH/H after HO on the dyn TS set-ts-use trx 1 0 states * TCH/F TCH/F - TCH/H- * * * meas-rep lchan 1 * * * rxlev 40 rxqual 0 ta 0 neighbors 30 congestion-check -# FAIL: resulting free slots are 2 TCH/H, which means no congestion. A handover should occur. -expect-no-chan +expect-ho from lchan 1 0 1 0 to lchan 1 0 4 1 +expect-ts-use trx 1 0 states * pdch TCH/F - TCH/HH * * * diff --git a/tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty b/tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty index 36a9817..de9595b 100644 --- a/tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty +++ b/tests/handover/test_dyn_ts_amr_tch_h_to_f_congestion_assignment_2.ho_vty @@ -21,8 +21,7 @@ set-ts-use trx 0 0 states * TCH/H- - - TCH/F * * * meas-rep lchan * * * * rxlev 40 rxqual 0 ta 0 neighbors 30 congestion-check -# FAIL: after the handover from the dyn TS to TCH/F, the dyn TS has freed a TCH/F, while the static TCH/F has reduced -# the TCH/F count by one. So the resulting free slots are 2 TCH/F, which means no congestion. A handover should occur. -expect-no-chan +expect-ho from lchan 0 0 1 0 to lchan 0 0 2 0 +expect-ts-use trx 0 0 states * pdch TCH/F - TCH/F * * * # (TCH/H -> TCH/F onto a dyn TS will always make TCH/H congestion worse, so there is no useful test case left here) -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/22527 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I332477cbddf32cf6f057007b45cda8477227f0b1 Gerrit-Change-Number: 22527 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210203/86a497e7/attachment.htm>