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/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24851 ) Change subject: hodec2: [2/2] implement automatic choice between FULL and SUBSET measurements ...................................................................... hodec2: [2/2] implement automatic choice between FULL and SUBSET measurements Add TDMA_MEAS_SET_AUTO to indicate automatic choice between FULL and SUBSET measurements depending on DTX in both hodec1 and hodec2. TDMA_MEAS_SET_AUTO looks at each individual measurement report's DTX flag and for each report chooses FULL if DTX is not used, or SUB if DTX is used. The default setting for 'handover2 tdma-measurement' is still 'subset'. To use the automatic choice, users need configure handover2 tdma-measurement auto Change-Id: I67dce55ccf892c8679272ee5dfedc25620f0f725 --- M include/osmocom/bsc/handover_cfg.h M include/osmocom/bsc/meas_rep.h M src/osmo-bsc/handover_decision_2.c M src/osmo-bsc/meas_rep.c M tests/bsc/Makefile.am M tests/handover_cfg.vty 6 files changed, 35 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/24851/1 diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h index 6e003af..551ce8d 100644 --- a/include/osmocom/bsc/handover_cfg.h +++ b/include/osmocom/bsc/handover_cfg.h @@ -38,18 +38,6 @@ return arg? 1 : 0; } -static inline bool a2tdma(const char *arg) -{ - if (!strcmp(arg, "full")) - return true; - return false; -} - -static inline const char *tdma2a(bool val) -{ - return val? "full" : "subset"; -} - /* The HO_CFG_ONE_MEMBER macro gets redefined, depending on whether to define struct members, * function declarations or definitions... It is of the format * HO_CFG_ONE_MEMBER(TYPE, NAME, DEFAULT_VAL, @@ -188,10 +176,13 @@ "Disable in-call assignment\n" \ "Enable in-call assignment\n") \ \ - HO_CFG_ONE_MEMBER(bool, hodec2_full_tdma, subset, \ - "handover2 ", "tdma-measurement", "full|subset", a2tdma, "%s", tdma2a, \ + HO_CFG_ONE_MEMBER(enum tdma_meas_set, hodec2_tdma_meas_set, subset, \ + "handover2 ", "tdma-measurement", "auto|full|subset", \ + tdma_meas_set_from_str, "%s", tdma_meas_set_name, \ HO_CFG_STR_HANDOVER2 \ "Define measurement set of TDMA frames\n" \ + "Use full set when DTX is not in use, use subset when DTX is in use," \ + " as indicated by each Measurement Report\n" \ "Full set of 102/104 TDMA frames\n" \ "Sub set of 4 TDMA frames (SACCH)\n") \ \ diff --git a/include/osmocom/bsc/meas_rep.h b/include/osmocom/bsc/meas_rep.h index 77af365..e30121f 100644 --- a/include/osmocom/bsc/meas_rep.h +++ b/include/osmocom/bsc/meas_rep.h @@ -67,6 +67,12 @@ TDMA_MEAS_SET_AUTO, }; +extern const struct value_string tdma_meas_set_names[]; +static inline const char *tdma_meas_set_name(enum tdma_meas_set val) +{ return get_value_string(tdma_meas_set_names, val); } +static inline enum tdma_meas_set tdma_meas_set_from_str(const char *name) +{ return get_string_value(tdma_meas_set_names, name); } + /* obtain an average over the last 'num' fields in the meas reps */ int get_meas_rep_avg(const struct gsm_lchan *lchan, enum tdma_meas_field field, enum tdma_meas_dir dir, enum tdma_meas_set set, diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c index c3674ff..dd35c73 100644 --- a/src/osmo-bsc/handover_decision_2.c +++ b/src/osmo-bsc/handover_decision_2.c @@ -244,16 +244,14 @@ static int current_rxlev(struct gsm_lchan *lchan) { struct gsm_bts *bts = lchan->ts->trx->bts; - return get_meas_rep_avg(lchan, TDMA_MEAS_FIELD_RXLEV, TDMA_MEAS_DIR_DL, - ho_get_hodec2_full_tdma(bts->ho) ? TDMA_MEAS_SET_FULL : TDMA_MEAS_SET_SUB, + return get_meas_rep_avg(lchan, TDMA_MEAS_FIELD_RXLEV, TDMA_MEAS_DIR_DL, ho_get_hodec2_tdma_meas_set(bts->ho), ho_get_hodec2_rxlev_avg_win(bts->ho)); } static int current_rxqual(struct gsm_lchan *lchan) { struct gsm_bts *bts = lchan->ts->trx->bts; - return get_meas_rep_avg(lchan, TDMA_MEAS_FIELD_RXQUAL, TDMA_MEAS_DIR_DL, - ho_get_hodec2_full_tdma(bts->ho) ? TDMA_MEAS_SET_FULL : TDMA_MEAS_SET_SUB, + return get_meas_rep_avg(lchan, TDMA_MEAS_FIELD_RXQUAL, TDMA_MEAS_DIR_DL, ho_get_hodec2_tdma_meas_set(bts->ho), ho_get_hodec2_rxqual_avg_win(bts->ho)); } diff --git a/src/osmo-bsc/meas_rep.c b/src/osmo-bsc/meas_rep.c index 0ddf349..ee8555d 100644 --- a/src/osmo-bsc/meas_rep.c +++ b/src/osmo-bsc/meas_rep.c @@ -81,7 +81,7 @@ } static inline enum meas_rep_field choose_meas_rep_field(enum tdma_meas_field field, enum tdma_meas_dir dir, - enum tdma_meas_set set) + enum tdma_meas_set set, const struct gsm_meas_rep *meas_rep) { const enum meas_rep_field map[2][2][2] = { [TDMA_MEAS_FIELD_RXLEV] = { @@ -106,6 +106,14 @@ }, }; + if (set == TDMA_MEAS_SET_AUTO) { + bool dtx_in_use; + OSMO_ASSERT(meas_rep); + + dtx_in_use = (meas_rep->flags & ((dir == TDMA_MEAS_DIR_UL) ? MEAS_REP_F_UL_DTX : MEAS_REP_F_DL_DTX)); + set = (dtx_in_use ? TDMA_MEAS_SET_SUB : TDMA_MEAS_SET_FULL); + } + OSMO_ASSERT(field == TDMA_MEAS_FIELD_RXQUAL || field == TDMA_MEAS_FIELD_RXLEV); OSMO_ASSERT(dir == TDMA_MEAS_DIR_UL || dir == TDMA_MEAS_DIR_DL); OSMO_ASSERT(set == TDMA_MEAS_SET_FULL || set == TDMA_MEAS_SET_SUB); @@ -135,7 +143,7 @@ enum meas_rep_field use_field; int val; - use_field = choose_meas_rep_field(field, dir, set); + use_field = choose_meas_rep_field(field, dir, set, &lchan->meas_rep[j]); val = get_field(&lchan->meas_rep[j], use_field); if (val >= 0) { @@ -166,7 +174,7 @@ enum meas_rep_field use_field; int val; - use_field = choose_meas_rep_field(field, dir, set); + use_field = choose_meas_rep_field(field, dir, set, &lchan->meas_rep[j]); val = get_field(&lchan->meas_rep[j], use_field); if (val >= be) /* implies that val < 0 will not count */ @@ -178,3 +186,10 @@ return 0; } + +const struct value_string tdma_meas_set_names[] = { + { TDMA_MEAS_SET_FULL, "full" }, + { TDMA_MEAS_SET_SUB, "subset" }, + { TDMA_MEAS_SET_AUTO, "auto" }, + {} +}; diff --git a/tests/bsc/Makefile.am b/tests/bsc/Makefile.am index a0bbb81..2f66778 100644 --- a/tests/bsc/Makefile.am +++ b/tests/bsc/Makefile.am @@ -46,6 +46,7 @@ $(top_builddir)/src/osmo-bsc/gsm_data.o \ $(top_builddir)/src/osmo-bsc/handover_cfg.o \ $(top_builddir)/src/osmo-bsc/handover_logic.o \ + $(top_builddir)/src/osmo-bsc/meas_rep.o \ $(top_builddir)/src/osmo-bsc/neighbor_ident.o \ $(top_builddir)/src/osmo-bsc/net_init.o \ $(top_builddir)/src/osmo-bsc/nm_common_fsm.o \ diff --git a/tests/handover_cfg.vty b/tests/handover_cfg.vty index 4bafd72..ccb1a6b 100644 --- a/tests/handover_cfg.vty +++ b/tests/handover_cfg.vty @@ -178,7 +178,7 @@ handover2 power budget hysteresis (<0-999>|default) handover2 maximum distance (<0-9999>|default) handover2 assignment (0|1|default) - handover2 tdma-measurement (full|subset|default) + handover2 tdma-measurement (auto|full|subset|default) handover2 min rxlev (<-110--50>|default) handover2 min rxqual (<0-7>|default) handover2 afs-bias rxlev (<0-20>|default) @@ -335,6 +335,7 @@ default Use default (0), remove explicit setting on this node OsmoBSC(config-net)# handover2 tdma-measurement ? + auto Use full set when DTX is not in use, use subset when DTX is in use, as indicated by each Measurement Report full Full set of 102/104 TDMA frames subset Sub set of 4 TDMA frames (SACCH) default Use default (subset), remove explicit setting on this node @@ -553,6 +554,7 @@ default Use default (0), remove explicit setting on this node OsmoBSC(config-net-bts)# handover2 tdma-measurement ? + auto Use full set when DTX is not in use, use subset when DTX is in use, as indicated by each Measurement Report full Full set of 102/104 TDMA frames subset Sub set of 4 TDMA frames (SACCH) default Use default (subset), remove explicit setting on this node -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24851 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I67dce55ccf892c8679272ee5dfedc25620f0f725 Gerrit-Change-Number: 24851 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210705/347388b7/attachment.htm>