lynxis has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sigtran/+/44084?usp=email )


Change subject: tcap_as_loadshare: add rate counter tcap:loadshare:failure
......................................................................

tcap_as_loadshare: add rate counter tcap:loadshare:failure

When selecting an ASP fails for a TCAP Begin message.

Related: SYS#8283
Change-Id: I04e63bf30742e5e584609337aab11177553b8033
---
M src/ss7_as.c
M src/ss7_as.h
M src/tcap_as_loadshare.c
3 files changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran 
refs/changes/84/44084/1

diff --git a/src/ss7_as.c b/src/ss7_as.c
index 8b71359..d000125 100644
--- a/src/ss7_as.c
+++ b/src/ss7_as.c
@@ -142,6 +142,7 @@
        [SS7_AS_CTR_TCAP_DECODE_SUCCESS] = {    "tcap:decode:success",  "Number 
of successful decoded TCAP messages (loadshare-tcap)" },
        [SS7_AS_CTR_TCAP_DECODE_FAILURE] = {    "tcap:decode:failure",  "Number 
of TCAP messages which could not decoded (loadshare-tcap)" },
        [SS7_AS_CTR_TCAP_LOAD_SHARE_SUCCESS] = 
{"tcap:loadshare:success","Successful ASP selection for a TCAP Begin message 
(loadshare-tcap)" },
+       [SS7_AS_CTR_TCAP_LOAD_SHARE_FAILURE] = {"tcap:loadshare:failure","Could 
not find a valid ASP for a TCAP Begin message (loadshare-tcap)" },
        [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)" },
diff --git a/src/ss7_as.h b/src/ss7_as.h
index 4e6b671..f869240 100644
--- a/src/ss7_as.h
+++ b/src/ss7_as.h
@@ -69,6 +69,7 @@
        SS7_AS_CTR_TCAP_DECODE_SUCCESS,
        SS7_AS_CTR_TCAP_DECODE_FAILURE,
        SS7_AS_CTR_TCAP_LOAD_SHARE_SUCCESS,
+       SS7_AS_CTR_TCAP_LOAD_SHARE_FAILURE,
        SS7_AS_CTR_TCAP_ASP_FALLBACK,
        SS7_AS_CTR_TCAP_ASP_FAILED,
        SS7_AS_CTR_TCAP_SESS_MISS,
diff --git a/src/tcap_as_loadshare.c b/src/tcap_as_loadshare.c
index 15512a6..81fae90 100644
--- a/src/tcap_as_loadshare.c
+++ b/src/tcap_as_loadshare.c
@@ -665,6 +665,7 @@
                } else {
                        /* Couldn't find a suitable canditate */
                        LOGPAS(as, DLTCAP, LOGL_DEBUG, "Couldn't find a 
suitable canditate for TCAP Begin otid %u\n", parsed.otid);
+                       rate_ctr_inc2(as->ctrg, 
SS7_AS_CTR_TCAP_LOAD_SHARE_FAILURE);
                        rc = -ENOKEY;
                        goto out_free_sua;
                }

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/44084?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: I04e63bf30742e5e584609337aab11177553b8033
Gerrit-Change-Number: 44084
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis <[email protected]>

Reply via email to