aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2017-08-23 17:51:22 +0300
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-12 03:10:05 +0100
commit188587b146333e761d278dcb92befd3cd08fa609 (patch)
tree9c9ab1cc4c6eeed62bc8521cf994d8a7fe779d17
parentf56a28d1c24e7ab40402939676edd8d5f50bc94e (diff)
handover_decision: Add more log messages to get more information about HO causes in logs
-rw-r--r--src/libbsc/handover_decision.c22
-rw-r--r--src/libbsc/handover_logic.c15
2 files changed, 31 insertions, 6 deletions
diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c
index 09c7eaa84..2506946ca 100644
--- a/src/libbsc/handover_decision.c
+++ b/src/libbsc/handover_decision.c
@@ -230,7 +230,7 @@ static int attempt_handover(struct gsm_meas_rep *mr)
rc = handover_to_arfcn_bsic(mr->lchan, best_cell->arfcn, best_cell->bsic);
switch (rc) {
case 0:
- LOGPC(DHO, LOGL_INFO, "Starting handover\n");
+ LOGPC(DHO, LOGL_INFO, "Starting handover: meas report number %d \n", mr->nr);
break;
case -ENOSPC:
LOGPC(DHO, LOGL_INFO, "No channel available\n");
@@ -278,20 +278,32 @@ static int process_meas_rep(struct gsm_meas_rep *mr)
/* Interference HO */
if (rxlev2dbm(av_rxlev) > -85 &&
- meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5))
+ meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5)) {
+ LOGPC(DHO, LOGL_INFO, "HO cause: Interference HO av_rxlev=%d dbm \n",
+ rxlev2dbm(av_rxlev));
return attempt_handover(mr);
+ }
/* Bad Quality */
- if (meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5))
+ if (meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5)) {
+ LOGPC(DHO, LOGL_INFO, "HO cause: Bad Quality av_rxlev=%d dbm \n",
+ rxlev2dbm(av_rxlev));
return attempt_handover(mr);
+ }
/* Low Level */
- if (rxlev2dbm(av_rxlev) <= -110)
+ if (rxlev2dbm(av_rxlev) <= -110) {
+ LOGPC(DHO, LOGL_INFO, "HO cause: Low Level av_rxlev=%d dbm \n",
+ rxlev2dbm(av_rxlev));
return attempt_handover(mr);
+ }
/* Distance */
- if (mr->ms_l1.ta > net->handover.max_distance)
+ if (mr->ms_l1.ta > net->handover.max_distance) {
+ LOGPC(DHO, LOGL_INFO, "HO cause: Distance av_rxlev=%d dbm ta=%d \n",
+ rxlev2dbm(av_rxlev), mr->ms_l1.ta);
return attempt_handover(mr);
+ }
/* Power Budget AKA Better Cell */
if ((mr->nr % net->handover.pwr_interval) == 0)
diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c
index a30cd0912..aab5ead77 100644
--- a/src/libbsc/handover_logic.c
+++ b/src/libbsc/handover_logic.c
@@ -260,7 +260,7 @@ static int ho_gsm48_ho_compl(struct gsm_lchan *new_lchan)
net = new_lchan->ts->trx->bts->network;
LOGP(DHO, LOGL_INFO, "Subscriber %s HO from BTS %u->%u on ARFCN "
- "%u->%u\n", bsc_subscr_name(ho->old_lchan->conn->bsub),
+ "%u->%u HANDOVER COMPLETE\n", bsc_subscr_name(ho->old_lchan->conn->bsub),
ho->old_lchan->ts->trx->bts->nr, new_lchan->ts->trx->bts->nr,
ho->old_lchan->ts->trx->arfcn, new_lchan->ts->trx->arfcn);
@@ -299,6 +299,9 @@ static int ho_gsm48_ho_fail(struct gsm_lchan *old_lchan)
return -ENODEV;
}
+ LOGP(DHO, LOGL_ERROR, "%s -> %s HANDOVER FAIL\n",
+ gsm_lchan_name(old_lchan), gsm_lchan_name(ho->new_lchan));
+
rate_ctr_inc(&net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_FAILED]);
new_lchan = ho->new_lchan;
@@ -325,7 +328,17 @@ static int ho_rsl_detect(struct gsm_lchan *new_lchan)
return -ENODEV;
}
+ LOGP(DHO, LOGL_DEBUG, "HANDOVER DETECT %s -> %s\n",
+ gsm_lchan_name(ho->old_lchan), gsm_lchan_name(ho->new_lchan));
+
/* FIXME: do we actually want to do something here ? */
+ //rsl_ipacc_mdcx(new_lchan,
+ // old_lchan->abis_ip.connect_ip,
+ // old_lchan->abis_ip.connect_port, 0);
+ LOGP(DHO, LOGL_DEBUG, "? rsl_ipacc_mdcx(%s -> %x:%u)\n",
+ gsm_lchan_name(new_lchan),
+ ho->old_lchan->abis_ip.connect_ip,
+ ho->old_lchan->abis_ip.connect_port);
return 0;
}