[S] Change in libosmo-sigtran[master]: tcap_as_loadshare: add rate counter for TCAP tcap:session:hit
lynxis has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/44082?usp=email ) Change subject: tcap_as_loadshare: add rate counter for TCAP tcap:session:hit ...................................................................... tcap_as_loadshare: add rate counter for TCAP tcap:session:hit When a TCAP message could be routed by the tcap session tracking. Related: SYS#8283 Change-Id: I10c3ae05c36bef3f3ae91713ed7332a5e66bb04b --- M src/ss7_as.c M src/ss7_as.h M src/tcap_as_loadshare.c 3 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/82/44082/1 diff --git a/src/ss7_as.c b/src/ss7_as.c index 6721c24..3a9352e 100644 --- a/src/ss7_as.c +++ b/src/ss7_as.c @@ -145,6 +145,7 @@ [SS7_AS_CTR_TCAP_ASP_FALLBACK] = { "tcap:asp:fallback", "A non-starting TCAP message had to be routed by round-robin over all ASP. (loadshare-tcap)" }, [SS7_AS_CTR_TCAP_ASP_FAILED] = { "tcap:asp:failed", "ASP selection failed for a TCAP-message (loadshare-tcap)" }, [SS7_AS_CTR_TCAP_SESS_MISS] = { "tcap:session:miss", "A non-starting TCAP message (Continue, End, Abort) was missing a session entry. (loadshare-tcap)" }, + [SS7_AS_CTR_TCAP_SESS_HIT] = { "tcap:session:hit", "A non-starting TCAP message (Continue, End, Abort) hit a session entry, (loadshare-tcap)" }, #endif /* WITH_TCAP_LOADSHARING */ }; diff --git a/src/ss7_as.h b/src/ss7_as.h index 804b59d..d9301a0 100644 --- a/src/ss7_as.h +++ b/src/ss7_as.h @@ -72,6 +72,7 @@ SS7_AS_CTR_TCAP_ASP_FALLBACK, SS7_AS_CTR_TCAP_ASP_FAILED, SS7_AS_CTR_TCAP_SESS_MISS, + SS7_AS_CTR_TCAP_SESS_HIT, #endif /* WITH_TCAP_LOADSHARING */ }; diff --git a/src/tcap_as_loadshare.c b/src/tcap_as_loadshare.c index ea9545e..ca4cd6d 100644 --- a/src/tcap_as_loadshare.c +++ b/src/tcap_as_loadshare.c @@ -682,7 +682,9 @@ * "When a destination TID is present, the SG extracts the label and * selects the ASP that corresponds with it." */ asp = tcap_trans_track_continue(as, &called_addr, &parsed.dtid, &calling_addr, &parsed.otid); - if (!asp) { + if (asp) + rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TCAP_SESS_HIT); + else { LOGPAS(as, DLTCAP, LOGL_INFO, "Couldn't find cached ASP for TCAP Continue, dtid %u/otid %u, using tcap route", parsed.dtid, parsed.otid); rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TCAP_SESS_MISS); asp = tcap_as_asp_find_by_tcap_id(as, &calling_addr, &called_addr, parsed.dtid); @@ -714,7 +716,9 @@ } asp = tcap_trans_track_end(as, &called_addr, &parsed.dtid, &calling_addr, NULL); - if (!asp) { + if (asp) + rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TCAP_SESS_HIT); + else { LOGPAS(as, DLTCAP, LOGL_INFO, "Couldn't find cached ASP for TCAP End, dtid %u, using tcap route\n", parsed.dtid); rate_ctr_inc2(as->ctrg, SS7_AS_CTR_TCAP_SESS_MISS); asp = tcap_as_asp_find_by_tcap_id(as, &calling_addr, &called_addr, parsed.dtid); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/44082?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I10c3ae05c36bef3f3ae91713ed7332a5e66bb04b Gerrit-Change-Number: 44082 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis <lynxis@fe80.eu>
participants (1)
-
lynxis