[PATCH] osmo-bts[master]: l1sap/osmo-bts-sysmo: Improve logging

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.org
Wed Aug 9 11:06:06 UTC 2017


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/3038

to look at the new patch set (#2).

l1sap/osmo-bts-sysmo: Improve logging

Change-Id: I339db0e5f3fd5e44bac974f2447afc80388802af
---
M src/common/l1sap.c
1 file changed, 23 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/38/3038/2

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 97cbac1..21d9dc6 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -500,12 +500,16 @@
 	struct bts_ul_meas ulm;
 	struct gsm_lchan *lchan;
 
-	DEBUGP(DL1P, "MPH_INFO meas ind chan_nr=0x%02x\n",
-		info_meas_ind->chan_nr);
-
 	lchan = get_active_lchan_by_chan_nr(trx, info_meas_ind->chan_nr);
-	if (!lchan)
+	if (!lchan) {
+		LOGP(DL1P, LOGL_ERROR, "No lchan for MPH INFO MEAS IND (chan_nr=%u)\n",
+		     info_meas_ind->chan_nr);
 		return 0;
+	}
+
+	DEBUGP(DL1P, "%s MPH_INFO meas ind, ta_offs_qbits=%d, ber10k=%d, inv_rssi=%u\n",
+		gsm_lchan_name(lchan), info_meas_ind->ta_offs_qbits,
+		info_meas_ind->ber10k, info_meas_ind->inv_rssi);
 
 	/* in the GPRS case we are not interested in measurement
 	 * processing.  The PCU will take care of it */
@@ -727,8 +731,10 @@
 			memcpy(p, fill_frame, GSM_MACBLOCK_LEN);
 	} else if (!(chan_nr & 0x80)) { /* only TCH/F, TCH/H, SDCCH/4 and SDCCH/8 have C5 bit cleared */
 		lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
-		if (!lchan)
+		if (!lchan) {
+			LOGP(DL1P, LOGL_ERROR, "No lchan for PH-RTS.ind (chan_nr=%u)\n", chan_nr);
 			return 0;
+		}
 		if (L1SAP_IS_LINK_SACCH(link_id)) {
 			p = msgb_put(msg, GSM_MACBLOCK_LEN);
 			/* L1-header, if not set/modified by layer 1 */
@@ -779,8 +785,8 @@
 			memcpy(p, fill_frame, GSM_MACBLOCK_LEN);
 	}
 
-	DEBUGP(DL1P, "Tx PH-DATA.req %02u/%02u/%02u chan_nr=%02x link_id=0x%02x\n",
-		g_time.t1, g_time.t2, g_time.t3, chan_nr, link_id);
+	DEBUGP(DL1P, "Tx PH-DATA.req %s chan_nr=0x%02x link_id=0x%02x\n",
+		osmo_dump_gsmtime(&g_time), chan_nr, link_id);
 
 	l1sap_down(trx, l1sap);
 
@@ -830,8 +836,10 @@
 	DEBUGP(DL1P, "Rx TCH-RTS.ind %s chan_nr=0x%02x\n", osmo_dump_gsmtime(&g_time), chan_nr);
 
 	lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
-	if (!lchan)
+	if (!lchan) {
+		LOGP(DL1P, LOGL_ERROR, "No lchan for PH-RTS.ind (chan_nr=%u)\n", chan_nr);
 		return 0;
+	}
 
 	if (!lchan->loopback && lchan->abis_ip.rtp_socket) {
 		osmo_rtp_socket_poll(lchan->abis_ip.rtp_socket);
@@ -880,8 +888,7 @@
 	resp_l1sap->u.tch.fn = fn;
 	resp_l1sap->u.tch.marker = marker;
 
-	DEBUGP(DL1P, "Tx TCH.req %02u/%02u/%02u chan_nr=0x%02x\n",
-		g_time.t1, g_time.t2, g_time.t3, chan_nr);
+	DEBUGP(DL1P, "Tx TCH.req %s chan_nr=0x%02x\n", osmo_dump_gsmtime(&g_time), chan_nr);
 
 	l1sap_down(trx, resp_l1sap);
 
@@ -1024,8 +1031,10 @@
 	}
 
 	lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
-	if (!lchan)
+	if (!lchan) {
+		LOGP(DL1P, LOGL_ERROR, "No lchan for chan_nr=%d\n", chan_nr);
 		return 0;
+	}
 
 	/* bad frame */
 	if (len == 0) {
@@ -1091,8 +1100,10 @@
 	DEBUGP(DL1P, "Rx TCH.ind %s chan_nr=0x%02x\n", osmo_dump_gsmtime(&g_time), chan_nr);
 
 	lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
-	if (!lchan)
+	if (!lchan) {
+		LOGP(DL1P, LOGL_ERROR, "No lchan for TCH.ind (chan_nr=%u)\n", chan_nr);
 		return 0;
+	}
 
 	msgb_pull(msg, sizeof(*l1sap));
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I339db0e5f3fd5e44bac974f2447afc80388802af
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list