Change in osmo-bsc[master]: handover_test: add bspower to meas-rep cmd

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.org
Wed May 26 19:54:56 UTC 2021


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24423 )


Change subject: handover_test: add bspower to meas-rep cmd
......................................................................

handover_test: add bspower to meas-rep cmd

Subsequent patch will add a test that uses this to show a handover
oscillation problem in the presence of nonzero BS Power.

Related: SYS#5339
Change-Id: I158d4b27370ab19318f83018803853f423c89b79
---
M tests/handover/handover_test.c
1 file changed, 28 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/23/24423/1

diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 8e23a4f..5f45865 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -82,7 +82,7 @@
 
 uint8_t meas_rep_ba = 0, meas_rep_valid = 1, meas_valid = 1, meas_multi_rep = 0;
 uint8_t meas_ul_rxlev = 0, meas_ul_rxqual = 0;
-uint8_t meas_tx_power_ms = 0, meas_tx_power_bs = 0;
+uint8_t meas_tx_power_ms = 0;
 uint8_t meas_dtx_ms = 0, meas_dtx_bs = 0, meas_nr = 0;
 char *codec_tch_f = NULL;
 char *codec_tch_h = NULL;
@@ -94,7 +94,7 @@
 };
 
 static void gen_meas_rep(struct gsm_lchan *lchan,
-			 uint8_t rxlev, uint8_t rxqual, uint8_t ta,
+			 uint8_t bs_power, uint8_t rxlev, uint8_t rxqual, uint8_t ta,
 			 int neighbors_count, struct neighbor_meas *neighbors)
 {
 	struct msgb *msg = msgb_alloc_headroom(256, 64, "RSL");
@@ -117,7 +117,7 @@
 	ulm[2] = (meas_ul_rxqual << 3) | meas_ul_rxqual;
 	msgb_tlv_put(msg, RSL_IE_UPLINK_MEAS, sizeof(ulm), ulm);
 
-	msgb_tv_put(msg, RSL_IE_BS_POWER, meas_tx_power_bs);
+	msgb_tv_put(msg, RSL_IE_BS_POWER, (bs_power / 2) & 0xf);
 
 	l1i[0] = 0;
 	l1i[1] = ta;
@@ -865,6 +865,7 @@
 struct meas_rep_data {
 	int argc;
 	const char **argv;
+	uint8_t bs_power;
 };
 
 static void _meas_rep_cb(struct gsm_lchan *lc, void *data)
@@ -916,14 +917,15 @@
 			fprintf(stderr, " * Neighbor cell #%d, actual BTS %d: rxlev=%d\n", i, neighbor_bts_nr,
 				nm[i].rxlev);
 	}
-	gen_meas_rep(lc, rxlev, rxqual, ta, argc, nm);
+	gen_meas_rep(lc, d->bs_power, rxlev, rxqual, ta, argc, nm);
 }
 
-static int _meas_rep(struct vty *vty, int argc, const char **argv)
+static int _meas_rep(struct vty *vty, uint8_t bs_power, int argc, const char **argv)
 {
 	struct meas_rep_data d = {
 		.argc = argc - 4,
 		.argv = argv + 4,
+		.bs_power = bs_power,
 	};
 	parse_lchan_wildcard_args(argv, _meas_rep_cb, &d);
 	return CMD_SUCCESS;
@@ -951,7 +953,7 @@
       MEAS_REP_DOC MEAS_REP_ARGS_DOC)
 {
 	VTY_ECHO();
-	return _meas_rep(vty, argc, argv);
+	return _meas_rep(vty, 0, argc, argv);
 }
 
 DEFUN(meas_rep_repeat, meas_rep_repeat_cmd,
@@ -966,7 +968,25 @@
 	argc -= 1;
 
 	while (count--)
-		_meas_rep(vty, argc, argv);
+		_meas_rep(vty, 0, argc, argv);
+	return CMD_SUCCESS;
+}
+
+DEFUN(meas_rep_repeat_bspower, meas_rep_repeat_bspower_cmd,
+      "meas-rep repeat <0-999> bspower <0-63> " MEAS_REP_ARGS,
+      MEAS_REP_DOC
+      "Resend the same measurement report N times\nN\n"
+      "Send a nonzero BS Power value in the measurement report (downlink power reduction)\nBS Power reduction in dB\n"
+      MEAS_REP_ARGS_DOC)
+{
+	int count = atoi(argv[0]);
+	uint8_t bs_power = atoi(argv[1]);
+	VTY_ECHO();
+	argv += 2;
+	argc -= 2;
+
+	while (count--)
+		_meas_rep(vty, bs_power, argc, argv);
 	return CMD_SUCCESS;
 }
 
@@ -1184,6 +1204,7 @@
 	install_element(CONFIG_NODE, &create_ms_cmd);
 	install_element(CONFIG_NODE, &meas_rep_cmd);
 	install_element(CONFIG_NODE, &meas_rep_repeat_cmd);
+	install_element(CONFIG_NODE, &meas_rep_repeat_bspower_cmd);
 	install_element(CONFIG_NODE, &congestion_check_cmd);
 	install_element(CONFIG_NODE, &expect_no_chan_cmd);
 	install_element(CONFIG_NODE, &expect_chan_cmd);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24423
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I158d4b27370ab19318f83018803853f423c89b79
Gerrit-Change-Number: 24423
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/20210526/fdefb7e2/attachment.htm>


More information about the gerrit-log mailing list