neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41779?usp=email )
Change subject: personalization: refactor SmspTpScAddr
......................................................................
personalization: refactor SmspTpScAddr
Refactor SmspTpScAddr to the new ConfigurableParameter implementation
style.
Change-Id: I2600369e195e9f5aed7f4e6ff99ae273ed3ab3bf
---
M pySim/esim/saip/personalization.py
1 file changed, 11 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/79/41779/1
diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py
index efb4b00..9f55d76 100644
--- a/pySim/esim/saip/personalization.py
+++ b/pySim/esim/saip/personalization.py
@@ -340,10 +340,11 @@
class SmspTpScAddr(ConfigurableParameter):
"""Configurable SMSC (SMS Service Centre) TP-SC-ADDR. Expects to be a phone number in national or
international format (designated by a leading +). Automatically sets the NPI to E.164 and the TON based on
- presence or absence of leading +"""
+ presence or absence of leading +."""
- def validate(self):
- addr_str = str(self.input_value)
+ @classmethod
+ def validate_val(cls, val):
+ addr_str = str(val)
if addr_str[0] == '+':
digits = addr_str[1:]
international = True
@@ -354,10 +355,14 @@
raise ValueError('TP-SC-ADDR must not exceed 20 digits')
if not digits.isdecimal():
raise ValueError('TP-SC-ADDR must only contain decimal digits')
- self.value = (international, digits)
+ return (international, digits)
- def apply(self, pes: ProfileElementSequence):
- international, digits = self.value
+ @classmethod
+ def apply_val(cls, pes: ProfileElementSequence, val):
+ """val must be a tuple (international[bool], digits[str]).
+ For example, an input of "+1234" corresponds to (True, "1234");
+ An input of "1234" corresponds to (False, "1234")."""
+ international, digits = val
for pe in pes.get_pes_for_type('usim'):
# obtain the File instance from the ProfileElementUSIM
f_smsp = pe.files['ef-smsp']
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41779?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: I2600369e195e9f5aed7f4e6ff99ae273ed3ab3bf
Gerrit-Change-Number: 41779
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: laforge, neels.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/40094?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Code-Review-1 by laforge, Verified-1 by Jenkins Builder
Change subject: personalization: set example input values
......................................................................
personalization: set example input values
For all ConfigurableParameter subclasses, provide an example_input.
This may be useful for downstream projects' user interaction, to suggest
a value or prefill an input field, as appropriate.
Related: SYS#6768
Change-Id: I2672fedcbc32cb7a6cb0c233a4a22112bd9aae03
---
M pySim/esim/saip/personalization.py
1 file changed, 17 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/94/40094/7
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/40094?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2672fedcbc32cb7a6cb0c233a4a22112bd9aae03
Gerrit-Change-Number: 40094
Gerrit-PatchSet: 7
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Attention is currently required from: laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/39745?usp=email
to look at the new patch set (#11).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: personalization: refactor AlgorithmID, K, Opc
......................................................................
personalization: refactor AlgorithmID, K, Opc
Refactor AlgorithmID, K, Opc to the new ConfigurableParameter
implementation style.
K and Opc use a common abstract BinaryParam.
Note from the future: AlgorithmID so far takes "raw" int values, but
will turn to be an "enum" parameter with predefined meaningful strings
in I71c2ec1b753c66cb577436944634f32792353240
Change-Id: I6296fdcfd5d2ed313c4aade57ff43cc362375848
---
M pySim/esim/saip/personalization.py
1 file changed, 98 insertions(+), 40 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/45/39745/11
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39745?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6296fdcfd5d2ed313c4aade57ff43cc362375848
Gerrit-Change-Number: 39745
Gerrit-PatchSet: 11
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Attention is currently required from: laforge.
neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/39745?usp=email )
Change subject: personalization: refactor AlgorithmID, K, Opc
......................................................................
Patch Set 10:
(1 comment)
File pySim/esim/saip/personalization.py:
https://gerrit.osmocom.org/c/pysim/+/39745/comment/1ff15e96_dcd87e98?usp=em… :
PS8, Line 571: allow_len = int(128/8) # length in bytes (from BinaryParam)
> problem still seems apparent in new patchset 10?
yes, that is accurate.
so -- if the Algorithm chosen is TUAK, then the K length can be 256bit, right?
That is a first -- the valid range of one ConfigurableParam being influenced by the value of another.
I will simply allow both lengths in K and rely on the user to choose the right length.
Then certain downstream projects can later additionally validate the user input to match the Algorithm choice, like it warns against duplicate keys.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39745?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: I6296fdcfd5d2ed313c4aade57ff43cc362375848
Gerrit-Change-Number: 39745
Gerrit-PatchSet: 10
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 23:30:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter, fixeria, laforge.
neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/39742?usp=email )
Change subject: personalization: refactor ConfigurableParameter, Iccid, Imsi
......................................................................
Patch Set 13:
(1 comment)
File pySim/esim/saip/personalization.py:
https://gerrit.osmocom.org/c/pysim/+/39742/comment/61ccade4_4862c6f7?usp=em… :
PS13, Line 50: r"""Base class representing a part of the eSIM profile that is configurable during the
> I still don't understand why an abstract class is not inheriting from abc. […]
abc has no purpose and it doesn't work.
The first time this comment came up, I tried to use abc to determine which ConfigurableParameter classes are abstract. This did not work at all.
Adding empty cruft to code is not what I do.
This has been my position for a long time now. I am not defending this position to spite reviews, but the logical reason to change the patch is simply not present. I would love to accept your point, but explain to me why exactly you want to see abc in there.
If the reason is cosmetic, then let me know. I will disagree and i will still have to use a simple boolean flag to make it work as it should, but then I could at least understand what on earth you mean and why it is so important.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39742?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: I6522be4c463e34897ca9bff2309b3706a88b3ce8
Gerrit-Change-Number: 39742
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-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 07 Jan 2026 23:23:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email )
Change subject: ttcn3-bts-test: bpftrace: filter by executable name
......................................................................
ttcn3-bts-test: bpftrace: filter by executable name
Filtering by pid does not work as expected, perhaps because we
obtain it (by running pidof) in the container itself. Let's modify
the scripts to filter by the executable name instead.
Change-Id: I04c2e36806534a8ca650733bacf521ea57950692
Related: OS#6794
---
M ttcn3-bts-test/bpftrace/ksys_write_delay.bt
M ttcn3-bts-test/bpftrace/udp_sendmsg_delay.bt
M ttcn3-bts-test/jenkins.sh
3 files changed, 10 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/78/41778/1
diff --git a/ttcn3-bts-test/bpftrace/ksys_write_delay.bt b/ttcn3-bts-test/bpftrace/ksys_write_delay.bt
index 969dd29..bb964c3 100644
--- a/ttcn3-bts-test/bpftrace/ksys_write_delay.bt
+++ b/ttcn3-bts-test/bpftrace/ksys_write_delay.bt
@@ -7,11 +7,9 @@
* Implemented 2026 by Pau Espin Pedrol <pespin(a)sysmocom.de>
* SPDX-License-Identifier: CC0
*
- * As no filtering on PID etc. is done, you will likely use this with 'bpftrace -p' like
+ * The executable name must be passed as the first argument:
*
- * bpftrace ./ksys_write.bt -p PID
- *
- * (where PID is the PID of the process, like osmo-bts-trx)
+ * bpftrace ./ksys_write.bt osmo-bts-trx
*/
BEGIN
@@ -19,7 +17,7 @@
printf("Tracing ksys_write() latency... Hit Ctrl-C to end.\n");
}
-kprobe:ksys_write
+kprobe:ksys_write / comm == $1 /
{
$fd = (int64)arg0;
diff --git a/ttcn3-bts-test/bpftrace/udp_sendmsg_delay.bt b/ttcn3-bts-test/bpftrace/udp_sendmsg_delay.bt
index 8525413..f09960e 100644
--- a/ttcn3-bts-test/bpftrace/udp_sendmsg_delay.bt
+++ b/ttcn3-bts-test/bpftrace/udp_sendmsg_delay.bt
@@ -7,11 +7,9 @@
* Implemented 2025 by Vadim Yanitskiy <fixeria(a)osmocom.org>
* SPDX-License-Identifier: CC0
*
- * As no filtering on PID etc. is done, you will likely use this with 'bpftrace -p' like
+ * The executable name must be passed as the first argument:
*
- * bpftrace ./udp_sendmsg_delay.bt -p PID
- *
- * (where PID is the PID of the process, like osmo-bts-trx)
+ * bpftrace ./udp_sendmsg_delay.bt osmo-bts-trx
*/
BEGIN
@@ -19,7 +17,7 @@
printf("Tracing udp_sendmsg() latency... Hit Ctrl-C to end.\n");
}
-kprobe:udp_sendmsg
+kprobe:udp_sendmsg / comm == $1 /
{
$sk = (struct sock *)arg0;
/* poor man's ntohs() */
diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index 6e5cc67..0571d65 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -85,19 +85,14 @@
continue
fi
- local logfile="$VOL_BASE_DIR"/bts/bpftrace/$(basename "$script" | sed s/\.bt/.log/)
- local startscript="$VOL_BASE_DIR"/bts/bpftrace/$(basename "$script" | sed s/\.bt/.sh/)
+ local scriptfile="/data/bpftrace/$(basename "$script")"
+ local logfile="${scriptfile}.log"
cp "$script" "$VOL_BASE_DIR"/bts/bpftrace
- ( echo "#!/bin/sh -ex"
- echo "bpftrace /data/bpftrace/$(basename "$script") -p \$(pidof osmo-bts-$variant)" ) >"$startscript"
- chmod +x "$startscript"
-
- docker exec \
+ docker exec -d \
"${BUILD_TAG}-bts" \
- /usr/local/bin/respawn.sh /data/bpftrace/"$(basename "$startscript")" \
- >>"$logfile" 2>&1 &
+ /bin/sh -c "/usr/local/bin/respawn.sh bpftrace $scriptfile osmo-bts-$variant >>$logfile 2>&1"
done
fi
}
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/41778?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I04c2e36806534a8ca650733bacf521ea57950692
Gerrit-Change-Number: 41778
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/41776?usp=email )
Change subject: abis_osmo: Fix reading Abis IPA OSMO_EXT type
......................................................................
abis_osmo: Fix reading Abis IPA OSMO_EXT type
The l2 buffer points to the IPA payload, not the the ext type.
This was probably not the case during initial development of the stack,
but it is since a while ago, to be inline with usual behavior of ipa
handling.
This patch fixes BTS_Tests_OML.TC_ipa_osmo_pcu_anr_fwd failure.
Change-Id: I4941d28b2416a70e61d2881e8ebc556c5421256c
---
M src/common/abis_osmo.c
1 file changed, 2 insertions(+), 14 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
daniel: Looks good to me, but someone else must approve
diff --git a/src/common/abis_osmo.c b/src/common/abis_osmo.c
index beb9992..eb764d5 100644
--- a/src/common/abis_osmo.c
+++ b/src/common/abis_osmo.c
@@ -111,24 +111,12 @@
/* incoming IPA/OSMO extension Abis message from BSC */
int down_osmo(struct gsm_bts *bts, struct msgb *msg)
{
- uint8_t *type;
-
- if (msgb_l2len(msg) < 1) {
- oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG,
- "OSMO message too short\n");
- msgb_free(msg);
- return -EIO;
- }
-
- type = msgb_l2(msg);
- msg->l2h = type + 1;
-
- switch (*type) {
+ switch (osmo_ipa_msgb_cb_proto_ext(msg)) {
case IPAC_PROTO_EXT_PCU:
return rx_down_osmo_pcu(bts, msg);
default:
oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG,
- "OSMO message unknown extension %u\n", *type);
+ "OSMO message unknown extension %u\n", osmo_ipa_msgb_cb_proto_ext(msg));
msgb_free(msg);
return -EIO;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41776?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4941d28b2416a70e61d2881e8ebc556c5421256c
Gerrit-Change-Number: 41776
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/41777?usp=email )
Change subject: bpftrace: Introduce ksys_write_delay.bt
......................................................................
bpftrace: Introduce ksys_write_delay.bt
This will record latency of write() calls during ttcn3-bts-test run,
where some write() call on stderr seems to be taking ~0.32 seconds,
stalling the timerfd (71 times) and making osmo-bts exit.
Related: OS#6794
Change-Id: Ia1d2036ac7c6c9e2818d07e8787d857b3b3e5881
---
A ttcn3-bts-test/bpftrace/ksys_write_delay.bt
1 file changed, 39 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/ttcn3-bts-test/bpftrace/ksys_write_delay.bt b/ttcn3-bts-test/bpftrace/ksys_write_delay.bt
new file mode 100644
index 0000000..969dd29
--- /dev/null
+++ b/ttcn3-bts-test/bpftrace/ksys_write_delay.bt
@@ -0,0 +1,39 @@
+#!/usr/bin/env bpftrace
+
+/* Script to obtain ksys_write() latency histograms.
+ * It will measure time between entry and exit and plot one histogram
+ * for each destination port number, indicating the amount of time spent.
+ *
+ * Implemented 2026 by Pau Espin Pedrol <pespin(a)sysmocom.de>
+ * SPDX-License-Identifier: CC0
+ *
+ * As no filtering on PID etc. is done, you will likely use this with 'bpftrace -p' like
+ *
+ * bpftrace ./ksys_write.bt -p PID
+ *
+ * (where PID is the PID of the process, like osmo-bts-trx)
+ */
+
+BEGIN
+{
+ printf("Tracing ksys_write() latency... Hit Ctrl-C to end.\n");
+}
+
+kprobe:ksys_write
+{
+ $fd = (int64)arg0;
+
+ @start[tid] = nsecs;
+ @fd[tid] = $fd;
+}
+
+kretprobe:ksys_write / @start[tid] /
+{
+ $delta_us = (nsecs - @start[tid]) / 1000;
+ @latency[@fd[tid]] = hist($delta_us);
+
+ delete(@start[tid]);
+ delete(@fd[tid]);
+}
+
+/* vim:set ts=2 sw=2 et: */
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/41777?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ia1d2036ac7c6c9e2818d07e8787d857b3b3e5881
Gerrit-Change-Number: 41777
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(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>