Projects
osmocom:master
open5gs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 523
View file
commit_3d3f18e342fc2d7c3a8e35c575f468077cfd706c.txt
Deleted
View file
commit_6d80d4322a6daf4420c39f2edb1d1d8585a577a0.txt
Added
View file
open5gs_2.7.2.4519.3d3f.dsc -> open5gs_2.7.2.4521.6d80.dsc
Changed
@@ -2,7 +2,7 @@ Source: open5gs Binary: open5gs-common, open5gs-mme, open5gs-sgwc, open5gs-smf, open5gs-amf, open5gs-sgwu, open5gs-upf, open5gs-hss, open5gs-pcrf, open5gs-nrf, open5gs-scp, open5gs-sepp, open5gs-ausf, open5gs-udm, open5gs-pcf, open5gs-nssf, open5gs-bsf, open5gs-udr, open5gs, open5gs-dbg Architecture: any -Version: 2.7.2.4519.3d3f +Version: 2.7.2.4521.6d80 Maintainer: Harald Welte <laforge@gnumonks.org> Uploaders: Sukchan Lee <acetcom@gmail.com> Homepage: https://open5gs.org @@ -32,8 +32,8 @@ open5gs-udr deb net optional arch=any open5gs-upf deb net optional arch=any Checksums-Sha1: - 06b5b4645275169389959531e7e172c044ae7426 14508572 open5gs_2.7.2.4519.3d3f.tar.xz + 5c64934a97cac531899d7d8862b64e400b6c3296 14508400 open5gs_2.7.2.4521.6d80.tar.xz Checksums-Sha256: - 252816c86951828377e3bc0ec98e51e3d345e19c80a5b203280f0b65e5bd5e0b 14508572 open5gs_2.7.2.4519.3d3f.tar.xz + 06c7d6092cb422e36975f5bcbd6cd8a91b0e3c63fc7fe4ed4c01ae561a9eb0e8 14508400 open5gs_2.7.2.4521.6d80.tar.xz Files: - f909b2f18e93dc6a3e764fc812fe0831 14508572 open5gs_2.7.2.4519.3d3f.tar.xz + 82daf15f066e071638224ca0ff390fff 14508400 open5gs_2.7.2.4521.6d80.tar.xz
View file
open5gs_2.7.2.4519.3d3f.tar.xz/.tarball-version -> open5gs_2.7.2.4521.6d80.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.7.2.4519-3d3f +2.7.2.4521-6d80
View file
open5gs_2.7.2.4519.3d3f.tar.xz/debian/changelog -> open5gs_2.7.2.4521.6d80.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -open5gs (2.7.2.4519.3d3f) unstable; urgency=medium +open5gs (2.7.2.4521.6d80) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Thu, 05 Sep 2024 12:35:50 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Thu, 05 Sep 2024 13:49:27 +0000 open5gs (2.7.2) unstable; urgency=medium
View file
open5gs_2.7.2.4519.3d3f.tar.xz/src/pcrf/metrics.c -> open5gs_2.7.2.4521.6d80.tar.xz/src/pcrf/metrics.c
Changed
@@ -1,8 +1,158 @@ +#include "ogs-app.h" +#include "pcrf-context.h" + #include "metrics.h" +typedef struct pcrf_metrics_spec_def_s { + unsigned int type; + const char *name; + const char *description; + int initial_val; + unsigned int num_labels; + const char **labels; +} pcrf_metrics_spec_def_t; + +/* Helper generic functions: */ +static int pcrf_metrics_init_inst(ogs_metrics_inst_t **inst, ogs_metrics_spec_t **specs, + unsigned int len, unsigned int num_labels, const char **labels) +{ + unsigned int i; + for (i = 0; i < len; i++) + insti = ogs_metrics_inst_new(specsi, num_labels, labels); + return OGS_OK; +} + +static int pcrf_metrics_free_inst(ogs_metrics_inst_t **inst, + unsigned int len) +{ + unsigned int i; + for (i = 0; i < len; i++) + ogs_metrics_inst_free(insti); + memset(inst, 0, sizeof(inst0) * len); + return OGS_OK; +} + +static int pcrf_metrics_init_spec(ogs_metrics_context_t *ctx, + ogs_metrics_spec_t **dst, pcrf_metrics_spec_def_t *src, unsigned int len) +{ + unsigned int i; + for (i = 0; i < len; i++) { + dsti = ogs_metrics_spec_new(ctx, srci.type, + srci.name, srci.description, + srci.initial_val, srci.num_labels, srci.labels, + NULL); + } + return OGS_OK; +} + +/* GLOBAL */ +ogs_metrics_spec_t *pcrf_metrics_spec_global_PCRF_METR_GLOB_MAX; +ogs_metrics_inst_t *pcrf_metrics_inst_global_PCRF_METR_GLOB_MAX; +pcrf_metrics_spec_def_t pcrf_metrics_spec_def_global_PCRF_METR_GLOB_MAX = { +/* Global Counters: */ +/* Global Counters: Gx */ +PCRF_METR_GLOB_CTR_Gx_RX_UNKNOWN = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "gx_rx_unknown", + .description = "Received Gx unknown messages", +}, +PCRF_METR_GLOB_CTR_Gx_RX_CCR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "gx_rx_ccr", + .description = "Received Gx CCR messages", +}, +PCRF_METR_GLOB_CTR_Gx_RX_CCR_ERROR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "gx_rx_ccr_error", + .description = "Received Gx CCR messages failed", +}, +PCRF_METR_GLOB_CTR_Gx_RX_RAA = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "gx_rx_raa", + .description = "Received Gx RAA messages", +}, +PCRF_METR_GLOB_CTR_Gx_TX_CCA = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "gx_tx_cca", + .description = "Received Gx RAA messages failed", +}, +PCRF_METR_GLOB_CTR_Gx_TX_RAR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "gx_tx_rar", + .description = "Transmitted Gx RAR messages", +}, +PCRF_METR_GLOB_CTR_Gx_TX_RAR_ERROR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "gx_tx_rar_error", + .description = "Failed to transmit Gx RAR messages", +}, +/* Global Counters: Rx */ +PCRF_METR_GLOB_CTR_Rx_RX_UNKNOWN = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_rx_unknown", + .description = "Received Rx unknown messages", +}, +PCRF_METR_GLOB_CTR_Rx_RX_AAR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_rx_aar", + .description = "Received Rx AAR messages", +}, +PCRF_METR_GLOB_CTR_Rx_RX_AAR_ERROR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_rx_aar_error", + .description = "Received Rx AAR messages failed", +}, +PCRF_METR_GLOB_CTR_Rx_RX_ASA = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_rx_asa", + .description = "Received Rx ASA messages", +}, +PCRF_METR_GLOB_CTR_Rx_RX_STR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_rx_asa_error", + .description = "Received Rx ASA messages failed", +}, +PCRF_METR_GLOB_CTR_Rx_RX_STR_ERROR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_rx_str_error", + .description = "Received Rx STR messages failed", +}, +PCRF_METR_GLOB_CTR_Rx_TX_AAA = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_tx_aaa", + .description = "Transmitted Rx AAA messages", +}, +PCRF_METR_GLOB_CTR_Rx_TX_SAR = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_tx_sar", + .description = "Transmitted Rx SAR messages", +}, +PCRF_METR_GLOB_CTR_Rx_TX_STA = { + .type = OGS_METRICS_METRIC_TYPE_COUNTER, + .name = "rx_tx_sta", + .description = "Transmitted Rx STA messages", +}, +/* Global Gauges: */ +}; +int pcrf_metrics_init_inst_global(void) +{ + return pcrf_metrics_init_inst(pcrf_metrics_inst_global, pcrf_metrics_spec_global, + _PCRF_METR_GLOB_MAX, 0, NULL); +} +int pcrf_metrics_free_inst_global(void) +{ + return pcrf_metrics_free_inst(pcrf_metrics_inst_global, _PCRF_METR_GLOB_MAX); +} + void pcrf_metrics_init(void) { + ogs_metrics_context_t *ctx = ogs_metrics_self(); ogs_metrics_context_init(); + + pcrf_metrics_init_spec(ctx, pcrf_metrics_spec_global, pcrf_metrics_spec_def_global, + _PCRF_METR_GLOB_MAX); + + pcrf_metrics_init_inst_global(); } void pcrf_metrics_final(void)
View file
open5gs_2.7.2.4519.3d3f.tar.xz/src/pcrf/metrics.h -> open5gs_2.7.2.4521.6d80.tar.xz/src/pcrf/metrics.h
Changed
@@ -7,6 +7,42 @@ extern "C" { #endif +/* GLOBAL */ +typedef enum pcrf_metric_type_global_s { + PCRF_METR_GLOB_CTR_Gx_RX_UNKNOWN, + PCRF_METR_GLOB_CTR_Gx_RX_CCR, + PCRF_METR_GLOB_CTR_Gx_RX_CCR_ERROR, + PCRF_METR_GLOB_CTR_Gx_RX_RAA, + PCRF_METR_GLOB_CTR_Gx_TX_CCA, + PCRF_METR_GLOB_CTR_Gx_TX_RAR, + PCRF_METR_GLOB_CTR_Gx_TX_RAR_ERROR, + + PCRF_METR_GLOB_CTR_Rx_RX_UNKNOWN, + PCRF_METR_GLOB_CTR_Rx_RX_AAR, + PCRF_METR_GLOB_CTR_Rx_RX_AAR_ERROR, + PCRF_METR_GLOB_CTR_Rx_RX_ASA, + PCRF_METR_GLOB_CTR_Rx_RX_STR, + PCRF_METR_GLOB_CTR_Rx_RX_STR_ERROR, + PCRF_METR_GLOB_CTR_Rx_TX_AAA, + PCRF_METR_GLOB_CTR_Rx_TX_SAR, + PCRF_METR_GLOB_CTR_Rx_TX_STA, + + _PCRF_METR_GLOB_MAX, +} pcrf_metric_type_global_t; +extern ogs_metrics_inst_t *pcrf_metrics_inst_global_PCRF_METR_GLOB_MAX; + +int pcrf_metrics_init_inst_global(void); +int pcrf_metrics_free_inst_global(void); + +static inline void pcrf_metrics_inst_global_set(pcrf_metric_type_global_t t, int val) +{ ogs_metrics_inst_set(pcrf_metrics_inst_globalt, val); } +static inline void pcrf_metrics_inst_global_add(pcrf_metric_type_global_t t, int val) +{ ogs_metrics_inst_add(pcrf_metrics_inst_globalt, val); } +static inline void pcrf_metrics_inst_global_inc(pcrf_metric_type_global_t t) +{ ogs_metrics_inst_inc(pcrf_metrics_inst_globalt); } +static inline void pcrf_metrics_inst_global_dec(pcrf_metric_type_global_t t) +{ ogs_metrics_inst_dec(pcrf_metrics_inst_globalt); } + void pcrf_metrics_init(void); void pcrf_metrics_final(void);
View file
open5gs_2.7.2.4519.3d3f.tar.xz/src/pcrf/pcrf-context.c -> open5gs_2.7.2.4521.6d80.tar.xz/src/pcrf/pcrf-context.c
Changed
@@ -19,6 +19,7 @@ #include "ogs-dbi.h" #include "pcrf-context.h" +#include "pcrf-fd-path.h" static pcrf_context_t self; static ogs_diam_config_t g_diam_conf; @@ -72,6 +73,7 @@ { self.diam_config->cnf_port = DIAMETER_PORT; self.diam_config->cnf_port_tls = DIAMETER_SECURE_PORT; + self.diam_config->stats.priv_stats_size = sizeof(pcrf_diam_stats_t); return OGS_OK; } @@ -342,6 +344,9 @@ ogs_error("parse_session_conf() failed"); return rv; } + } else if (!strcmp(pcrf_key, "diameter_stats_interval")) { + const char *v = ogs_yaml_iter_value(&pcrf_iter); + if (v) self.diam_config->stats.interval_sec = atoi(v); } else if (!strcmp(pcrf_key, "metrics")) { /* handle config in metrics library */ } else
View file
open5gs_2.7.2.4519.3d3f.tar.xz/src/pcrf/pcrf-context.h -> open5gs_2.7.2.4521.6d80.tar.xz/src/pcrf/pcrf-context.h
Changed
@@ -24,6 +24,7 @@ #include "ogs-diameter-rx.h" #include "ogs-dbi.h" #include "ogs-app.h" +#include "metrics.h" #ifdef __cplusplus extern "C" {
View file
open5gs_2.7.2.4519.3d3f.tar.xz/src/pcrf/pcrf-fd-path.c -> open5gs_2.7.2.4521.6d80.tar.xz/src/pcrf/pcrf-fd-path.c
Changed
@@ -20,6 +20,41 @@ #include "pcrf-context.h" #include "pcrf-fd-path.h" +static pcrf_diam_stats_t prev_st; + +static void pcrf_diam_stats_update_cb(const ogs_diam_stats_t *stats, const void *priv_stats) +{ + const pcrf_diam_stats_t *st = (const pcrf_diam_stats_t *)priv_stats; + + ogs_debug("%s(): Update PCRF diameter metrics", __func__); + + #define METRIC_ADD(metric_name, field) \ + { \ + int diff = st->field - prev_st.field; \ + if (diff > 0) pcrf_metrics_inst_global_add(metric_name, diff); \ + } + + METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_RX_UNKNOWN, gx.rx_unknown); + METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_RX_CCR, gx.rx_ccr); + METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_RX_CCR_ERROR, gx.rx_ccr_error); + METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_RX_RAA, gx.rx_raa); + METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_TX_CCA, gx.tx_cca); + METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_TX_RAR, gx.tx_rar); + METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_TX_RAR_ERROR, gx.tx_rar_error); + + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_UNKNOWN, rx.rx_unknown); + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_AAR, rx.rx_aar); + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_AAR_ERROR, rx.rx_aar_error); + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_ASA, rx.rx_asa); + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_STR, rx.rx_str); + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_STR_ERROR, rx.rx_str_error); + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_TX_AAA, rx.tx_aaa); + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_TX_SAR, rx.tx_sar); + METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_TX_STA, rx.tx_sta); + + memcpy(&prev_st, st, sizeof(*st)); +} + int pcrf_fd_init(void) { int rv; @@ -33,6 +68,8 @@ rv = pcrf_rx_init(); ogs_assert(rv == OGS_OK); + ogs_diam_stats_update_cb_register(pcrf_diam_stats_update_cb); + rv = ogs_diam_start(); ogs_assert(rv == 0);
View file
open5gs_2.7.2.4519.3d3f.tar.xz/src/pcrf/pcrf-fd-path.h -> open5gs_2.7.2.4521.6d80.tar.xz/src/pcrf/pcrf-fd-path.h
Changed
@@ -27,6 +27,36 @@ struct sess_state; typedef struct ogs_diam_rx_message_s ogs_diam_rx_message_t; +typedef struct pcrf_diam_stats_gx_s { + unsigned long long rx_unknown; + unsigned long long rx_ccr; + unsigned long long rx_ccr_error; + unsigned long long rx_raa; + unsigned long long tx_cca; + unsigned long long tx_rar; + unsigned long long tx_rar_error; +} pcrf_diam_stats_gx_t; + +typedef struct pcrf_diam_stats_rx_s { + unsigned long long rx_unknown; + unsigned long long rx_aar; + unsigned long long rx_aar_error; + unsigned long long rx_asa; + unsigned long long rx_str; + unsigned long long rx_str_error; + unsigned long long tx_aaa; + unsigned long long tx_sar; + unsigned long long tx_sta; +} pcrf_diam_stats_rx_t; + +typedef struct pcrf_diam_stats_s { + pcrf_diam_stats_gx_t gx; + pcrf_diam_stats_rx_t rx; +} pcrf_diam_stats_t; + +#define PCRF_DIAM_PRIV_STATS_ADD(field, val) ((pcrf_diam_stats_t *)ogs_diam_stats_self()->priv_stats)->field += val +#define PCRF_DIAM_PRIV_STATS_INC(field) PCRF_DIAM_PRIV_STATS_ADD(field, 1) + int pcrf_fd_init(void); void pcrf_fd_final(void);
View file
open5gs_2.7.2.4519.3d3f.tar.xz/src/pcrf/pcrf-gx-path.c -> open5gs_2.7.2.4521.6d80.tar.xz/src/pcrf/pcrf-gx-path.c
Changed
@@ -214,6 +214,10 @@ /* This CB should never be called */ ogs_warn("Unexpected message received!"); + OGS_DIAM_STATS_MTX( + PCRF_DIAM_PRIV_STATS_INC(gx.rx_unknown); + ) + return ENOTSUP; } @@ -621,9 +625,11 @@ ogs_debug("Tx Credit-Control-Answer"); /* Add this value to the stats */ - ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0); - ogs_diam_stats_self()->stats.nb_echoed++; - ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) ==0); + OGS_DIAM_STATS_MTX( + OGS_DIAM_STATS_INC(nb_echoed); + PCRF_DIAM_PRIV_STATS_INC(gx.rx_ccr); + PCRF_DIAM_PRIV_STATS_INC(gx.tx_cca); + ) OGS_SESSION_DATA_FREE(&gx_message.session_data); @@ -662,6 +668,11 @@ ret = fd_msg_send(msg, NULL, NULL); ogs_assert(ret == 0); + OGS_DIAM_STATS_MTX( + PCRF_DIAM_PRIV_STATS_INC(gx.rx_ccr); + PCRF_DIAM_PRIV_STATS_INC(gx.rx_ccr_error); + ) + OGS_SESSION_DATA_FREE(&gx_message.session_data); return 0; @@ -1013,9 +1024,10 @@ ogs_assert(ret == 0); /* Increment the counter */ - ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0); - ogs_diam_stats_self()->stats.nb_sent++; - ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0); + OGS_DIAM_STATS_MTX( + OGS_DIAM_STATS_INC(nb_sent); + PCRF_DIAM_PRIV_STATS_INC(gx.tx_rar); + ) /* Set no error */ rx_message->result_code = ER_DIAMETER_SUCCESS; @@ -1029,6 +1041,11 @@ ret = fd_sess_state_store(pcrf_gx_reg, session, &sess_data); ogs_assert(sess_data == NULL); + OGS_DIAM_STATS_MTX( + OGS_DIAM_STATS_INC(nb_sent); + PCRF_DIAM_PRIV_STATS_INC(gx.tx_rar_error); + ) + OGS_SESSION_DATA_FREE(&gx_message.session_data); return OGS_ERROR; @@ -1121,30 +1138,31 @@ } /* Free the message */ - ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0); - dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) + - ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); - if (ogs_diam_stats_self()->stats.nb_recv) { - /* Ponderate in the avg */ - ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg * - ogs_diam_stats_self()->stats.nb_recv + dur) / - (ogs_diam_stats_self()->stats.nb_recv + 1); - /* Min, max */ - if (dur < ogs_diam_stats_self()->stats.shortest) + OGS_DIAM_STATS_MTX( + dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) + + ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); + if (ogs_diam_stats_self()->stats.nb_recv) { + /* Ponderate in the avg */ + ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg * + ogs_diam_stats_self()->stats.nb_recv + dur) / + (ogs_diam_stats_self()->stats.nb_recv + 1); + /* Min, max */ + if (dur < ogs_diam_stats_self()->stats.shortest) + ogs_diam_stats_self()->stats.shortest = dur; + if (dur > ogs_diam_stats_self()->stats.longest) + ogs_diam_stats_self()->stats.longest = dur; + } else { ogs_diam_stats_self()->stats.shortest = dur; - if (dur > ogs_diam_stats_self()->stats.longest) ogs_diam_stats_self()->stats.longest = dur; - } else { - ogs_diam_stats_self()->stats.shortest = dur; - ogs_diam_stats_self()->stats.longest = dur; - ogs_diam_stats_self()->stats.avg = dur; - } - if (error) - ogs_diam_stats_self()->stats.nb_errs++; - else - ogs_diam_stats_self()->stats.nb_recv++; + ogs_diam_stats_self()->stats.avg = dur; + } + if (error) + ogs_diam_stats_self()->stats.nb_errs++; + else + ogs_diam_stats_self()->stats.nb_recv++; - ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0); + PCRF_DIAM_PRIV_STATS_INC(gx.rx_raa); + ) /* Display how long it took */ if (ts.tv_nsec > sess_data->ts.tv_nsec)
View file
open5gs_2.7.2.4519.3d3f.tar.xz/src/pcrf/pcrf-rx-path.c -> open5gs_2.7.2.4521.6d80.tar.xz/src/pcrf/pcrf-rx-path.c
Changed
@@ -97,6 +97,10 @@ /* This CB should never be called */ ogs_warn("Unexpected message received!"); + OGS_DIAM_STATS_MTX( + PCRF_DIAM_PRIV_STATS_INC(rx.rx_unknown); + ) + return ENOTSUP; } @@ -413,9 +417,11 @@ ogs_debug("PCRF Tx AA-Answer"); /* Add this value to the stats */ - ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0); - ogs_diam_stats_self()->stats.nb_echoed++; - ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0); + OGS_DIAM_STATS_MTX( + OGS_DIAM_STATS_INC(nb_echoed); + PCRF_DIAM_PRIV_STATS_INC(rx.rx_aar); + PCRF_DIAM_PRIV_STATS_INC(rx.tx_aaa); + ) ogs_ims_data_free(&rx_message.ims_data); @@ -442,6 +448,11 @@ ret = fd_msg_send(msg, NULL, NULL); ogs_assert(ret == 0); + OGS_DIAM_STATS_MTX( + PCRF_DIAM_PRIV_STATS_INC(rx.rx_aar); + PCRF_DIAM_PRIV_STATS_INC(rx.rx_aar_error); + ) + state_cleanup(sess_data, NULL, NULL); ogs_ims_data_free(&rx_message.ims_data); @@ -561,9 +572,10 @@ ogs_assert(ret == 0); /* Increment the counter */ - ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0); - ogs_diam_stats_self()->stats.nb_sent++; - ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0); + OGS_DIAM_STATS_MTX( + OGS_DIAM_STATS_INC(nb_sent); + PCRF_DIAM_PRIV_STATS_INC(rx.tx_sar); + ) return OGS_OK; } @@ -639,6 +651,10 @@ ogs_error("ERROR DIAMETER Result Code(%d)", result_code); } + OGS_DIAM_STATS_MTX( + PCRF_DIAM_PRIV_STATS_INC(rx.rx_asa); + ) + ret = fd_msg_free(*msg); ogs_assert(ret == 0); *msg = NULL; @@ -746,9 +762,11 @@ ogs_debug("PCRF Tx Session-Termination-Answer"); /* Add this value to the stats */ - ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0); - ogs_diam_stats_self()->stats.nb_echoed++; - ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0); + OGS_DIAM_STATS_MTX( + OGS_DIAM_STATS_INC(nb_echoed); + PCRF_DIAM_PRIV_STATS_INC(rx.rx_str); + PCRF_DIAM_PRIV_STATS_INC(rx.tx_sta); + ) state_cleanup(sess_data, NULL, NULL); ogs_ims_data_free(&rx_message.ims_data); @@ -778,6 +796,12 @@ ogs_assert(ret == 0); ogs_debug("PCRF Tx Session-Termination-Answer"); + OGS_DIAM_STATS_MTX( + PCRF_DIAM_PRIV_STATS_INC(rx.rx_str); + PCRF_DIAM_PRIV_STATS_INC(rx.rx_str_error); + PCRF_DIAM_PRIV_STATS_INC(rx.tx_sta); + ) + if (sess_data) state_cleanup(sess_data, NULL, NULL); ogs_ims_data_free(&rx_message.ims_data);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.