Skip to content

Commit

Permalink
[CENNSO-1768] feat: session reports sent counter (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
demo-exe authored Feb 22, 2024
1 parent 8d16074 commit 2740f75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions upf/upf.h
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,9 @@ typedef enum
UPF_PFCP_SESSION_REPORT_RESPONSE_OK = 54,
UPF_PFCP_SESSION_REPORT_RESPONSE_ERROR = 55,

UPF_N_COUNTERS = 56,
UPF_SESSION_REPORTS_GENERATED = 56,

UPF_N_COUNTERS = 57,
} upf_counters_type_t;

/* clang-format off */
Expand Down Expand Up @@ -628,7 +630,8 @@ typedef enum
_ (PFCP_SESSION_REPORT_REQUEST_OK, pfcp_session_report_request_ok, upf) \
_ (PFCP_SESSION_REPORT_REQUEST_ERROR, pfcp_session_report_request_error, upf) \
_ (PFCP_SESSION_REPORT_RESPONSE_OK, pfcp_session_report_response_ok, upf) \
_ (PFCP_SESSION_REPORT_RESPONSE_ERROR, pfcp_session_report_response_error, upf)
_ (PFCP_SESSION_REPORT_RESPONSE_ERROR, pfcp_session_report_response_error, upf) \
_ (SESSION_REPORTS_GENERATED, session_reports_generated, upf)
/* clang-format on */

/* TODO: measure if more optimize cache line aware layout
Expand Down
1 change: 1 addition & 0 deletions upf/upf_pfcp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -2483,6 +2483,7 @@ upf_usage_report_build (upf_session_t *sx, ip46_address_t *ue, upf_urr_t *urr,
now, usage_report);
}
}
upf_increment_counter (UPF_SESSION_REPORTS_GENERATED, 0, 1);
}

static int
Expand Down

0 comments on commit 2740f75

Please sign in to comment.