Change in osmo-pcu[master]: RIM: Improve logging

pespin gerrit-no-reply at lists.osmocom.org
Thu Apr 22 10:23:20 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/23800 )

Change subject: RIM: Improve logging
......................................................................

RIM: Improve logging

Change-Id: I0adbb8ea4480912463dc1dded6c06a1b8f7ed807
---
M src/gprs_bssgp_rim.c
1 file changed, 19 insertions(+), 5 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  dexter: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved



diff --git a/src/gprs_bssgp_rim.c b/src/gprs_bssgp_rim.c
index 5f6f750..c1f9cec 100644
--- a/src/gprs_bssgp_rim.c
+++ b/src/gprs_bssgp_rim.c
@@ -87,6 +87,13 @@
 	/* Note: It is possible that the resulting PDU will not contain any system information, even if this is
 	 * an unlikely case since the BTS immediately updates the system information after startup. The
 	 * specification permits to send zero system information, see also: 3GPP TS 48.018 section 11.3.63.2.1 */
+
+	if (!bts->si1_is_set || !bts->si3_is_set || !bts->si13_is_set)
+		LOGP(DNACC, LOGL_INFO, "TX RAN INFO RESPONSE (NACC) %s: Some SI are missing:%s%s%s\n",
+		     osmo_cgi_ps_name(&app_cont->reprt_cell),
+		     bts->si1_is_set ? "" : " SI1",
+		     bts->si3_is_set ? "" : " SI3",
+		     bts->si13_is_set ? "" : " SI13");
 }
 
 /* Format a RAN INFORMATION PDU that contains the requested system information */
@@ -243,7 +250,7 @@
 				pdu->routing_info_dest.geran.cid);
 	bts = gprs_pcu_get_bts_by_cgi_ps(the_pcu, &dst_addr);
 	if (!bts) {
-		LOGPRIM(nsei, LOGL_ERROR, "Cell %s unknown to this pcu\n",
+		LOGPRIM(nsei, LOGL_ERROR, "Destination cell %s unknown to this pcu\n",
 			osmo_cgi_ps_name(&dst_addr));
 		return bssgp_tx_status(BSSGP_CAUSE_UNKN_DST, NULL, msg);
 	}
@@ -251,7 +258,8 @@
 	/* Check if the incoming RIM PDU is parseable, if not we must report
 	 * an error to the controlling BSS 3GPP TS 48.018, 8c.3.4 and 8c.3.4.2 */
 	if (!pdu->decoded_present) {
-		LOGPRIM(nsei, LOGL_ERROR, "Errornous RIM PDU received -- rejected.\n");
+		LOGPRIM(nsei, LOGL_ERROR, "Erroneous RIM PDU received for cell %s -- reject.\n",
+			osmo_cgi_ps_name(&dst_addr));
 		format_response_pdu_err(&resp_pdu, pdu);
 		return 0;
 	}
@@ -259,7 +267,9 @@
 	/* Check if the RIM container inside the incoming RIM PDU has the correct
 	 * application ID */
 	if (!match_app_id(pdu, BSSGP_RAN_INF_APP_ID_NACC)) {
-		LOGPRIM(nsei, LOGL_ERROR, "RIM PDU with unknown/wrong application ID received -- rejected.\n");
+		LOGPRIM(nsei, LOGL_ERROR,
+			"RIM PDU for cell %s with unknown/wrong application ID received -- reject.\n",
+			osmo_cgi_ps_name(&dst_addr));
 		format_response_pdu_err(&resp_pdu, pdu);
 		return 0;
 	}
@@ -269,10 +279,14 @@
 	case BSSGP_IE_RI_REQ_RIM_CONTAINER:
 		rc = osmo_cgi_ps_cmp(&dst_addr, &pdu->decoded.req_rim_cont.u.app_cont_nacc.reprt_cell);
 		if (rc != 0) {
-			LOGPRIM(nsei, LOGL_ERROR, "reporting cell in RIM application container does not match destination cell in RIM routing info -- rejected.\n");
+			LOGPRIM(nsei, LOGL_ERROR, "reporting cell in RIM application container %s "
+				"does not match destination cell in RIM routing info %s -- rejected.\n",
+				osmo_cgi_ps_name(&pdu->decoded.req_rim_cont.u.app_cont_nacc.reprt_cell),
+				osmo_cgi_ps_name2(&dst_addr));
 			format_response_pdu_err(&resp_pdu, pdu);
 		} else {
-			LOGPRIM(nsei, LOGL_INFO, "Responding to RAN INFORMATION REQUEST ...\n");
+			LOGPRIM(nsei, LOGL_INFO, "Responding to RAN INFORMATION REQUEST %s ...\n",
+				osmo_cgi_ps_name(&pdu->decoded.req_rim_cont.u.app_cont_nacc.reprt_cell));
 			format_response_pdu(&resp_pdu, pdu, bts);
 		}
 		bssgp_tx_rim(&resp_pdu, nsei);

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I0adbb8ea4480912463dc1dded6c06a1b8f7ed807
Gerrit-Change-Number: 23800
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210422/6ef64110/attachment.htm>


More information about the gerrit-log mailing list