fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42413?usp=email )
Change subject: rebar.lock: bump exometer_report_statsd version
......................................................................
rebar.lock: bump exometer_report_statsd version
The new version is using ETS instead of dict for counter lookups.
This significantly reduces performance impact when multiple eNBs
are registered, since the ETS provides O(1) average-case hash
lookups and in-place mutation.
Change-Id: I931321a831215012aa8186d851d9a8d38908a4bf
---
M rebar.lock
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/13/42413/1
diff --git a/rebar.lock b/rebar.lock
index 1efe90b..439ea74 100644
--- a/rebar.lock
+++ b/rebar.lock
@@ -18,7 +18,7 @@
0},
{<<"exometer_report_statsd">>,
{git,"https://github.com/osmocom/exometer_report_statsd.git",
- {ref,"d35a98edf87996f2ab9ef0feda93b38677b0d063"}},
+ {ref,"bfd6c095bfc404e5fab5c07f5ebe0fe305e58830"}},
0},
{<<"hut">>,{pkg,<<"hut">>,<<"1.3.0">>},1},
{<<"jiffy">>,
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42413?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I931321a831215012aa8186d851d9a8d38908a4bf
Gerrit-Change-Number: 42413
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: Timur Davydov.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42410?usp=email )
Change subject: transceiver: split control command handling from socket I/O
......................................................................
Patch Set 3:
(1 comment)
File Transceiver52M/Transceiver.cpp:
https://gerrit.osmocom.org/c/osmo-trx/+/42410/comment/1868fef0_a0478afb?usp… :
PS3, Line 1026: return -EINVAL;
> The logic is preserved here. […]
My point is that I don't see why do you decided to move the "return EINVAL here instead of 0 and decide to convert EINVAl to o 0 in other function" logic.
I see no good reason to do that in this patch.
If you consider that this path should return an error instead of 0 (which may be correct) then please submit a different patch changing this.
It seems the diferentiation for this path returning non-error was made in 76ff96e21079db2cd7123ff9ca33fa7d2fb0cb01 (by me) but there's no real description on why was that, and I think we should indeed fail if timeslot reading fails.
So please, if you want to change the logic, submit a patch before or after this one.
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42410?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I5413aa511e951522270c75635e89448395fc429e
Gerrit-Change-Number: 42410
Gerrit-PatchSet: 3
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Comment-Date: Mon, 16 Mar 2026 11:44:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: Timur Davydov <dtv.comp(a)gmail.com>
Attention is currently required from: pespin.
Timur Davydov has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42410?usp=email )
Change subject: transceiver: split control command handling from socket I/O
......................................................................
Patch Set 3:
(2 comments)
File Transceiver52M/Transceiver.cpp:
https://gerrit.osmocom.org/c/osmo-trx/+/42410/comment/c3610f30_6b28b2bd?usp… :
PS3, Line 1026: return -EINVAL;
> This logic change looks unrelated to this patch, please split into several patches.
The logic is preserved here. The different return code is only used to distinguish this case from a normal `0` return value after the function was split. Previously this condition was handled in the same function, so there was no need to differentiate it.
https://gerrit.osmocom.org/c/osmo-trx/+/42410/comment/43f6339a_bbd15495?usp… :
PS3, Line 1091: return rc == -EINVAL ? 0 : rc; /* Ignore invalid values, but report other errors */
> This is a logic change, please split into separate patch.
The logic is preserved here. Previously, when the timeslot was out of range, the function returned 0. After splitting the function, ctrl_cmd_handle() returns -EINVAL for that case, and ctrl_sock_handle_rx() converts it back to 0 to keep the original behavior.
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42410?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I5413aa511e951522270c75635e89448395fc429e
Gerrit-Change-Number: 42410
Gerrit-PatchSet: 3
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 16 Mar 2026 11:34:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/42354?usp=email )
Change subject: osmo_io: Rewrite iofd_handle_send_completion() to fix multiple issues
......................................................................
osmo_io: Rewrite iofd_handle_send_completion() to fix multiple issues
Previous implementation had multiple issues, which this patch addresses:
* Didn't call user cb updating completed bytes for a given msg which had
a partial write.
* rc checks against "Incomplete write" were wrong, because rc was not
being decremented with previous msgs idxs being processed.
* Didn't take into account the write(0, fd, buf) = 0 valid user case for
regular files.
The rewrite also simplifies the logic by splitting the "rc < 0" (error) paths
from the "rc >= 0" (successful) paths.
Related: SYS#7842
Change-Id: Ia016e4df7be5e534a8212f7271caff9779e08eb1
---
M src/core/osmo_io.c
1 file changed, 56 insertions(+), 32 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
jolly: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 7c59a61..2a20405 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -509,6 +509,26 @@
}
}
+static void iofd_send_completion_cb(struct osmo_io_fd *iofd, int rc, const struct iofd_msghdr *msghdr, struct msgb *msg)
+{
+ switch (msghdr->action) {
+ case IOFD_ACT_WRITE:
+ if (iofd->io_ops.write_cb)
+ iofd->io_ops.write_cb(iofd, rc, msg);
+ break;
+ case IOFD_ACT_SENDTO:
+ if (iofd->io_ops.sendto_cb)
+ iofd->io_ops.sendto_cb(iofd, rc, msg, &msghdr->osa);
+ break;
+ case IOFD_ACT_SENDMSG:
+ if (iofd->io_ops.sendmsg_cb)
+ iofd->io_ops.sendmsg_cb(iofd, rc, msg);
+ break;
+ default:
+ OSMO_ASSERT(0);
+ }
+}
+
/*! completion handler: Internal function called by osmo_io_backend after a given I/O operation has completed
* \param[in] iofd I/O file-descriptor on which I/O has completed
* \param[in] rc return value of the I/O operation
@@ -518,18 +538,45 @@
{
int idx, i;
- /* Re-enqueue the complete msgb. */
- if (rc == -EAGAIN) {
- iofd_txqueue_enqueue_front(iofd, msghdr);
+ if (OSMO_UNLIKELY(rc < 0)) {
+ /* Re-enqueue the complete msgb. */
+ if (rc == -EAGAIN) {
+ iofd_txqueue_enqueue_front(iofd, msghdr);
+ return;
+ }
+
+ /* Propagate error for all msgbs to user cb: */
+ for (idx = 0; idx < msghdr->io_len; idx++) {
+ iofd_send_completion_cb(iofd, rc, msghdr, msghdr->msg[idx]);
+ msgb_free(msghdr->msg[idx]);
+ msghdr->msg[idx] = NULL;
+
+ /* The user can unregister/close the iofd during callback above. */
+ if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED))
+ break;
+ }
+ iofd_msghdr_free(msghdr);
return;
}
for (idx = 0; idx < msghdr->io_len; idx++) {
struct msgb *msg = msghdr->msg[idx];
- int chunk;
+ int chunk = OSMO_MIN(rc, msgb_length(msg));
+ /* chunk contains write completed bytes of msg */
- /* Incomplete write */
- if (rc > 0 && rc < msgb_length(msg)) {
+ /* If "rc == 0 and msgb_length(msg) > 0", then we had a partial
+ * write where OS wrote up to exact start point of current msg.
+ * In that case, we want to skip notifying the user and continue
+ * below on the "Incomplete write" path to delay further writing.
+ * If "rc == 0 and msgb_length(msg) == 0", the user specifically
+ * requested a write() of 0 bytes and 0 can be returned, which
+ * has its use cases for regular files. In that case user is
+ * interested in receiving a cb. */
+ if (OSMO_LIKELY(!(rc == 0 && msgb_length(msg) > 0)))
+ iofd_send_completion_cb(iofd, chunk, msghdr, msg);
+
+ /* Incomplete write: */
+ if (chunk < msgb_length(msg)) {
/* Keep msg with unsent data only. */
msgb_pull(msg, rc);
msghdr->iov[idx].iov_len = msgb_length(msg);
@@ -551,35 +598,12 @@
return;
}
- if (rc >= 0) {
- chunk = msgb_length(msg);
- if (rc < chunk)
- chunk = rc;
- } else {
- chunk = rc;
- }
-
- /* All other failure and success cases are handled here */
- switch (msghdr->action) {
- case IOFD_ACT_WRITE:
- if (iofd->io_ops.write_cb)
- iofd->io_ops.write_cb(iofd, chunk, msg);
- break;
- case IOFD_ACT_SENDTO:
- if (iofd->io_ops.sendto_cb)
- iofd->io_ops.sendto_cb(iofd, chunk, msg, &msghdr->osa);
- break;
- case IOFD_ACT_SENDMSG:
- if (iofd->io_ops.sendmsg_cb)
- iofd->io_ops.sendmsg_cb(iofd, chunk, msg);
- break;
- default:
- OSMO_ASSERT(0);
- }
-
msgb_free(msghdr->msg[idx]);
msghdr->msg[idx] = NULL;
+ /* At least current msg (idx) was written, maybe more: rc >= chunk */
+ rc -= chunk;
+
/* The user can unregister/close the iofd during callback above. */
if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED))
break;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/42354?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia016e4df7be5e534a8212f7271caff9779e08eb1
Gerrit-Change-Number: 42354
Gerrit-PatchSet: 2
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: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/42412?usp=email )
Change subject: osmo_io: Fix msgb memleak if iofd is unregistered during write_cb with >1 io buffers
......................................................................
osmo_io: Fix msgb memleak if iofd is unregistered during write_cb with >1 io buffers
The msgbs are not allocated under the msghdr, hence if user unregistered
the iofd we need to manually free all remaining msgbs when freeing the
msghdr.
Change-Id: I579bc2142bba02947021c47d94bf2fe4f2040b01
---
M src/core/osmo_io.c
1 file changed, 11 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
jolly: Looks good to me, but someone else must approve
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 2a20405..ddf77ec 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -553,7 +553,7 @@
/* The user can unregister/close the iofd during callback above. */
if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED))
- break;
+ goto free_remaining_idx;
}
iofd_msghdr_free(msghdr);
return;
@@ -606,9 +606,18 @@
/* The user can unregister/close the iofd during callback above. */
if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED))
- break;
+ goto free_remaining_idx;
}
iofd_msghdr_free(msghdr);
+ return;
+
+free_remaining_idx:
+ for (idx = idx + 1; idx < msghdr->io_len; idx++) {
+ msgb_free(msghdr->msg[idx]);
+ msghdr->msg[idx] = NULL;
+ }
+ iofd_msghdr_free(msghdr);
+ return;
}
/* Public functions */
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/42412?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I579bc2142bba02947021c47d94bf2fe4f2040b01
Gerrit-Change-Number: 42412
Gerrit-PatchSet: 2
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: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
Timur Davydov has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42411?usp=email )
Change subject: device/websdr: add WebSDR transceiver backend and build target
......................................................................
Patch Set 3:
(1 comment)
File Transceiver52M/device/websdr/TransceiverWebSdr.cpp:
https://gerrit.osmocom.org/c/osmo-trx/+/42411/comment/9d598a47_8a816d3b?usp… :
PS3, Line 50: : Transceiver(cfg, wTransmitLatency, wRadioInterface)
> I'm not really liking the patch. […]
Thanks for the feedback. My intention was mainly to group everything related to the WebSDR backend into a separate directory. However, you are right that this approach does not fit well with the existing device backend structure.
It makes more sense to move this code into Transceiver52 instead. In fact, in this case I don't really need a radioDevice subclass implementation, so the current layout under device/ is not appropriate. I'll rework the patch accordingly.
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42411?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ia0d340c323c2eea28fbe82601ba0af7cfbd68f6d
Gerrit-Change-Number: 42411
Gerrit-PatchSet: 3
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 16 Mar 2026 11:06:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42352?usp=email )
Change subject: mme_registry: add backwards compat for old sctp_client config
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/42352?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: Ia97fb61bbb5ace6f43d1a6768fb5fb6883158532
Gerrit-Change-Number: 42352
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 16 Mar 2026 10:58:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Timur Davydov.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42410?usp=email )
Change subject: transceiver: split control command handling from socket I/O
......................................................................
Patch Set 3:
(1 comment)
File Transceiver52M/Transceiver.h:
https://gerrit.osmocom.org/c/osmo-trx/+/42410/comment/26cb7e84_4d8f0a9e?usp… :
PS3, Line 220: int ctrl_cmd_handle(int chan, const char *buffer, char *response, size_t response_size);
> The file uses 2-space indentation, but when using 2 spaces Jenkins fails the build. […]
It's fine if CI fails in this file, we wan overwrite it manually.
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42410?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I5413aa511e951522270c75635e89448395fc429e
Gerrit-Change-Number: 42410
Gerrit-PatchSet: 3
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Comment-Date: Mon, 16 Mar 2026 10:58:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: Timur Davydov <dtv.comp(a)gmail.com>