Attention is currently required from: fixeria, laforge, pespin.
Hello Jenkins Builder, fixeria, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-msc/+/41698?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by laforge, Code-Review+2 by pespin, Verified+1 by Jenkins Builder
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Change subject: add vty setting for ThemWi RTP formats
......................................................................
add vty setting for ThemWi RTP formats
For every GSM speech codec and for CSD, Osmocom BSS supports both
the standard RTP format prescribed by 3GPP and an alternative enhanced
RTP format invented by Themyscira Wireless: TW-TS-001, TW-TS-002,
TW-TS-006 and TW-TS-007. In order to enable these enhanced RTP
formats, the MSC needs to include an extension IE in the Assignment
Request it sends to the BSS. Until now there was no way to do so
in mainline OsmoMSC, only via local code patches - fix this omission.
The following considerations apply to this new tw-rtp-formats
vty setting:
* When internal MNCC is used, it is beneficial to enable enhanced TW
RTP formats, especially when using E1 BTS with tw-e1abis-mgw:
the DL call leg receives more complete information content from
the UL call leg in each direction.
* When external MNCC is used with non-ThemWi CN software (e.g., with
a PBX via osmo-sip-connector), tw-rtp-formats should NOT be
enabled - off-the-shelf PBX etc software won't understand them.
* Future patches will allow osmo-msc to operate with a ThemWi
transcoding MGW (TC to G.711) in the place of non-TC osmo-mgw;
in that configuration TW RTP formats will become mandatory,
as they are strictly required by ThemWi TC implementation.
Depends: I4c184db53bec28ab42bcd45e033733d850eea5d2 (libosmocore.git)
Change-Id: Icea152f5f2cdbcb0df09ef5b7211d1461b499f14
---
M TODO-RELEASE
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/ran_msg.h
M src/libmsc/msc_a.c
M src/libmsc/msc_vty.c
M src/libmsc/ran_msg_a.c
M tests/test_nodes.vty
7 files changed, 79 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/98/41698/7
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/41698?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Icea152f5f2cdbcb0df09ef5b7211d1461b499f14
Gerrit-Change-Number: 41698
Gerrit-PatchSet: 7
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
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>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-msc/+/41698?usp=email )
Change subject: add vty setting for ThemWi RTP formats
......................................................................
Patch Set 6:
(1 comment)
File src/libmsc/msc_vty.c:
https://gerrit.osmocom.org/c/osmo-msc/+/41698/comment/29d0d9ca_4f6a43c3?usp… :
PS6, Line 689: #define TWCODEC_OPT " [(fr|hr|amr|csd)]"
> well I meant the multichoice part, but fine anyway.
As I understand it, merging a patch with unresolved review comments is considered bad form. Therefore, I have to go off and spin another iteration, then get all necessary approvals all over...
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/41698?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Icea152f5f2cdbcb0df09ef5b7211d1461b499f14
Gerrit-Change-Number: 41698
Gerrit-PatchSet: 6
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
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>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 19 Dec 2025 00:43:50 +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/+/41715?usp=email )
Change subject: gsmtap_util: Set source_fd RCVBUF to minimum
......................................................................
gsmtap_util: Set source_fd RCVBUF to minimum
We never expect to receive anything on this socket, so set its RCVBUF to
the minimum possible to save some memory.
Change-Id: If82b3edf11dea1a124035d4eb0e6aa44f4223555
---
M src/core/gsmtap_util.c
1 file changed, 6 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/src/core/gsmtap_util.c b/src/core/gsmtap_util.c
index 3fab7ac..0a920e3 100644
--- a/src/core/gsmtap_util.c
+++ b/src/core/gsmtap_util.c
@@ -501,6 +501,7 @@
{
struct gsmtap_inst *gti;
int fd;
+ int buflen;
fd = gsmtap_source_init_fd2(local_host, local_port, rem_host, rem_port);
if (fd < 0)
@@ -522,6 +523,11 @@
osmo_iofd_set_txqueue_max_length(gti->out, 1024);
}
+ /* We never read from this socket, so tell the kernel
+ * to set the RCVBUF to the minimum possible value */
+ buflen = 0;
+ setsockopt(gti->source_fd, SOL_SOCKET, SO_RCVBUF, &buflen, sizeof(buflen));
+
return gti;
err_cleanup:
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41715?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: If82b3edf11dea1a124035d4eb0e6aa44f4223555
Gerrit-Change-Number: 41715
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41716?usp=email )
Change subject: gsmtap_util: Increase source_fd's SO_SNDBUF to 4MB
......................................................................
gsmtap_util: Increase source_fd's SO_SNDBUF to 4MB
Using bpftrace we spotted osmo-bts sporadically blocking on send()
of gsmtap_log for 2-4s, most probably due to the UDP send buffer being
full. The wmem_default of ~292KB is indeed a bit tight, and for instance
upstream Linux got its wmem_max to 4MB in april 2025 since it's becoming
more usual that sockets need to increase this value.
Hence, increase the SO_SNDBUF to 4MB to get some extra room and avoid
blocks (or drops if socket is later on set non-blocking) and be able to
accomodate to logging spikes better.
The kernel will take care of lowering the size set to the configured
net.core.wmem_max if needed.
Related: OS#6794
Change-Id: I5033a018dfc748b309600102b8a9ade0df014615
---
M src/core/gsmtap_util.c
1 file changed, 10 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c
index 0a920e3..b46f273 100644
--- a/src/core/gsmtap_util.c
+++ b/src/core/gsmtap_util.c
@@ -528,6 +528,16 @@
buflen = 0;
setsockopt(gti->source_fd, SOL_SOCKET, SO_RCVBUF, &buflen, sizeof(buflen));
+ /* The wmem_default of 212992B is too low for heavy bursty gsmtap transmission (eg. tons of DEBUG logging).
+ * A full UDP socket send buffer can cause blocks (or drops if sk is later configured non-blocking),
+ * so let's try to increase it to a safer value of 4MB (newer default net.core.wmem_max in linux kernel since
+ * 2025 a6d4f25888b83b8300aef28d9ee22765c1cc9b34).
+ * The kernel will trim the size set to the configured net.core.wmem_max if lower.
+ * In case you wonder, YES! blocking of 2-4s was seen in osmo-bts gsmtap_log's send() during ttcn3-bts-test execution.
+ */
+ buflen = 4194304; /* 4 << 20 */
+ setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buflen, sizeof(buflen));
+
return gti;
err_cleanup:
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41716?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: I5033a018dfc748b309600102b8a9ade0df014615
Gerrit-Change-Number: 41716
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41714?usp=email )
Change subject: gsmtap_util: Set sink_fd RCVBUF and SNDBUF to minimum
......................................................................
gsmtap_util: Set sink_fd RCVBUF and SNDBUF to minimum
We never transmit anything over the socket, nor are interested in
reading from it. We are only interested in having the socket open to
avoid ICMP errors.
Hence, set the buffers to the minimum to save some memory which we won't
ever need/use.
Change-Id: Icfbc24ff679898496666d224d49e1ff06ddffda8
---
M src/core/gsmtap_util.c
1 file changed, 9 insertions(+), 3 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c
index b21de74..3fab7ac 100644
--- a/src/core/gsmtap_util.c
+++ b/src/core/gsmtap_util.c
@@ -325,12 +325,18 @@
return rc;
if (osmo_sockaddr_is_local((struct sockaddr *)&ss, ss_len) == 1) {
- rc = osmo_sock_init_sa((struct sockaddr *)&ss, SOCK_DGRAM,
+ int zero = 0;
+ int fd = osmo_sock_init_sa((struct sockaddr *)&ss, SOCK_DGRAM,
IPPROTO_UDP,
OSMO_SOCK_F_BIND |
OSMO_SOCK_F_UDP_REUSEADDR);
- if (rc >= 0)
- return rc;
+ if (fd < 0)
+ return fd;
+ /* We never read nor write from this socket, so tell the kernel
+ * to set the RCVBUF/SNDBUF to the minimum possible value */
+ setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &zero, sizeof(zero));
+ setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &zero, sizeof(zero));
+ return fd;
}
return -ENODEV;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41714?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: Icfbc24ff679898496666d224d49e1ff06ddffda8
Gerrit-Change-Number: 41714
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>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41703?usp=email )
Change subject: logging_vty: Set 'gsmtap log nonblocking-io' as default
......................................................................
logging_vty: Set 'gsmtap log nonblocking-io' as default
Apps using a VTY are expected to be using an event loop, and hence
should not be using blocking operations which would stall the event
loop.
If user fears losing messages (eg, when enabling a lot of DEBUG),
then the taget can still be switched to "wq" at the expense of
losing performance, or increasing the kernel UDP socket sndbuf by means
of sysctl net.core.wmem_{default,max}.
Related: OS#6213
Related: OS#6794
Change-Id: Ifca8a821e13ec1327ab2476b0db91078fcff948b
---
M src/vty/logging_vty.c
1 file changed, 7 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 259d22b..84e3331 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -815,13 +815,13 @@
"log gsmtap [HOSTNAME] [(nonblocking-io|blocking-io|wq)]",
LOG_STR "Logging via GSMTAP\n"
"Host name to send the GSMTAP logging to (UDP port 4729)\n"
- "Use non-blocking, synchronous I/O (may lose msgs if UDP socket send buffer becomes full)\n"
- "Use blocking, synchronous I/O (only for debug purposes or when blocking is acceptable) (default)\n"
+ "Use non-blocking, synchronous I/O (may lose msgs if UDP socket send buffer becomes full) (default)\n"
+ "Use blocking, synchronous I/O (only for debug purposes or when blocking is acceptable)\n"
"Use Tx workqueue, asynchronous I/O (may lose msgs if queue becomes full)\n")
{
const char *hostname = argc > 0 ? argv[0] : "127.0.0.1";
bool ofd_wq_mode = argc > 1 && (strcmp(argv[1], "wq") == 0);
- bool nonblocking_io = argc > 1 && (strcmp(argv[1], "nonblocking-io") == 0);
+ bool blocking_io = argc > 1 && (strcmp(argv[1], "blocking-io") == 0);
struct log_target *tgt;
log_tgt_mutex_lock();
@@ -835,7 +835,7 @@
hostname, VTY_NEWLINE);
RET_WITH_UNLOCK(CMD_WARNING);
}
- if (!ofd_wq_mode && nonblocking_io) {
+ if (!ofd_wq_mode && !blocking_io) {
int rc = gsmtap_source_set_nonblock(tgt->tgt_gsmtap.gsmtap_inst, 1);
if (rc != 0)
vty_out(vty, "%% Unable to configure GSMTAP log for %s as nonblocking-io%s",
@@ -850,7 +850,7 @@
}
if (!ofd_wq_mode) {
int fd = gsmtap_inst_fd2(tgt->tgt_gsmtap.gsmtap_inst);
- if (fd > 0 && osmo_sock_get_nonblock(fd) != nonblocking_io) {
+ if (fd > 0 && !osmo_sock_get_nonblock(fd) != blocking_io) {
vty_out(vty, "%% Remove and re-add the log gsmtap target in order to "
"change between blocking and non-blocking IO%s", VTY_NEWLINE);
RET_WITH_UNLOCK(CMD_WARNING);
@@ -1071,8 +1071,8 @@
pars = " wq";
} else {
int fd = gsmtap_inst_fd2(tgt->tgt_gsmtap.gsmtap_inst);
- if (fd > 0 && osmo_sock_get_nonblock(fd))
- pars = " nonblocking-io";
+ if (fd > 0 && !osmo_sock_get_nonblock(fd))
+ pars = " blocking-io";
else
pars = "";
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41703?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: Ifca8a821e13ec1327ab2476b0db91078fcff948b
Gerrit-Change-Number: 41703
Gerrit-PatchSet: 3
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>