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

August 2025

  • 1 participants
  • 1086 discussions
[S] Change in libosmo-netif[master]: Fix time_t prints for debian 13 armv7l
by laforge 12 Aug '25

12 Aug '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/40866?usp=email ) Change subject: Fix time_t prints for debian 13 armv7l ...................................................................... Fix time_t prints for debian 13 armv7l In Debian 13 armv7l, time_t and suseconds_t are "long long int" instead of "long unsigned int" as seen on x86_64 and aarch64. Fix it by casting to "long unsigned int". Related: OS#6828 Change-Id: I0b29930a8797fbf0c9d8bfde40bcef9702629834 --- M examples/ipa-stream-client.c M src/jibuf.c M tests/jibuf/jibuf_test.c M tests/jibuf/jibuf_tool.c M tests/osmo-pcap-test/pcap.c M tests/osmux/osmux_input_test.c M tests/osmux/osmux_output_test.c M tests/osmux/osmux_test.c M tests/stream/stream_test.c 9 files changed, 26 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c index 2604266..cd2e936 100644 --- a/examples/ipa-stream-client.c +++ b/examples/ipa-stream-client.c @@ -131,8 +131,8 @@ gettimeofday(&tv, NULL); timersub(&tv, &found->tv, &diff); - LOGP(DLINP, LOGL_NOTICE, "message %d replied " - "in %lu.%.6lu\n", num, diff.tv_sec, diff.tv_usec); + LOGP(DLINP, LOGL_NOTICE, "message %d replied in %lu.%.6lu\n", num, + (unsigned int long) diff.tv_sec, (unsigned int long) diff.tv_usec); talloc_free(found); } else { LOGP(DLINP, LOGL_ERROR, diff --git a/src/jibuf.c b/src/jibuf.c index a351248..4f93cda 100644 --- a/src/jibuf.c +++ b/src/jibuf.c @@ -388,8 +388,9 @@ LOGP(DLJIBUF, LOGL_DEBUG, "enqueuing packet seq=%"PRIu16" rel=%d delay=%d" \ " skew=%d thres=%d {%lu.%06lu -> %lu.%06lu} %s\n", msg_get_sequence(msg), rel_delay, delay, jb->skew_us, jb->threshold_delay, - jb->last_enqueue_time.tv_sec, jb->last_enqueue_time.tv_usec, - sched_ts.tv_sec, sched_ts.tv_usec, msg_get_marker(msg)? "M" : ""); + (unsigned int long) jb->last_enqueue_time.tv_sec, (unsigned int long) jb->last_enqueue_time.tv_usec, + (unsigned int long) sched_ts.tv_sec, (unsigned int long) sched_ts.tv_usec, + msg_get_marker(msg) ? "M" : ""); /* Add scheduled dequeue time in msg->cb so we can check it later */ unsigned long *old_cb = talloc_memdup(jb->talloc_ctx, msg->cb, sizeof(msg->cb)); diff --git a/tests/jibuf/jibuf_test.c b/tests/jibuf/jibuf_test.c index 7643797..9a19d9a 100644 --- a/tests/jibuf/jibuf_test.c +++ b/tests/jibuf/jibuf_test.c @@ -106,7 +106,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); osmo_gettimeofday(&tv, NULL); printf("sys={%lu.%06lu}, mono={%lu.%06lu}: %s\n", - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, str); + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, str); } static void clock_override_enable(bool enable) diff --git a/tests/jibuf/jibuf_tool.c b/tests/jibuf/jibuf_tool.c index 0502a98..875f0d5 100644 --- a/tests/jibuf/jibuf_tool.c +++ b/tests/jibuf/jibuf_tool.c @@ -168,7 +168,7 @@ LOGP(DLJIBUF, LOGL_DEBUG, "%s: seq=%"PRIu16" ts=%"PRIu32" (%ld.%06ld) tx_delay=%"PRIu32 \ " end_delay=%"PRIu32" pre_trans=%d pre_jitter=%f post_trans=%d post_jitter=%f skew=%"PRId32"\n", info, ntohs(rtph->sequence), ntohl(rtph->timestamp), - pinfo->tx_time.tv_sec, pinfo->tx_time.tv_usec, + (unsigned int long) pinfo->tx_time.tv_sec, (unsigned int long) pinfo->tx_time.tv_usec, pinfo->tx_delay, total_delay_ms, pinfo->prequeue.transit, pinfo->prequeue.jitter, pinfo->postqueue.transit, pinfo->postqueue.jitter, pinfo->skew_us); @@ -179,7 +179,7 @@ " pre_trans=%d pre_jitter=%f post_trans=%d post_jitter=%f dropped=%"PRIu32 \ " buffer=%"PRIu32"\n", ntohs(rtph->sequence), ntohl(rtph->timestamp), - pinfo->tx_time.tv_sec, pinfo->tx_time.tv_usec, + (unsigned int long) pinfo->tx_time.tv_sec, (unsigned int long) pinfo->tx_time.tv_usec, pinfo->tx_delay, total_delay_ms, pinfo->prequeue.transit, pinfo->prequeue.jitter, pinfo->postqueue.transit, pinfo->postqueue.jitter, diff --git a/tests/osmo-pcap-test/pcap.c b/tests/osmo-pcap-test/pcap.c index a67b121..2c18687 100644 --- a/tests/osmo-pcap-test/pcap.c +++ b/tests/osmo-pcap-test/pcap.c @@ -181,7 +181,7 @@ timersub(&elapsed_pcap, &elapsed_sys, &res); } printf("next packet comes in %lu.%.6lu seconds\n", - res.tv_sec, res.tv_usec); + (unsigned int long) res.tv_sec, (unsigned int long) res.tv_usec); osmo_timer_schedule(&p->timer, res.tv_sec, res.tv_usec); return 0; diff --git a/tests/osmux/osmux_input_test.c b/tests/osmux/osmux_input_test.c index df02423..327d174 100644 --- a/tests/osmux/osmux_input_test.c +++ b/tests/osmux/osmux_input_test.c @@ -116,7 +116,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \ osmo_gettimeofday(&tv, NULL); \ fprintf(stdout, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt "\n", \ - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, ##args); \ } while (0) static void clock_override_enable(bool enable) diff --git a/tests/osmux/osmux_output_test.c b/tests/osmux/osmux_output_test.c index 94d6a5b..a492379 100644 --- a/tests/osmux/osmux_output_test.c +++ b/tests/osmux/osmux_output_test.c @@ -101,7 +101,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); osmo_gettimeofday(&tv, NULL); printf("sys={%lu.%06lu}, mono={%lu.%06lu}: %s\n", - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, str); + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, str); } static void clock_override_enable(bool enable) diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c index f80902d..426ecb2 100644 --- a/tests/osmux/osmux_test.c +++ b/tests/osmux/osmux_test.c @@ -63,7 +63,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \ osmo_gettimeofday(&tv, NULL); \ fprintf(stderr, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt, \ - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, ##args); \ } while(0) static void clock_override_enable(bool enable) diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c index f2f1d4f..f23bb5b 100644 --- a/tests/stream/stream_test.c +++ b/tests/stream/stream_test.c @@ -65,7 +65,8 @@ #define LOGCLI(cli, fmt, args...) do { \ struct timeval tv; \ osmo_gettimeofday(&tv, NULL); \ - printf("{%lu.%06lu} [%s] Client's %s(): " fmt, tv.tv_sec, tv.tv_usec, \ + printf("{%lu.%06lu} [%s] Client's %s(): " fmt, \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ osmo_stream_cli_get_data(cli) ? "OK" : "NA", __func__, ##args); \ } while (0) @@ -243,7 +244,8 @@ #define LOGSRV(srv, fmt, args...) do { \ struct timeval tv; \ osmo_gettimeofday(&tv, NULL); \ - printf("{%lu.%06lu} [%s|%s] Server's %s(): " fmt, tv.tv_sec, tv.tv_usec, \ + printf("{%lu.%06lu} [%s|%s] Server's %s(): " fmt, \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ osmo_stream_srv_get_data(srv) ? "OK" : "NA", \ osmo_stream_srv_link_get_data(osmo_stream_srv_get_master(srv)) ? "OK" : "NA", \ __func__, ##args); \ @@ -364,21 +366,24 @@ osmo_select_main(0); osmo_gettimeofday(&tv, NULL); fprintf(stderr, "\n{%lu.%06lu} %s test step %u [client %s, server %s], FD reg %u\n", - tv.tv_sec, tv.tv_usec, ASTR(autoreconnect), steps, + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, + ASTR(autoreconnect), steps, osmo_stream_cli_get_data(cli) ? "OK" : "NA", osmo_stream_srv_link_get_data(lnk) ? "OK" : "NA", osmo_fd_is_registered(osmo_stream_cli_get_ofd(cli))); if (test_stop_requested(lnk)) { printf("{%lu.%06lu} Server requested test termination\n", - tv.tv_sec, tv.tv_usec); + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec); steps = 0; } } osmo_stream_cli_destroy(cli); osmo_stream_srv_link_close(lnk); - printf("{%lu.%06lu} %s test complete.\n\n", tv.tv_sec, tv.tv_usec, ASTR(autoreconnect)); + printf("{%lu.%06lu} %s test complete.\n\n", + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, + ASTR(autoreconnect)); } /* Segmentation test code (using IPA) */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40866?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0b29930a8797fbf0c9d8bfde40bcef9702629834 Gerrit-Change-Number: 40866 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in libosmo-netif[master]: Fix time_t prints for debian 13 armv7l
by laforge 12 Aug '25

12 Aug '25
Attention is currently required from: osmith. laforge has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libosmo-netif/+/40866?usp=email ) Change subject: Fix time_t prints for debian 13 armv7l ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40866?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0b29930a8797fbf0c9d8bfde40bcef9702629834 Gerrit-Change-Number: 40866 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 12 Aug 2025 10:59:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-netif[master]: Use %zu for size_t
by laforge 12 Aug '25

12 Aug '25
Attention is currently required from: osmith. laforge has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libosmo-netif/+/40867?usp=email ) Change subject: Use %zu for size_t ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40867?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I81f6d26623544c259199099beb54d14f5788a9e4 Gerrit-Change-Number: 40867 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 12 Aug 2025 10:57:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-netif[master]: Use %zu for size_t
by fixeria 12 Aug '25

12 Aug '25
Attention is currently required from: osmith. fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libosmo-netif/+/40867?usp=email ) Change subject: Use %zu for size_t ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40867?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I81f6d26623544c259199099beb54d14f5788a9e4 Gerrit-Change-Number: 40867 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 12 Aug 2025 10:22:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-netif[master]: Fix time_t prints for debian 13 armv7l
by fixeria 12 Aug '25

12 Aug '25
Attention is currently required from: osmith. fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libosmo-netif/+/40866?usp=email ) Change subject: Fix time_t prints for debian 13 armv7l ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40866?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0b29930a8797fbf0c9d8bfde40bcef9702629834 Gerrit-Change-Number: 40866 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 12 Aug 2025 10:22:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-gprs[master]: tests: fix for debian 13 armv7l
by fixeria 12 Aug '25

12 Aug '25
Attention is currently required from: osmith. fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/40865?usp=email ) Change subject: tests: fix for debian 13 armv7l ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/40865?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I416b31dd11a82ad52f6a662d7e099123a5c77fff Gerrit-Change-Number: 40865 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 12 Aug 2025 10:21:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-netif[master]: Use %zu for size_t
by osmith 12 Aug '25

12 Aug '25
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmo-netif/+/40867?usp=email ) Change subject: Use %zu for size_t ...................................................................... Use %zu for size_t Fix that this doesn't build for debian 13 armv7l with errors like: osmo-amr-inspect.c:138:53: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] 138 | printf(" Payload has no padding (%lu bits with offset 10)\n", ft_bits); | ~~^ ~~~~~~~ | | | | long unsigned int size_t {aka unsigned int} Related: OS#6828 Change-Id: I81f6d26623544c259199099beb54d14f5788a9e4 --- M tests/stream/stream_test.c M utils/osmo-amr-inspect.c 2 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/67/40867/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40867?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I81f6d26623544c259199099beb54d14f5788a9e4 Gerrit-Change-Number: 40867 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-CC: Jenkins Builder
1 0
0 0
[S] Change in libosmo-netif[master]: Use %zu for size_t
by osmith 12 Aug '25

12 Aug '25
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/40867?usp=email ) Change subject: Use %zu for size_t ...................................................................... Use %zu for size_t Fix that this doesn't build for debian 13 armv7l with errors like: osmo-amr-inspect.c:138:53: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] 138 | printf(" Payload has no padding (%lu bits with offset 10)\n", ft_bits); | ~~^ ~~~~~~~ | | | | long unsigned int size_t {aka unsigned int} Related: OS#6828 Change-Id: I81f6d26623544c259199099beb54d14f5788a9e4 --- A tests/osmux/osmux_input_test A tests/osmux/osmux_output_test M tests/stream/stream_test.c M utils/osmo-amr-inspect.c 4 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/67/40867/1 diff --git a/tests/osmux/osmux_input_test b/tests/osmux/osmux_input_test new file mode 100755 index 0000000..7a05e95 --- /dev/null +++ b/tests/osmux/osmux_input_test Binary files differ diff --git a/tests/osmux/osmux_output_test b/tests/osmux/osmux_output_test new file mode 100755 index 0000000..eabee5b --- /dev/null +++ b/tests/osmux/osmux_output_test Binary files differ diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c index f23bb5b..cc3f0c2 100644 --- a/tests/stream/stream_test.c +++ b/tests/stream/stream_test.c @@ -745,7 +745,7 @@ fprintf(stderr, "Cannot allocate message\n"); return -ENOMEM; } - LOGSRV(conn, "Received message from stream (total len including stripped headers = %lu)\n", + LOGSRV(conn, "Received message from stream (total len including stripped headers = %zu)\n", osmo_ntohs(h->len) + sizeof(*h)); if (5 < ipa_msg_type) { fprintf(stderr, "Received unexpected IPAC message type %"PRIu8"\n", ipa_msg_type); diff --git a/utils/osmo-amr-inspect.c b/utils/osmo-amr-inspect.c index dbf612d..b550f50 100644 --- a/utils/osmo-amr-inspect.c +++ b/utils/osmo-amr-inspect.c @@ -73,7 +73,7 @@ printf(" F: %u\n", hdr->f); printf(" FT: %u (%s)\n", hdr->ft, osmo_amr_type_name(hdr->ft)); printf(" Q: %u\n", hdr->q); - printf(" Payload (%lu bytes): %s\n", + printf(" Payload (%zu bytes): %s\n", buf_len - sizeof(*hdr), osmo_hexdump_nospc(payload, payload_len)); if (hdr->f) @@ -88,11 +88,11 @@ println_orange(" WARN: PAD2=0x%x not zero!", hdr->pad2); ft_bytes = osmo_amr_bytes(hdr->ft); if (payload_len != ft_bytes) { - println_red(" ERROR: Wrong payload byte-length %lu != exp %lu!", payload_len, ft_bytes); + println_red(" ERROR: Wrong payload byte-length %zu != exp %zu!", payload_len, ft_bytes); } else { ft_bits = osmo_amr_bits(hdr->ft); if (ft_bits/8 == ft_bytes) { - printf(" Payload has no padding (%lu bits)\n", ft_bits); + printf(" Payload has no padding (%zu bits)\n", ft_bits); } else { uint8_t last_byte = payload[payload_len - 1]; uint8_t padding = last_byte & (0xff >> (ft_bits & 3)); @@ -117,7 +117,7 @@ printf(" FT: %u (%s)\n", ft, osmo_amr_type_name(ft)); printf(" Q: %u\n", hdr->q); printf(" Payload first 6 bits: 0x%02x\n", hdr->data_start); - printf(" Payload continuation (%lu bytes): %s\n", buf_len - sizeof(*hdr), + printf(" Payload continuation (%zu bytes): %s\n", buf_len - sizeof(*hdr), osmo_hexdump_nospc(buf + sizeof(*hdr), buf_len - sizeof(*hdr))); if (hdr->f) @@ -130,12 +130,12 @@ } ft_bits = osmo_amr_bits(ft); if (ft_bits != payload_len_bits) { - println_red(" ERROR: Wrong payload bits-length %lu != exp %lu! (FT=%u)\n", payload_len_bits, ft_bits, ft); + println_red(" ERROR: Wrong payload bits-length %zu != exp %zu! (FT=%u)\n", payload_len_bits, ft_bits, ft); return; } if (!((AMR_HDR_BWE_LEN_BITS + ft_bits) & 0x03)) { - printf(" Payload has no padding (%lu bits with offset 10)\n", ft_bits); + printf(" Payload has no padding (%zu bits with offset 10)\n", ft_bits); } else { uint8_t last_byte = buf[buf_len - 1]; uint8_t padding = last_byte & (0xff >> ((AMR_HDR_BWE_LEN_BITS + ft_bits) & 0x03)); @@ -156,7 +156,7 @@ static void inspect_amr(unsigned int i, const uint8_t *buf, size_t buf_len) { bool is_oa; - printf("[%u] Buffer (%lu bytes): %s\n", i, buf_len, osmo_hexdump_nospc(buf, buf_len)); + printf("[%u] Buffer (%zu bytes): %s\n", i, buf_len, osmo_hexdump_nospc(buf, buf_len)); is_oa = osmo_amr_is_oa(buf, buf_len); switch (force_fmt) { case FORCE_AMR_INPUT_FMT_AUTO: @@ -253,7 +253,7 @@ hex_buf[hex_buflen] = '\0'; if (hex_buflen == sizeof(hex_buf) - 1) { - fprintf(stderr, "Failed parsing (input too long > %lu): %s\n", hex_buflen, hex_buf); + fprintf(stderr, "Failed parsing (input too long > %zu): %s\n", hex_buflen, hex_buf); return -ENOMEM; } @@ -263,7 +263,7 @@ return -1; } if (rc < 2) { - fprintf(stderr, "Too short to be an AMR buffer (%ld bytes): %s\n", rc, hex_buf); + fprintf(stderr, "Too short to be an AMR buffer (%zu bytes): %s\n", rc, hex_buf); return -1; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40867?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I81f6d26623544c259199099beb54d14f5788a9e4 Gerrit-Change-Number: 40867 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-netif[master]: Fix time_t prints for debian 13 armv7l
by osmith 12 Aug '25

12 Aug '25
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/40866?usp=email ) Change subject: Fix time_t prints for debian 13 armv7l ...................................................................... Fix time_t prints for debian 13 armv7l In Debian 13 armv7l, time_t and suseconds_t are "long long int" instead of "long unsigned int" as seen on x86_64 and aarch64. Fix it by casting to "long unsigned int". Related: OS#6828 Change-Id: I0b29930a8797fbf0c9d8bfde40bcef9702629834 --- M examples/ipa-stream-client.c M src/jibuf.c M tests/jibuf/jibuf_test.c M tests/jibuf/jibuf_tool.c M tests/osmo-pcap-test/pcap.c M tests/osmux/osmux_input_test.c M tests/osmux/osmux_output_test.c M tests/osmux/osmux_test.c M tests/stream/stream_test.c 9 files changed, 26 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/66/40866/1 diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c index 2604266..cd2e936 100644 --- a/examples/ipa-stream-client.c +++ b/examples/ipa-stream-client.c @@ -131,8 +131,8 @@ gettimeofday(&tv, NULL); timersub(&tv, &found->tv, &diff); - LOGP(DLINP, LOGL_NOTICE, "message %d replied " - "in %lu.%.6lu\n", num, diff.tv_sec, diff.tv_usec); + LOGP(DLINP, LOGL_NOTICE, "message %d replied in %lu.%.6lu\n", num, + (unsigned int long) diff.tv_sec, (unsigned int long) diff.tv_usec); talloc_free(found); } else { LOGP(DLINP, LOGL_ERROR, diff --git a/src/jibuf.c b/src/jibuf.c index a351248..4f93cda 100644 --- a/src/jibuf.c +++ b/src/jibuf.c @@ -388,8 +388,9 @@ LOGP(DLJIBUF, LOGL_DEBUG, "enqueuing packet seq=%"PRIu16" rel=%d delay=%d" \ " skew=%d thres=%d {%lu.%06lu -> %lu.%06lu} %s\n", msg_get_sequence(msg), rel_delay, delay, jb->skew_us, jb->threshold_delay, - jb->last_enqueue_time.tv_sec, jb->last_enqueue_time.tv_usec, - sched_ts.tv_sec, sched_ts.tv_usec, msg_get_marker(msg)? "M" : ""); + (unsigned int long) jb->last_enqueue_time.tv_sec, (unsigned int long) jb->last_enqueue_time.tv_usec, + (unsigned int long) sched_ts.tv_sec, (unsigned int long) sched_ts.tv_usec, + msg_get_marker(msg) ? "M" : ""); /* Add scheduled dequeue time in msg->cb so we can check it later */ unsigned long *old_cb = talloc_memdup(jb->talloc_ctx, msg->cb, sizeof(msg->cb)); diff --git a/tests/jibuf/jibuf_test.c b/tests/jibuf/jibuf_test.c index 7643797..9a19d9a 100644 --- a/tests/jibuf/jibuf_test.c +++ b/tests/jibuf/jibuf_test.c @@ -106,7 +106,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); osmo_gettimeofday(&tv, NULL); printf("sys={%lu.%06lu}, mono={%lu.%06lu}: %s\n", - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, str); + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, str); } static void clock_override_enable(bool enable) diff --git a/tests/jibuf/jibuf_tool.c b/tests/jibuf/jibuf_tool.c index 0502a98..875f0d5 100644 --- a/tests/jibuf/jibuf_tool.c +++ b/tests/jibuf/jibuf_tool.c @@ -168,7 +168,7 @@ LOGP(DLJIBUF, LOGL_DEBUG, "%s: seq=%"PRIu16" ts=%"PRIu32" (%ld.%06ld) tx_delay=%"PRIu32 \ " end_delay=%"PRIu32" pre_trans=%d pre_jitter=%f post_trans=%d post_jitter=%f skew=%"PRId32"\n", info, ntohs(rtph->sequence), ntohl(rtph->timestamp), - pinfo->tx_time.tv_sec, pinfo->tx_time.tv_usec, + (unsigned int long) pinfo->tx_time.tv_sec, (unsigned int long) pinfo->tx_time.tv_usec, pinfo->tx_delay, total_delay_ms, pinfo->prequeue.transit, pinfo->prequeue.jitter, pinfo->postqueue.transit, pinfo->postqueue.jitter, pinfo->skew_us); @@ -179,7 +179,7 @@ " pre_trans=%d pre_jitter=%f post_trans=%d post_jitter=%f dropped=%"PRIu32 \ " buffer=%"PRIu32"\n", ntohs(rtph->sequence), ntohl(rtph->timestamp), - pinfo->tx_time.tv_sec, pinfo->tx_time.tv_usec, + (unsigned int long) pinfo->tx_time.tv_sec, (unsigned int long) pinfo->tx_time.tv_usec, pinfo->tx_delay, total_delay_ms, pinfo->prequeue.transit, pinfo->prequeue.jitter, pinfo->postqueue.transit, pinfo->postqueue.jitter, diff --git a/tests/osmo-pcap-test/pcap.c b/tests/osmo-pcap-test/pcap.c index a67b121..2c18687 100644 --- a/tests/osmo-pcap-test/pcap.c +++ b/tests/osmo-pcap-test/pcap.c @@ -181,7 +181,7 @@ timersub(&elapsed_pcap, &elapsed_sys, &res); } printf("next packet comes in %lu.%.6lu seconds\n", - res.tv_sec, res.tv_usec); + (unsigned int long) res.tv_sec, (unsigned int long) res.tv_usec); osmo_timer_schedule(&p->timer, res.tv_sec, res.tv_usec); return 0; diff --git a/tests/osmux/osmux_input_test.c b/tests/osmux/osmux_input_test.c index df02423..327d174 100644 --- a/tests/osmux/osmux_input_test.c +++ b/tests/osmux/osmux_input_test.c @@ -116,7 +116,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \ osmo_gettimeofday(&tv, NULL); \ fprintf(stdout, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt "\n", \ - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, ##args); \ } while (0) static void clock_override_enable(bool enable) diff --git a/tests/osmux/osmux_output_test.c b/tests/osmux/osmux_output_test.c index 94d6a5b..a492379 100644 --- a/tests/osmux/osmux_output_test.c +++ b/tests/osmux/osmux_output_test.c @@ -101,7 +101,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); osmo_gettimeofday(&tv, NULL); printf("sys={%lu.%06lu}, mono={%lu.%06lu}: %s\n", - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, str); + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, str); } static void clock_override_enable(bool enable) diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c index f80902d..426ecb2 100644 --- a/tests/osmux/osmux_test.c +++ b/tests/osmux/osmux_test.c @@ -63,7 +63,8 @@ osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \ osmo_gettimeofday(&tv, NULL); \ fprintf(stderr, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt, \ - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ + (unsigned int long) ts.tv_sec, ts.tv_nsec/1000, ##args); \ } while(0) static void clock_override_enable(bool enable) diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c index f2f1d4f..f23bb5b 100644 --- a/tests/stream/stream_test.c +++ b/tests/stream/stream_test.c @@ -65,7 +65,8 @@ #define LOGCLI(cli, fmt, args...) do { \ struct timeval tv; \ osmo_gettimeofday(&tv, NULL); \ - printf("{%lu.%06lu} [%s] Client's %s(): " fmt, tv.tv_sec, tv.tv_usec, \ + printf("{%lu.%06lu} [%s] Client's %s(): " fmt, \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ osmo_stream_cli_get_data(cli) ? "OK" : "NA", __func__, ##args); \ } while (0) @@ -243,7 +244,8 @@ #define LOGSRV(srv, fmt, args...) do { \ struct timeval tv; \ osmo_gettimeofday(&tv, NULL); \ - printf("{%lu.%06lu} [%s|%s] Server's %s(): " fmt, tv.tv_sec, tv.tv_usec, \ + printf("{%lu.%06lu} [%s|%s] Server's %s(): " fmt, \ + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, \ osmo_stream_srv_get_data(srv) ? "OK" : "NA", \ osmo_stream_srv_link_get_data(osmo_stream_srv_get_master(srv)) ? "OK" : "NA", \ __func__, ##args); \ @@ -364,21 +366,24 @@ osmo_select_main(0); osmo_gettimeofday(&tv, NULL); fprintf(stderr, "\n{%lu.%06lu} %s test step %u [client %s, server %s], FD reg %u\n", - tv.tv_sec, tv.tv_usec, ASTR(autoreconnect), steps, + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, + ASTR(autoreconnect), steps, osmo_stream_cli_get_data(cli) ? "OK" : "NA", osmo_stream_srv_link_get_data(lnk) ? "OK" : "NA", osmo_fd_is_registered(osmo_stream_cli_get_ofd(cli))); if (test_stop_requested(lnk)) { printf("{%lu.%06lu} Server requested test termination\n", - tv.tv_sec, tv.tv_usec); + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec); steps = 0; } } osmo_stream_cli_destroy(cli); osmo_stream_srv_link_close(lnk); - printf("{%lu.%06lu} %s test complete.\n\n", tv.tv_sec, tv.tv_usec, ASTR(autoreconnect)); + printf("{%lu.%06lu} %s test complete.\n\n", + (unsigned int long) tv.tv_sec, (unsigned int long) tv.tv_usec, + ASTR(autoreconnect)); } /* Segmentation test code (using IPA) */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/40866?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0b29930a8797fbf0c9d8bfde40bcef9702629834 Gerrit-Change-Number: 40866 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[M] Change in ...osmo-s1gw[master]: enb_uptime: track eNB uptime
by fixeria 12 Aug '25

12 Aug '25
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40831?usp=email ) Change subject: enb_uptime: track eNB uptime ...................................................................... enb_uptime: track eNB uptime Change-Id: Ie8a06fafa2ce3e7a5aec1eb8e71af3053599cf24 Related: SYS#7594 --- M include/s1gw_metrics.hrl A src/enb_uptime.erl M src/s1ap_proxy.erl 3 files changed, 109 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved jolly: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve diff --git a/include/s1gw_metrics.hrl b/include/s1gw_metrics.hrl index db087c5..83ec768 100644 --- a/include/s1gw_metrics.hrl +++ b/include/s1gw_metrics.hrl @@ -37,9 +37,10 @@ -define(S1GW_CTR_S1AP_PROXY_OUT_PKT_REPLY_ALL, [ctr, s1ap, proxy, out_pkt, reply, all]). -define(S1GW_CTR_S1AP_PROXY_OUT_PKT_REPLY_ERAB_SETUP_RSP, [ctr, s1ap, proxy, out_pkt, reply, erab_setup_rsp]). -%% GTP-U (traffic) related counters +%% per-eNB counters %% NOTE: these counters shall not be listed in ?S1GW_COUNTERS, %% but created dynamically for each connecting eNB. +-define(S1GW_CTR_ENB_UPTIME(ENBId), [ctr, enb, ENBId, uptime]). -define(S1GW_CTR_GTPU_PACKETS(ENBId, UDL), [ctr, enb, ENBId, gtpu, packets, UDL]). -define(S1GW_CTR_GTPU_BYTES_UE(ENBId, UDL), [ctr, enb, ENBId, gtpu, bytes, ue, UDL]). -define(S1GW_CTR_GTPU_BYTES_TOTAL(ENBId, UDL), [ctr, enb, ENBId, gtpu, bytes, total, UDL]). diff --git a/src/enb_uptime.erl b/src/enb_uptime.erl new file mode 100644 index 0000000..4c6f76a --- /dev/null +++ b/src/enb_uptime.erl @@ -0,0 +1,99 @@ +%% Copyright (C) 2025 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +%% Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> +%% +%% All Rights Reserved +%% +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU Affero General Public License as +%% published by the Free Software Foundation; either version 3 of the +%% License, or (at your option) any later version. +%% +%% This program is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%% GNU General Public License for more details. +%% +%% You should have received a copy of the GNU Affero General Public License +%% along with this program. If not, see <https://www.gnu.org/licenses/>. +%% +%% Additional Permission under GNU AGPL version 3 section 7: +%% +%% If you modify this Program, or any covered work, by linking or +%% combining it with runtime libraries of Erlang/OTP as released by +%% Ericsson on https://www.erlang.org (or a modified version of these +%% libraries), containing parts covered by the terms of the Erlang Public +%% License (https://www.erlang.org/EPLICENSE) the licensors of this +%% Program grant you additional permission to convey the resulting work +%% without the need to license the runtime libraries of Erlang/OTP under +%% the GNU Affero General Public License. Corresponding Source for a +%% non-source form of such a combination shall include the source code +%% for the parts of the runtime libraries of Erlang/OTP used as well as +%% that of the covered work. + +-module(enb_uptime). + +-export([start_link/0, + genb_id_ind/2, + shutdown/1]). + +-include_lib("kernel/include/logger.hrl"). + +-include("s1gw_metrics.hrl"). + +-define(INTERVAL, 5_000). + + +%% ------------------------------------------------------------------ +%% public API +%% ------------------------------------------------------------------ + +-spec start_link() -> pid(). +start_link() -> + T0 = erlang:monotonic_time(), + spawn_link(fun() -> loop(#{time => T0}) end). + + +-spec genb_id_ind(pid(), string()) -> ok. +genb_id_ind(Pid, GlobalENBId) -> + Pid ! {?FUNCTION_NAME, GlobalENBId}, + ok. + + +-spec shutdown(pid()) -> ok. +shutdown(Pid) -> + Pid ! stop, + ok. + + +%% ------------------------------------------------------------------ +%% private API +%% ------------------------------------------------------------------ + +loop(#{genb_id := GlobalENBId, time := T0} = S) -> + receive + stop -> + s1gw_metrics:ctr_reset(?S1GW_CTR_ENB_UPTIME(GlobalENBId)), + ok; + Event -> + ?LOG_ERROR("Rx unexpected event: ~p", [Event]) + after ?INTERVAL -> + T1 = erlang:monotonic_time(), + Diff = erlang:convert_time_unit(T1 - T0, native, second), + s1gw_metrics:ctr_inc(?S1GW_CTR_ENB_UPTIME(GlobalENBId), Diff), + ?LOG_INFO("Td ~p second(s)", [Diff]), + loop(S#{time => T1}) + end; + +loop(#{} = S) -> + receive + {genb_id_ind, GlobalENBId} -> + catch exometer:new(?S1GW_CTR_ENB_UPTIME(GlobalENBId), counter), + loop(S#{genb_id => GlobalENBId}); + Event -> + ?LOG_ERROR("Rx unexpected event: ~p", [Event]) + end. + + +%% vim:set ts=4 sw=4 et: diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index 06e5302..8111ad6 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -78,7 +78,8 @@ mme_ue_id :: undefined | mme_ue_id(), enb_ue_id :: undefined | enb_ue_id(), erab_id :: undefined | erab_id(), - path :: [s1ap_ie_id()] + path :: [s1ap_ie_id()], + enb_uptime :: pid() }). -type proxy_state() :: #proxy_state{}. @@ -127,7 +128,8 @@ init([ConnInfo]) -> process_flag(trap_exit, true), - {ok, #proxy_state{conn_info = ConnInfo, + {ok, #proxy_state{enb_uptime = enb_uptime:start_link(), + conn_info = ConnInfo, erabs = dict:new(), path = []}}. @@ -167,7 +169,8 @@ {noreply, S}. -terminate(Reason, #proxy_state{}) -> +terminate(Reason, #proxy_state{} = S) -> + enb_uptime:shutdown(S#proxy_state.enb_uptime), ?LOG_NOTICE("Terminating, reason ~p", [Reason]), ok. @@ -375,6 +378,8 @@ #'SuccessfulOutcome'{procedureCode = ?'id-S1Setup'}}, S) -> ?LOG_DEBUG("Processing S1 SETUP RESPONSE"), gtpu_kpi_enb_register(S), + enb_uptime:genb_id_ind(S#proxy_state.enb_uptime, + S#proxy_state.genb_id_str), %% there's nothing to patch in this PDU, so we forward it as-is {forward, S}; -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40831?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Ie8a06fafa2ce3e7a5aec1eb8e71af3053599cf24 Gerrit-Change-Number: 40831 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • ...
  • 109
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.