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

March 2026

  • 1 participants
  • 1933 discussions
[S] Change in pysim[master]: personalization: indicate default ParamSource per ConfigurableParameter
by dexter 25 Mar '26

25 Mar '26
Attention is currently required from: laforge, neels. dexter has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40200?usp=email ) Change subject: personalization: indicate default ParamSource per ConfigurableParameter ...................................................................... Patch Set 11: Code-Review+2 (1 comment) File pySim/esim/saip/personalization.py: https://gerrit.osmocom.org/c/pysim/+/40200/comment/b9412245_b3d4ba17?usp=em… : PS9, Line 362: default_source = param_source.IncDigitSource > the luhn is added implicitly, the editable part is without the luhn. […] Ah ok. I probably get it. Before everything ends up in the eSIM profile it runs through vaidate_val anyway. And this ensures that the luhn is always present. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40200?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: Ie58d13bce3fa1aa2547cf3cee918c2f5b30a8b32 Gerrit-Change-Number: 40200 Gerrit-PatchSet: 11 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 25 Mar 2026 15:26:57 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[M] Change in pysim[master]: personalization: implement reading back values from a PES
by dexter 25 Mar '26

25 Mar '26
Attention is currently required from: laforge, neels. dexter has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40198?usp=email ) Change subject: personalization: implement reading back values from a PES ...................................................................... Patch Set 13: Code-Review+2 (4 comments) Patchset: PS13: To me everything looks fine here. File pySim/esim/saip/personalization.py: https://gerrit.osmocom.org/c/pysim/+/40198/comment/defadd47_8d597171?usp=em… : PS11, Line 292: if isinstance(val, bytes): > the values are coming from a ProfileElementSequence's decoded section, should always be either a hex […] I think everything is fine here. (I now know that the code uses bytes and hexstrings for parameters.) https://gerrit.osmocom.org/c/pysim/+/40198/comment/4480cc7e_385b26a5?usp=em… : PS11, Line 297: val = unrpad(val, c) > I got this code from elsewhere (or reversing code from elsewhere?) […] Ah ok. So "4141" => "AA" is indeed what you want. Then everything is fine. File pySim/esim/saip/personalization.py: https://gerrit.osmocom.org/c/pysim/+/40198/comment/79fa47ec_fb919824?usp=em… : PS13, Line 410: acc_f = pe.files.get('ef-acc', None) Apparently we are doing nothing with acc_f but I can see that in the following patch acc_f is used. If you want to make it perfect you could move this line into the correct patch, but I think it is not necessary. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/40198?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: I234fc4317f0bdc1a486f0cee4fa432c1dce9b463 Gerrit-Change-Number: 40198 Gerrit-PatchSet: 13 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 25 Mar 2026 15:20:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in pysim[master]: global_platform: install_cap_parser: argument groups cannot be nested
by dexter 25 Mar '26

25 Mar '26
Attention is currently required from: fixeria, laforge. dexter has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/pysim/+/42310?usp=email ) Change subject: global_platform: install_cap_parser: argument groups cannot be nested ...................................................................... Patch Set 4: Code-Review+2 Verified+1 (1 comment) Patchset: PS4: I think now everything is fine, the check properly detects an invalid combination: install_cap /home/user/work/simcard_applet_loading/apletts/HelloSTK_09122024.cap --install-parameters 000000 --install-parameters-non-volatile-memory-quota 255 --install-parameters-volatile-memory-quota 255 --install-parameters-stk 010001001505000000000000000000000000 loading cap file: /home/user/work/simcard_applet_loading/apletts/HelloSTK_09122024.cap ... usage: pySim-shell.py FILE [--install-parameters | --install-parameters-*] pySim-shell.py: error: arguments --install-parameters-* are not allowed with --install-parameters I think this patch is now ready to get merged. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/42310?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: Idddf72d5a745345e134b23f2f01e0257d0667579 Gerrit-Change-Number: 42310 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 25 Mar 2026 14:47:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in ...osmo-s1gw[master]: pfcp_peer: make assoc_setup and heartbeat_req timeouts configurable
by fixeria 25 Mar '26

25 Mar '26
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42486?usp=email ) Change subject: pfcp_peer: make assoc_setup and heartbeat_req timeouts configurable ...................................................................... pfcp_peer: make assoc_setup and heartbeat_req timeouts configurable Add assoc_setup_timeout and heartbeat_req_timeout as optional fields in the pfcp_peer config map, with 2000 ms defaults. Store the full cfg() map in #peer_state{} and read values from it with maps:get/3 at the point of use. Change-Id: I58a472a3bbbbad029a2f0246b084428ab3b1905c --- M config/sys.config M contrib/openapi.yaml M doc/manuals/chapters/configuration.adoc M doc/manuals/chapters/rest.adoc M include/osmo_s1gw.hrl M priv/openapi.json M src/osmo_s1gw_sup.erl M src/pfcp_peer.erl M src/rest_server.erl 9 files changed, 62 insertions(+), 13 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/config/sys.config b/config/sys.config index af6480b..5bebbe6 100644 --- a/config/sys.config +++ b/config/sys.config @@ -32,6 +32,10 @@ laddr => "127.0.1.1", %% remote address for outgoing PFCP PDUs to the UPF raddr => "127.0.1.2" + %% optional: PFCP Association Setup timeout in milliseconds (default: 2000) + %% assoc_setup_timeout => 2000, + %% optional: PFCP Heartbeat Request timeout in milliseconds (default: 2000) + %% heartbeat_req_timeout => 2000 }} %% Optional PFCP Network Instance IEs (omitted if not configured) %% {pfcp_net_inst_core, "core-side"}, %% PFCP Network Instance IE value (to core) diff --git a/contrib/openapi.yaml b/contrib/openapi.yaml index 59de93f..8ca18aa 100644 --- a/contrib/openapi.yaml +++ b/contrib/openapi.yaml @@ -529,6 +529,12 @@ raddr: type: string description: Remote IP address of the UPF (PFCP peer) + assoc_setup_timeout: + type: integer + description: PFCP Association Setup response timeout in milliseconds + heartbeat_req_timeout: + type: integer + description: PFCP Heartbeat Request response timeout in milliseconds GtpuKpiCfg: type: object diff --git a/doc/manuals/chapters/configuration.adoc b/doc/manuals/chapters/configuration.adoc index a43c9ad..a361730 100644 --- a/doc/manuals/chapters/configuration.adoc +++ b/doc/manuals/chapters/configuration.adoc @@ -137,6 +137,8 @@ {pfcp_peer, #{ laddr => "127.0.1.1", %% local address for PFCP (UDP) raddr => "127.0.1.2" %% remote address of the UPF + %% assoc_setup_timeout => 2000, %% optional, milliseconds + %% heartbeat_req_timeout => 2000 %% optional, milliseconds }}, %% Optional Network Instance IEs: @@ -151,6 +153,14 @@ `raddr`:: Remote IP address of the UPF. Default: `"127.0.1.2"`. +`assoc_setup_timeout`:: + How long (in milliseconds) to wait for a PFCP Association Setup Response + before retrying. Default: `2000`. + +`heartbeat_req_timeout`:: + How long (in milliseconds) to wait for a PFCP Heartbeat Response before + declaring the heartbeat timed out. Default: `2000`. + NOTE: The legacy flat keys `pfcp_loc_addr` and `pfcp_rem_addr` are still accepted for backwards compatibility. The `pfcp_peer` map takes priority if both are present. diff --git a/doc/manuals/chapters/rest.adoc b/doc/manuals/chapters/rest.adoc index 92b4f7a..c3f53af 100644 --- a/doc/manuals/chapters/rest.adoc +++ b/doc/manuals/chapters/rest.adoc @@ -78,7 +78,9 @@ }, "pfcp": { "laddr": "127.0.1.1", - "raddr": "127.0.1.2" + "raddr": "127.0.1.2", + "assoc_setup_timeout": 2000, + "heartbeat_req_timeout": 2000 }, "gtpu_kpi": { "enable": false, @@ -107,6 +109,8 @@ `pfcp`:: `laddr`::: Local PFCP bind address. `raddr`::: Remote UPF (PFCP peer) address. + `assoc_setup_timeout`::: PFCP Association Setup response timeout in milliseconds. + `heartbeat_req_timeout`::: PFCP Heartbeat Request response timeout in milliseconds. `gtpu_kpi`:: `enable`::: Whether GTP-U KPI reporting via nftables counters is active. diff --git a/include/osmo_s1gw.hrl b/include/osmo_s1gw.hrl index 91bd2e6..692a6ff 100644 --- a/include/osmo_s1gw.hrl +++ b/include/osmo_s1gw.hrl @@ -41,6 +41,8 @@ -define(ENV_DEFAULT_MME_REM_PORT, 36412). -define(ENV_DEFAULT_PFCP_LOC_ADDR, "127.0.1.1"). -define(ENV_DEFAULT_PFCP_REM_ADDR, "127.0.1.2"). +-define(ENV_DEFAULT_PFCP_ASSOC_SETUP_TIMEOUT, 2000). +-define(ENV_DEFAULT_PFCP_HEARTBEAT_REQ_TIMEOUT, 2000). -define(ENV_DEFAULT_GTPU_KPI_ENABLE, false). -define(ENV_DEFAULT_GTPU_KPI_TABLE_NAME, "osmo-s1gw"). -define(ENV_DEFAULT_GTPU_KPI_INTERVAL, 3000). diff --git a/priv/openapi.json b/priv/openapi.json index cf2fb50..3153505 100644 --- a/priv/openapi.json +++ b/priv/openapi.json @@ -763,6 +763,14 @@ "raddr": { "type": "string", "description": "Remote IP address of the UPF (PFCP peer)" + }, + "assoc_setup_timeout": { + "type": "integer", + "description": "PFCP Association Setup response timeout in milliseconds" + }, + "heartbeat_req_timeout": { + "type": "integer", + "description": "PFCP Heartbeat Request response timeout in milliseconds" } } }, diff --git a/src/osmo_s1gw_sup.erl b/src/osmo_s1gw_sup.erl index 573f2cb..9809fff 100644 --- a/src/osmo_s1gw_sup.erl +++ b/src/osmo_s1gw_sup.erl @@ -159,7 +159,11 @@ %% parse the new pfcp configuration block (takes priority) Cfg = maps:merge(OldCfg, osmo_s1gw:get_env(pfcp_peer, #{ })), #{laddr => maps:get(laddr, Cfg, ?ENV_DEFAULT_PFCP_LOC_ADDR), - raddr => maps:get(raddr, Cfg, ?ENV_DEFAULT_PFCP_REM_ADDR)}. + raddr => maps:get(raddr, Cfg, ?ENV_DEFAULT_PFCP_REM_ADDR), + assoc_setup_timeout => maps:get(assoc_setup_timeout, Cfg, + ?ENV_DEFAULT_PFCP_ASSOC_SETUP_TIMEOUT), + heartbeat_req_timeout => maps:get(heartbeat_req_timeout, Cfg, + ?ENV_DEFAULT_PFCP_HEARTBEAT_REQ_TIMEOUT)}. -spec gtpu_kpi_cfg() -> gtpu_kpi:cfg(). diff --git a/src/pfcp_peer.erl b/src/pfcp_peer.erl index 3423237..a6f4b03 100644 --- a/src/pfcp_peer.erl +++ b/src/pfcp_peer.erl @@ -55,14 +55,14 @@ -include_lib("kernel/include/logger.hrl"). -include_lib("pfcplib/include/pfcp_packet.hrl"). + +-include("osmo_s1gw.hrl"). -include("s1gw_metrics.hrl"). %% 3GPP TS 29.244, section 4.2 "UDP Header and Port Numbers" -define(PFCP_PORT, 8805). -define(PFCP_SEQ_NR_MAX, 16#ffffff). -define(PFCP_SEID_MAX, 16#ffffffffffffffff). --define(PFCP_ASSOC_SETUP_TIMEOUT, 2000). --define(PFCP_HEARTBEAT_REQ_TIMEOUT, 2000). -type pfcp_session_rsp() :: ok | {error, term()}. @@ -75,7 +75,9 @@ -type pfcp_pdu() :: #pfcp{}. -type cfg() :: #{laddr := string() | inet:ip_address(), - raddr := string() | inet:ip_address()}. + raddr := string() | inet:ip_address(), + assoc_setup_timeout => pos_integer(), + heartbeat_req_timeout => pos_integer()}. -type peer_info() :: #{state := atom(), laddr := inet:ip_address(), @@ -98,7 +100,8 @@ tref :: reference() }). --record(peer_state, {seid :: pfcp_seid(), +-record(peer_state, {cfg :: cfg(), + seid :: pfcp_seid(), sock :: gen_udp:socket(), loc_addr :: inet:ip_address(), rem_addr :: inet:ip_address(), @@ -189,7 +192,8 @@ {reuseaddr, true}, {active, true}]), ?LOG_INFO("PFCP peer @ ~p will talk to UPF @ ~p", [LocAddr, RemAddr]), - {ok, connecting, #peer_state{seid = 1, %% SEID=0 is special, see 7.2.2.4.2 + {ok, connecting, #peer_state{cfg = Cfg, + seid = 1, %% SEID=0 is special, see 7.2.2.4.2 sock = Sock, loc_addr = LocAddr, rem_addr = RemAddr, @@ -204,12 +208,13 @@ %% CONNECTING state connecting(enter, OldState, - #peer_state{} = S0) -> + #peer_state{cfg = Cfg} = S0) -> ?LOG_INFO("State change: ~p -> ~p", [OldState, ?FUNCTION_NAME]), s1gw_metrics:gauge_set(?S1GW_GAUGE_PFCP_ASSOCIATED, 0), %% Tx PFCP Association Setup {ok, S1} = send_assoc_setup(S0), - {keep_state, S1, [{state_timeout, ?PFCP_ASSOC_SETUP_TIMEOUT, assoc_setup_timeout}]}; + TVal = maps:get(assoc_setup_timeout, Cfg, ?ENV_DEFAULT_PFCP_ASSOC_SETUP_TIMEOUT), + {keep_state, S1, [{state_timeout, TVal, assoc_setup_timeout}]}; %% Handle Association Setup timeout connecting(state_timeout, assoc_setup_timeout, S) -> @@ -571,7 +576,8 @@ ?LOG_ERROR("Another Heartbeat Request is still pending (SeqNr=~p)", [SeqNr]), {{error, heartbeat_req_pending}, S}; -send_heartbeat_request(From, #peer_state{heartbeat = undefined, +send_heartbeat_request(From, #peer_state{cfg = Cfg, + heartbeat = undefined, seq_nr = SeqNr, loc_rts = LRTS} = S0) -> ReqIEs = #{recovery_time_stamp => #recovery_time_stamp{time = LRTS}}, @@ -579,8 +585,9 @@ case send_pdu({heartbeat_request, ReqIEs}, S0) of {ok, S1} -> s1gw_metrics:ctr_inc(?S1GW_CTR_PFCP_HEARTBEAT_REQ_TX), - TRef = erlang:start_timer(?PFCP_HEARTBEAT_REQ_TIMEOUT, self(), - heartbeat_request_watchdog), + TVal = maps:get(heartbeat_req_timeout, Cfg, + ?ENV_DEFAULT_PFCP_HEARTBEAT_REQ_TIMEOUT), + TRef = erlang:start_timer(TVal, self(), heartbeat_request_watchdog), HB = #heartbeat_state{from = From, seq_nr = SeqNr, tref = TRef}, diff --git a/src/rest_server.erl b/src/rest_server.erl index 24ca33b..7960ffa 100644 --- a/src/rest_server.erl +++ b/src/rest_server.erl @@ -281,7 +281,11 @@ config_pfcp() -> Cfg = osmo_s1gw:get_env(pfcp_peer, #{}), #{<<"laddr">> => bval(maps:get(laddr, Cfg, ?ENV_DEFAULT_PFCP_LOC_ADDR)), - <<"raddr">> => bval(maps:get(raddr, Cfg, ?ENV_DEFAULT_PFCP_REM_ADDR))}. + <<"raddr">> => bval(maps:get(raddr, Cfg, ?ENV_DEFAULT_PFCP_REM_ADDR)), + <<"assoc_setup_timeout">> => maps:get(assoc_setup_timeout, Cfg, + ?ENV_DEFAULT_PFCP_ASSOC_SETUP_TIMEOUT), + <<"heartbeat_req_timeout">> => maps:get(heartbeat_req_timeout, Cfg, + ?ENV_DEFAULT_PFCP_HEARTBEAT_REQ_TIMEOUT)}. -spec config_gtpu_kpi() -> map(). -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42486?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: I58a472a3bbbbad029a2f0246b084428ab3b1905c Gerrit-Change-Number: 42486 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> 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>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: gtpu_kpi: use ?ENV_DEFAULT_GTPU_KPI_{TABLE_NAME,INTERVAL}
by fixeria 25 Mar '26

25 Mar '26
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42484?usp=email ) Change subject: gtpu_kpi: use ?ENV_DEFAULT_GTPU_KPI_{TABLE_NAME,INTERVAL} ...................................................................... gtpu_kpi: use ?ENV_DEFAULT_GTPU_KPI_{TABLE_NAME,INTERVAL} Change-Id: Ia8194966b20da1adc26c02f416b8ec0508191d98 --- M src/gtpu_kpi.erl 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gtpu_kpi.erl b/src/gtpu_kpi.erl index 9432626..309f554 100644 --- a/src/gtpu_kpi.erl +++ b/src/gtpu_kpi.erl @@ -49,6 +49,7 @@ -include_lib("kernel/include/logger.hrl"). +-include("osmo_s1gw.hrl"). -include("s1gw_metrics.hrl"). -define(GTPU_PORT, 2152). @@ -146,8 +147,8 @@ %% ------------------------------------------------------------------ init([#{enable := true} = Cfg]) -> - TName = maps:get(table_name, Cfg, "osmo-s1gw"), - Interval = maps:get(interval, Cfg, 3000), + TName = maps:get(table_name, Cfg, ?ENV_DEFAULT_GTPU_KPI_TABLE_NAME), + Interval = maps:get(interval, Cfg, ?ENV_DEFAULT_GTPU_KPI_INTERVAL), %% flush the table, in case it remained %% it may not exist, so we ignore the result nft_flush_table(TName), -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42484?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: Ia8194966b20da1adc26c02f416b8ec0508191d98 Gerrit-Change-Number: 42484 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> 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>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: [REST] PfcpAssocState: field 'lrts' is required
by fixeria 25 Mar '26

25 Mar '26
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42483?usp=email ) Change subject: [REST] PfcpAssocState: field 'lrts' is required ...................................................................... [REST] PfcpAssocState: field 'lrts' is required The local RTS is always known and thus always gets included regardless of the PFCP association state. Only the remote RTS is optional. Change-Id: Ic766ebc56ce1810fc27cb49ddcac50bc94e539d9 Related: osmo-ttcn3-hacks.git I332e95a32935e0c8da99e600e8d30af14bd36b16 --- M contrib/openapi.yaml M priv/openapi.json 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/contrib/openapi.yaml b/contrib/openapi.yaml index 9308027..59de93f 100644 --- a/contrib/openapi.yaml +++ b/contrib/openapi.yaml @@ -333,6 +333,7 @@ - state - laddr - raddr + - lrts properties: state: type: string diff --git a/priv/openapi.json b/priv/openapi.json index f305739..cf2fb50 100644 --- a/priv/openapi.json +++ b/priv/openapi.json @@ -500,7 +500,8 @@ "required": [ "state", "laddr", - "raddr" + "raddr", + "lrts" ], "properties": { "state": { -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42483?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: Ic766ebc56ce1810fc27cb49ddcac50bc94e539d9 Gerrit-Change-Number: 42483 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> 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>
1 0
0 0
[M] Change in ...osmo-s1gw[master]: config/sys.config: group pfcp_peer params into a map
by fixeria 25 Mar '26

25 Mar '26
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42485?usp=email ) Change subject: config/sys.config: group pfcp_peer params into a map ...................................................................... config/sys.config: group pfcp_peer params into a map Following the same pattern as sctp_{client,server}, group the flat pfcp_loc_addr/pfcp_rem_addr environment variables into a pfcp_peer map. The old flat keys are still supported for backwards compat. Changes: * osmo_s1gw_sup: add pfcp_cfg(), merging legacy flat keys with the new pfcp_peer map (new takes priority); store the resolved config back via set_env(pfcp_peer, ...) so all consumers see a single canonical map * pfcp_peer: change start_link/2 to start_link/1 taking a cfg() map; simplify init() using sctp_common:parse_addr/1; add cfg() type * rest_server: read pfcp laddr/raddr from the pfcp_peer map Change-Id: Iba954746fe20e6b9eeaec3196e1f83e3fc3e7fc2 --- M config/sys.config M doc/manuals/chapters/configuration.adoc M src/osmo_s1gw_sup.erl M src/pfcp_peer.erl M src/rest_server.erl 5 files changed, 49 insertions(+), 28 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/config/sys.config b/config/sys.config index d428765..af6480b 100644 --- a/config/sys.config +++ b/config/sys.config @@ -26,8 +26,13 @@ %% socket options (if omitted or left empty, defaults apply) - see above sockopts => #{ } }}, - {pfcp_loc_addr, "127.0.1.1"}, %% local address for incoming PFCP PDUs from the UPF - {pfcp_rem_addr, "127.0.1.2"} %% remote address for outgoing PFCP PDUs to the UPF + %% PFCP peer (UPF) configuration + {pfcp_peer, #{ + %% local address for incoming PFCP PDUs from the UPF + laddr => "127.0.1.1", + %% remote address for outgoing PFCP PDUs to the UPF + raddr => "127.0.1.2" + }} %% Optional PFCP Network Instance IEs (omitted if not configured) %% {pfcp_net_inst_core, "core-side"}, %% PFCP Network Instance IE value (to core) %% {pfcp_net_inst_access, "radio-side"} %% PFCP Network Instance IE value (to access) diff --git a/doc/manuals/chapters/configuration.adoc b/doc/manuals/chapters/configuration.adoc index 0d4315f..a43c9ad 100644 --- a/doc/manuals/chapters/configuration.adoc +++ b/doc/manuals/chapters/configuration.adoc @@ -134,21 +134,27 @@ These parameters control the PFCP session between OsmoS1GW and the UPF. ---- -{pfcp_loc_addr, "127.0.1.1"}, %% local address for PFCP (UDP) -{pfcp_rem_addr, "127.0.1.2"}, %% remote address of the UPF +{pfcp_peer, #{ + laddr => "127.0.1.1", %% local address for PFCP (UDP) + raddr => "127.0.1.2" %% remote address of the UPF +}}, %% Optional Network Instance IEs: %% {pfcp_net_inst_core, "core-side"}, %% {pfcp_net_inst_access, "radio-side"} ---- -`pfcp_loc_addr`:: +`laddr`:: Local IP address on which OsmoS1GW listens for PFCP messages from the UPF. Default: `"127.0.1.1"`. -`pfcp_rem_addr`:: +`raddr`:: Remote IP address of the UPF. Default: `"127.0.1.2"`. +NOTE: The legacy flat keys `pfcp_loc_addr` and `pfcp_rem_addr` are still +accepted for backwards compatibility. The `pfcp_peer` map takes priority +if both are present. + `pfcp_net_inst_core`:: Value for the PFCP Network Instance IE on the core-network side of each GTP-U session. Omit if the UPF does not require Network Instance IEs. diff --git a/src/osmo_s1gw_sup.erl b/src/osmo_s1gw_sup.erl index fd89b3c..573f2cb 100644 --- a/src/osmo_s1gw_sup.erl +++ b/src/osmo_s1gw_sup.erl @@ -52,16 +52,17 @@ init([]) -> - PfcpLocAddr = osmo_s1gw:get_env(pfcp_loc_addr, ?ENV_DEFAULT_PFCP_LOC_ADDR), - PfcpRemAddr = osmo_s1gw:get_env(pfcp_rem_addr, ?ENV_DEFAULT_PFCP_REM_ADDR), - ClientCfg = client_cfg(), ServerCfg = server_cfg(), + PfcpCfg = pfcp_cfg(), %% Set a complete 'sctp_client' section with all fields populated. %% This may be used by mme_registry:mme_list_from_sctp_client/0 %% if the 'mme_pool' is missing in the configuration file. osmo_s1gw:set_env(sctp_client, ClientCfg), + %% Set a complete 'pfcp_peer' section with all fields populated. + %% This way the rest_server can read from it without legacy key handling. + osmo_s1gw:set_env(pfcp_peer, PfcpCfg), EnbRegistry = {enb_registry, {enb_registry, start_link, []}, permanent, @@ -78,8 +79,7 @@ 5000, worker, [sctp_server]}, - PfcpPeer = {pfcp_peer, {pfcp_peer, start_link, - [PfcpLocAddr, PfcpRemAddr]}, + PfcpPeer = {pfcp_peer, {pfcp_peer, start_link, [PfcpCfg]}, permanent, 5000, worker, @@ -151,6 +151,17 @@ priv => undefined}. +-spec pfcp_cfg() -> pfcp_peer:cfg(). +pfcp_cfg() -> + %% parse old/legacy environment options, if any + OldCfg = parse_env_map(#{laddr => pfcp_loc_addr, + raddr => pfcp_rem_addr}), + %% parse the new pfcp configuration block (takes priority) + Cfg = maps:merge(OldCfg, osmo_s1gw:get_env(pfcp_peer, #{ })), + #{laddr => maps:get(laddr, Cfg, ?ENV_DEFAULT_PFCP_LOC_ADDR), + raddr => maps:get(raddr, Cfg, ?ENV_DEFAULT_PFCP_REM_ADDR)}. + + -spec gtpu_kpi_cfg() -> gtpu_kpi:cfg(). gtpu_kpi_cfg() -> #{enable => osmo_s1gw:get_env(gtpu_kpi_enable, ?ENV_DEFAULT_GTPU_KPI_ENABLE), diff --git a/src/pfcp_peer.erl b/src/pfcp_peer.erl index aee679a..3423237 100644 --- a/src/pfcp_peer.erl +++ b/src/pfcp_peer.erl @@ -41,7 +41,7 @@ connected/3, code_change/4, terminate/3]). --export([start_link/2, +-export([start_link/1, assoc_setup/0, assoc_release/0, seid_alloc/0, @@ -74,13 +74,17 @@ -type pfcp_msg() :: {pfcp_msg_type(), pfcp_ies()}. -type pfcp_pdu() :: #pfcp{}. +-type cfg() :: #{laddr := string() | inet:ip_address(), + raddr := string() | inet:ip_address()}. + -type peer_info() :: #{state := atom(), laddr := inet:ip_address(), raddr := inet:ip_address(), lrts := pos_integer(), rrts => pos_integer()}. --export_type([peer_info/0, +-export_type([cfg/0, + peer_info/0, pfcp_session_rsp/0, pfcp_msg_type/0, pfcp_seq_nr/0, @@ -111,10 +115,9 @@ %% public API %% ------------------------------------------------------------------ -start_link(LocAddr, RemAddr) -> - gen_statem:start_link({local, ?MODULE}, ?MODULE, - [LocAddr, RemAddr], - []). +-spec start_link(cfg()) -> gen_statem:start_ret(). +start_link(Cfg) -> + gen_statem:start_link({local, ?MODULE}, ?MODULE, [Cfg], []). %% Initiate the PFCP Association Setup procedure @@ -176,15 +179,10 @@ %% gen_statem API %% ------------------------------------------------------------------ -init([LocAddrStr, RemAddr]) when is_list(LocAddrStr) -> - {ok, LocAddr} = inet:parse_address(LocAddrStr), - init([LocAddr, RemAddr]); - -init([LocAddr, RemAddrStr]) when is_list(RemAddrStr) -> - {ok, RemAddr} = inet:parse_address(RemAddrStr), - init([LocAddr, RemAddr]); - -init([LocAddr, RemAddr]) -> +init([Cfg]) -> + %% XXX: sctp_common:parse_addr/1 is not specific to SCTP + LocAddr = sctp_common:parse_addr(maps:get(laddr, Cfg)), + RemAddr = sctp_common:parse_addr(maps:get(raddr, Cfg)), s1gw_metrics:gauge_set(?S1GW_GAUGE_PFCP_ASSOCIATED, 0), {ok, Sock} = gen_udp:open(?PFCP_PORT, [binary, {ip, LocAddr}, diff --git a/src/rest_server.erl b/src/rest_server.erl index f9176cb..24ca33b 100644 --- a/src/rest_server.erl +++ b/src/rest_server.erl @@ -279,8 +279,9 @@ -spec config_pfcp() -> map(). config_pfcp() -> - #{<<"laddr">> => bval(osmo_s1gw:get_env(pfcp_loc_addr, ?ENV_DEFAULT_PFCP_LOC_ADDR)), - <<"raddr">> => bval(osmo_s1gw:get_env(pfcp_rem_addr, ?ENV_DEFAULT_PFCP_REM_ADDR))}. + Cfg = osmo_s1gw:get_env(pfcp_peer, #{}), + #{<<"laddr">> => bval(maps:get(laddr, Cfg, ?ENV_DEFAULT_PFCP_LOC_ADDR)), + <<"raddr">> => bval(maps:get(raddr, Cfg, ?ENV_DEFAULT_PFCP_REM_ADDR))}. -spec config_gtpu_kpi() -> map(). -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42485?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: Iba954746fe20e6b9eeaec3196e1f83e3fc3e7fc2 Gerrit-Change-Number: 42485 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> 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>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: GTPv1U_Emulation: Rename s/f_gtp1u_ping4/f_gtp1u_ping/
by fixeria 25 Mar '26

25 Mar '26
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42499?usp=email ) Change subject: GTPv1U_Emulation: Rename s/f_gtp1u_ping4/f_gtp1u_ping/ ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42499?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I195cb048176aefddcb477083ddc949b86ec592fa Gerrit-Change-Number: 42499 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 25 Mar 2026 14:12:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: GTPv2_Templates: Add enum for PDN Type and use it in pgw testsuite
by fixeria 25 Mar '26

25 Mar '26
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42498?usp=email ) Change subject: GTPv2_Templates: Add enum for PDN Type and use it in pgw testsuite ...................................................................... Patch Set 1: (1 comment) File pgw/PGW_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42498/comment/3ea94d7b_1d33… : PS1, Line 1002: TC_createSession_ping6 Looks like this should be done in a separate commit? The commit message does not tell that you're adding new TCs... -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42498?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9833e998522a09a15b93c8fed0e18a5e8159d760 Gerrit-Change-Number: 42498 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 25 Mar 2026 14:10:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: 5gc: Introduce test TC_pdu_sess_est_pco_pcscf
by fixeria 25 Mar '26

25 Mar '26
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42482?usp=email ) Change subject: 5gc: Introduce test TC_pdu_sess_est_pco_pcscf ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File 5gc/C5G_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42482/comment/15645c1a_a4fd… : PS1, Line 410: valueof These `valueof` are not really needed here because `cs_ExtdPCO` expects the second argument to be a template. Not critical, but I would remove them. Same applies to `cr_ExtdPCO`. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42482?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic7b22ad647bcac944551ac1c29080f895ca72cf8 Gerrit-Change-Number: 42482 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 25 Mar 2026 14:05:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • ...
  • 194
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.