[PATCH] osmo-bsc[master]: HO: lchan: store last seen measurement report nr, tweak log

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Feb 15 13:05:18 UTC 2018


Review at  https://gerrit.osmocom.org/6472

HO: lchan: store last seen measurement report nr, tweak log

Handover decision 2 will also store the last seen mr nr for neighbor cell
measurements and hence can tell whether a neighbor's measurement is outdated.

Change-Id: Ic1148364597f91b5a55666c80c758b61fa56f582
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/abis_rsl.c
M src/libbsc/chan_alloc.c
3 files changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index c730d96..8bfb859 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -377,6 +377,7 @@
 	struct gsm_meas_rep meas_rep[MAX_MEAS_REP];
 	int meas_rep_idx;
 	int meas_rep_count;
+	uint8_t meas_rep_last_seen_nr;
 
 	/* GSM Random Access data */
 	struct gsm48_req_ref *rqd_ref;
diff --git a/src/libbsc/abis_rsl.c b/src/libbsc/abis_rsl.c
index 261e6fe..7400f89 100644
--- a/src/libbsc/abis_rsl.c
+++ b/src/libbsc/abis_rsl.c
@@ -1523,8 +1523,9 @@
 	}
 
 	mr->lchan->meas_rep_count++;
-	LOGP(DRSL, LOGL_DEBUG, "%s: meas_rep_cnt++=%d\n",
-	     gsm_lchan_name(mr->lchan), mr->lchan->meas_rep_count);
+	mr->lchan->meas_rep_last_seen_nr = mr->nr;
+	LOGP(DRSL, LOGL_DEBUG, "%s: meas_rep_count++=%d meas_rep_last_seen_nr=%u\n",
+	     gsm_lchan_name(mr->lchan), mr->lchan->meas_rep_count, mr->lchan->meas_rep_last_seen_nr);
 
 	print_meas_rep(msg->lchan, mr);
 
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index 500ad59..0187195 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -414,6 +414,7 @@
 		/* reset measurement report counter and index */
 	        lchan->meas_rep_count = 0;
 	        lchan->meas_rep_idx = 0;
+	        lchan->meas_rep_last_seen_nr = 255;
 
 		/* clear sapis */
 		memset(lchan->sapis, 0, ARRAY_SIZE(lchan->sapis));

-- 
To view, visit https://gerrit.osmocom.org/6472
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1148364597f91b5a55666c80c758b61fa56f582
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list