Attention is currently required from: daniel, laforge, lynxis lazus.
lynxis lazus has uploaded a new patch set (#4) to the change originally created by daniel. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39703?usp=email )
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: Use osmo_select_main_ctx to support talloc context OTC_SELECT
......................................................................
Use osmo_select_main_ctx to support talloc context OTC_SELECT
The libvlr code is using the OTC_SELECT talloc context.
Change-Id: I4b26b73af706ce790181085880c6866e7f7e8c65
---
M src/sgsn/sgsn_main.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/03/39703/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39703?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I4b26b73af706ce790181085880c6866e7f7e8c65
Gerrit-Change-Number: 39703
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: Hoernchen, daniel, laforge.
dexter has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/43545?usp=email )
Change subject: smpp2sim: make the SCP81 BIP relay work
......................................................................
Patch Set 2: Code-Review+1
(11 comments)
Patchset:
PS2:
I have now carefully read that through. I think this patch would benefit a lot from a more verbose documentation. All methods that are important for an API user should have all input and output parameters documented and contain a hint on how they should be used. I know I have left a lot of comments, some reflect what I have understood. Maybe you can use that for a reference to improve the documentation.
Otherwise I think the logic is all right. This should work.
File pySim/bip.py:
https://gerrit.osmocom.org/c/pysim/+/43545/comment/fbb002a2_3adc6228?usp=em… :
PS2, Line 30: # Without them the handler builds and logs what it would send.
I would move such documentation into the API docstrings of the class. General information is ok at this location, the specific bits like which parameters the constructors get, etc, that should be in the API docstrings
https://gerrit.osmocom.org/c/pysim/+/43545/comment/d2648cd9_6f51fb19?usp=em… :
PS2, Line 64: bandwidth..
This explains why we have moved away from twisted. I would put this into a normal comment. Having this in the API docstring is a bit too much I think...
https://gerrit.osmocom.org/c/pysim/+/43545/comment/b2d9b943_f029e2e2?usp=em… :
PS2, Line 119: if was_empty and not self._closing:
I think its important to document why we only notify when the buffer was empty. As far as I understand the rationale is that when a new event happens the buffer is usually empty.
So data comes in, the notify happens and a ENVELOPE EVENT DOWNLOAD is sent to the card (actively by the API user, via the ENVELOPE command). The card now knows that there was an event and how much data is in the buffer.
Then the card sends proactive RECEIVE DATA commands to get the data from the buffer. When the card has received all data, the buffer is empty again and ready for a new event.
Since with each RECEIVE DATA, the card gets the current amount of remaining bytes, we can be sure that the cards reads all bytes until the buffer really runs empty. So basically we will see burts of incoming data with pauses in between. The ENVELOPE EVENT DOWNLOAD is to get the data transfer to the card going again after there was a pause.
https://gerrit.osmocom.org/c/pysim/+/43545/comment/377bf6d1_1d6fa423?usp=em… :
PS2, Line 126: def rx_available(self) -> int:
Missing API doc
(you have take_rx and wait_rx, maybe rename this method to "available_rx" or vice-versa?)
https://gerrit.osmocom.org/c/pysim/+/43545/comment/d4a1deef_429e9510?usp=em… :
PS2, Line 175: def __init__(self, on_data_available=None):
I think here it is in particular important to put an API docstring and to document the on_data_available callback in the API docstring.
https://gerrit.osmocom.org/c/pysim/+/43545/comment/9a4cb166_3a92c552?usp=em… :
PS2, Line 189: def channel_delete(self, chan_nr: int):
maybe add a docstring?
https://gerrit.osmocom.org/c/pysim/+/43545/comment/687f6ee6_bf03f992?usp=em… :
PS2, Line 192: def notify_data_available(self, chan: ProactChannel):
The ProactChannel object is created by the channel_create method in this class. Maybe it makes sense to give the self._on_data_available callback to the constructor of ProactChannel. Then the ProactChannel can call it directly, without reaching back to here.
This would also result in a clearer architecture as it seems the only reason why the ProactChannel object has a reference to the ProactChannels object is to reach the notify_data_available callback. Then we can also just pass the callback directly with the constructor. We then also can drop the notify_data_available method here entirely.
https://gerrit.osmocom.org/c/pysim/+/43545/comment/7ad435c6_e6e4f723?usp=em… :
PS2, Line 199: def __init__(self, data_available_sink=None, sms_sink=None):
Explain the parameters in an API docstring. In particular the data_available_sink is important here.
The API user should know what to do with the result. I think the comment is already good, but I would mention that the API user gets the encoded bytes. So all he has to do is to forward those bytes using the ENVELOPE command.
https://gerrit.osmocom.org/c/pysim/+/43545/comment/91cc2b9d_11c38d19?usp=em… :
PS2, Line 268: def build_data_available_envelope(self, chan: ProactChannel) -> bytes:
As far as I can see this is called from _on_channel_data_available only. This means that it is an internal method - not to be called by API users. I would recommend to prefix it with an underscore when this is the case.
https://gerrit.osmocom.org/c/pysim/+/43545/comment/80ce1b95_14c01fd5?usp=em… :
PS2, Line 392: def handle_ReceiveData(self, pcmd: ProactiveCommand):
maybe add some more API doc on how to use this function? As far as I understood, this is to be called by the API user when he has received a proactive RECEIVE DATA command from the card. So with this the card basically actively fetches data from the rx buffer.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43545?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: If96c768f2e35c20ea3753e601059410121517b60
Gerrit-Change-Number: 43545
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 09 Sep 2026 13:47:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/43584?usp=email )
Change subject: configure: search libresolv for res_9_init
......................................................................
configure: search libresolv for res_9_init
sgsnemu points the resolver at the DNS server received in the PCO by
writing to the resolver state from <resolv.h>. glibc keeps that state
in libc, so nothing extra is needed on GNU/Linux.
Darwin keeps it in libresolv and renames the interface to the BIND 9
symbols: /usr/include/resolv.h has "#define res_init res_9_init" and
"#define __res_state __res_9_state". The link of sgsnemu then fails
with
Undefined symbols for architecture arm64: "___res_9_state"
Add AC_SEARCH_LIBS([res_9_init], [resolv]) so -lresolv is picked up
where the symbol lives there. res_9_init is deliberately the name
searched for, rather than res_init: it exists only on the platforms
that carry this renaming, so on glibc the search finds nothing, LIBS
stays as it was and the link line does not change.
Change-Id: I97787b051c712c5cfdb241cb7931a214d5a87630
Signed-off-by: Andrei Gosman <andrei.gosman(a)gmail.com>
---
M configure.ac
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/configure.ac b/configure.ac
index cbb6b66..3283aae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,10 @@
# check for getopt in standard library
adl_FUNC_GETOPT_LONG
+# sgsnemu sets the resolver state (_res) from <resolv.h>. glibc keeps it in
+# libc; Darwin exports it from libresolv under BIND 9 names (res_9_*).
+AC_SEARCH_LIBS([res_9_init], [resolv])
+
AM_INIT_AUTOMAKE([foreign])
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.14.2)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/43584?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I97787b051c712c5cfdb241cb7931a214d5a87630
Gerrit-Change-Number: 43584
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/43580?usp=email )
Change subject: build: probe UHD version with PKG_CHECK_EXISTS
......................................................................
build: probe UHD version with PKG_CHECK_EXISTS
configure.ac appends -lboost_thread for libuhd < 4.2, which needs it
because of a bug in its own code. The probe is a second
PKG_CHECK_MODULES(UHD, uhd < 004.002, ...) reusing the UHD variable
prefix of the first one.
That never asks pkg-config. PKG_CHECK_MODULES expands _PKG_CONFIG,
which opens with
if test -n "$$1"; then
pkg_cv_[]$1="$$1"
so once UHD_CFLAGS and UHD_LIBS are set by the earlier
PKG_CHECK_MODULES(UHD, uhd >= 003.011), the second call takes those
values as its answer, leaves pkg_failed at no, and runs the
action-if-found branch whatever the installed version is.
-lboost_thread is therefore always appended.
On GNU/Linux that only adds a library that is usually present, so the
bug is invisible. On macOS ARM64 with UHD 4.10 from Homebrew there is
no such library on the link path and the build stops:
ld: library 'boost_thread' not found
Use PKG_CHECK_EXISTS, which asks pkg-config and sets no variables. The
workaround then applies where it was meant to, on libuhd < 4.2.
Change-Id: Icbd8af94f258128ea75c0268e0a240dc423ff69e
Signed-off-by: Andrei Gosman <andrei.gosman(a)gmail.com>
---
M configure.ac
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/configure.ac b/configure.ac
index a384495..0cd388d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,9 +195,8 @@
# code and therefore requires linking against boost_thread. It's missing in
# uhd.pc, so work around it here.
# https://github.com/EttusResearch/uhd/commit/04a83b6e76beef970854da69ba882d7…
- PKG_CHECK_MODULES(UHD, uhd < 004.002,
- [LIBS="$LIBS -lboost_thread"],
- []
+ PKG_CHECK_EXISTS([uhd < 004.002],
+ [LIBS="$LIBS -lboost_thread"]
)
])
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43580?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Icbd8af94f258128ea75c0268e0a240dc423ff69e
Gerrit-Change-Number: 43580
Gerrit-PatchSet: 2
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>