libosmo-sccp[master]: add various debug logging to help figure out complex SCCP ro...

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
Fri Jun 23 14:20:51 UTC 2017


Patch Set 1:

(10 comments)

https://gerrit.osmocom.org/#/c/3012/1//COMMIT_MSG
Commit Message:

Line 7: add various debug logging to help figure out complex SCCP routing
actually, I think we only implement MTP-level routing so far.


https://gerrit.osmocom.org/#/c/3012/1/src/m3ua.c
File src/m3ua.c:

Line 562: 		"m3ua data hdr opc=%u dpc=%u\n",
I think the function name or some other indication should be given to indicate *where* we are logging this from.  just printing some header details could happen pretty much any place in the stack.


https://gerrit.osmocom.org/#/c/3012/1/src/osmo_ss7.c
File src/osmo_ss7.c:

Line 745: 		DEBUGP(DLSS7, "Created route pc=%u mask=%u name=%s linkset %s\n", pc, mask, linkset_name,
route creation/removal is rather rare, and it could actually be propagated to LOGL_INFO. your call.


https://gerrit.osmocom.org/#/c/3012/1/src/osmo_ss7_hmrt.c
File src/osmo_ss7_hmrt.c:

Line 135: 		DEBUGP(DLSS7, "found route for dpc %u: %s pc=%u mask=%u %s:%s\n", dpc,
point-codes can be printing in a more meaningful representation than as unsigned int.  osmo_ss7_* has already some functions for parsing and stringification.


Line 152: 				DEBUGP(DLSS7, "rt->dest.as proto is M3UA for dpc %u\n", dpc);
if you want to print this, I think it should go one level up and print for any as->cfg.proto, and not just in the M3UA case.


Line 184: 		DEBUGP(DLSS7, "dpc %u is local\n", dpc);
again I think here it's useful to see the context, i.e. that we just received a message from L2 and now have determined that an incoming message is local (or routing for remote below)


https://gerrit.osmocom.org/#/c/3012/1/src/sccp_scoc.c
File src/sccp_scoc.c:

PS1, Line 1547: c
could move into sccp_scoc_rx_inval_src_ref() and could be propagated from debug to notice.


Line 1556: 			DEBUGP(DLSCCP, "xua->mtp.opc(%u) != conn->remote_pc(%u)\n",
could be moved into sccp_scoc_rx_inval_opc() and could be propagated to notice.


https://gerrit.osmocom.org/#/c/3012/1/src/sccp_scrc.c
File src/sccp_scrc.c:

Line 241: 	LOGP(DLSS7, LOGL_DEBUG, "scrc_node_4\n");
I'm not sure if we want to trace every node here, that's a bit excessive from my POV.  Also, as there are many packets traversing the code (although only sequentially), the log statement should probably include some information about what particular packet is processed here?  Finally, if LOGL_DEBUG, DEBUGP() could be used to shorten it.


Line 461: 			LOGP(DLSS7, LOGL_DEBUG, "hop-counter violation\n");
I think this is
a) reported by arelated SCCP return cause message, i.e. visible in the protocol trace
b) is not a DEBUG level event, but at least INFO, if not NOTICE. Probably the latter.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia3243606d6cad7721f7da7f6caba2caa90ae2bbd
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list