Change in osmo-bts[master]: rsl: ensure measurement reports are sent

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/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Nov 22 13:18:48 UTC 2019


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/16170 )


Change subject: rsl: ensure measurement reports are sent
......................................................................

rsl: ensure measurement reports are sent

osmo-bts currently does not generate a measurement report in case the
SACCH of the related traffic channel is lost. This is a problem because
the moment when reception gets bad measurmenet reporting is crucial to
carry out handover decisions effectively.

The presence of a SACCH block controls the conclusion of the measurement
interval and the sending of the RSL measurement report. The latter one
not only requires a measurmenet indication, it also requires a fully
intact SACCH block.

Lets use the NOPE / IDLE indications from V1 of the TRXD protocol to
ensure a SACCH block is always reported up to l1sap.c. In cases where
the SACCH is bad, trigger the sending of the RSL measurement report
manually without attaching the measurmenet data from the MS (which we do
not have in this case)

Related: OS#2975
Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2
---
M include/osmo-bts/rsl.h
M src/common/l1sap.c
M src/common/rsl.c
M src/common/scheduler.c
4 files changed, 24 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/70/16170/1

diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index 186018e..ff6c2a8 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -45,4 +45,6 @@
 
 int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount);
 
+int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const struct lapdm_entity *le);
+
 #endif // _RSL_H */
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 7bf0b09..47368b7 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1235,8 +1235,20 @@
 
 	/* bad frame */
 	if (len == 0) {
-		if (L1SAP_IS_LINK_SACCH(link_id))
+		if (L1SAP_IS_LINK_SACCH(link_id)) {
+
+			/* In case we loose a SACCH block on the traffic we
+			 * must take care that the related measurement report
+			 * is sent via RSL. This is a fallback method. The
+			 * report will also lack the measurement report from
+			 * the MS side. See also rsl.c:lapdm_rll_tx_cb() */
+			if (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H) {
+				le = &lchan->lapdm_ch.lapdm_acch;
+				rsl_tx_meas_res(lchan, NULL, 0, le);
+			}
+
 			radio_link_timeout(lchan, 1);
+		}
 		return -EINVAL;
 	}
 
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 09a9217..61f3a38 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2837,8 +2837,8 @@
 	uint16_t toa256_std_dev;
 } __attribute__((packed));
 
-/* 8.4.8 MEASUREMENT RESult */
-static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const struct lapdm_entity *le)
+/* Compose and send 8.4.8 MEASUREMENT RESult via RSL */
+int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, const struct lapdm_entity *le)
 {
 	struct msgb *msg;
 	uint8_t meas_res[16];
@@ -2898,9 +2898,12 @@
 		msgb_tv_fixed_put(msg, RSL_IE_L1_INFO, 2, lchan->meas.l1_info);
 		lchan->meas.flags &= ~LC_UL_M_F_L1_VALID;
 	}
-	msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3);
+
+	if (l3 && l3_len > 0)
+		msgb_tl16v_put(msg, RSL_IE_L3_INFO, l3_len, l3);
 	if (ms_to_valid(lchan)) {
-		msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, ms_to2rsl(lchan, le));
+		if (l3 && l3_len > 0)
+			msgb_tv_put(msg, RSL_IE_MS_TIMING_OFFSET, ms_to2rsl(lchan, le));
 		lchan->ms_t_offs = -1;
 		lchan->p_offs = -1;
 	}
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index fe93c32..1c2755e 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -191,6 +191,7 @@
 		.rts_fn = rts_tchf_fn,
 		.dl_fn = tx_tchf_fn,
 		.ul_fn = rx_tchf_fn,
+		.nope_fn = rx_tchf_fn,
 	},
 	[TRXC_TCHH_0] = {
 		.name = "TCH/H(0)", /* 3GPP TS 05.02, section 3.2 */
@@ -365,6 +366,7 @@
 		.rts_fn = rts_data_fn,
 		.dl_fn = tx_data_fn,
 		.ul_fn = rx_data_fn,
+		.nope_fn = rx_data_fn,
 	},
 	[TRXC_SACCHTH_0] = {
 		.name = "SACCH/TH(0)", /* 3GPP TS 05.02, section 3.3.4.1 */

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Idfa8ef94e8cf131ff234dac8f93f337051663ae2
Gerrit-Change-Number: 16170
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191122/46de9e5a/attachment.htm>


More information about the gerrit-log mailing list