Changes of Revision 523
commit_3d3f18e342fc2d7c3a8e35c575f468077cfd706c.txt
Deleted
commit_6d80d4322a6daf4420c39f2edb1d1d8585a577a0.txt
Added
open5gs_2.7.2.4519.3d3f.dsc -> open5gs_2.7.2.4521.6d80.dsc
Changed
x
1
2
Source: open5gs
3
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
4
Architecture: any
5
-Version: 2.7.2.4519.3d3f
6
+Version: 2.7.2.4521.6d80
7
Maintainer: Harald Welte <laforge@gnumonks.org>
8
Uploaders: Sukchan Lee <acetcom@gmail.com>
9
Homepage: https://open5gs.org
10
11
open5gs-udr deb net optional arch=any
12
open5gs-upf deb net optional arch=any
13
Checksums-Sha1:
14
- 06b5b4645275169389959531e7e172c044ae7426 14508572 open5gs_2.7.2.4519.3d3f.tar.xz
15
+ 5c64934a97cac531899d7d8862b64e400b6c3296 14508400 open5gs_2.7.2.4521.6d80.tar.xz
16
Checksums-Sha256:
17
- 252816c86951828377e3bc0ec98e51e3d345e19c80a5b203280f0b65e5bd5e0b 14508572 open5gs_2.7.2.4519.3d3f.tar.xz
18
+ 06c7d6092cb422e36975f5bcbd6cd8a91b0e3c63fc7fe4ed4c01ae561a9eb0e8 14508400 open5gs_2.7.2.4521.6d80.tar.xz
19
Files:
20
- f909b2f18e93dc6a3e764fc812fe0831 14508572 open5gs_2.7.2.4519.3d3f.tar.xz
21
+ 82daf15f066e071638224ca0ff390fff 14508400 open5gs_2.7.2.4521.6d80.tar.xz
22
open5gs_2.7.2.4519.3d3f.tar.xz/.tarball-version -> open5gs_2.7.2.4521.6d80.tar.xz/.tarball-version
Changed
4
1
2
-2.7.2.4519-3d3f
3
+2.7.2.4521-6d80
4
open5gs_2.7.2.4519.3d3f.tar.xz/debian/changelog -> open5gs_2.7.2.4521.6d80.tar.xz/debian/changelog
Changed
12
1
2
-open5gs (2.7.2.4519.3d3f) unstable; urgency=medium
3
+open5gs (2.7.2.4521.6d80) unstable; urgency=medium
4
5
* Automatically generated changelog entry for building the Osmocom master feed
6
7
- -- Osmocom OBS scripts <info@osmocom.org> Thu, 05 Sep 2024 12:35:50 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org> Thu, 05 Sep 2024 13:49:27 +0000
9
10
open5gs (2.7.2) unstable; urgency=medium
11
12
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
160
1
2
+#include "ogs-app.h"
3
+#include "pcrf-context.h"
4
+
5
#include "metrics.h"
6
7
+typedef struct pcrf_metrics_spec_def_s {
8
+ unsigned int type;
9
+ const char *name;
10
+ const char *description;
11
+ int initial_val;
12
+ unsigned int num_labels;
13
+ const char **labels;
14
+} pcrf_metrics_spec_def_t;
15
+
16
+/* Helper generic functions: */
17
+static int pcrf_metrics_init_inst(ogs_metrics_inst_t **inst, ogs_metrics_spec_t **specs,
18
+ unsigned int len, unsigned int num_labels, const char **labels)
19
+{
20
+ unsigned int i;
21
+ for (i = 0; i < len; i++)
22
+ insti = ogs_metrics_inst_new(specsi, num_labels, labels);
23
+ return OGS_OK;
24
+}
25
+
26
+static int pcrf_metrics_free_inst(ogs_metrics_inst_t **inst,
27
+ unsigned int len)
28
+{
29
+ unsigned int i;
30
+ for (i = 0; i < len; i++)
31
+ ogs_metrics_inst_free(insti);
32
+ memset(inst, 0, sizeof(inst0) * len);
33
+ return OGS_OK;
34
+}
35
+
36
+static int pcrf_metrics_init_spec(ogs_metrics_context_t *ctx,
37
+ ogs_metrics_spec_t **dst, pcrf_metrics_spec_def_t *src, unsigned int len)
38
+{
39
+ unsigned int i;
40
+ for (i = 0; i < len; i++) {
41
+ dsti = ogs_metrics_spec_new(ctx, srci.type,
42
+ srci.name, srci.description,
43
+ srci.initial_val, srci.num_labels, srci.labels,
44
+ NULL);
45
+ }
46
+ return OGS_OK;
47
+}
48
+
49
+/* GLOBAL */
50
+ogs_metrics_spec_t *pcrf_metrics_spec_global_PCRF_METR_GLOB_MAX;
51
+ogs_metrics_inst_t *pcrf_metrics_inst_global_PCRF_METR_GLOB_MAX;
52
+pcrf_metrics_spec_def_t pcrf_metrics_spec_def_global_PCRF_METR_GLOB_MAX = {
53
+/* Global Counters: */
54
+/* Global Counters: Gx */
55
+PCRF_METR_GLOB_CTR_Gx_RX_UNKNOWN = {
56
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
57
+ .name = "gx_rx_unknown",
58
+ .description = "Received Gx unknown messages",
59
+},
60
+PCRF_METR_GLOB_CTR_Gx_RX_CCR = {
61
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
62
+ .name = "gx_rx_ccr",
63
+ .description = "Received Gx CCR messages",
64
+},
65
+PCRF_METR_GLOB_CTR_Gx_RX_CCR_ERROR = {
66
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
67
+ .name = "gx_rx_ccr_error",
68
+ .description = "Received Gx CCR messages failed",
69
+},
70
+PCRF_METR_GLOB_CTR_Gx_RX_RAA = {
71
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
72
+ .name = "gx_rx_raa",
73
+ .description = "Received Gx RAA messages",
74
+},
75
+PCRF_METR_GLOB_CTR_Gx_TX_CCA = {
76
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
77
+ .name = "gx_tx_cca",
78
+ .description = "Received Gx RAA messages failed",
79
+},
80
+PCRF_METR_GLOB_CTR_Gx_TX_RAR = {
81
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
82
+ .name = "gx_tx_rar",
83
+ .description = "Transmitted Gx RAR messages",
84
+},
85
+PCRF_METR_GLOB_CTR_Gx_TX_RAR_ERROR = {
86
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
87
+ .name = "gx_tx_rar_error",
88
+ .description = "Failed to transmit Gx RAR messages",
89
+},
90
+/* Global Counters: Rx */
91
+PCRF_METR_GLOB_CTR_Rx_RX_UNKNOWN = {
92
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
93
+ .name = "rx_rx_unknown",
94
+ .description = "Received Rx unknown messages",
95
+},
96
+PCRF_METR_GLOB_CTR_Rx_RX_AAR = {
97
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
98
+ .name = "rx_rx_aar",
99
+ .description = "Received Rx AAR messages",
100
+},
101
+PCRF_METR_GLOB_CTR_Rx_RX_AAR_ERROR = {
102
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
103
+ .name = "rx_rx_aar_error",
104
+ .description = "Received Rx AAR messages failed",
105
+},
106
+PCRF_METR_GLOB_CTR_Rx_RX_ASA = {
107
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
108
+ .name = "rx_rx_asa",
109
+ .description = "Received Rx ASA messages",
110
+},
111
+PCRF_METR_GLOB_CTR_Rx_RX_STR = {
112
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
113
+ .name = "rx_rx_asa_error",
114
+ .description = "Received Rx ASA messages failed",
115
+},
116
+PCRF_METR_GLOB_CTR_Rx_RX_STR_ERROR = {
117
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
118
+ .name = "rx_rx_str_error",
119
+ .description = "Received Rx STR messages failed",
120
+},
121
+PCRF_METR_GLOB_CTR_Rx_TX_AAA = {
122
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
123
+ .name = "rx_tx_aaa",
124
+ .description = "Transmitted Rx AAA messages",
125
+},
126
+PCRF_METR_GLOB_CTR_Rx_TX_SAR = {
127
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
128
+ .name = "rx_tx_sar",
129
+ .description = "Transmitted Rx SAR messages",
130
+},
131
+PCRF_METR_GLOB_CTR_Rx_TX_STA = {
132
+ .type = OGS_METRICS_METRIC_TYPE_COUNTER,
133
+ .name = "rx_tx_sta",
134
+ .description = "Transmitted Rx STA messages",
135
+},
136
+/* Global Gauges: */
137
+};
138
+int pcrf_metrics_init_inst_global(void)
139
+{
140
+ return pcrf_metrics_init_inst(pcrf_metrics_inst_global, pcrf_metrics_spec_global,
141
+ _PCRF_METR_GLOB_MAX, 0, NULL);
142
+}
143
+int pcrf_metrics_free_inst_global(void)
144
+{
145
+ return pcrf_metrics_free_inst(pcrf_metrics_inst_global, _PCRF_METR_GLOB_MAX);
146
+}
147
+
148
void pcrf_metrics_init(void)
149
{
150
+ ogs_metrics_context_t *ctx = ogs_metrics_self();
151
ogs_metrics_context_init();
152
+
153
+ pcrf_metrics_init_spec(ctx, pcrf_metrics_spec_global, pcrf_metrics_spec_def_global,
154
+ _PCRF_METR_GLOB_MAX);
155
+
156
+ pcrf_metrics_init_inst_global();
157
}
158
159
void pcrf_metrics_final(void)
160
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
44
1
2
extern "C" {
3
#endif
4
5
+/* GLOBAL */
6
+typedef enum pcrf_metric_type_global_s {
7
+ PCRF_METR_GLOB_CTR_Gx_RX_UNKNOWN,
8
+ PCRF_METR_GLOB_CTR_Gx_RX_CCR,
9
+ PCRF_METR_GLOB_CTR_Gx_RX_CCR_ERROR,
10
+ PCRF_METR_GLOB_CTR_Gx_RX_RAA,
11
+ PCRF_METR_GLOB_CTR_Gx_TX_CCA,
12
+ PCRF_METR_GLOB_CTR_Gx_TX_RAR,
13
+ PCRF_METR_GLOB_CTR_Gx_TX_RAR_ERROR,
14
+
15
+ PCRF_METR_GLOB_CTR_Rx_RX_UNKNOWN,
16
+ PCRF_METR_GLOB_CTR_Rx_RX_AAR,
17
+ PCRF_METR_GLOB_CTR_Rx_RX_AAR_ERROR,
18
+ PCRF_METR_GLOB_CTR_Rx_RX_ASA,
19
+ PCRF_METR_GLOB_CTR_Rx_RX_STR,
20
+ PCRF_METR_GLOB_CTR_Rx_RX_STR_ERROR,
21
+ PCRF_METR_GLOB_CTR_Rx_TX_AAA,
22
+ PCRF_METR_GLOB_CTR_Rx_TX_SAR,
23
+ PCRF_METR_GLOB_CTR_Rx_TX_STA,
24
+
25
+ _PCRF_METR_GLOB_MAX,
26
+} pcrf_metric_type_global_t;
27
+extern ogs_metrics_inst_t *pcrf_metrics_inst_global_PCRF_METR_GLOB_MAX;
28
+
29
+int pcrf_metrics_init_inst_global(void);
30
+int pcrf_metrics_free_inst_global(void);
31
+
32
+static inline void pcrf_metrics_inst_global_set(pcrf_metric_type_global_t t, int val)
33
+{ ogs_metrics_inst_set(pcrf_metrics_inst_globalt, val); }
34
+static inline void pcrf_metrics_inst_global_add(pcrf_metric_type_global_t t, int val)
35
+{ ogs_metrics_inst_add(pcrf_metrics_inst_globalt, val); }
36
+static inline void pcrf_metrics_inst_global_inc(pcrf_metric_type_global_t t)
37
+{ ogs_metrics_inst_inc(pcrf_metrics_inst_globalt); }
38
+static inline void pcrf_metrics_inst_global_dec(pcrf_metric_type_global_t t)
39
+{ ogs_metrics_inst_dec(pcrf_metrics_inst_globalt); }
40
+
41
void pcrf_metrics_init(void);
42
void pcrf_metrics_final(void);
43
44
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
27
1
2
3
#include "ogs-dbi.h"
4
#include "pcrf-context.h"
5
+#include "pcrf-fd-path.h"
6
7
static pcrf_context_t self;
8
static ogs_diam_config_t g_diam_conf;
9
10
{
11
self.diam_config->cnf_port = DIAMETER_PORT;
12
self.diam_config->cnf_port_tls = DIAMETER_SECURE_PORT;
13
+ self.diam_config->stats.priv_stats_size = sizeof(pcrf_diam_stats_t);
14
15
return OGS_OK;
16
}
17
18
ogs_error("parse_session_conf() failed");
19
return rv;
20
}
21
+ } else if (!strcmp(pcrf_key, "diameter_stats_interval")) {
22
+ const char *v = ogs_yaml_iter_value(&pcrf_iter);
23
+ if (v) self.diam_config->stats.interval_sec = atoi(v);
24
} else if (!strcmp(pcrf_key, "metrics")) {
25
/* handle config in metrics library */
26
} else
27
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
9
1
2
#include "ogs-diameter-rx.h"
3
#include "ogs-dbi.h"
4
#include "ogs-app.h"
5
+#include "metrics.h"
6
7
#ifdef __cplusplus
8
extern "C" {
9
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
52
1
2
#include "pcrf-context.h"
3
#include "pcrf-fd-path.h"
4
5
+static pcrf_diam_stats_t prev_st;
6
+
7
+static void pcrf_diam_stats_update_cb(const ogs_diam_stats_t *stats, const void *priv_stats)
8
+{
9
+ const pcrf_diam_stats_t *st = (const pcrf_diam_stats_t *)priv_stats;
10
+
11
+ ogs_debug("%s(): Update PCRF diameter metrics", __func__);
12
+
13
+ #define METRIC_ADD(metric_name, field) \
14
+ { \
15
+ int diff = st->field - prev_st.field; \
16
+ if (diff > 0) pcrf_metrics_inst_global_add(metric_name, diff); \
17
+ }
18
+
19
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_RX_UNKNOWN, gx.rx_unknown);
20
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_RX_CCR, gx.rx_ccr);
21
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_RX_CCR_ERROR, gx.rx_ccr_error);
22
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_RX_RAA, gx.rx_raa);
23
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_TX_CCA, gx.tx_cca);
24
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_TX_RAR, gx.tx_rar);
25
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Gx_TX_RAR_ERROR, gx.tx_rar_error);
26
+
27
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_UNKNOWN, rx.rx_unknown);
28
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_AAR, rx.rx_aar);
29
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_AAR_ERROR, rx.rx_aar_error);
30
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_ASA, rx.rx_asa);
31
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_STR, rx.rx_str);
32
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_RX_STR_ERROR, rx.rx_str_error);
33
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_TX_AAA, rx.tx_aaa);
34
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_TX_SAR, rx.tx_sar);
35
+ METRIC_ADD(PCRF_METR_GLOB_CTR_Rx_TX_STA, rx.tx_sta);
36
+
37
+ memcpy(&prev_st, st, sizeof(*st));
38
+}
39
+
40
int pcrf_fd_init(void)
41
{
42
int rv;
43
44
rv = pcrf_rx_init();
45
ogs_assert(rv == OGS_OK);
46
47
+ ogs_diam_stats_update_cb_register(pcrf_diam_stats_update_cb);
48
+
49
rv = ogs_diam_start();
50
ogs_assert(rv == 0);
51
52
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
38
1
2
struct sess_state;
3
typedef struct ogs_diam_rx_message_s ogs_diam_rx_message_t;
4
5
+typedef struct pcrf_diam_stats_gx_s {
6
+ unsigned long long rx_unknown;
7
+ unsigned long long rx_ccr;
8
+ unsigned long long rx_ccr_error;
9
+ unsigned long long rx_raa;
10
+ unsigned long long tx_cca;
11
+ unsigned long long tx_rar;
12
+ unsigned long long tx_rar_error;
13
+} pcrf_diam_stats_gx_t;
14
+
15
+typedef struct pcrf_diam_stats_rx_s {
16
+ unsigned long long rx_unknown;
17
+ unsigned long long rx_aar;
18
+ unsigned long long rx_aar_error;
19
+ unsigned long long rx_asa;
20
+ unsigned long long rx_str;
21
+ unsigned long long rx_str_error;
22
+ unsigned long long tx_aaa;
23
+ unsigned long long tx_sar;
24
+ unsigned long long tx_sta;
25
+} pcrf_diam_stats_rx_t;
26
+
27
+typedef struct pcrf_diam_stats_s {
28
+ pcrf_diam_stats_gx_t gx;
29
+ pcrf_diam_stats_rx_t rx;
30
+} pcrf_diam_stats_t;
31
+
32
+#define PCRF_DIAM_PRIV_STATS_ADD(field, val) ((pcrf_diam_stats_t *)ogs_diam_stats_self()->priv_stats)->field += val
33
+#define PCRF_DIAM_PRIV_STATS_INC(field) PCRF_DIAM_PRIV_STATS_ADD(field, 1)
34
+
35
int pcrf_fd_init(void);
36
void pcrf_fd_final(void);
37
38
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
118
1
2
/* This CB should never be called */
3
ogs_warn("Unexpected message received!");
4
5
+ OGS_DIAM_STATS_MTX(
6
+ PCRF_DIAM_PRIV_STATS_INC(gx.rx_unknown);
7
+ )
8
+
9
return ENOTSUP;
10
}
11
12
13
ogs_debug("Tx Credit-Control-Answer");
14
15
/* Add this value to the stats */
16
- ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
17
- ogs_diam_stats_self()->stats.nb_echoed++;
18
- ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) ==0);
19
+ OGS_DIAM_STATS_MTX(
20
+ OGS_DIAM_STATS_INC(nb_echoed);
21
+ PCRF_DIAM_PRIV_STATS_INC(gx.rx_ccr);
22
+ PCRF_DIAM_PRIV_STATS_INC(gx.tx_cca);
23
+ )
24
25
OGS_SESSION_DATA_FREE(&gx_message.session_data);
26
27
28
ret = fd_msg_send(msg, NULL, NULL);
29
ogs_assert(ret == 0);
30
31
+ OGS_DIAM_STATS_MTX(
32
+ PCRF_DIAM_PRIV_STATS_INC(gx.rx_ccr);
33
+ PCRF_DIAM_PRIV_STATS_INC(gx.rx_ccr_error);
34
+ )
35
+
36
OGS_SESSION_DATA_FREE(&gx_message.session_data);
37
38
return 0;
39
40
ogs_assert(ret == 0);
41
42
/* Increment the counter */
43
- ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
44
- ogs_diam_stats_self()->stats.nb_sent++;
45
- ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
46
+ OGS_DIAM_STATS_MTX(
47
+ OGS_DIAM_STATS_INC(nb_sent);
48
+ PCRF_DIAM_PRIV_STATS_INC(gx.tx_rar);
49
+ )
50
51
/* Set no error */
52
rx_message->result_code = ER_DIAMETER_SUCCESS;
53
54
ret = fd_sess_state_store(pcrf_gx_reg, session, &sess_data);
55
ogs_assert(sess_data == NULL);
56
57
+ OGS_DIAM_STATS_MTX(
58
+ OGS_DIAM_STATS_INC(nb_sent);
59
+ PCRF_DIAM_PRIV_STATS_INC(gx.tx_rar_error);
60
+ )
61
+
62
OGS_SESSION_DATA_FREE(&gx_message.session_data);
63
64
return OGS_ERROR;
65
66
}
67
68
/* Free the message */
69
- ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
70
- dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
71
- ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
72
- if (ogs_diam_stats_self()->stats.nb_recv) {
73
- /* Ponderate in the avg */
74
- ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
75
- ogs_diam_stats_self()->stats.nb_recv + dur) /
76
- (ogs_diam_stats_self()->stats.nb_recv + 1);
77
- /* Min, max */
78
- if (dur < ogs_diam_stats_self()->stats.shortest)
79
+ OGS_DIAM_STATS_MTX(
80
+ dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) +
81
+ ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000);
82
+ if (ogs_diam_stats_self()->stats.nb_recv) {
83
+ /* Ponderate in the avg */
84
+ ogs_diam_stats_self()->stats.avg = (ogs_diam_stats_self()->stats.avg *
85
+ ogs_diam_stats_self()->stats.nb_recv + dur) /
86
+ (ogs_diam_stats_self()->stats.nb_recv + 1);
87
+ /* Min, max */
88
+ if (dur < ogs_diam_stats_self()->stats.shortest)
89
+ ogs_diam_stats_self()->stats.shortest = dur;
90
+ if (dur > ogs_diam_stats_self()->stats.longest)
91
+ ogs_diam_stats_self()->stats.longest = dur;
92
+ } else {
93
ogs_diam_stats_self()->stats.shortest = dur;
94
- if (dur > ogs_diam_stats_self()->stats.longest)
95
ogs_diam_stats_self()->stats.longest = dur;
96
- } else {
97
- ogs_diam_stats_self()->stats.shortest = dur;
98
- ogs_diam_stats_self()->stats.longest = dur;
99
- ogs_diam_stats_self()->stats.avg = dur;
100
- }
101
- if (error)
102
- ogs_diam_stats_self()->stats.nb_errs++;
103
- else
104
- ogs_diam_stats_self()->stats.nb_recv++;
105
+ ogs_diam_stats_self()->stats.avg = dur;
106
+ }
107
+ if (error)
108
+ ogs_diam_stats_self()->stats.nb_errs++;
109
+ else
110
+ ogs_diam_stats_self()->stats.nb_recv++;
111
112
- ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
113
+ PCRF_DIAM_PRIV_STATS_INC(gx.rx_raa);
114
+ )
115
116
/* Display how long it took */
117
if (ts.tv_nsec > sess_data->ts.tv_nsec)
118
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
92
1
2
/* This CB should never be called */
3
ogs_warn("Unexpected message received!");
4
5
+ OGS_DIAM_STATS_MTX(
6
+ PCRF_DIAM_PRIV_STATS_INC(rx.rx_unknown);
7
+ )
8
+
9
return ENOTSUP;
10
}
11
12
13
ogs_debug("PCRF Tx AA-Answer");
14
15
/* Add this value to the stats */
16
- ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
17
- ogs_diam_stats_self()->stats.nb_echoed++;
18
- ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
19
+ OGS_DIAM_STATS_MTX(
20
+ OGS_DIAM_STATS_INC(nb_echoed);
21
+ PCRF_DIAM_PRIV_STATS_INC(rx.rx_aar);
22
+ PCRF_DIAM_PRIV_STATS_INC(rx.tx_aaa);
23
+ )
24
25
ogs_ims_data_free(&rx_message.ims_data);
26
27
28
ret = fd_msg_send(msg, NULL, NULL);
29
ogs_assert(ret == 0);
30
31
+ OGS_DIAM_STATS_MTX(
32
+ PCRF_DIAM_PRIV_STATS_INC(rx.rx_aar);
33
+ PCRF_DIAM_PRIV_STATS_INC(rx.rx_aar_error);
34
+ )
35
+
36
state_cleanup(sess_data, NULL, NULL);
37
ogs_ims_data_free(&rx_message.ims_data);
38
39
40
ogs_assert(ret == 0);
41
42
/* Increment the counter */
43
- ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
44
- ogs_diam_stats_self()->stats.nb_sent++;
45
- ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
46
+ OGS_DIAM_STATS_MTX(
47
+ OGS_DIAM_STATS_INC(nb_sent);
48
+ PCRF_DIAM_PRIV_STATS_INC(rx.tx_sar);
49
+ )
50
51
return OGS_OK;
52
}
53
54
ogs_error("ERROR DIAMETER Result Code(%d)", result_code);
55
}
56
57
+ OGS_DIAM_STATS_MTX(
58
+ PCRF_DIAM_PRIV_STATS_INC(rx.rx_asa);
59
+ )
60
+
61
ret = fd_msg_free(*msg);
62
ogs_assert(ret == 0);
63
*msg = NULL;
64
65
ogs_debug("PCRF Tx Session-Termination-Answer");
66
67
/* Add this value to the stats */
68
- ogs_assert(pthread_mutex_lock(&ogs_diam_stats_self()->stats_lock) == 0);
69
- ogs_diam_stats_self()->stats.nb_echoed++;
70
- ogs_assert(pthread_mutex_unlock(&ogs_diam_stats_self()->stats_lock) == 0);
71
+ OGS_DIAM_STATS_MTX(
72
+ OGS_DIAM_STATS_INC(nb_echoed);
73
+ PCRF_DIAM_PRIV_STATS_INC(rx.rx_str);
74
+ PCRF_DIAM_PRIV_STATS_INC(rx.tx_sta);
75
+ )
76
77
state_cleanup(sess_data, NULL, NULL);
78
ogs_ims_data_free(&rx_message.ims_data);
79
80
ogs_assert(ret == 0);
81
ogs_debug("PCRF Tx Session-Termination-Answer");
82
83
+ OGS_DIAM_STATS_MTX(
84
+ PCRF_DIAM_PRIV_STATS_INC(rx.rx_str);
85
+ PCRF_DIAM_PRIV_STATS_INC(rx.rx_str_error);
86
+ PCRF_DIAM_PRIV_STATS_INC(rx.tx_sta);
87
+ )
88
+
89
if (sess_data)
90
state_cleanup(sess_data, NULL, NULL);
91
ogs_ims_data_free(&rx_message.ims_data);
92