Attention is currently required from: laforge.
neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/40096?usp=email )
Change subject: personalization: add param_source.py, implement batch personalization
......................................................................
Patch Set 10:
(4 comments)
Patchset:
PS6:
> I think we have had this discussion in the osmocom community before, and the general social consensu […]
In simple patches this makes sense, but there is a bound to this:
As a developer I need to be able to *use* the infrastructure that we have instead of running my laptop hot, also considering that i cannot run the complete pysim test suite on my laptop to begin with.
With a sufficiently complex branch, trying to be considerate about what to push becomes unfeasible.
When the gerrit job takes >10 minutes to finish each commit, it must be allowed to push ahead and not have to wait on each patch individually.
IMHO we have the [x] Resolved / DONE markings to indicate patch status for reviewers.
File pySim/esim/saip/param_source.py:
https://gerrit.osmocom.org/c/pysim/+/40096/comment/4c1deccc_ed242473?usp=em… :
PS10, Line 50:
> This is dead code. […]
ok, then yet another ABC cycle.
Ack, with that useless @abstractmethod decorator it is indeed dead code.
We clearly have different approaches. In my opinion, *ABC* is the dead code, and you keep advocating it besides the points I make against it -- I have many points against it and I find them logical and simple.
Not least that I have spent days exploring the world of ABC, found mostly problems it creates, and *one* valid point for it: that developers can read in the code that there is inheritance, which a single word comment can do likewise.
So I would very much enjoy if ABC took far less space and time in CR from now on.
https://gerrit.osmocom.org/c/pysim/+/40096/comment/059a7954_db20a739?usp=em… :
PS10, Line 84:
> likewise here, just `pass` will do.
Done
File pySim/esim/saip/personalization.py:
https://gerrit.osmocom.org/c/pysim/+/40096/comment/af6ada37_3f165569?usp=em… :
PS10, Line 705: def __init__(self,
> highly unusual formatting which we don't do this way in any other part o the code. […]
I am trying hard to read this CR as neutral fact. Thank you for a considerate choice of words in CR comments.
I find this formatting readable, because the type annotations clutter up the function signature.
For important styling, we should have a linter.
For perspective, I have recently seen a pysim patch with weird spaces in the function signature, and including an obvious bug, being +2 and merged within minutes. So, what I mean is, I could use any help to get this branch merged.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40096?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: I497c60c101ea0eea980e8b1a4b1f36c0eda39002
Gerrit-Change-Number: 40096
Gerrit-PatchSet: 10
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Sun, 15 Feb 2026 17:08:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: neels, pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/42120?usp=email )
Change subject: cp_peer: Implement local originated heartbeat procedure
......................................................................
Patch Set 1:
(1 comment)
File src/libosmo-pfcp/pfcp_cp_peer.c:
https://gerrit.osmocom.org/c/libosmo-pfcp/+/42120/comment/40a78f59_9ccd30a6… :
PS1, Line 112: unsigned int tval_rx_heartbeat_s =
: osmo_tdef_get(cp_peer->ep->cfg.tdefs, OSMO_PFCP_TIMER_HEARTBEAT_RESP, OSMO_TDEF_S, -1);
: o
Not critical, but it looks more logical to schedule this timer not when a response is received, but when sending the HEARTBEAT REQUEST (i.e. in `pfcp_cp_peer_tx_heartbeat_req()`).
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/42120?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I7efc0961e1ea39dd7f4cc6ba96be4cf5ce9a2d6c
Gerrit-Change-Number: 42120
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 15 Feb 2026 16:11:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: neels, pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/42120?usp=email )
Change subject: cp_peer: Implement local originated heartbeat procedure
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
one might have moved/extracted the header file in a separate patch, that would have saved me some confusion reading the diff from top to bottom, wondering why the copyright statement is by neels while you are the author of the commit, and the content being generic and unrelated to heartbeat ;)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/42120?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I7efc0961e1ea39dd7f4cc6ba96be4cf5ce9a2d6c
Gerrit-Change-Number: 42120
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 14 Feb 2026 10:30:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/42122?usp=email )
Change subject: pySim.esim.saip.File: Support pinStatusTemplateDO + lcsi
......................................................................
pySim.esim.saip.File: Support pinStatusTemplateDO + lcsi
The tuples defining a DF or ADF in an eSIM template must contain a
pinStatusTemplateDO. When parsing tuples into a File() instance, we
must save it, and re-create it at the time we re-encode that file.
Same applies to the lcsi (life cycle state indicator), which may
optionally exist for any file.
Change-Id: I073aa4374f2cd664d07fa0224bf0d4c809cdf4aa
Closes: OS#6955
---
M pySim/esim/saip/__init__.py
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/22/42122/1
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index a50e86f..bdbbccf 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -151,6 +151,8 @@
self.df_name = None
self.fill_pattern = None
self.fill_pattern_repeat = False
+ self.pstdo = None # pinStatusTemplateDO, mandatory for DF/ADF
+ self.lcsi = None # optional life cycle status indicator
# apply some defaults from profile
if self.template:
self.from_template(self.template)
@@ -278,6 +280,8 @@
elif self.file_type in ['MF', 'DF', 'ADF']:
fdb_dec['file_type'] = 'df'
fdb_dec['structure'] = 'no_info_given'
+ # pinStatusTemplateDO is mandatory for DF/ADF
+ fileDescriptor['pinStatusTemplateDO'] = self.pstdo
# build file descriptor based on above input data
fd_dict = {}
if len(fdb_dec):
@@ -304,6 +308,8 @@
# desired fill or repeat pattern in the "proprietaryEFInfo" element for the EF in Profiles
# downloaded to a V2.2 or earlier eUICC.
fileDescriptor['proprietaryEFInfo'] = pefi
+ if self.lcsi:
+ fileDescriptor['lcsi'] = self.lcsi
logger.debug("%s: to_fileDescriptor(%s)" % (self, fileDescriptor))
return fileDescriptor
@@ -323,6 +329,8 @@
if efFileSize:
self._file_size = self._decode_file_size(efFileSize)
+ self.pstdo = fileDescriptor.get('pinStatusTemplateDO', None)
+ self.lcsi = fileDescriptor.get('lcsi', None)
pefi = fileDescriptor.get('proprietaryEFInfo', {})
securityAttributesReferenced = fileDescriptor.get('securityAttributesReferenced', None)
if securityAttributesReferenced:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42122?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I073aa4374f2cd664d07fa0224bf0d4c809cdf4aa
Gerrit-Change-Number: 42122
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/42120?usp=email )
Change subject: cp_peer: Implement local originated heartbeat procedure
......................................................................
cp_peer: Implement local originated heartbeat procedure
Submit PFCP Hearbeat Request with configured interval,
and timeout after no PFCP Hearbeat Response received based on
configuration.
Upon timeout, the cp_peer assoc_cb() is called to notify the user that
the peer is considered not associated anymore. It will then try to
keep associating again automatically.
Related: SYS#7294
Change-Id: I7efc0961e1ea39dd7f4cc6ba96be4cf5ce9a2d6c
---
M include/osmocom/pfcp/Makefile.am
M include/osmocom/pfcp/pfcp_cp_peer_private.h
A include/osmocom/pfcp/pfcp_endpoint_private.h
M src/libosmo-pfcp/pfcp_cp_peer.c
M src/libosmo-pfcp/pfcp_endpoint.c
5 files changed, 163 insertions(+), 33 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/20/42120/1
diff --git a/include/osmocom/pfcp/Makefile.am b/include/osmocom/pfcp/Makefile.am
index 21b3aeb..b4a2305 100644
--- a/include/osmocom/pfcp/Makefile.am
+++ b/include/osmocom/pfcp/Makefile.am
@@ -1,4 +1,5 @@
noinst_HEADERS = \
+ pfcp_endpoint_private.h \
pfcp_cp_peer_private.h \
$(NULL)
diff --git a/include/osmocom/pfcp/pfcp_cp_peer_private.h b/include/osmocom/pfcp/pfcp_cp_peer_private.h
index b8b0af7..503912d 100644
--- a/include/osmocom/pfcp/pfcp_cp_peer_private.h
+++ b/include/osmocom/pfcp/pfcp_cp_peer_private.h
@@ -46,6 +46,9 @@
/* Application private data for assoc_cb, in case ep->priv does not suffice. */
void *priv;
+ struct osmo_timer_list heartbeat_tx_timer;
+ struct osmo_timer_list heartbeat_rx_timer;
+
struct osmo_use_count use_count;
struct osmo_use_count_entry use_count_buf[128];
};
diff --git a/include/osmocom/pfcp/pfcp_endpoint_private.h b/include/osmocom/pfcp/pfcp_endpoint_private.h
new file mode 100644
index 0000000..2b1b52b
--- /dev/null
+++ b/include/osmocom/pfcp/pfcp_endpoint_private.h
@@ -0,0 +1,57 @@
+/*
+ * (C) 2021-2025 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de>
+ * All Rights Reserved.
+ *
+ * Author: Neels Janosch Hofmeyr <nhofmeyr(a)sysmocom.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <stdint.h>
+
+#include <osmocom/core/hashtable.h>
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/osmo_io.h>
+#include <osmocom/pfcp/pfcp_endpoint.h>
+
+
+/* Send/receive PFCP messages to/from remote PFCP endpoints. */
+struct osmo_pfcp_endpoint {
+ struct osmo_pfcp_endpoint_cfg cfg;
+
+ /* PFCP socket */
+ struct osmo_io_fd *iofd;
+
+ /* The time at which this endpoint last restarted, as seconds since unix epoch. */
+ uint32_t recovery_time_stamp;
+
+ /* State for determining the next sequence number for transmitting a request message */
+ uint32_t seq_nr_state;
+
+ /* All transmitted PFCP Request messages, list of osmo_pfcp_queue_entry.
+ * For a transmitted Request message, wait for a matching Response from a remote peer; if none arrives,
+ * retransmit (see n1 and t1_ms). */
+ struct llist_head sent_requests;
+ DECLARE_HASHTABLE(sent_requests_by_seq_nr, 12);
+ /* All transmitted PFCP Response messages, list of osmo_pfcp_queue_entry.
+ * For a transmitted Response message, keep it in the queue for a fixed amount of time. If the peer retransmits
+ * the original Request, do not dispatch the Request, but respond with the queued message directly. */
+ struct llist_head sent_responses;
+ DECLARE_HASHTABLE(sent_responses_by_seq_nr, 12);
+};
diff --git a/src/libosmo-pfcp/pfcp_cp_peer.c b/src/libosmo-pfcp/pfcp_cp_peer.c
index 403a474..e48810f 100644
--- a/src/libosmo-pfcp/pfcp_cp_peer.c
+++ b/src/libosmo-pfcp/pfcp_cp_peer.c
@@ -27,7 +27,7 @@
#include <osmocom/core/fsm.h>
#include <osmocom/core/tdef.h>
-#include <osmocom/pfcp/pfcp_endpoint.h>
+#include <osmocom/pfcp/pfcp_endpoint_private.h>
#include <osmocom/pfcp/pfcp_cp_peer_private.h>
#define LOG_CP_PEER(CP_PEER, LOGLEVEL, FMT, ARGS...) \
@@ -45,12 +45,14 @@
enum pfcp_cp_peer_fsm_event {
PFCP_CP_PEER_EV_RX_ASSOC_SETUP_RESP,
PFCP_CP_PEER_EV_RX_ASSOC_UPDATE_REQ,
+ PFCP_CP_PEER_EV_HEARTBEAT_TIMEOUT,
PFCP_CP_PEER_EV_USE_COUNT_ZERO,
};
static const struct value_string pfcp_cp_peer_fsm_event_names[] = {
OSMO_VALUE_STRING(PFCP_CP_PEER_EV_RX_ASSOC_SETUP_RESP),
OSMO_VALUE_STRING(PFCP_CP_PEER_EV_RX_ASSOC_UPDATE_REQ),
+ OSMO_VALUE_STRING(PFCP_CP_PEER_EV_HEARTBEAT_TIMEOUT),
OSMO_VALUE_STRING(PFCP_CP_PEER_EV_USE_COUNT_ZERO),
{}
};
@@ -91,6 +93,62 @@
return 0;
}
+static int on_pfcp_heartbeat_resp(struct osmo_pfcp_msg *req, struct osmo_pfcp_msg *rx_resp, const char *errmsg)
+{
+ struct osmo_fsm_inst *fi = req->ctx.peer_fi;
+ struct osmo_pfcp_cp_peer *cp_peer = fi->priv;
+
+ if (!rx_resp) {
+ OSMO_LOG_PFCP_MSG(req, LOGL_NOTICE, "Error: PFCP Heartbeat Response: %s\n",
+ errmsg ? : "no response received");
+ return 0;
+ }
+
+ OSMO_LOG_PFCP_MSG(rx_resp, LOGL_INFO, "Rx PFCP Heartbeat Response\n");
+
+ if (fi->state != PFCP_CP_PEER_ST_ASSOCIATED)
+ return 0;
+
+ unsigned int tval_rx_heartbeat_s =
+ osmo_tdef_get(cp_peer->ep->cfg.tdefs, OSMO_PFCP_TIMER_HEARTBEAT_RESP, OSMO_TDEF_S, -1);
+ osmo_timer_schedule(&cp_peer->heartbeat_rx_timer, tval_rx_heartbeat_s, 0);
+
+ return 0;
+}
+
+static void pfcp_cp_peer_tx_heartbeat_req(struct osmo_pfcp_cp_peer *cp_peer)
+{
+ struct osmo_pfcp_msg *m;
+
+ m = osmo_pfcp_cp_peer_new_req(cp_peer, OSMO_PFCP_MSGT_HEARTBEAT_REQ);
+ m->ies.heartbeat_req.recovery_time_stamp = osmo_pfcp_endpoint_get_recovery_timestamp(cp_peer->ep);
+
+ m->ctx.resp_cb = on_pfcp_heartbeat_resp;
+
+ LOG_CP_PEER(cp_peer, LOGL_INFO, "Tx PFCP Heartbeat Request\n");
+
+ if (osmo_pfcp_endpoint_tx(cp_peer->ep, m))
+ LOG_CP_PEER(cp_peer, LOGL_ERROR, "Failed to transmit PFCP Heartbeat Request to peer\n");
+}
+
+static void pfcp_cp_peer_heartbeat_tx_timer_cb(void *data)
+{
+ struct osmo_pfcp_cp_peer *cp_peer = data;
+ unsigned int tval_tx_heartbeat_s =
+ osmo_tdef_get(cp_peer->ep->cfg.tdefs, OSMO_PFCP_TIMER_HEARTBEAT_REQ, OSMO_TDEF_S, -1);
+
+ pfcp_cp_peer_tx_heartbeat_req(cp_peer);
+
+ osmo_timer_schedule(&cp_peer->heartbeat_tx_timer, tval_tx_heartbeat_s, 0);
+}
+
+static void pfcp_cp_peer_heartbeat_rx_timer_cb(void *data)
+{
+ struct osmo_pfcp_cp_peer *cp_peer = data;
+
+ osmo_fsm_inst_dispatch(cp_peer->fi, PFCP_CP_PEER_EV_HEARTBEAT_TIMEOUT, NULL);
+}
+
/* Allocate PFCP CP peer FSM and start sending PFCP Association Setup Request messages to remote_addr, using endpoint
* ep. As soon as a successful response is received, change to state PFCP_CP_PEER_ST_ASSOCIATED.
*/
@@ -117,9 +175,20 @@
osmo_use_count_make_static_entries(&cp_peer->use_count, cp_peer->use_count_buf, ARRAY_SIZE(cp_peer->use_count_buf));
osmo_fsm_inst_update_id_f_sanitize(fi, '-', osmo_sockaddr_to_str_c(OTC_SELECT, &cp_peer->remote_addr));
+
+ osmo_timer_setup(&cp_peer->heartbeat_tx_timer, pfcp_cp_peer_heartbeat_tx_timer_cb, cp_peer);
+ osmo_timer_setup(&cp_peer->heartbeat_rx_timer, pfcp_cp_peer_heartbeat_rx_timer_cb, cp_peer);
return cp_peer;
}
+
+static void pfcp_cp_peer_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
+{
+ struct osmo_pfcp_cp_peer *cp_peer = fi->priv;
+ osmo_timer_del(&cp_peer->heartbeat_tx_timer);
+ osmo_timer_del(&cp_peer->heartbeat_rx_timer);
+}
+
void osmo_pfcp_cp_peer_free(struct osmo_pfcp_cp_peer *cp_peer)
{
if (!cp_peer)
@@ -257,8 +326,18 @@
static void pfcp_cp_peer_associated_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
struct osmo_pfcp_cp_peer *cp_peer = fi->priv;
+ unsigned int tval_rx_heartbeat_s =
+ osmo_tdef_get(cp_peer->ep->cfg.tdefs, OSMO_PFCP_TIMER_HEARTBEAT_RESP, OSMO_TDEF_S, -1);
LOG_CP_PEER(cp_peer, LOGL_NOTICE, "Associated with UPF %s\n",
osmo_sockaddr_to_str_c(OTC_SELECT, &cp_peer->remote_addr));
+
+ /* Send first Hrartbeat Req immediately to fetch recovery timestamp info from peer.
+ * 3GPP TS 23.007 19A: "When peer PFCP entities information is available, i.e. when the PFCP Association
+ * is still alive, the restarted PFCP entity shall send its updated Recovery Time Stamps in a Heartbeat
+ * Request message to the peer PFCP entities before initiating any PFCP session signalling"
+ */
+ osmo_timer_schedule(&cp_peer->heartbeat_tx_timer, 0, 0);
+ osmo_timer_schedule(&cp_peer->heartbeat_rx_timer, tval_rx_heartbeat_s, 0);
if (cp_peer->assoc_cb)
cp_peer->assoc_cb(cp_peer, true);
}
@@ -273,6 +352,11 @@
LOG_CP_PEER(cp_peer, LOGL_ERROR, "PFCP Association Update Request is not implemented\n");
break;
+ case PFCP_CP_PEER_EV_HEARTBEAT_TIMEOUT:
+ LOG_CP_PEER(cp_peer, LOGL_NOTICE, "Heartbeat timeout!\n");
+ osmo_pfcp_cp_peer_fsm_state_chg(PFCP_CP_PEER_ST_WAIT_ASSOC_SETUP_RESP);
+ break;
+
default:
OSMO_ASSERT(false);
}
@@ -283,6 +367,8 @@
struct osmo_pfcp_cp_peer *cp_peer = fi->priv;
LOG_CP_PEER(cp_peer, LOGL_NOTICE, "Disassociating from UPF %s\n",
osmo_sockaddr_to_str_c(OTC_SELECT, &cp_peer->remote_addr));
+ osmo_timer_del(&cp_peer->heartbeat_tx_timer);
+ osmo_timer_del(&cp_peer->heartbeat_rx_timer);
if (cp_peer->assoc_cb)
cp_peer->assoc_cb(cp_peer, false);
}
@@ -358,6 +444,7 @@
.name = "associated",
.in_event_mask = 0
| S(PFCP_CP_PEER_EV_RX_ASSOC_UPDATE_REQ)
+ | S(PFCP_CP_PEER_EV_HEARTBEAT_TIMEOUT)
,
.out_state_mask = 0
| S(PFCP_CP_PEER_ST_WAIT_ASSOC_SETUP_RESP)
@@ -394,6 +481,7 @@
.num_states = ARRAY_SIZE(pfcp_cp_peer_fsm_states),
.log_subsys = DLPFCP,
.event_names = pfcp_cp_peer_fsm_event_names,
+ .cleanup = pfcp_cp_peer_fsm_cleanup,
.timer_cb = pfcp_cp_peer_fsm_timer_cb,
.allstate_action = pfcp_cp_peer_allstate_action,
.allstate_event_mask = 0
diff --git a/src/libosmo-pfcp/pfcp_endpoint.c b/src/libosmo-pfcp/pfcp_endpoint.c
index 64ea347..0198582 100644
--- a/src/libosmo-pfcp/pfcp_endpoint.c
+++ b/src/libosmo-pfcp/pfcp_endpoint.c
@@ -33,32 +33,9 @@
#include <osmocom/core/osmo_io.h>
#include <osmocom/pfcp/pfcp_endpoint.h>
+#include <osmocom/pfcp/pfcp_endpoint_private.h>
#include <osmocom/pfcp/pfcp_msg.h>
-/* Send/receive PFCP messages to/from remote PFCP endpoints. */
-struct osmo_pfcp_endpoint {
- struct osmo_pfcp_endpoint_cfg cfg;
-
- /* PFCP socket */
- struct osmo_io_fd *iofd;
-
- /* The time at which this endpoint last restarted, as seconds since unix epoch. */
- uint32_t recovery_time_stamp;
-
- /* State for determining the next sequence number for transmitting a request message */
- uint32_t seq_nr_state;
-
- /* All transmitted PFCP Request messages, list of osmo_pfcp_queue_entry.
- * For a transmitted Request message, wait for a matching Response from a remote peer; if none arrives,
- * retransmit (see n1 and t1_ms). */
- struct llist_head sent_requests;
- DECLARE_HASHTABLE(sent_requests_by_seq_nr, 12);
- /* All transmitted PFCP Response messages, list of osmo_pfcp_queue_entry.
- * For a transmitted Response message, keep it in the queue for a fixed amount of time. If the peer retransmits
- * the original Request, do not dispatch the Request, but respond with the queued message directly. */
- struct llist_head sent_responses;
- DECLARE_HASHTABLE(sent_responses_by_seq_nr, 12);
-};
/*! Entry of pfcp_endpoint message queue of PFCP messages, for re-transsions. */
struct osmo_pfcp_queue_entry {
@@ -151,14 +128,18 @@
return ep;
}
-static unsigned int ep_n1(struct osmo_pfcp_endpoint *ep)
+static unsigned int ep_n1(struct osmo_pfcp_endpoint *ep, const struct osmo_pfcp_msg *m)
{
+ if (m->h.message_type == OSMO_PFCP_MSGT_HEARTBEAT_REQ)
+ return 0;
return osmo_tdef_get(ep->cfg.tdefs, OSMO_PFCP_TIMER_N1, OSMO_TDEF_CUSTOM, -1);
}
-static unsigned int ep_t1(struct osmo_pfcp_endpoint *ep)
+static unsigned int ep_t1(struct osmo_pfcp_endpoint *ep, const struct osmo_pfcp_msg *m)
{
- return osmo_tdef_get(ep->cfg.tdefs, OSMO_PFCP_TIMER_T1, OSMO_TDEF_MS, -1);
+ int T = m->h.message_type == OSMO_PFCP_MSGT_HEARTBEAT_REQ ? OSMO_PFCP_TIMER_HEARTBEAT_RESP :
+ OSMO_PFCP_TIMER_T1;
+ return osmo_tdef_get(ep->cfg.tdefs, T, OSMO_TDEF_MS, -1);
}
static unsigned int ep_keep_resp(const struct osmo_pfcp_endpoint *ep, const struct osmo_pfcp_msg *m)
@@ -177,8 +158,8 @@
static bool pfcp_queue_retrans(struct osmo_pfcp_queue_entry *qe)
{
struct osmo_pfcp_endpoint *endpoint = qe->ep;
- unsigned int t1_ms = ep_t1(endpoint);
struct osmo_pfcp_msg *m = qe->m;
+ unsigned int t1_ms = ep_t1(endpoint, m);
int rc;
/* if no more attempts remaining, drop from queue */
@@ -283,12 +264,12 @@
timeout_ms = ep_keep_resp(endpoint, m);
OSMO_LOG_PFCP_MSG(m, LOGL_DEBUG, "keep sent Responses for %ums\n", timeout_ms);
} else {
- timeout_ms = ep_t1(endpoint);
- n1 = ep_n1(endpoint);
+ timeout_ms = ep_t1(endpoint, m);
+ n1 = ep_n1(endpoint, m);
OSMO_LOG_PFCP_MSG(m, LOGL_DEBUG, "retransmit unanswered Requests %u x %ums\n", n1, timeout_ms);
- /* If there are no retransmissions or no timeout, it makes no sense to add to the queue. */
- if (!n1 || !timeout_ms) {
+ /* If there are no retransmissions and no timeout, it makes no sense to add to the queue. */
+ if (!n1 && !timeout_ms) {
if (!m->is_response && m->ctx.resp_cb)
m->ctx.resp_cb(m, NULL, "PFCP timeout is zero, cannot wait for a response");
return 0;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/42120?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I7efc0961e1ea39dd7f4cc6ba96be4cf5ce9a2d6c
Gerrit-Change-Number: 42120
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42119?usp=email )
Change subject: xua_asp_fsm: Validate remote ASP Id matching config in SG role
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42119?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I3e22439aa7e22f7a6113b093c44ace6745c808b9
Gerrit-Change-Number: 42119
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Feb 2026 12:42:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42113?usp=email )
Change subject: xua_default_lm_fsm: Submit RKM REG REQ for all AS in ASP
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42113?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I932c1b05dfd37fd7b89adea0d1ea59a5dc6138b4
Gerrit-Change-Number: 42113
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Feb 2026 12:42:18 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: daniel, pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42115?usp=email )
Change subject: Allow configuring local ASP Identifier
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File src/ss7_asp_vty.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/42115/comment/3cf4b6f4_50328… :
PS1, Line 465: id64
> I specially wanted to name it that way because the var is signed 64 bits because the osmo_str_to_int […]
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42115?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ib94d542f940e13d5c007bc3319e7dde65cf81f12
Gerrit-Change-Number: 42115
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 13 Feb 2026 12:41:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42119?usp=email )
Change subject: xua_asp_fsm: Validate remote ASP Id matching config in SG role
......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/42119/comment/8177e5d0_124cc… :
PS1, Line 11: identift
> identify
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42119?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I3e22439aa7e22f7a6113b093c44ace6745c808b9
Gerrit-Change-Number: 42119
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 13 Feb 2026 08:51:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>