lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2024

  • 1 participants
  • 1983 discussions
[M] Change in osmo-msc[master]: silent-call: add CSD channel modes
by fixeria 28 Sep '24

28 Sep '24
Attention is currently required from: fixeria. Hello Jenkins Builder, falconia, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/38311?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: silent-call: add CSD channel modes ...................................................................... silent-call: add CSD channel modes This is useful for BER testing and figuring out if the baseband supports the requested channel mode, e.g. half-rate data calls. Going below 2.4k (0.6k, 1.2k, 1.2k_75) makes no sense, because: * these rates are carried by TCH/[FH]2.4 channels anyway, and * we never tell the user data rate to the MS (part of CC SETUP) The same applies to transparent vs non-transparent channel modes, but let's add non-transparent variants anyway, just in case the BTS PHY does not support transparent modes. Change-Id: Ife83f5bcb2b68a228a014f47c7cbb21660290593 --- M src/libmsc/msc_vty.c 1 file changed, 65 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/11/38311/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38311?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ife83f5bcb2b68a228a014f47c7cbb21660290593 Gerrit-Change-Number: 38311 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-msc[master]: silent-call: add CSD channel modes
by falconia 28 Sep '24

28 Sep '24
Attention is currently required from: fixeria. falconia has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-msc/+/38311?usp=email ) Change subject: silent-call: add CSD channel modes ...................................................................... Patch Set 1: (1 comment) File src/libmsc/msc_vty.c: https://gerrit.osmocom.org/c/osmo-msc/+/38311/comment/a7465c18_c5be4af7?usp… : PS1, Line 1596: ct.ch_rate_type = sign ? GSM0808_SPEECH_FULL_PREF : GSM0808_SIGN_ANY; It looks like you forgot to reverse the order of `GSM0808_SPEECH_FULL_PREF` and `GSM0808_SIGN_ANY` when inverting the sense from `speech` to `sign`. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38311?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ife83f5bcb2b68a228a014f47c7cbb21660290593 Gerrit-Change-Number: 38311 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 28 Sep 2024 14:40:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[L] Change in libosmo-abis[master]: libosmotrau: implement RAA' encoder function
by falconia 28 Sep '24

28 Sep '24
Attention is currently required from: fixeria, laforge, pespin. falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38292?usp=email ) Change subject: libosmotrau: implement RAA' encoder function ...................................................................... Patch Set 4: (1 comment) File include/Makefile.am: https://gerrit.osmocom.org/c/libosmo-abis/+/38292/comment/eb25dfce_291faebc… : PS4, Line 8: raa_prime > Maybe prefix header name with `csd_` for consistency with `csd_ra2.h`, i.e. […] Before I spin yet another patch revision and invalidate everyone's votes, let's ask the other reviewers how they feel about header file naming: should it remain `raa_prime.h`, or should it be renamed to `csd_raa_prime.h`? How did this inconsistency come about in the first place? I originally had just the two patches for RAA-prime, but then I saw myself replicating RA2 code in the third place (after Vadim's original implementation in OsmoBTS and my first replication in below-14.4 trau_rtp_conv functions), hence I decided to create `csd_ra2` layer as a prepatch. -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38292?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I11fc1529f5be88fa778c7e05cb11eef58a389d40 Gerrit-Change-Number: 38292 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 28 Sep 2024 14:27:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[L] Change in libosmo-abis[master]: libosmotrau: implement RAA' decoder function
by fixeria 28 Sep '24

28 Sep '24
Attention is currently required from: falconia. fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38293?usp=email ) Change subject: libosmotrau: implement RAA' decoder function ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38293?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I1347a25ce97d5022502ee9112caded66315b09a4 Gerrit-Change-Number: 38293 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Sat, 28 Sep 2024 11:42:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in libosmo-abis[master]: libosmotrau: implement RAA' encoder function
by fixeria 28 Sep '24

28 Sep '24
Attention is currently required from: falconia. fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38292?usp=email ) Change subject: libosmotrau: implement RAA' encoder function ...................................................................... Patch Set 4: Code-Review+2 (1 comment) File include/Makefile.am: https://gerrit.osmocom.org/c/libosmo-abis/+/38292/comment/24cf5bbf_52a0c19e… : PS4, Line 8: raa_prime Maybe prefix header name with `csd_` for consistency with `csd_ra2.h`, i.e. `csd_raa_prime`? -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38292?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I11fc1529f5be88fa778c7e05cb11eef58a389d40 Gerrit-Change-Number: 38292 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Sat, 28 Sep 2024 11:40:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-abis[master]: trau_rtp_conv: use new RA2 functions for CSD
by fixeria 28 Sep '24

28 Sep '24
Attention is currently required from: falconia. fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38291?usp=email ) Change subject: trau_rtp_conv: use new RA2 functions for CSD ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38291?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ia157989579ced866b1e7abfc789d69ae489224e9 Gerrit-Change-Number: 38291 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Sat, 28 Sep 2024 11:29:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: libosmotrau: add CSD RA2 functions
by fixeria 28 Sep '24

28 Sep '24
Attention is currently required from: dexter, falconia, laforge. fixeria has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38290?usp=email ) Change subject: libosmotrau: add CSD RA2 functions ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38290?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I7b98b958651b3fc1a814d119d1b8644c91f98676 Gerrit-Change-Number: 38290 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sat, 28 Sep 2024 11:29:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-msc[master]: silent-call: add CSD channel modes
by fixeria 28 Sep '24

28 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/38311?usp=email ) Change subject: silent-call: add CSD channel modes ...................................................................... silent-call: add CSD channel modes This is useful for BER testing and figuring out if the baseband supports the requested channel mode, e.g. half-rate data calls. Going below 2.4k (0.6k, 1.2k, 1.2k_75) makes no sense, because: * these rates are carried by TCH/[FH]2.4 channels anyway, and * we never tell the user data rate to the MS (part of CC SETUP) The same applies to transparent vs non-transparent channel modes, but let's add non-transparent variants anyway, just in case the BTS PHY does not support transparent modes. Change-Id: Ife83f5bcb2b68a228a014f47c7cbb21660290593 --- M src/libmsc/msc_vty.c 1 file changed, 65 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/11/38311/1 diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c index 1f389f4..7d495bc 100644 --- a/src/libmsc/msc_vty.c +++ b/src/libmsc/msc_vty.c @@ -1474,19 +1474,39 @@ #define CHAN_TYPES "(any|tch/f|tch/h|tch/any|sdcch)" #define CHAN_TYPE_HELP \ - "Any channel\n" \ - "TCH/F channel\n" \ - "TCH/H channel\n" \ - "Any TCH channel\n" \ - "SDCCH channel\n" + "Any channel\n" \ + "TCH/F channel\n" \ + "TCH/H channel\n" \ + "Any TCH channel\n" \ + "SDCCH channel\n" -#define CHAN_MODES "(signalling|speech-hr|speech-fr|speech-efr|speech-amr)" -#define CHAN_MODE_HELP \ - "Signalling only\n" \ - "Speech with HR codec\n" \ - "Speech with FR codec\n" \ - "Speech with EFR codec\n" \ - "Speech with AMR codec\n" +#define CHAN_MODES_SPEECH "speech-hr|speech-fr|speech-efr|speech-amr" +#define CHAN_MODE_HELP_SPEECH \ + "Speech with HR codec\n" \ + "Speech with FR codec\n" \ + "Speech with EFR codec\n" \ + "Speech with AMR codec\n" + +#define CHAN_MODES_DATA_T "data-2400|data-4800|data-9600|data-14400" +#define CHAN_MODE_HELP_DATA_T \ + "Data (transparent) @ 2.4k/3.6k\n" \ + "Data (transparent) @ 4.8k/6.0k\n" \ + "Data (transparent) @ 9.6k/12.0k\n" \ + "Data (transparent) @ 14.4k/14.5k\n" + +#define CHAN_MODES_DATA_NT "data-4800-nt|data-9600-nt|data-14400-nt" +#define CHAN_MODE_HELP_DATA_NT \ + "Data (non-transparent) @ 4.8k/6k\n" \ + "Data (non-transparent) @ 9.6k/12k\n" \ + "Data (non-transparent) @ 14.4k/14.5k\n" + +#define CHAN_MODES "(signalling|" CHAN_MODES_SPEECH "|" CHAN_MODES_DATA_T "|" CHAN_MODES_DATA_NT ")" +#define CHAN_MODE_HELP \ + "Signalling only\n" \ + CHAN_MODE_HELP_SPEECH \ + CHAN_MODE_HELP_DATA_T \ + CHAN_MODE_HELP_DATA_NT + DEFUN(subscriber_silent_call_start, subscriber_silent_call_start_cmd, @@ -1500,7 +1520,7 @@ struct gsm0808_channel_type ct; const char *ip; uint16_t port; - int rc, speech; + int rc, sign; if (!vsub) { vty_out(vty, "%% No subscriber found for %s %s%s", @@ -1531,24 +1551,49 @@ ct.perm_spch[0] = GSM0808_PERM_FR3; ct.perm_spch[1] = GSM0808_PERM_HR3; ct.perm_spch_len = 2; + } else if (!strcmp(argv[3], "data-2400")) { + ct.ch_indctr = GSM0808_CHAN_DATA; + ct.data_rate = GSM0808_DATA_RATE_TRANSP_2k4; + ct.data_transparent = true; + } else if (!strcmp(argv[3], "data-4800")) { + ct.ch_indctr = GSM0808_CHAN_DATA; + ct.data_rate = GSM0808_DATA_RATE_TRANSP_4k8; + ct.data_transparent = true; + } else if (!strcmp(argv[3], "data-9600")) { + ct.ch_indctr = GSM0808_CHAN_DATA; + ct.data_rate = GSM0808_DATA_RATE_TRANSP_9k6; + ct.data_transparent = true; + } else if (!strcmp(argv[3], "data-14400")) { + ct.ch_indctr = GSM0808_CHAN_DATA; + ct.data_rate = GSM0808_DATA_RATE_TRANSP_14k4; + ct.data_transparent = true; + } else if (!strcmp(argv[3], "data-4800-nt")) { + ct.ch_indctr = GSM0808_CHAN_DATA; + ct.data_rate = GSM0808_DATA_RATE_NON_TRANSP_6k0; + } else if (!strcmp(argv[3], "data-9600-nt")) { + ct.ch_indctr = GSM0808_CHAN_DATA; + ct.data_rate = GSM0808_DATA_RATE_NON_TRANSP_12k0; + } else if (!strcmp(argv[3], "data-14400-nt")) { + ct.ch_indctr = GSM0808_CHAN_DATA; + ct.data_rate = GSM0808_DATA_RATE_NON_TRANSP_14k5; } - speech = ct.ch_indctr == GSM0808_CHAN_SPEECH; + sign = ct.ch_indctr == GSM0808_CHAN_SIGN; if (!strcmp(argv[2], "tch/f")) - ct.ch_rate_type = speech ? GSM0808_SPEECH_FULL_BM : GSM0808_SIGN_FULL_BM; + ct.ch_rate_type = sign ? GSM0808_SIGN_FULL_BM : GSM0808_SPEECH_FULL_BM; else if (!strcmp(argv[2], "tch/h")) - ct.ch_rate_type = speech ? GSM0808_SPEECH_HALF_LM : GSM0808_SIGN_HALF_LM; + ct.ch_rate_type = sign ? GSM0808_SIGN_HALF_LM : GSM0808_SPEECH_HALF_LM; else if (!strcmp(argv[2], "tch/any")) - ct.ch_rate_type = speech ? GSM0808_SPEECH_FULL_PREF : GSM0808_SIGN_FULL_PREF; + ct.ch_rate_type = sign ? GSM0808_SIGN_FULL_PREF : GSM0808_SPEECH_FULL_PREF; else if (!strcmp(argv[2], "sdcch")) { - if (speech) { - vty_out(vty, "Can't request speech on SDCCH%s", VTY_NEWLINE); + if (!sign) { + vty_out(vty, "Can't request speech/data on SDCCH%s", VTY_NEWLINE); return CMD_WARNING; } ct.ch_rate_type = GSM0808_SIGN_SDCCH; } else - ct.ch_rate_type = speech ? GSM0808_SPEECH_FULL_PREF : GSM0808_SIGN_ANY; + ct.ch_rate_type = sign ? GSM0808_SPEECH_FULL_PREF : GSM0808_SIGN_ANY; ip = argc >= 5 ? argv[4] : "127.0.0.1"; port = argc >= 6 ? atoi(argv[5]) : 4000; -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38311?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ife83f5bcb2b68a228a014f47c7cbb21660290593 Gerrit-Change-Number: 38311 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: sctp_proxy: fix calling gauge_dec() on a counter
by fixeria 28 Sep '24

28 Sep '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38296?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: sctp_proxy: fix calling gauge_dec() on a counter ...................................................................... sctp_proxy: fix calling gauge_dec() on a counter A follow-up commit will add type hints to prevent such errors. Change-Id: Ic1e29061838e9c96cc4687308c6c56db7011ae9f --- M src/sctp_proxy.erl 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/sctp_proxy.erl b/src/sctp_proxy.erl index 280e408..c901b80 100644 --- a/src/sctp_proxy.erl +++ b/src/sctp_proxy.erl @@ -258,7 +258,7 @@ sctp_send_pending([Data | Pending], S0) -> S1 = sctp_send(Data, S0), - s1gw_metrics:gauge_dec(?S1GW_CTR_S1AP_PROXY_UPLINK_PACKETS_QUEUED), + s1gw_metrics:gauge_dec(?S1GW_GAUGE_S1AP_PROXY_UPLINK_PACKETS_QUEUED), sctp_send_pending(Pending, S1); sctp_send_pending([], S) -> -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38296?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Ic1e29061838e9c96cc4687308c6c56db7011ae9f Gerrit-Change-Number: 38296 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in ...osmo-s1gw[master]: s1gw_metrics: more precise type hints
by fixeria 28 Sep '24

28 Sep '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38297?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: s1gw_metrics: more precise type hints ...................................................................... s1gw_metrics: more precise type hints This enables dialyzer to detect errors when: * ctr_* API is used on an ?S1GW_GAUGE_* definition, and * gauge_* API is used on an ?S1GW_CTR_* definition. One of such errors has been fixed in a previous commit. Change-Id: I36eaa5e04037e165e43eb960c541f967c394a2ea --- M src/s1gw_metrics.erl 1 file changed, 16 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/s1gw_metrics.erl b/src/s1gw_metrics.erl index 6b078e5..ee14d08 100644 --- a/src/s1gw_metrics.erl +++ b/src/s1gw_metrics.erl @@ -82,31 +82,34 @@ ?S1GW_GAUGE_S1AP_PROXY_UPLINK_PACKETS_QUEUED ]). --spec new_ctr(list()) -> ok. +-type counter() :: [ctr | _]. +-type gauge() :: [gauge | _]. + +-spec new_ctr(counter()) -> ok. new_ctr(Name) -> %%?LOG_INFO("New counter ~p", [Name]), ok = exometer:new(Name, counter). --spec new_ctrs(list()) -> ok. +-spec new_ctrs(list(counter())) -> ok. new_ctrs([]) -> ok; new_ctrs([Name | MoreNames]) -> new_ctr(Name), new_ctrs(MoreNames). --spec new_gauge(list()) -> ok. +-spec new_gauge(gauge()) -> ok. new_gauge(Name) -> %%?LOG_INFO("New gauge ~p", [Name]), ok = exometer:new(Name, gauge). --spec new_gauges(list()) -> ok. +-spec new_gauges(list(gauge())) -> ok. new_gauges([]) -> ok; new_gauges([Name | MoreNames]) -> new_gauge(Name), new_gauges(MoreNames). --spec get_current_value(list()) -> integer(). +-spec get_current_value(counter() | gauge()) -> integer(). get_current_value(Name) -> Result = exometer:get_value(Name, value), {ok, [{value, PrevVal}]} = Result, @@ -124,43 +127,43 @@ %%%%%%%%%%%%% %% CTR APIs %%%%%%%%%%%%% --spec ctr_reset(list()) -> ok | {error, any()}. +-spec ctr_reset(counter()) -> ok | {error, any()}. ctr_reset(Name) -> ?LOG_DEBUG("ctr_reset(~p)", [Name]), exometer:reset(Name). --spec ctr_inc(list(), integer()) -> ok | {error, any()}. +-spec ctr_inc(counter(), integer()) -> ok | {error, any()}. ctr_inc(Name, Value) -> ?LOG_DEBUG("ctr_inc(~p, ~p)", [Name, Value]), exometer:update(Name, Value). --spec ctr_inc(list()) -> ok | {error, any()}. +-spec ctr_inc(counter()) -> ok | {error, any()}. ctr_inc(Name) -> ctr_inc(Name, 1). %%%%%%%%%%%%% %% GAUGE APIs %%%%%%%%%%%%% --spec gauge_reset(list()) -> ok | {error, any()}. +-spec gauge_reset(gauge()) -> ok | {error, any()}. gauge_reset(Name) -> ?LOG_DEBUG("gauge_reset(~p)", [Name]), exometer:reset(Name). --spec gauge_set(list(), integer()) -> ok | {error, any()}. +-spec gauge_set(gauge(), integer()) -> ok | {error, any()}. gauge_set(Name, Value) -> exometer:update(Name, Value). --spec gauge_inc(list(), integer()) -> ok | {error, any()}. +-spec gauge_inc(gauge(), integer()) -> ok | {error, any()}. gauge_inc(Name, Value) -> PrevVal = get_current_value(Name), ?LOG_DEBUG("gauge_inc(~p, ~p): pre_val=~p", [Name, Value, PrevVal]), exometer:update(Name, Value + PrevVal). --spec gauge_inc(list()) -> ok | {error, any()}. +-spec gauge_inc(gauge()) -> ok | {error, any()}. gauge_inc(Name) -> gauge_inc(Name, 1). --spec gauge_dec(list()) -> ok | {error, any()}. +-spec gauge_dec(gauge()) -> ok | {error, any()}. gauge_dec(Name) -> gauge_inc(Name, -1). -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/38297?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I36eaa5e04037e165e43eb960c541f967c394a2ea Gerrit-Change-Number: 38297 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.