lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

December 2025

  • 1 participants
  • 1175 discussions
[M] Change in osmo-msc[master]: add vty setting for ThemWi RTP formats
by falconia 19 Dec '25

19 Dec '25
Attention is currently required from: fixeria, laforge, 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 7: (1 comment) File src/libmsc/msc_vty.c: https://gerrit.osmocom.org/c/osmo-msc/+/41698/comment/f6d40622_4c6e0ab5?usp… : PS6, Line 689: #define TWCODEC_OPT " [(fr|hr|amr|csd)]" > As I understand it, merging a patch with unresolved review comments is considered bad form. […] Please see Patchset 7 - is it satisfactory now? -- 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: 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> Gerrit-Comment-Date: Fri, 19 Dec 2025 01:56:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: falconia <falcon(a)freecalypso.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-msc[master]: add vty setting for ThemWi RTP formats
by falconia 19 Dec '25

19 Dec '25
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>
1 0
0 0
[M] Change in osmo-msc[master]: add vty setting for ThemWi RTP formats
by falconia 19 Dec '25

19 Dec '25
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>
1 0
0 0
[M] Change in osmo-msc[master]: add vty setting for ThemWi RTP formats
by pespin 19 Dec '25

19 Dec '25
Attention is currently required from: falconia. pespin 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: Code-Review+2 (1 comment) File src/libmsc/msc_vty.c: https://gerrit.osmocom.org/c/osmo-msc/+/41698/comment/d4baecbe_6ff306f8?usp… : PS6, Line 689: #define TWCODEC_OPT " [(fr|hr|amr|csd)]" well I meant the multichoice part, but fine anyway. -- 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: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Thu, 18 Dec 2025 23:12:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmocore[master]: gsmtap_util: Set source_fd RCVBUF to minimum
by pespin 19 Dec '25

19 Dec '25
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>
1 0
0 0
[S] Change in libosmocore[master]: gsmtap_util: Increase source_fd's SO_SNDBUF to 4MB
by pespin 19 Dec '25

19 Dec '25
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>
1 0
0 0
[S] Change in libosmocore[master]: gsmtap_util: Set sink_fd RCVBUF and SNDBUF to minimum
by pespin 19 Dec '25

19 Dec '25
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>
1 0
0 0
[S] Change in libosmocore[master]: logging_vty: Set 'gsmtap log nonblocking-io' as default
by pespin 19 Dec '25

19 Dec '25
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>
1 0
0 0
[M] Change in libosmocore[master]: logging_vty: Allow setting gsmtap log tgt as (blocking-io|nonblocking...
by pespin 19 Dec '25

19 Dec '25
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41702?usp=email ) Change subject: logging_vty: Allow setting gsmtap log tgt as (blocking-io|nonblocking-io|wq) ...................................................................... logging_vty: Allow setting gsmtap log tgt as (blocking-io|nonblocking-io|wq) The current patch adds the possibility to configure it, and leaves the previous behavior as default: blocking-io. Related: OS#6213 Change-Id: Id5d31bedd7d265d18f6e475ccbc94ced80598d04 --- M TODO-RELEASE M include/osmocom/core/gsmtap_util.h M include/osmocom/core/socket.h M src/core/gsmtap_util.c M src/core/libosmocore.map M src/core/socket.c M src/vty/logging_vty.c 7 files changed, 88 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index 1562b38..4859444 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,4 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line -core added osmo_sock_set_nonblock() +core added osmo_sock_set_nonblock(), osmo_sock_get_nonblock() +core added gsmtap_source_set_nonblock(), gsmtap_source_using_wq() diff --git a/include/osmocom/core/gsmtap_util.h b/include/osmocom/core/gsmtap_util.h index d24ee95..5cad23b 100644 --- a/include/osmocom/core/gsmtap_util.h +++ b/include/osmocom/core/gsmtap_util.h @@ -1,6 +1,7 @@ #pragma once #include <stdint.h> +#include <stdbool.h> #include <osmocom/core/write_queue.h> #include <osmocom/core/select.h> @@ -43,8 +44,11 @@ void gsmtap_source_free(struct gsmtap_inst *gti); +int gsmtap_source_set_nonblock(struct gsmtap_inst *gti, int on); int gsmtap_source_add_sink(struct gsmtap_inst *gti); +bool gsmtap_source_using_wq(const struct gsmtap_inst *gti); + int gsmtap_sendmsg(struct gsmtap_inst *gti, struct msgb *msg); int gsmtap_sendmsg_free(struct gsmtap_inst *gti, struct msgb *msg); diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 088a444..e9979f5 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -219,6 +219,7 @@ int osmo_sock_set_dscp(int fd, uint8_t dscp); int osmo_sock_set_priority(int fd, int prio); +int osmo_sock_get_nonblock(int fd); int osmo_sock_set_nonblock(int fd, int on); int osmo_sock_sctp_get_peer_addr_info(int fd, struct sctp_paddrinfo *pinfo, size_t *pinfo_cnt); diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c index 903821d..b21de74 100644 --- a/src/core/gsmtap_util.c +++ b/src/core/gsmtap_util.c @@ -419,6 +419,20 @@ signal_dbm, snr, data, len); } +/*! Set the gsmtap source socket as non-blocking (see sockopt O_NONBLOCK). + * \param[in] gti existing GSMTAP source + * \param[in] on set to 1 to set as non-blocking, 0 to set as blocking. + * \returns 0 on success; negative on error + * + * This setting is ignored when \ref gti was initialied in ofd_wq_mode=1 mode. + */ +int gsmtap_source_set_nonblock(struct gsmtap_inst *gti, int on) +{ + if (gti->osmo_io_mode) + return 0; + return osmo_sock_set_nonblock(gti->source_fd, on); +} + /*! Add a local sink to an existing GSMTAP source and return fd * \param[in] gti existing GSMTAP source * \returns file descriptor of locally bound receive socket; negative on error @@ -447,6 +461,15 @@ return rc; } +/*! Was GSMTAP source configured to use a workqueue (ofd_wq_mode=1)? + * \param[in] gti existing GSMTAP source + * \returns Whether GSMTAP source was configured to use a workqueue (ofd_wq_mode=1) + */ +bool gsmtap_source_using_wq(const struct gsmtap_inst *gti) +{ + return gti->osmo_io_mode; +} + /* Registered in Osmo IO as a no-op to set the write callback. */ static void gsmtap_ops_noop_cb(struct osmo_io_fd *iofd, int res, struct msgb *msg) { diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map index 166eea9..6a46f6c 100644 --- a/src/core/libosmocore.map +++ b/src/core/libosmocore.map @@ -54,6 +54,8 @@ gsmtap_source_init2; gsmtap_source_init_fd; gsmtap_source_init_fd2; +gsmtap_source_set_nonblock; +gsmtap_source_using_wq; gsmtap_type_names; log_add_target; log_category_name; @@ -453,6 +455,7 @@ osmo_sock_multiaddr_get_ip_and_port; osmo_sock_multiaddr_get_name_buf; osmo_sock_sctp_get_peer_addr_info; +osmo_sock_get_nonblock; osmo_sock_set_dscp; osmo_sock_set_nonblock; osmo_sock_set_priority; diff --git a/src/core/socket.c b/src/core/socket.c index 01093bb..bb32185 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -46,6 +46,7 @@ #include <netinet/in.h> #include <arpa/inet.h> +#include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <stdint.h> @@ -2756,6 +2757,17 @@ return ioctl(fd, FIONBIO, (unsigned char *)&on); } +/*! Find out whether the socket is configured as non-blocking or blocking. + * \param[in] fd File descriptor of the socket + * \returns 1 == nonblocking, 0 == blocking, < 0 error */ +int osmo_sock_get_nonblock(int fd) +{ + int flags = fcntl(fd, F_GETFL); + if (flags < 0) + return flags; + return (flags & O_NONBLOCK) ? 1 : 0; +} + #ifdef HAVE_LIBSCTP /*! Fill in array of struct sctp_paddrinfo with each of the remote addresses of an SCTP socket * \param[in] fd file descriptor of SCTP socket diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index 678ae68..259d22b 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -29,7 +29,9 @@ #include <osmocom/core/strrb.h> #include <osmocom/core/loggingrb.h> #include <osmocom/core/gsmtap.h> +#include <osmocom/core/gsmtap_util.h> #include <osmocom/core/application.h> +#include <osmocom/core/socket.h> #include <osmocom/vty/command.h> #include <osmocom/vty/buffer.h> @@ -810,25 +812,50 @@ } DEFUN(cfg_log_gsmtap, cfg_log_gsmtap_cmd, - "log gsmtap [HOSTNAME]", + "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") + "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 Tx workqueue, asynchronous I/O (may lose msgs if queue becomes full)\n") { - const char *hostname = argc ? argv[0] : "127.0.0.1"; + 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); struct log_target *tgt; log_tgt_mutex_lock(); tgt = log_target_find(LOG_TGT_TYPE_GSMTAP, hostname); if (!tgt) { tgt = log_target_create_gsmtap(hostname, GSMTAP_UDP_PORT, - host.app_info->name, false, + host.app_info->name, ofd_wq_mode, true); if (!tgt) { vty_out(vty, "%% Unable to create GSMTAP log for %s%s", hostname, VTY_NEWLINE); RET_WITH_UNLOCK(CMD_WARNING); } + if (!ofd_wq_mode && nonblocking_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", + hostname, VTY_NEWLINE); + } log_add_target(tgt); + } else { + if (ofd_wq_mode != gsmtap_source_using_wq(tgt->tgt_gsmtap.gsmtap_inst)) { + vty_out(vty, "%% Remove and re-add the log gsmtap target in order to " + "change between synchronous and asynchronous IO%s", VTY_NEWLINE); + RET_WITH_UNLOCK(CMD_WARNING); + } + if (!ofd_wq_mode) { + int fd = gsmtap_inst_fd2(tgt->tgt_gsmtap.gsmtap_inst); + if (fd > 0 && osmo_sock_get_nonblock(fd) != nonblocking_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); + } + } } vty->index = tgt; @@ -1009,6 +1036,7 @@ { char level_buf[128]; int i; + char *pars; switch (tgt->type) { case LOG_TGT_TYPE_VTY: @@ -1039,8 +1067,17 @@ log_target_rb_avail_size(tgt), VTY_NEWLINE); break; case LOG_TGT_TYPE_GSMTAP: - vty_out(vty, "log gsmtap %s%s", - tgt->tgt_gsmtap.hostname, VTY_NEWLINE); + if (gsmtap_source_using_wq(tgt->tgt_gsmtap.gsmtap_inst)) { + pars = " wq"; + } else { + int fd = gsmtap_inst_fd2(tgt->tgt_gsmtap.gsmtap_inst); + if (fd > 0 && osmo_sock_get_nonblock(fd)) + pars = " nonblocking-io"; + else + pars = ""; + } + vty_out(vty, "log gsmtap %s%s%s", + tgt->tgt_gsmtap.hostname, pars, VTY_NEWLINE); break; case LOG_TGT_TYPE_SYSTEMD: vty_out(vty, "log systemd-journal%s%s", -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41702?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: Id5d31bedd7d265d18f6e475ccbc94ced80598d04 Gerrit-Change-Number: 41702 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>
1 0
0 0
[XS] Change in docker-playground[master]: common/respawn: improve logging
by fixeria 18 Dec '25

18 Dec '25
Attention is currently required from: osmith. fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/docker-playground/+/41721?usp=email ) Change subject: common/respawn: improve logging ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/41721?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I641f17f6988eced12c9b301042fb5c5cfd757511 Gerrit-Change-Number: 41721 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Thu, 18 Dec 2025 22:31:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • ...
  • 118
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.