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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: HO: logging: more logs, and more concise logging ...................................................................... HO: logging: more logs, and more concise logging Explicitly log "Handover" or "Assignment", add more info to existing log statements and add more log statements. Log ho failure both on RR and HO log categories: RR receives the HO failure message, while the HO failure is an important event to note when watching the HO category. Change-Id: Ia3999755cdd4e0c2861582b20e2dbb7e1538e074 --- M src/libbsc/bsc_api.c M src/libbsc/handover_logic.c 2 files changed, 41 insertions(+), 15 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c index 21836f3..d81bf0d 100644 --- a/src/libbsc/bsc_api.c +++ b/src/libbsc/bsc_api.c @@ -675,8 +675,8 @@ struct lchan_signal_data sig; struct gsm48_hdr *gh = msgb_l3(msg); - DEBUGP(DRR, "HANDOVER FAILED cause = %s\n", - rr_cause_name(gh->data[0])); + DEBUGP(DRR, "HANDOVER FAILED cause = %s\n", rr_cause_name(gh->data[0])); + DEBUGP(DHO, "HANDOVER FAILED cause = %s\n", rr_cause_name(gh->data[0])); sig.lchan = msg->lchan; sig.mr = NULL; diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c index 52e5dd3..3dd7227 100644 --- a/src/libbsc/handover_logic.c +++ b/src/libbsc/handover_logic.c @@ -40,6 +40,26 @@ #include <osmocom/bsc/gsm_04_08_utils.h> #include <osmocom/bsc/handover.h> +#define LOGPHOLCHANTOLCHAN(lchan, new_lchan, level, fmt, args...) \ + LOGP(DHODEC, level, "(BTS %u trx %u arfcn %u ts %u lchan %u %s)->(BTS %u trx %u arfcn %u ts %u lchan %u %s) (subscr %s) " fmt, \ + lchan->ts->trx->bts->nr, \ + lchan->ts->trx->nr, \ + lchan->ts->trx->arfcn, \ + lchan->ts->nr, \ + lchan->nr, \ + gsm_pchan_name(lchan->ts->pchan), \ + new_lchan->ts->trx->bts->nr, \ + new_lchan->ts->trx->nr, \ + new_lchan->ts->trx->arfcn, \ + new_lchan->ts->nr, \ + new_lchan->nr, \ + gsm_pchan_name(new_lchan->ts->pchan), \ + bsc_subscr_name(lchan->conn->bsub), \ + ## args) + +#define LOGPHO(struct_bsc_handover, level, fmt, args ...) \ + LOGPHOLCHANTOLCHAN(struct_bsc_handover->old_lchan, struct_bsc_handover->new_lchan, level, fmt, ## args) + struct bsc_handover { struct llist_head list; @@ -105,10 +125,6 @@ if (bsc_ho_by_old_lchan(old_lchan)) return -EBUSY; - DEBUGP(DHO, "Beginning with handover operation" - "(old_lchan on BTS %u, new BTS %u) ...\n", - old_lchan->ts->trx->bts->nr, new_bts->nr); - /* No new BTS? Then it shall be assignment within the same BTS. */ if (!new_bts) new_bts = old_lchan->ts->trx->bts; do_assignment = (new_bts == old_lchan->ts->trx->bts); @@ -121,6 +137,15 @@ LOGP(DHO, LOGL_ERROR, "Old lchan lacks connection data.\n"); return -ENOSPC; } + + DEBUGP(DHO, "(BTS %u trx %u ts %u lchan %u %s)->(BTS %u lchan %s) Beginning with handover operation...\n", + old_lchan->ts->trx->bts->nr, + old_lchan->ts->trx->nr, + old_lchan->ts->nr, + old_lchan->nr, + gsm_pchan_name(old_lchan->ts->pchan), + new_bts->nr, + gsm_lchant_name(new_lchan_type)); new_lchan = lchan_alloc(new_bts, new_lchan_type, 0); if (!new_lchan) { @@ -140,6 +165,8 @@ ho->ho_ref = ho_ref++; ho->inter_cell = !do_assignment; ho->async = true; + + LOGPHO(ho, LOGL_INFO, "Triggering %s\n", do_assignment? "Assignment" : "Handover"); /* copy some parameters from old lchan */ memcpy(&new_lchan->encr, &old_lchan->encr, sizeof(new_lchan->encr)); @@ -165,7 +192,8 @@ ho->async ? RSL_ACT_INTER_ASYNC : RSL_ACT_INTER_SYNC, ho->ho_ref); if (rc < 0) { - LOGP(DHO, LOGL_ERROR, "could not activate channel\n"); + LOGPHO(ho, LOGL_INFO, "%s Failure: activate lchan rc = %d\n", + do_assignment? "Assignment" : "Handover", rc); new_lchan->conn->ho_lchan = NULL; new_lchan->conn = NULL; talloc_free(ho); @@ -231,7 +259,7 @@ if (!ho) return -ENODEV; - DEBUGP(DHO, "handover activate ack, send HO Command\n"); + LOGPHO(ho, LOGL_INFO, "Channel Activate Ack, send %s COMMAND\n", ho->inter_cell? "HANDOVER" : "ASSIGNMENT"); /* we can now send the 04.08 HANDOVER COMMAND to the MS * using the old lchan */ @@ -283,10 +311,8 @@ } 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), - ho->old_lchan->ts->trx->bts->nr, new_lchan->ts->trx->bts->nr, - ho->old_lchan->ts->trx->arfcn, new_lchan->ts->trx->arfcn); + + LOGPHO(ho, LOGL_INFO, "%s Complete\n", ho->inter_cell ? "Handover" : "Assignment"); rate_ctr_inc(&net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_COMPLETED]); @@ -294,10 +320,10 @@ /* Replace the ho lchan with the primary one */ if (ho->old_lchan != new_lchan->conn->lchan) - LOGP(DHO, LOGL_ERROR, "Primary lchan changed during handover.\n"); + LOGPHO(ho, LOGL_ERROR, "Primary lchan changed during handover.\n"); if (new_lchan != new_lchan->conn->ho_lchan) - LOGP(DHO, LOGL_ERROR, "Handover channel changed during this handover.\n"); + LOGPHO(ho, LOGL_ERROR, "Handover channel changed during this handover.\n"); new_lchan->conn->ho_lchan = NULL; new_lchan->conn->lchan = new_lchan; @@ -348,7 +374,7 @@ return -ENODEV; } - LOGP(DHO, LOGL_DEBUG, "%s Handover RACH detected\n", gsm_lchan_name(new_lchan)); + LOGPHO(ho, LOGL_DEBUG, "Handover RACH detected\n"); /* This is just for logging on the DHO category. The actual MGCP switchover happens in * osmo_bsc_mgcp.c by receiving the same S_LCHAN_HANDOVER_DETECT signal. -- To view, visit https://gerrit.osmocom.org/6467 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3999755cdd4e0c2861582b20e2dbb7e1538e074 Gerrit-PatchSet: 3 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>