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

December 2025

  • 1 participants
  • 1175 discussions
[M] Change in ...osmo-s1gw[master]: s1ap_utils: add API for building S1 SETUP FAILURE PDU
by fixeria 25 Dec '25

25 Dec '25
fixeria has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41762?usp=email ) Change subject: s1ap_utils: add API for building S1 SETUP FAILURE PDU ...................................................................... s1ap_utils: add API for building S1 SETUP FAILURE PDU This API will be used in a follow-up patch adding the MME pooling. Take a chance to add a parsing test for the new PDU blob. Change-Id: I5a4e060e0a2ebdfbcfafac42f9de2e49ac3583b8 Related: SYS#7052 --- M src/s1ap_utils.erl M test/s1ap_samples.erl M test/s1ap_utils_test.erl 3 files changed, 88 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/62/41762/2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41762?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I5a4e060e0a2ebdfbcfafac42f9de2e49ac3583b8 Gerrit-Change-Number: 41762 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in ...osmo-s1gw[master]: enb_proxy: add inital MME pooling support
by fixeria 25 Dec '25

25 Dec '25
Attention is currently required from: fixeria, osmith. Hello Jenkins Builder, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41624?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Code-Review+1 by osmith, Verified+1 by Jenkins Builder Change subject: enb_proxy: add inital MME pooling support ...................................................................... enb_proxy: add inital MME pooling support Change-Id: I83dc4a78c78a7b87e87f5ca9a941a168d6c1dc36 Related: SYS#7052 --- M include/s1gw_metrics.hrl M src/enb_proxy.erl M src/s1ap_utils.erl M src/s1gw_metrics.erl 4 files changed, 83 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/24/41624/4 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41624?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I83dc4a78c78a7b87e87f5ca9a941a168d6c1dc36 Gerrit-Change-Number: 41624 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[L] Change in ...osmo-s1gw[master]: mme_registry: the MME registry (pool) implementation
by fixeria 25 Dec '25

25 Dec '25
Attention is currently required from: fixeria, osmith, pespin. Hello Jenkins Builder, osmith, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41281?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Code-Review+1 by osmith, Verified+1 by Jenkins Builder Change subject: mme_registry: the MME registry (pool) implementation ...................................................................... mme_registry: the MME registry (pool) implementation Change-Id: Id5480222439bf93eca2e994b291c619dff823b01 Related: SYS#7052 --- A src/mme_registry.erl M src/osmo_s1gw_sup.erl A test/mme_registry_test.erl 3 files changed, 503 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/81/41281/5 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41281?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Id5480222439bf93eca2e994b291c619dff823b01 Gerrit-Change-Number: 41281 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[L] Change in ...osmo-s1gw[master]: [REST] Add MmeList, MmeAdd, MmeInfo, MmeDelete
by fixeria 25 Dec '25

25 Dec '25
Attention is currently required from: fixeria, osmith, pespin. Hello Jenkins Builder, osmith, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41282?usp=email to look at the new patch set (#5). The following approvals got outdated and were removed: Code-Review+1 by osmith, Verified+1 by Jenkins Builder Change subject: [REST] Add MmeList, MmeAdd, MmeInfo, MmeDelete ...................................................................... [REST] Add MmeList, MmeAdd, MmeInfo, MmeDelete Change-Id: Iad249aed99face9e35fd19e0596cf2364ade4c77 Related: SYS#7052 --- M contrib/openapi.yaml M contrib/osmo-s1gw-cli.py M doc/osmo-s1gw-cli.md M priv/openapi.json M src/rest_server.erl 5 files changed, 578 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/82/41282/5 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41282?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Iad249aed99face9e35fd19e0596cf2364ade4c77 Gerrit-Change-Number: 41282 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in ...osmo-s1gw[master]: enb_proxy: add per-eNB and global counters
by fixeria 25 Dec '25

25 Dec '25
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41760?usp=email ) Change subject: enb_proxy: add per-eNB and global counters ...................................................................... enb_proxy: add per-eNB and global counters Change-Id: I3670db6a519ec8070ada6aecd471c4630ad53c86 Related: SYS#7052 --- M include/s1gw_metrics.hrl M src/enb_proxy.erl M src/s1gw_metrics.erl 3 files changed, 80 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/60/41760/1 diff --git a/include/s1gw_metrics.hrl b/include/s1gw_metrics.hrl index 8f78821..ecdf315 100644 --- a/include/s1gw_metrics.hrl +++ b/include/s1gw_metrics.hrl @@ -39,6 +39,17 @@ -define(S1GW_CTR_S1AP_PROXY_OUT_PKT_REPLY_ALL, [ctr, s1ap, proxy, out_pkt, reply, all]). -define(S1GW_CTR_S1AP_PROXY_OUT_PKT_REPLY_ERAB_SETUP_RSP, [ctr, s1ap, proxy, out_pkt, reply, erab_setup_rsp]). +%% enb_proxy related metrics +-define(S1GW_CTR_ENB_PROXY_S1_SETUP_REQ, [ctr, enb_proxy, s1setup, req]). +-define(S1GW_CTR_ENB_PROXY_S1_SETUP_RSP, [ctr, enb_proxy, s1setup, rsp]). +-define(S1GW_CTR_ENB_PROXY_S1_SETUP_FAILURE, [ctr, enb_proxy, s1setup, failure]). +-define(S1GW_CTR_ENB_PROXY_S1_SETUP_REQ_TIMEOUT, [ctr, enb_proxy, s1setup, req, timeout]). +-define(S1GW_CTR_ENB_PROXY_S1_SETUP_RSP_TIMEOUT, [ctr, enb_proxy, s1setup, rsp, timeout]). +-define(S1GW_CTR_ENB_PROXY_CONN_EST_TIMEOUT, [ctr, enb_proxy, conn_est, timeout]). +-define(S1GW_CTR_ENB_PROXY_CONN_EST_FAILURE, [ctr, enb_proxy, conn_est, failure]). +-define(S1GW_CTR_ENB_PROXY_UNEXPECTED_PDU, [ctr, enb_proxy, unexpected_pdu]). +-define(S1GW_CTR_ENB_PROXY_MALFORMED_PDU, [ctr, enb_proxy, malformed_pdu]). + %% SCTP related metrics -define(S1GW_CTR_SCTP_ERROR_ALL, [ctr, sctp, error, all]). -define(S1GW_CTR_SCTP_ERROR_SEND_FAILED, [ctr, sctp, error, send_failed]). diff --git a/src/enb_proxy.erl b/src/enb_proxy.erl index 7a51221..4495e31 100644 --- a/src/enb_proxy.erl +++ b/src/enb_proxy.erl @@ -136,8 +136,9 @@ [{state_timeout, 5_000, s1setup_req_timeout}]}; %% Handle S1 SETUP REQUEST timeout -wait_s1setup_req(state_timeout, s1setup_req_timeout, _S) -> +wait_s1setup_req(state_timeout, s1setup_req_timeout, S) -> ?LOG_ERROR("Timeout waiting for S1 SETUP REQUEST from eNB"), + ctr_inc(?S1GW_CTR_ENB_PROXY_S1_SETUP_REQ_TIMEOUT, S), {stop, {shutdown, s1setup_req_timeout}}; %% Handle PDUs coming from the eNB @@ -151,6 +152,10 @@ %% use it as the logging prefix osmo_s1gw:set_log_prefix("eNB " ++ GlobalENBId), ?LOG_INFO("Rx S1 SETUP REQUEST from eNB"), + %% register per-eNB metrics + ctr_reg_all(GlobalENBId), + ctr_inc(?S1GW_CTR_ENB_PROXY_S1_SETUP_REQ, + S#state{genb_id_str = GlobalENBId}), %% signal the Global-eNB-ID to other modules s1ap_proxy:set_genb_id(S#state.handler, GlobalENBId), enb_registry:enb_event(S#state.enb_handle, {s1setup, GENBId}), @@ -160,8 +165,10 @@ genb_id_str = GlobalENBId}}; {{Proc, Type}, IEs} -> ?LOG_ERROR("Rx unexpected S1AP PDU from eNB: ~p/~p, ~p", [Proc, Type, IEs]), + ctr_inc(?S1GW_CTR_ENB_PROXY_UNEXPECTED_PDU, S), {stop, {shutdown, s1setup_error}}; {error, _Error} -> + ctr_inc(?S1GW_CTR_ENB_PROXY_MALFORMED_PDU, S), {stop, {shutdown, s1setup_error}} end; @@ -180,12 +187,14 @@ [{state_timeout, 2_000, conn_est_timeout}]}; %% Handle connection establishment timeout -connecting(state_timeout, conn_est_timeout, _S) -> +connecting(state_timeout, conn_est_timeout, S) -> + ctr_inc(?S1GW_CTR_ENB_PROXY_CONN_EST_TIMEOUT, S), {stop, {shutdown, conn_est_timeout}}; %% Handle PDUs coming from the eNB -connecting(cast, {send_data, Data}, _S) -> +connecting(cast, {send_data, Data}, S) -> ?LOG_ERROR("Rx unexpected S1AP PDU from eNB: ~p", [Data]), + ctr_inc(?S1GW_CTR_ENB_PROXY_UNEXPECTED_PDU, S), keep_state_and_data; %% Handle an #sctp_assoc_change event (connection state) @@ -202,6 +211,7 @@ {next_state, wait_s1setup_rsp, S#state{mme_aid = Aid}}; _ -> ?LOG_NOTICE("MME connection establishment failed: ~p", [ConnState]), + ctr_inc(?S1GW_CTR_ENB_PROXY_CONN_EST_FAILURE, S), {stop, {shutdown, conn_est_fail}} end; @@ -216,13 +226,15 @@ [{state_timeout, 5_000, s1setup_rsp_timeout}]}; %% Handle S1 SETUP RESPONSE timeout -wait_s1setup_rsp(state_timeout, s1setup_rsp_timeout, _S) -> +wait_s1setup_rsp(state_timeout, s1setup_rsp_timeout, S) -> ?LOG_ERROR("Timeout waiting for S1 SETUP RESPONSE from MME"), + ctr_inc(?S1GW_CTR_ENB_PROXY_S1_SETUP_RSP_TIMEOUT, S), {stop, {shutdown, s1setup_rsp_timeout}}; %% Handle PDUs coming from the eNB -wait_s1setup_rsp(cast, {send_data, Data}, _S) -> +wait_s1setup_rsp(cast, {send_data, Data}, S) -> ?LOG_ERROR("Rx unexpected S1AP PDU from eNB: ~p", [Data]), + ctr_inc(?S1GW_CTR_ENB_PROXY_UNEXPECTED_PDU, S), keep_state_and_data; %% Handle PDUs coming from the MME @@ -239,16 +251,20 @@ case s1ap_utils:parse_pdu(Data) of {{?'id-S1Setup', successfulOutcome}, _IEs} -> ?LOG_INFO("Rx S1 SETUP RESPONSE from MME"), + ctr_inc(?S1GW_CTR_ENB_PROXY_S1_SETUP_RSP, S), sctp_send_from_mme(Data, S), {next_state, connected, S}; {{?'id-S1Setup', unsuccessfulOutcome}, _IEs} -> ?LOG_NOTICE("Rx S1 SETUP FAILURE from MME"), + ctr_inc(?S1GW_CTR_ENB_PROXY_S1_SETUP_FAILURE, S), sctp_send_from_mme(Data, S), {stop, {shutdown, s1setup_error}}; {{Proc, Type}, IEs} -> ?LOG_ERROR("Rx unexpected S1AP PDU from MME: ~p/~p, ~p", [Proc, Type, IEs]), + ctr_inc(?S1GW_CTR_ENB_PROXY_UNEXPECTED_PDU, S), {stop, {shutdown, s1setup_error}}; {error, _Error} -> + ctr_inc(?S1GW_CTR_ENB_PROXY_MALFORMED_PDU, S), {stop, {shutdown, s1setup_error}} end; @@ -455,4 +471,41 @@ end. +%% register a single per-eNB counter +-spec ctr_reg(C, GlobalENBId) -> C + when C :: s1gw_metrics:counter(), + GlobalENBId :: string(). +ctr_reg([ctr, ?MODULE | _] = C0, GlobalENBId) -> + C1 = s1gw_metrics:enb_metric(C0, GlobalENBId), + %% counter may already exist, so catch exceptions here + catch exometer:new(C1, counter), + C0; + +ctr_reg(C0, _GlobalENBId) -> C0. + + +%% register all per-eNB counters +-spec ctr_reg_all(string()) -> list(). +ctr_reg_all(GlobalENBId) -> + Ctrs = s1gw_metrics:ctr_list(), + lists:map(fun(Name) -> ctr_reg(Name, GlobalENBId) end, Ctrs). + + +%% increment the global and/or per-eNB counters +-spec ctr_inc(C0, S) -> term() + when C0 :: s1gw_metrics:counter(), + S :: state(). +ctr_inc([ctr, ?MODULE | _] = C0, + #state{genb_id_str = undefined}) -> + %% increment the global counter only + s1gw_metrics:ctr_inc(C0); + +ctr_inc([ctr, ?MODULE | _] = C0, + #state{genb_id_str = GlobalENBId}) -> + %% increment both the global and per-eNB counters + C1 = s1gw_metrics:enb_metric(C0, GlobalENBId), + s1gw_metrics:ctr_inc(C0), + s1gw_metrics:ctr_inc(C1). + + %% vim:set ts=4 sw=4 et: diff --git a/src/s1gw_metrics.erl b/src/s1gw_metrics.erl index 1368c5b..52a5a10 100644 --- a/src/s1gw_metrics.erl +++ b/src/s1gw_metrics.erl @@ -96,6 +96,17 @@ ?S1GW_CTR_S1AP_PROXY_OUT_PKT_REPLY_ALL, %% replied: total ?S1GW_CTR_S1AP_PROXY_OUT_PKT_REPLY_ERAB_SETUP_RSP, %% replied: E-RAB SETUP.rsp + %% enb_proxy related metrics + ?S1GW_CTR_ENB_PROXY_S1_SETUP_REQ, %% S1 SETUP REQUEST PDUs + ?S1GW_CTR_ENB_PROXY_S1_SETUP_RSP, %% S1 SETUP RESPONSE PDUs + ?S1GW_CTR_ENB_PROXY_S1_SETUP_FAILURE, %% S1 SETUP FAILURE PDUs + ?S1GW_CTR_ENB_PROXY_S1_SETUP_REQ_TIMEOUT, %% S1 SETUP REQUEST timeout + ?S1GW_CTR_ENB_PROXY_S1_SETUP_RSP_TIMEOUT, %% S1 SETUP RESPONSE timeout + ?S1GW_CTR_ENB_PROXY_CONN_EST_TIMEOUT, %% MME connection establishment timeout + ?S1GW_CTR_ENB_PROXY_CONN_EST_FAILURE, %% MME connection establishment failure + ?S1GW_CTR_ENB_PROXY_UNEXPECTED_PDU, %% unexpected PDUs received from eNB/MME + ?S1GW_CTR_ENB_PROXY_MALFORMED_PDU, %% malformed PDUs received from eNB/MME + %% SCTP related counters ?S1GW_CTR_SCTP_ERROR_ALL, %% total number of SCTP errors ?S1GW_CTR_SCTP_ERROR_SEND_FAILED, %% send operation failed -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41760?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I3670db6a519ec8070ada6aecd471c4630ad53c86 Gerrit-Change-Number: 41760 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: s1gw_metrics: remove ?S1GW_{CTR,GAUGE}_S1AP_PROXY_UPLINK_PACKETS_QUEUED
by fixeria 25 Dec '25

25 Dec '25
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41758?usp=email ) Change subject: s1gw_metrics: remove ?S1GW_{CTR,GAUGE}_S1AP_PROXY_UPLINK_PACKETS_QUEUED ...................................................................... s1gw_metrics: remove ?S1GW_{CTR,GAUGE}_S1AP_PROXY_UPLINK_PACKETS_QUEUED We no longer queue any packets, so these metrics are not relevant. Change-Id: I6c4c4a751dbe5a245f16515a1a1d65acf33468e9 Related: 4614fc3 ("s1ap_proxy: move S1 SETUP handling to sctp_proxy") Related: SYS#7052 --- M include/s1gw_metrics.hrl M src/s1gw_metrics.erl 2 files changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/58/41758/1 diff --git a/include/s1gw_metrics.hrl b/include/s1gw_metrics.hrl index 385b5fa..8f78821 100644 --- a/include/s1gw_metrics.hrl +++ b/include/s1gw_metrics.hrl @@ -11,7 +11,6 @@ -define(S1GW_CTR_PFCP_UNEXPECTED_PDU, [ctr, pfcp, unexpected_pdu]). -define(S1GW_CTR_S1AP_ENB_ALL_RX, [ctr, s1ap, enb, all, rx]). -define(S1GW_CTR_S1AP_ENB_ALL_RX_UNKNOWN_ENB, [ctr, s1ap, enb, all, rx_unknown_enb]). --define(S1GW_CTR_S1AP_PROXY_UPLINK_PACKETS_QUEUED, [ctr, s1ap, proxy, uplink_packets_queued]). -define(S1GW_CTR_S1AP_PROXY_EXCEPTION, [ctr, s1ap, proxy, exception]). -define(S1GW_CTR_S1AP_PROXY_IN_PKT_ALL, [ctr, s1ap, proxy, in_pkt, all]). -define(S1GW_CTR_S1AP_PROXY_IN_PKT_DROP_ALL, [ctr, s1ap, proxy, in_pkt, drop, all]). @@ -56,7 +55,6 @@ -define(S1GW_GAUGE_PFCP_ASSOCIATED, [gauge, pfcp, associated]). -define(S1GW_GAUGE_S1AP_ENB_NUM_SCTP_CONNECTIONS, [gauge, s1ap, enb, num_sctp_connections]). --define(S1GW_GAUGE_S1AP_PROXY_UPLINK_PACKETS_QUEUED, [gauge, s1ap, proxy, uplink_packets_queued]). %% NOTE: Remember to add new entries to s1gw_metric:init()! diff --git a/src/s1gw_metrics.erl b/src/s1gw_metrics.erl index bb4bd97..1368c5b 100644 --- a/src/s1gw_metrics.erl +++ b/src/s1gw_metrics.erl @@ -65,7 +65,6 @@ ?S1GW_CTR_PFCP_UNEXPECTED_PDU, ?S1GW_CTR_S1AP_ENB_ALL_RX, ?S1GW_CTR_S1AP_ENB_ALL_RX_UNKNOWN_ENB, - ?S1GW_CTR_S1AP_PROXY_UPLINK_PACKETS_QUEUED, ?S1GW_CTR_S1AP_PROXY_EXCEPTION, %% exception(s) occurred %% s1ap_proxy: INcoming PDU counters ?S1GW_CTR_S1AP_PROXY_IN_PKT_ALL, %% received total @@ -106,8 +105,7 @@ -define(S1GW_GAUGES, [ ?S1GW_GAUGE_PFCP_ASSOCIATED, - ?S1GW_GAUGE_S1AP_ENB_NUM_SCTP_CONNECTIONS, - ?S1GW_GAUGE_S1AP_PROXY_UPLINK_PACKETS_QUEUED + ?S1GW_GAUGE_S1AP_ENB_NUM_SCTP_CONNECTIONS ]). -type counter() :: [ctr | _]. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41758?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I6c4c4a751dbe5a245f16515a1a1d65acf33468e9 Gerrit-Change-Number: 41758 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: s1ap_proxy: improve per-eNB counter reg/inc API
by fixeria 25 Dec '25

25 Dec '25
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41759?usp=email ) Change subject: s1ap_proxy: improve per-eNB counter reg/inc API ...................................................................... s1ap_proxy: improve per-eNB counter reg/inc API Change-Id: I2244190d0640209f8a2d4d78e5b64db580aa863d --- M src/s1ap_proxy.erl 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/59/41759/1 diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index 0903906..a29a817 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -212,7 +212,7 @@ %% register a single per-eNB counter -spec ctr_reg(C, GlobalENBId) -> C - when C :: [ctr | _], + when C :: s1gw_metrics:counter(), GlobalENBId :: string(). ctr_reg([ctr, s1ap, proxy | _] = C0, GlobalENBId) -> C1 = s1gw_metrics:enb_metric(C0, GlobalENBId), @@ -232,9 +232,9 @@ %% increment the global and/or per-eNB counters -spec ctr_inc(C0, S) -> term() - when C0 :: [ctr | _], + when C0 :: s1gw_metrics:counter(), S :: proxy_state(). -ctr_inc([ctr | _] = C0, S) -> +ctr_inc([ctr, s1ap, proxy | _] = C0, S) -> case S#proxy_state.genb_id_str of undefined -> %% increment the global counter only -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41759?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I2244190d0640209f8a2d4d78e5b64db580aa863d Gerrit-Change-Number: 41759 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: s1ap_utils_test: fix: expected value goes first
by fixeria 25 Dec '25

25 Dec '25
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41761?usp=email ) Change subject: s1ap_utils_test: fix: expected value goes first ...................................................................... s1ap_utils_test: fix: expected value goes first Change-Id: Ib7c6478b95a78c9797e86180a89c098e75b615e0 --- M test/s1ap_utils_test.erl 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/61/41761/1 diff --git a/test/s1ap_utils_test.erl b/test/s1ap_utils_test.erl index 1f3279b..ca63606 100644 --- a/test/s1ap_utils_test.erl +++ b/test/s1ap_utils_test.erl @@ -18,7 +18,7 @@ s1ap_setup_req_test_() -> {MsgType, IEs} = s1ap_utils:parse_pdu(s1ap_samples:s1_setup_req_pdu()), - [?_assertEqual(MsgType, {?'id-S1Setup', initiatingMessage}), + [?_assertEqual({?'id-S1Setup', initiatingMessage}, MsgType), ?_assertEqualIE(?'id-Global-ENB-ID', #{enb_id => 0, plmn_id => {"001", "01"}}), ?_assertEqualIE(?'id-eNBname', undefined), %% optional, not present @@ -27,7 +27,7 @@ s1ap_setup_rsp_test_() -> {MsgType, IEs} = s1ap_utils:parse_pdu(s1ap_samples:s1_setup_rsp_pdu()), - [?_assertEqual(MsgType, {?'id-S1Setup', successfulOutcome}), + [?_assertEqual({?'id-S1Setup', successfulOutcome}, MsgType), ?_assertEqualIE(?'id-MMEname', "open5gs-mme0"), ?_assertMatchIE(?'id-ServedGUMMEIs', [#'ServedGUMMEIsItem'{}]), ?_assertEqualIE(?'id-RelativeMMECapacity', 16#ff)]. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41761?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Ib7c6478b95a78c9797e86180a89c098e75b615e0 Gerrit-Change-Number: 41761 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[M] Change in ...osmo-s1gw[master]: s1ap_utils: add API for building S1 SETUP FAILURE PDU
by fixeria 25 Dec '25

25 Dec '25
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41762?usp=email ) Change subject: s1ap_utils: add API for building S1 SETUP FAILURE PDU ...................................................................... s1ap_utils: add API for building S1 SETUP FAILURE PDU This API will be used in a follow-up patch adding the MME pooling. Take a chance to add a parsing test for the new PDU blob. Change-Id: I5a4e060e0a2ebdfbcfafac42f9de2e49ac3583b8 Related: SYS#7052 --- M src/s1ap_utils.erl M test/s1ap_samples.erl M test/s1ap_utils_test.erl 3 files changed, 89 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/62/41762/1 diff --git a/src/s1ap_utils.erl b/src/s1ap_utils.erl index 6f7e6b6..2ecd0bf 100644 --- a/src/s1ap_utils.erl +++ b/src/s1ap_utils.erl @@ -40,6 +40,8 @@ parse_plmn_id/1, parse_enb_id/1, genb_id_str/1]). +-export([build_pdu/1, + build_s1setup_fail_pdu/1]). -include_lib("kernel/include/logger.hrl"). @@ -120,6 +122,34 @@ MCC ++ "-" ++ MNC ++ "-" ++ integer_to_list(ENBId). +%% Build an S1AP PDU +-spec build_pdu(s1ap_pdu_info()) -> {ok, binary()} | {error, term()}. +build_pdu({MsgType, Content}) -> + case build_pdu(MsgType, Content) of + {error, Error} -> + ?LOG_ERROR("Failed to build an S1AP PDU: ~p", [Error]), + {error, {build_pdu, Error}}; + PDU -> + try encode_pdu(PDU) of + {ok, Data} -> + {ok, Data}; + {error, Error} -> + ?LOG_ERROR("S1AP PDU encoding failed: ~p", [Error]), + {error, {encode_pdu, Error}} + catch + Exception:Reason:StackTrace -> + ?LOG_ERROR("An exception occurred: ~p, ~p, ~p", [Exception, Reason, StackTrace]), + {error, encode_pdu} + end + end. + + +%% Build an S1AP S1 SETUP FAILURE PDU +-spec build_s1setup_fail_pdu(proplists:proplist()) -> {ok, binary()} | {error, term()}. +build_s1setup_fail_pdu(Content) -> + build_pdu({{?'id-S1Setup', unsuccessfulOutcome}, Content}). + + %% ------------------------------------------------------------------ %% private API %% ------------------------------------------------------------------ @@ -207,4 +237,28 @@ lists:map(fun parse_ie/1, IEs). +-spec build_pdu(MsgType, Content) -> s1ap_pdu() | {error, term()} + when MsgType :: s1ap_msg_type(), + Content :: proplists:proplist(). +build_pdu({?'id-S1Setup' = PC, + unsuccessfulOutcome = Outcome}, Content) -> + Cause = proplists:get_value(?'id-Cause', Content, {misc, unspecified}), + TimeToWait = proplists:get_value(?'id-TimeToWait', Content, v10s), + IEs = [#'ProtocolIE-Field'{id = ?'id-Cause', + criticality = ignore, + value = Cause}, + #'ProtocolIE-Field'{id = ?'id-TimeToWait', + criticality = ignore, + value = TimeToWait}], + {Outcome, + #'UnsuccessfulOutcome'{procedureCode = PC, + criticality = reject, + value = #'S1SetupFailure'{protocolIEs = IEs}}}; + + +build_pdu(MsgType, _Content) -> + ?LOG_ERROR("~p(~p): not implemented", [?FUNCTION_NAME, MsgType]), + {error, not_implemented}. + + %% vim:set ts=4 sw=4 et: diff --git a/test/s1ap_samples.erl b/test/s1ap_samples.erl index e3c3ac1..183aad6 100644 --- a/test/s1ap_samples.erl +++ b/test/s1ap_samples.erl @@ -2,6 +2,7 @@ -export([s1_setup_req_pdu/0, s1_setup_rsp_pdu/0, + s1_setup_fail_pdu/0, e_rab_setup_req_pdu/2, e_rab_setup_rsp_pdu/2, e_rab_setup_rsp_fail_pdu/0, @@ -48,6 +49,14 @@ >>. +%% S1 SETUP FAILURE +s1_setup_fail_pdu() -> + << 16#40, 16#11, 16#00, 16#0d, 16#00, 16#00, 16#02, 16#00, + 16#02, 16#40, 16#01, 16#44, 16#00, 16#41, 16#40, 16#01, + 16#30 + >>. + + %% [eNB <- MME] E-RAB SETUP REQUEST e_rab_setup_req_pdu(TLA, TEID) when is_binary(TLA), is_integer(TEID) -> diff --git a/test/s1ap_utils_test.erl b/test/s1ap_utils_test.erl index ca63606..9285da8 100644 --- a/test/s1ap_utils_test.erl +++ b/test/s1ap_utils_test.erl @@ -16,7 +16,7 @@ %% actual testcases %% ------------------------------------------------------------------ -s1ap_setup_req_test_() -> +s1ap_setup_req_parse_test_() -> {MsgType, IEs} = s1ap_utils:parse_pdu(s1ap_samples:s1_setup_req_pdu()), [?_assertEqual({?'id-S1Setup', initiatingMessage}, MsgType), ?_assertEqualIE(?'id-Global-ENB-ID', #{enb_id => 0, @@ -25,7 +25,7 @@ ?_assertMatchIE(?'id-SupportedTAs', [12345])]. %% we only parse the TACs -s1ap_setup_rsp_test_() -> +s1ap_setup_rsp_parse_test_() -> {MsgType, IEs} = s1ap_utils:parse_pdu(s1ap_samples:s1_setup_rsp_pdu()), [?_assertEqual({?'id-S1Setup', successfulOutcome}, MsgType), ?_assertEqualIE(?'id-MMEname', "open5gs-mme0"), @@ -33,4 +33,28 @@ ?_assertEqualIE(?'id-RelativeMMECapacity', 16#ff)]. +s1ap_setup_fail_parse_test_() -> + {MsgType, IEs} = s1ap_utils:parse_pdu(s1ap_samples:s1_setup_fail_pdu()), + [?_assertEqual({?'id-S1Setup', unsuccessfulOutcome}, MsgType), + ?_assertEqualIE(?'id-Cause', {misc, unspecified}), + ?_assertEqualIE(?'id-TimeToWait', v10s)]. + + +s1ap_setup_fail_build_test_() -> + [?_assertEqual({ok, s1ap_samples:s1_setup_fail_pdu()}, + s1ap_utils:build_s1setup_fail_pdu([]))]. + + +build_pdu_error_test_() -> + TraceStartReq = {{?'id-TraceStart', initiatingMessage}, []}, + S1SetupFailure = {{?'id-S1Setup', unsuccessfulOutcome}, + [{?'id-TimeToWait', 42}]}, %% wrong value + [%% test building a non-implemented PDU + ?_assertEqual({error, {build_pdu, not_implemented}}, + s1ap_utils:build_pdu(TraceStartReq)), + %% test building a PDU with a wrong user-supplied IE + ?_assertMatch({error, {encode_pdu, {asn1, _}}}, + s1ap_utils:build_pdu(S1SetupFailure))]. + + %% vim:set ts=4 sw=4 et: -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41762?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I5a4e060e0a2ebdfbcfafac42f9de2e49ac3583b8 Gerrit-Change-Number: 41762 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in pysim[master]: esim.saip: Better docstring about FsNode class
by fixeria 25 Dec '25

25 Dec '25
Attention is currently required from: laforge. fixeria has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/41737?usp=email ) Change subject: esim.saip: Better docstring about FsNode class ...................................................................... Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41737?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id9d196e8d9b1d1b892ec50100b170d72d2c3910b Gerrit-Change-Number: 41737 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Thu, 25 Dec 2025 11:00:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • ...
  • 118
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.