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

February 2024

  • 1 participants
  • 1748 discussions
[S] Change in osmo-msc[master]: pick up all *.vty in EXTRA_DIST
by fixeria 09 Feb '24

09 Feb '24
Attention is currently required from: laforge, neels, osmith, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/35872?usp=email ) Change subject: pick up all *.vty in EXTRA_DIST ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > but also neighbor_ident.vty is present in https://obs.osmocom.org/package/show/osmocom:master/osmo-msc even though it is missing from Makefile.am's EXTRA_DIST Not sure about OBS, but I don't see this file in the latest release tarball: ``` $ wget https://downloads.osmocom.org/releases/osmo-msc/osmo-msc-1.11.1.tar.bz2 $ tar -tvf osmo-msc-1.11.1.tar.bz2 | grep neighbor_ident -rw-r--r-- 1000/1000 2034 2023-09-29 12:19 osmo-msc-1.11.1/include/osmocom/msc/neighbor_ident.h -rw-r--r-- 1000/1000 5080 2023-09-29 12:19 osmo-msc-1.11.1/src/libmsc/neighbor_ident.c -rw-r--r-- 1000/1000 12514 2023-09-29 12:19 osmo-msc-1.11.1/src/libmsc/neighbor_ident_vty.c ``` Could it be that the OBS builds from `*.tar.xz` generated by `git-archive` (not by `make dist`)? -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/35872?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Id28e020fc59b83d1b4cd0e5b72314a46bea62259 Gerrit-Change-Number: 35872 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Feb 2024 15:32:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: examples/stream-*: Prevent signals from interrupting main loop
by jolly 09 Feb '24

09 Feb '24
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35925?usp=email ) Change subject: examples/stream-*: Prevent signals from interrupting main loop ...................................................................... examples/stream-*: Prevent signals from interrupting main loop SIGHUP and SIGPIPE are signals that must not interrupt the main loop if a socket is closed or fails. Change-Id: Ida3858600f5c87ff559e75ddf9ac031b3a8592a9 --- M examples/stream-client.c M examples/stream-server.c 2 files changed, 30 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/25/35925/1 diff --git a/examples/stream-client.c b/examples/stream-client.c index e42748f..f17a7d8 100644 --- a/examples/stream-client.c +++ b/examples/stream-client.c @@ -32,8 +32,11 @@ static struct osmo_stream_cli *conn; -void sighandler(int foo) +static void sighandler(int sigset) { + if (sigset == SIGPIPE || sigset == SIGHUP) + return; + LOGP(DSTREAMTEST, LOGL_NOTICE, "closing stream.\n"); exit(EXIT_SUCCESS); } @@ -150,6 +153,11 @@ LOGP(DSTREAMTEST, LOGL_NOTICE, "Entering main loop\n"); + signal(SIGINT, sighandler); + signal(SIGHUP, sighandler); + signal(SIGTERM, sighandler); + signal(SIGPIPE, sighandler); + while(1) { osmo_select_main(0); } diff --git a/examples/stream-server.c b/examples/stream-server.c index 9faf307..26dff95 100644 --- a/examples/stream-server.c +++ b/examples/stream-server.c @@ -36,8 +36,11 @@ static struct osmo_stream_srv *conn; -void sighandler(int foo) +static void sighandler(int sigset) { + if (sigset == SIGPIPE || sigset == SIGHUP) + return; + LOGP(DSTREAMTEST, LOGL_NOTICE, "closing STREAMSERVER.\n"); exit(EXIT_SUCCESS); } @@ -166,6 +169,11 @@ osmo_fd_setup(kbd_ofd, STDIN_FILENO, OSMO_FD_READ, kbd_cb, srv, 0); osmo_fd_register(kbd_ofd); + signal(SIGINT, sighandler); + signal(SIGHUP, sighandler); + signal(SIGTERM, sighandler); + signal(SIGPIPE, sighandler); + LOGP(DSTREAMTEST, LOGL_NOTICE, "Entering main loop on %s\n", osmo_stream_srv_link_get_sockname(srv)); while(1) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35925?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ida3858600f5c87ff559e75ddf9ac031b3a8592a9 Gerrit-Change-Number: 35925 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-netif[master]: stream_{cli,srv}: Add support for SCTP in OSMO_IO mode
by jolly 09 Feb '24

09 Feb '24
Attention is currently required from: arehbein, daniel, fixeria, laforge. jolly has uploaded a new patch set (#6) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35069?usp=email ) The following approvals got outdated and were removed: Code-Review+1 by daniel, Code-Review+1 by fixeria, Verified-1 by Jenkins Builder Change subject: stream_{cli,srv}: Add support for SCTP in OSMO_IO mode ...................................................................... stream_{cli,srv}: Add support for SCTP in OSMO_IO mode Let's enable the OSMO_IO_FD_MODE_SCTP_RECVMSG_SEND mode for SCTP sockets, allowing OSMO_STREAM_MODE_OSMO_IO to be used with SCTP. Change-Id: I6cf5bad5f618e71c80017960c38009b089dbd6a1 Depends: libosmocore Change-Id: I89eb519b22d21011d61a7855b2364bc3c295df82 Closes: OS#5753 --- M TODO-RELEASE M src/stream_cli.c M src/stream_srv.c 3 files changed, 35 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/69/35069/6 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35069?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I6cf5bad5f618e71c80017960c38009b089dbd6a1 Gerrit-Change-Number: 35069 Gerrit-PatchSet: 6 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-netif[master]: examples/stream-*: Add options, to set local/remote peer
by jolly 09 Feb '24

09 Feb '24
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35927?usp=email ) Change subject: examples/stream-*: Add options, to set local/remote peer ...................................................................... examples/stream-*: Add options, to set local/remote peer This helps to test connections via a network and failing connections. The client may add "-r <peer>" to the command line, to set the address of the remove peer. The server may add "-l <peer>" to the command line, to select address of local peer. By default "127.0.0.1" is used. Change-Id: Ie6da55ef248436e521c5d8f21f8053356c46a114 --- M examples/stream-client.c M examples/stream-server.c 2 files changed, 33 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/27/35927/1 diff --git a/examples/stream-client.c b/examples/stream-client.c index af0e38f..a7b80ab 100644 --- a/examples/stream-client.c +++ b/examples/stream-client.c @@ -97,15 +97,19 @@ { struct osmo_fd *kbd_ofd; bool use_sctp = false; + const char *use_remote_addr = "127.0.0.1"; int opt, rc; - while ((opt = getopt(argc, argv, "s")) != -1) { + while ((opt = getopt(argc, argv, "sr:")) != -1) { switch (opt) { case 's': use_sctp = true; break; - default: + case 'r': + use_remote_addr = optarg; break; + default: + exit(0); } } @@ -124,11 +128,10 @@ exit(EXIT_FAILURE); } osmo_stream_cli_set_name(conn, "stream_client"); - osmo_stream_cli_set_addr(conn, "127.0.0.1"); + osmo_stream_cli_set_addr(conn, use_remote_addr); osmo_stream_cli_set_port(conn, 10000); if (use_sctp) osmo_stream_cli_set_proto(conn, IPPROTO_SCTP); - osmo_stream_cli_set_connect_cb(conn, connect_cb); osmo_stream_cli_set_disconnect_cb(conn, disconnect_cb); osmo_stream_cli_set_read_cb2(conn, read_cb); diff --git a/examples/stream-server.c b/examples/stream-server.c index 2dee5f6..19ef83e 100644 --- a/examples/stream-server.c +++ b/examples/stream-server.c @@ -124,15 +124,19 @@ { struct osmo_fd *kbd_ofd; bool use_sctp = false; + const char *use_local_addr = "127.0.0.1"; int opt; - while ((opt = getopt(argc, argv, "s")) != -1) { + while ((opt = getopt(argc, argv, "sl:")) != -1) { switch (opt) { case 's': use_sctp = true; break; - default: + case 'l': + use_local_addr = optarg; break; + default: + exit(0); } } @@ -150,7 +154,7 @@ fprintf(stderr, "cannot create server link\n"); exit(EXIT_FAILURE); } - osmo_stream_srv_link_set_addr(srv, "127.0.0.1"); + osmo_stream_srv_link_set_addr(srv, use_local_addr); osmo_stream_srv_link_set_port(srv, 10000); if (use_sctp) osmo_stream_srv_link_set_proto(srv, IPPROTO_SCTP); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35927?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ie6da55ef248436e521c5d8f21f8053356c46a114 Gerrit-Change-Number: 35927 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-netif[master]: stream_{cli,srv}: Fix memory leak, if sending a message fails
by jolly 09 Feb '24

09 Feb '24
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35926?usp=email ) Change subject: stream_{cli,srv}: Fix memory leak, if sending a message fails ...................................................................... stream_{cli,srv}: Fix memory leak, if sending a message fails Also the example client/server must not access msgb after sending it, especially if the msgb got freed due to a failure. Change-Id: I627a71b4f0183cd83835c328a5cdd67a413ae614 --- M examples/stream-client.c M examples/stream-server.c M src/stream_cli.c M src/stream_srv.c 4 files changed, 27 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/26/35926/1 diff --git a/examples/stream-client.c b/examples/stream-client.c index f17a7d8..af0e38f 100644 --- a/examples/stream-client.c +++ b/examples/stream-client.c @@ -86,9 +86,9 @@ ptr = msgb_put(msg, ret); memcpy(ptr, buf, ret); - osmo_stream_cli_send(conn, msg); + LOGP(DSTREAMTEST, LOGL_NOTICE, "sending %d bytes message: %s\n", msg->len, msgb_hexdump(msg)); - LOGP(DSTREAMTEST, LOGL_NOTICE, "sent %d bytes message: %s\n", msg->len, msgb_hexdump(msg)); + osmo_stream_cli_send(conn, msg); return 0; } diff --git a/examples/stream-server.c b/examples/stream-server.c index 26dff95..2dee5f6 100644 --- a/examples/stream-server.c +++ b/examples/stream-server.c @@ -115,7 +115,7 @@ memcpy(ptr, buf, ret); osmo_stream_srv_send(conn, msg); - LOGP(DSTREAMTEST, LOGL_NOTICE, "message of %d bytes sent\n", msg->len); + LOGP(DSTREAMTEST, LOGL_NOTICE, "message of %d bytes sent\n", ret); return 0; } diff --git a/src/stream_cli.c b/src/stream_cli.c index e7e0ec6..4a39166 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -946,6 +946,8 @@ * \param[in] msg Message buffer to enqueue in transmit queue */ void osmo_stream_cli_send(struct osmo_stream_cli *cli, struct msgb *msg) { + int rc; + OSMO_ASSERT(cli); OSMO_ASSERT(msg); @@ -956,9 +958,11 @@ break; case OSMO_STREAM_MODE_OSMO_IO: if (cli->proto == IPPROTO_SCTP) - osmo_iofd_sctp_send_msgb(cli->iofd, msg, MSG_NOSIGNAL); + rc = osmo_iofd_sctp_send_msgb(cli->iofd, msg, MSG_NOSIGNAL); else - osmo_iofd_write_msgb(cli->iofd, msg); + rc = osmo_iofd_write_msgb(cli->iofd, msg); + if (rc < 0) + msgb_free(msg); break; default: OSMO_ASSERT(false); diff --git a/src/stream_srv.c b/src/stream_srv.c index ff38756..d493cdc 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -940,6 +940,8 @@ * \param[in] msg Message buffer to enqueue in transmit queue */ void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg) { + int rc; + OSMO_ASSERT(conn); OSMO_ASSERT(msg); if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { @@ -955,9 +957,11 @@ break; case OSMO_STREAM_MODE_OSMO_IO: if (conn->srv->proto == IPPROTO_SCTP) - osmo_iofd_sctp_send_msgb(conn->iofd, msg, MSG_NOSIGNAL); + rc = osmo_iofd_sctp_send_msgb(conn->iofd, msg, MSG_NOSIGNAL); else - osmo_iofd_write_msgb(conn->iofd, msg); + rc = osmo_iofd_write_msgb(conn->iofd, msg); + if (rc < 0) + msgb_free(msg); break; default: OSMO_ASSERT(false); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35926?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I627a71b4f0183cd83835c328a5cdd67a413ae614 Gerrit-Change-Number: 35926 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-netif[master]: FIXME: debug-code
by jolly 09 Feb '24

09 Feb '24
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35928?usp=email ) Change subject: FIXME: debug-code ...................................................................... FIXME: debug-code Change-Id: Ib7dc6199cedd2cd24e6113675ec6bdeef801fa41 --- M include/osmocom/netif/stream.h M src/stream_cli.c M src/stream_srv.c 3 files changed, 23 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/28/35928/1 diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 2e6aa97..837257d 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -10,14 +10,6 @@ * @{ */ -/*! \brief Access SCTP flags from the msgb control buffer */ -#define OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION 0x80 /* sctp_recvmsg() flags=MSG_NOTIFICATION, msgb_data() contains "union sctp_notification*" */ -#define msgb_sctp_msg_flags(msg) (msg)->cb[2] - -/*! \brief Access the SCTP PPID from the msgb control buffer */ -#define msgb_sctp_ppid(msg) (msg)->cb[3] -/*! \brief Access the SCTP Stream ID from the msgb control buffer */ -#define msgb_sctp_stream(msg) (msg)->cb[4] /*! \brief Osmocom Stream Server Link: A server socket listening/accepting */ struct osmo_stream_srv_link; diff --git a/src/stream_cli.c b/src/stream_cli.c index 4a39166..832b06b 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -886,6 +886,7 @@ if (ret < 0) { osmo_stream_cli_reconnect(cli); + printf("return after cli_reconnect\n"); return ret; } @@ -893,15 +894,19 @@ if (cli->flags & OSMO_STREAM_CLI_F_NODELAY) { ret = stream_setsockopt_nodelay(fd, cli->proto, 1); - if (ret < 0) + if (ret < 0) { + printf("return after nodelay\n"); goto error_close_socket; + } } switch (cli->mode) { case OSMO_STREAM_MODE_OSMO_FD: osmo_fd_setup(&cli->ofd, fd, OSMO_FD_READ | OSMO_FD_WRITE, osmo_stream_cli_fd_cb, cli, 0); - if (osmo_fd_register(&cli->ofd) < 0) + if (osmo_fd_register(&cli->ofd) < 0) { + printf("return after fd_register\n"); goto error_close_socket; + } break; case OSMO_STREAM_MODE_OSMO_IO: if (!cli->iofd) { @@ -910,12 +915,16 @@ iofd_mode = OSMO_IO_FD_MODE_SCTP_RECVMSG_SEND; cli->iofd = osmo_iofd_setup(cli, fd, cli->name, iofd_mode, &osmo_stream_cli_ioops, cli); } - if (!cli->iofd) + if (!cli->iofd) { + printf("return after iofd_setup\n"); goto error_close_socket; + } configure_cli_segmentation_cb(cli->iofd, cli->segmentation_cb); - if (osmo_iofd_register(cli->iofd, fd) < 0) + if (osmo_iofd_register(cli->iofd, fd) < 0) { + printf("return after iofd_register\n"); goto error_close_socket; + } osmo_iofd_notify_connected(cli->iofd); break; default: diff --git a/src/stream_srv.c b/src/stream_srv.c index d493cdc..29ca910 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -897,6 +897,7 @@ default: break; } + OSMO_ASSERT(0); return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35928?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ib7dc6199cedd2cd24e6113675ec6bdeef801fa41 Gerrit-Change-Number: 35928 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmocom-bb[master]: mobile: use osmo_csd_chan_mode_rate_desc[] from libosmogsm
by fixeria 09 Feb '24

09 Feb '24
Attention is currently required from: fixeria, pespin. Hello Jenkins Builder, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/35915?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by pespin, Verified-1 by Jenkins Builder Change subject: mobile: use osmo_csd_chan_mode_rate_desc[] from libosmogsm ...................................................................... mobile: use osmo_csd_chan_mode_rate_desc[] from libosmogsm Change-Id: I862329fbf19c515be88f2c23989b3991886a2cf4 Depends: libosmocore.git Ie230e09d496c9b791981d8ee04902fc9966ed6d7 Related: OS#4396 --- M src/host/layer23/src/mobile/tch_data.c 1 file changed, 21 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/15/35915/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35915?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I862329fbf19c515be88f2c23989b3991886a2cf4 Gerrit-Change-Number: 35915 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmocore[master]: gsm: add TCH block/lchan definitions for CSD
by fixeria 09 Feb '24

09 Feb '24
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35914?usp=email ) Change subject: gsm: add TCH block/lchan definitions for CSD ...................................................................... Patch Set 2: (1 comment) File include/osmocom/gsm/gsm44021.h: https://gerrit.osmocom.org/c/libosmocore/+/35914/comment/8da23827_fc396464 PS1, Line 15: > You are missing here: "extern const struct osmo_csd_tch_lchan_desc osmo_csd_chan_mode_rate_desc[256] […] Ack, thanks! -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35914?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie230e09d496c9b791981d8ee04902fc9966ed6d7 Gerrit-Change-Number: 35914 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 09 Feb 2024 15:18:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: gsm: add TCH block/lchan definitions for CSD
by fixeria 09 Feb '24

09 Feb '24
Attention is currently required from: fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35914?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: gsm: add TCH block/lchan definitions for CSD ...................................................................... gsm: add TCH block/lchan definitions for CSD Change-Id: Ie230e09d496c9b791981d8ee04902fc9966ed6d7 Related: OS#1572, OS#4396 --- M include/osmocom/gsm/gsm44021.h M src/gsm/gsm44021.c M src/gsm/libosmogsm.map 3 files changed, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/35914/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35914?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie230e09d496c9b791981d8ee04902fc9966ed6d7 Gerrit-Change-Number: 35914 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-bts[master]: csd_v110: use osmo_csd_chan_mode_rate_desc[] from libosmogsm
by fixeria 09 Feb '24

09 Feb '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/35924?usp=email ) Change subject: csd_v110: use osmo_csd_chan_mode_rate_desc[] from libosmogsm ...................................................................... csd_v110: use osmo_csd_chan_mode_rate_desc[] from libosmogsm Change-Id: I1e16a1f8142ff3cf0e26e16316fde4c42082ad54 Depends: libosmocore.git Ie230e09d496c9b791981d8ee04902fc9966ed6d7 Related: OS#1572 --- M include/osmo-bts/csd_v110.h M src/common/csd_v110.c M tests/csd/csd_test.c 3 files changed, 33 insertions(+), 60 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/35924/1 diff --git a/include/osmo-bts/csd_v110.h b/include/osmo-bts/csd_v110.h index f6be0ae..b80f95d 100644 --- a/include/osmo-bts/csd_v110.h +++ b/include/osmo-bts/csd_v110.h @@ -5,18 +5,6 @@ struct gsm_lchan; -struct csd_v110_frame_desc { - uint16_t num_blocks; - uint16_t num_bits; -}; - -struct csd_v110_lchan_desc { - struct csd_v110_frame_desc fr; - struct csd_v110_frame_desc hr; -}; - -extern const struct csd_v110_lchan_desc csd_v110_lchan_desc[256]; - int csd_v110_rtp_encode(const struct gsm_lchan *lchan, uint8_t *rtp, const uint8_t *data, size_t data_len); int csd_v110_rtp_decode(const struct gsm_lchan *lchan, uint8_t *data, diff --git a/src/common/csd_v110.c b/src/common/csd_v110.c index 5046d6e..79cfe97 100644 --- a/src/common/csd_v110.c +++ b/src/common/csd_v110.c @@ -32,32 +32,6 @@ #include <osmo-bts/csd_v110.h> #include <osmo-bts/lchan.h> -/* key is enum gsm48_chan_mode, so assuming a value in range 0..255 */ -const struct csd_v110_lchan_desc csd_v110_lchan_desc[256] = { -#if 0 - [GSM48_CMODE_DATA_14k5] = { - /* TCH/F14.4: 290 bits every 20 ms (14.5 kbit/s) */ - .fr = { .num_blocks = 1, .num_bits = 290 }, - }, -#endif - [GSM48_CMODE_DATA_12k0] = { - /* TCH/F9.6: 4 * 60 bits every 20 ms (12.0 kbit/s) */ - .fr = { .num_blocks = 4, .num_bits = 60 }, - }, - [GSM48_CMODE_DATA_6k0] = { - /* TCH/F4.8: 2 * 60 bits every 20 ms (6.0 kbit/s) */ - .fr = { .num_blocks = 2, .num_bits = 60 }, - /* TCH/H4.8: 4 * 60 bits every 40 ms (6.0 kbit/s) */ - .hr = { .num_blocks = 4, .num_bits = 60 }, - }, - [GSM48_CMODE_DATA_3k6] = { - /* TCH/F2.4: 2 * 36 bits every 20 ms (3.6 kbit/s) */ - .fr = { .num_blocks = 2, .num_bits = 36 }, - /* TCH/H2.4: 4 * 36 bits every 40 ms (3.6 kbit/s) */ - .hr = { .num_blocks = 4, .num_bits = 36 }, - }, -}; - /* 3GPP TS 44.021, Figure 4: Coding of data rates (E1/E2/E3 bits) */ static const uint8_t e1e2e3_map[_LCHAN_CSD_M_NUM][3] = { [LCHAN_CSD_M_T_600] = { 1, 0, 0 }, @@ -76,28 +50,28 @@ int csd_v110_rtp_encode(const struct gsm_lchan *lchan, uint8_t *rtp, const uint8_t *data, size_t data_len) { - const struct csd_v110_frame_desc *desc; + const struct osmo_csd_tch_block_desc *desc; ubit_t ra_bits[80 * 4]; - OSMO_ASSERT(lchan->tch_mode < ARRAY_SIZE(csd_v110_lchan_desc)); + OSMO_ASSERT(lchan->tch_mode < ARRAY_SIZE(osmo_csd_chan_mode_rate_desc)); if (lchan->type == GSM_LCHAN_TCH_F) - desc = &csd_v110_lchan_desc[lchan->tch_mode].fr; + desc = &osmo_csd_chan_mode_rate_desc[lchan->tch_mode].fr; else - desc = &csd_v110_lchan_desc[lchan->tch_mode].hr; - if (OSMO_UNLIKELY(desc->num_blocks == 0)) + desc = &osmo_csd_chan_mode_rate_desc[lchan->tch_mode].hr; + if (OSMO_UNLIKELY(desc->num_frames == 0)) return -ENOTSUP; /* handle empty/incomplete Uplink frames gracefully */ - if (OSMO_UNLIKELY(data_len < (desc->num_blocks * desc->num_bits))) { + if (OSMO_UNLIKELY(data_len < (desc->num_frames * desc->num_bits))) { /* encode N idle frames as per 3GPP TS 44.021, section 8.1.6 */ memset(&ra_bits[0], 0x01, sizeof(ra_bits)); - for (unsigned int i = 0; i < desc->num_blocks; i++) + for (int i = 0; i < desc->num_frames; i++) memset(&ra_bits[i * 80], 0x00, 8); /* alignment pattern */ goto ra1_ra2; } /* RA1'/RA1: convert from radio rate to an intermediate data rate */ - for (unsigned int i = 0; i < desc->num_blocks; i++) { + for (int i = 0; i < desc->num_frames; i++) { struct osmo_v110_decoded_frame df; /* convert a V.110 36-/60-bit frame to a V.110 80-bit frame */ @@ -124,7 +98,7 @@ ra1_ra2: /* RA1/RA2: convert from an intermediate rate to 64 kbit/s */ - if (desc->num_blocks == 4) { + if (desc->num_frames == 4) { /* 4 * 80 bits (16 kbit/s) => 2 bits per octet */ for (unsigned int i = 0, j = 0; i < RFC4040_RTP_PLEN; i++) { rtp[i] = (0xff >> 2); @@ -145,22 +119,22 @@ int csd_v110_rtp_decode(const struct gsm_lchan *lchan, uint8_t *data, const uint8_t *rtp, size_t rtp_len) { - const struct csd_v110_frame_desc *desc; + const struct osmo_csd_tch_block_desc *desc; ubit_t ra_bits[80 * 4]; - OSMO_ASSERT(lchan->tch_mode < ARRAY_SIZE(csd_v110_lchan_desc)); + OSMO_ASSERT(lchan->tch_mode < ARRAY_SIZE(osmo_csd_chan_mode_rate_desc)); if (lchan->type == GSM_LCHAN_TCH_F) - desc = &csd_v110_lchan_desc[lchan->tch_mode].fr; + desc = &osmo_csd_chan_mode_rate_desc[lchan->tch_mode].fr; else - desc = &csd_v110_lchan_desc[lchan->tch_mode].hr; - if (OSMO_UNLIKELY(desc->num_blocks == 0)) + desc = &osmo_csd_chan_mode_rate_desc[lchan->tch_mode].hr; + if (OSMO_UNLIKELY(desc->num_frames == 0)) return -ENOTSUP; if (OSMO_UNLIKELY(rtp_len != RFC4040_RTP_PLEN)) return -EINVAL; /* RA1/RA2: convert from 64 kbit/s to an intermediate rate */ - if (desc->num_blocks == 4) { + if (desc->num_frames == 4) { /* 4 * 80 bits (16 kbit/s) => 2 bits per octet */ for (unsigned int i = 0, j = 0; i < RFC4040_RTP_PLEN; i++) { ra_bits[j++] = (rtp[i] >> 7); @@ -173,7 +147,7 @@ } /* RA1'/RA1: convert from an intermediate rate to radio rate */ - for (unsigned int i = 0; i < desc->num_blocks; i++) { + for (int i = 0; i < desc->num_frames; i++) { struct osmo_v110_decoded_frame df; /* convert a V.110 80-bit frame to a V.110 36-/60-bit frame */ @@ -184,5 +158,5 @@ osmo_csd_3k6_encode_frame(&data[i * 36], 36, &df); } - return desc->num_blocks * desc->num_bits; + return desc->num_frames * desc->num_bits; } diff --git a/tests/csd/csd_test.c b/tests/csd/csd_test.c index 466ff88..b1c03a1 100644 --- a/tests/csd/csd_test.c +++ b/tests/csd/csd_test.c @@ -81,21 +81,21 @@ static void exec_test_case(const struct test_case *tc) { - const struct csd_v110_frame_desc *desc; + const struct osmo_csd_tch_block_desc *desc; uint8_t rtp[RFC4040_RTP_PLEN] = { 0 }; ubit_t data_enc[BBUF_MAX]; ubit_t data_dec[BBUF_MAX]; int rc; /* obtain a V.110 frame description for the given channel type/rate */ - OSMO_ASSERT(tc->tch_mode < ARRAY_SIZE(csd_v110_lchan_desc)); + OSMO_ASSERT(tc->tch_mode < ARRAY_SIZE(osmo_csd_chan_mode_rate_desc)); if (tc->lchan_type == GSM_LCHAN_TCH_F) - desc = &csd_v110_lchan_desc[tc->tch_mode].fr; + desc = &osmo_csd_chan_mode_rate_desc[tc->tch_mode].fr; else - desc = &csd_v110_lchan_desc[tc->tch_mode].hr; + desc = &osmo_csd_chan_mode_rate_desc[tc->tch_mode].hr; /* total number of bits carried by a radio interface block */ - const unsigned int bit_num = desc->num_bits * desc->num_blocks; + const unsigned int bit_num = desc->num_bits * desc->num_frames; if (bit_num == 0) { fprintf(stderr, "[i] Skipping '%s' (not implemented)\n", tc->name); return; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/35924?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I1e16a1f8142ff3cf0e26e16316fde4c42082ad54 Gerrit-Change-Number: 35924 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • ...
  • 175
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.