fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/39831?usp=email )
Change subject: power_control: always feed input values to do_avg_algo()
......................................................................
power_control: always feed input values to do_avg_algo()
The purpose of the power control interval (P_CON_INTERVAL) is to
temporarily suspend the decision-making process of the MS/BS power
control algorithm, allowing time to observe the effects of a
previous adjustment.
However, input value (RxLev/RxQual) averaging must continue
uninterrupted, regardless of the power control interval.
Otherwise we're simply loosing measurement samples.
Change-Id: I2ccad1cb0ebbfcce64a93bc81b66db37b1399769
---
M src/common/power_control.c
1 file changed, 13 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/31/39831/1
diff --git a/src/common/power_control.c b/src/common/power_control.c
index 7f98a41..45d8969 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -206,6 +206,12 @@
if (params == NULL)
return 0;
+ /* Average the input RxLev/RxQual samples (if needed). Do this before
+ * the loop suspension logic to keep the pre-processing state updated. */
+ ci_meas = lchan_get_ci_thresholds(lchan);
+ ul_lqual_cb_avg = do_avg_algo(ci_meas, &state->ci_meas_proc, ul_lqual_cb);
+ rxlev_avg = do_avg_algo(¶ms->rxlev_meas, &state->rxlev_meas_proc, dbm2rxlev(ul_rssi_dbm));
+
/* Shall we skip current block based on configured interval? */
if (ctrl_interval_skip_block(params, state))
return 0;
@@ -225,15 +231,10 @@
return 0;
}
- ci_meas = lchan_get_ci_thresholds(lchan);
-
/* Is C/I based algo enabled by config?
* FIXME: this can later be generalized when properly implementing P & N counting. */
ci_on = ci_meas->lower_cmp_n && ci_meas->upper_cmp_n;
- ul_lqual_cb_avg = do_avg_algo(ci_meas, &state->ci_meas_proc, ul_lqual_cb);
- rxlev_avg = do_avg_algo(¶ms->rxlev_meas, &state->rxlev_meas_proc, dbm2rxlev(ul_rssi_dbm));
-
/* If computed C/I is enabled and out of acceptable thresholds: */
if (ci_on && ul_lqual_cb_avg < ci_meas->lower_thresh * 10) {
new_dbm = ms_dbm + params->inc_step_size_db;
@@ -334,10 +335,6 @@
lchan->tch.dtx.dl_active ? "enabled" : "disabled",
lchan->tch.dtx.dl_active ? "SUB" : "FULL");
- /* Shall we skip current block based on configured interval? */
- if (ctrl_interval_skip_block(params, state))
- return 0;
-
/* If DTx is active on Downlink, use the '-SUB' */
if (lchan->tch.dtx.dl_active) {
rxqual = mr->rxqual_sub;
@@ -347,8 +344,15 @@
rxlev = mr->rxlev_full;
}
+ /* Average the input RxLev/RxQual samples (if needed). Do this before
+ * the loop suspension logic to keep the pre-processing state updated. */
rxlev_avg = do_avg_algo(¶ms->rxlev_meas, &state->rxlev_meas_proc, rxlev);
rxqual_avg = do_avg_algo(¶ms->rxqual_meas, &state->rxqual_meas_proc, rxqual);
+
+ /* Shall we skip current block based on configured interval? */
+ if (ctrl_interval_skip_block(params, state))
+ return 0;
+
/* If RxQual > L_RXQUAL_XX_P, try to increase Tx power */
if (rxqual_avg > params->rxqual_meas.lower_thresh) {
/* Increase Tx power by reducing Tx attenuation */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39831?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2ccad1cb0ebbfcce64a93bc81b66db37b1399769
Gerrit-Change-Number: 39831
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/39828?usp=email )
Change subject: rsl: rsl_rx_chan_activ(): fix code formatting
......................................................................
rsl: rsl_rx_chan_activ(): fix code formatting
Change-Id: Ib22f9b90a5194370d2b5bb768d050cc0b167320e
---
M src/common/rsl.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/28/39828/1
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 20581d4..7931a17 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2078,8 +2078,8 @@
}
/* Spec explicitly states BTS should only perform
- * autonomous MS power control loop in BTS if 'MS Power
- * Parameters' IE is present! */
+ * autonomous MS power control loop in BTS if 'MS Power
+ * Parameters' IE is present! */
lchan->ms_power_ctrl.dpc_params = params;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39828?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib22f9b90a5194370d2b5bb768d050cc0b167320e
Gerrit-Change-Number: 39828
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/39829?usp=email )
Change subject: rsl: rsl_rx_chan_activ(): set TA=0 if not indicated by the BSC
......................................................................
rsl: rsl_rx_chan_activ(): set TA=0 if not indicated by the BSC
Otherwise the TA loop would end up using whatever value was set
previously. Let's assume TA=0 if not indicated by the BSC.
Change-Id: I83f26ff06cebdfe8d4e75944f496e9678310e2a2
---
M src/common/rsl.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/29/39829/1
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 7931a17..1104ef8 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2064,6 +2064,8 @@
/* 9.3.24 Timing Advance */
if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1))
lchan->ta_ctrl.current = *TLVP_VAL(&tp, RSL_IE_TIMING_ADVANCE);
+ else /* assume TA=0 if not indicated by the BSC */
+ lchan->ta_ctrl.current = 0;
/* 9.3.31 (TLV) MS Power Parameters IE (vendor specific) */
if ((ie = TLVP_GET(&tp, RSL_IE_MS_POWER_PARAM)) != NULL) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39829?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I83f26ff06cebdfe8d4e75944f496e9678310e2a2
Gerrit-Change-Number: 39829
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/39830?usp=email )
Change subject: fixup: rsl: properly initialize MS/BS Power Control state
......................................................................
fixup: rsl: properly initialize MS/BS Power Control state
Commit 75162427 fixed one problem, but introduced another one:
'''
/* Initialize MS Power Control defaults */
lchan->ms_power_ctrl = (struct lchan_power_ctrl_state) {
.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0),
.current = lchan->ms_power_ctrl.max, /* XXX */
};
'''
The intention here was to assign the same value to both 'max' and
'current' fields. However, field 'current' actually gets assigned
whatever value was assigned to field 'max' previously.
This regression was caught by running the BTS_Tests.TC_rsl_ms_pwr_ctrl
several times against the same osmo-bts-trx process.
Let's use the good-old memset() to initialize the MS/BS Power Control
state structures, and move initialization of 'max' and 'current' fields
to the else branches of the RSL_IE_{MS,BS}_POWER IE checks.
Change-Id: I46c881d5a3959c2542610ed767e0f131d01f9f98
Fixes: 75162427 ("rsl: properly initialize MS/BS Power Control state")
Related: SYS#4918, OS#6672
---
M src/common/rsl.c
1 file changed, 11 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/39830/1
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 1104ef8..f16fe7c 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1987,17 +1987,9 @@
}
}
- /* Initialize MS Power Control defaults */
- lchan->ms_power_ctrl = (struct lchan_power_ctrl_state) {
- .max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0),
- .current = lchan->ms_power_ctrl.max,
- };
-
- /* Initialize BS Power Control defaults */
- lchan->bs_power_ctrl = (struct lchan_power_ctrl_state) {
- .max = 2 * 15, /* maximum defined in 9.3.4 */
- .current = 0,
- };
+ /* Initialize MS/BS Power Control state */
+ memset(&lchan->ms_power_ctrl, 0, sizeof(lchan->ms_power_ctrl));
+ memset(&lchan->bs_power_ctrl, 0, sizeof(lchan->bs_power_ctrl));
/* 9.3.6 Channel Mode */
if (type != RSL_ACT_OSMO_PDCH) {
@@ -2054,13 +2046,18 @@
LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "BS Power attenuation %u dB\n",
lchan->bs_power_ctrl.current);
+ } else {
+ lchan->bs_power_ctrl.max = 2 * 15; /* maximum defined in 9.3.4 */
+ lchan->bs_power_ctrl.current = 0;
}
/* 9.3.13 MS Power */
- if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) {
+ if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1))
lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F;
- lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
- }
+ else /* XXX: should we use the maximum power level instead of 0 dBm? */
+ lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
+ lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
+
/* 9.3.24 Timing Advance */
if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1))
lchan->ta_ctrl.current = *TLVP_VAL(&tp, RSL_IE_TIMING_ADVANCE);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39830?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I46c881d5a3959c2542610ed767e0f131d01f9f98
Gerrit-Change-Number: 39830
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ci/+/39826?usp=email )
Change subject: obs: gerrit_binpkgs: set --allow-unknown-package
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/39826?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I79e89c0d7a73f8b2262fd10a0f7a118aa8351635
Gerrit-Change-Number: 39826
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 20 Mar 2025 14:54:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/39826?usp=email )
Change subject: obs: gerrit_binpkgs: set --allow-unknown-package
......................................................................
obs: gerrit_binpkgs: set --allow-unknown-package
The gerrit_binpkgs.sh script can be used to quickly test building of
debian packages in a container even for packages that we don't have
in the OBS osmocom repositories. For example I'm currently using it to
test-build kamailio packages. Use the --allow-unknown-package argument
so build_srcpkg.py doesn't complain if this gets called with a package
that isn't a known Osmocom package.
Change-Id: I79e89c0d7a73f8b2262fd10a0f7a118aa8351635
---
M scripts/obs/gerrit_binpkgs.sh
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/26/39826/1
diff --git a/scripts/obs/gerrit_binpkgs.sh b/scripts/obs/gerrit_binpkgs.sh
index 443c33f..f199844 100755
--- a/scripts/obs/gerrit_binpkgs.sh
+++ b/scripts/obs/gerrit_binpkgs.sh
@@ -37,6 +37,7 @@
echo ":: Building the source package"
"$SCRIPTS_OBS_DIR"/build_srcpkg.py \
+ --allow-unknown-package \
--docker \
--feed master \
--git-skip-fetch \
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/39826?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I79e89c0d7a73f8b2262fd10a0f7a118aa8351635
Gerrit-Change-Number: 39826
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>