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 libosmo-netif[master]: osmo_io: make use of osmo_iofd_get_ioops()
by jolly 29 Feb '24

29 Feb '24
Attention is currently required from: laforge. jolly has uploaded a new patch set (#2) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36077?usp=email ) The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: osmo_io: make use of osmo_iofd_get_ioops() ...................................................................... osmo_io: make use of osmo_iofd_get_ioops() This avoids resetting the callbacks with the wrong ones in the SCTP case. Change-Id: Id3cb11bc0000299faa79d980de8abc1980916d70 Depends: libosmocore.git Change-Id I03398c811b9534f50c6644b21eea89a04be29fb0 --- M src/stream_cli.c M src/stream_srv.c 2 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/77/36077/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36077?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: Id3cb11bc0000299faa79d980de8abc1980916d70 Gerrit-Change-Number: 36077 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-netif[master]: stream_{client,server} example: Cleanup on exit
by jolly 29 Feb '24

29 Feb '24
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36124?usp=email ) Change subject: stream_{client,server} example: Cleanup on exit ...................................................................... stream_{client,server} example: Cleanup on exit In order to detect memory leaks while debugging, stream server/client and keyboard is closed on exit. Related: OS#5753 Change-Id: I9dbb7f46b2a798e88ad4df8ff73c6ee40c07b843 --- M examples/stream-client.c M examples/stream-server.c 2 files changed, 36 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/24/36124/1 diff --git a/examples/stream-client.c b/examples/stream-client.c index 97aaa1c..d57dc12 100644 --- a/examples/stream-client.c +++ b/examples/stream-client.c @@ -32,9 +32,12 @@ static struct osmo_stream_cli *conn; +static bool quit = false; + void sighandler(int foo) { LOGP(DSTREAMTEST, LOGL_NOTICE, "closing stream.\n"); + quit = true; exit(EXIT_SUCCESS); } @@ -162,9 +165,17 @@ exit(EXIT_FAILURE); } + signal(SIGINT, sighandler); + LOGP(DSTREAMTEST, LOGL_NOTICE, "Entering main loop\n"); - while(1) { + while(!quit) { osmo_select_main(0); } + + signal(SIGINT, SIG_DFL); + + osmo_fd_unregister(kbd_ofd); + + osmo_stream_cli_destroy(conn); } diff --git a/examples/stream-server.c b/examples/stream-server.c index d0647b7..49d52a7 100644 --- a/examples/stream-server.c +++ b/examples/stream-server.c @@ -35,11 +35,12 @@ static struct osmo_stream_srv_link *srv; static struct osmo_stream_srv *conn; +bool quit = false; void sighandler(int foo) { LOGP(DSTREAMTEST, LOGL_NOTICE, "closing STREAMSERVER.\n"); - exit(EXIT_SUCCESS); + quit = true; } int read_cb(struct osmo_stream_srv *conn, struct msgb *msg) @@ -181,9 +182,17 @@ osmo_fd_setup(kbd_ofd, STDIN_FILENO, OSMO_FD_READ, kbd_cb, srv, 0); osmo_fd_register(kbd_ofd); + signal(SIGINT, sighandler); + LOGP(DSTREAMTEST, LOGL_NOTICE, "Entering main loop on %s\n", osmo_stream_srv_link_get_sockname(srv)); - while(1) { + while(!quit) { osmo_select_main(0); } + + signal(SIGINT, SIG_DFL); + + osmo_fd_unregister(kbd_ofd); + + osmo_stream_srv_link_destroy(srv); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36124?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: I9dbb7f46b2a798e88ad4df8ff73c6ee40c07b843 Gerrit-Change-Number: 36124 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: Do not try to send msg, if not connected
by jolly 29 Feb '24

29 Feb '24
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36123?usp=email ) Change subject: stream_cli: Do not try to send msg, if not connected ...................................................................... stream_cli: Do not try to send msg, if not connected Related: OS#5753 Change-Id: I9e5f5db9b45615dacb05115c4de8ff3f715815c8 --- M src/stream_cli.c 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/23/36123/1 diff --git a/src/stream_cli.c b/src/stream_cli.c index 3544e14..f9e52a0 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -995,6 +995,12 @@ OSMO_ASSERT(cli); OSMO_ASSERT(msg); + if (cli->state != STREAM_CLI_STATE_CONNECTED) { + LOGSCLI(cli, LOGL_ERROR, "Not connected with srv.\n"); + msgb_free(msg); + return; + } + switch (cli->mode) { case OSMO_STREAM_MODE_OSMO_FD: msgb_enqueue(&cli->tx_queue, msg); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36123?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: I9e5f5db9b45615dacb05115c4de8ff3f715815c8 Gerrit-Change-Number: 36123 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}: Free received messages when not forwarded
by jolly 29 Feb '24

29 Feb '24
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36125?usp=email ) Change subject: stream_{cli,srv}: Free received messages when not forwarded ...................................................................... stream_{cli,srv}: Free received messages when not forwarded If a message is not forwarded (to a read callback function, it must be freed, to prevent memory leaks. The message musst be freed before calling osmo_stream_srv_destroy() or stream_cli_handle_connecting(), because within the function calls the client/server instance may get destroyed and the message is 'owned' by it. Calling msgb_free(msg) afterwards may result in double free bug. Related: OS#5753 Change-Id: Ic043f11cdba0df9e0b78cac8db7206800098e0ba --- M src/stream_cli.c M src/stream_srv.c 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/25/36125/1 diff --git a/src/stream_cli.c b/src/stream_cli.c index f9e52a0..61fb4b7 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -439,6 +439,7 @@ switch (cli->state) { case STREAM_CLI_STATE_CONNECTING: + msgb_free(msg); stream_cli_handle_connecting(cli, res); break; case STREAM_CLI_STATE_CONNECTED: @@ -447,6 +448,8 @@ /* Forward message to read callback, also if the connection failed. */ if (cli->iofd_read_cb) cli->iofd_read_cb(cli, msg); + else + msgb_free(msg); break; default: osmo_panic("%s() called with unexpected state %d\n", __func__, cli->state); @@ -488,6 +491,7 @@ switch (cli->state) { case STREAM_CLI_STATE_CONNECTING: + msgb_free(msg); stream_cli_handle_connecting(cli, res); break; case STREAM_CLI_STATE_CONNECTED: @@ -496,6 +500,8 @@ /* Forward message to read callback, also if the connection failed. */ if (cli->iofd_read_cb) cli->iofd_read_cb(cli, msg); + else + msgb_free(msg); break; default: osmo_panic("%s() called with unexpected state %d\n", __func__, cli->state); diff --git a/src/stream_srv.c b/src/stream_srv.c index f82a9a0..852154a 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -562,6 +562,7 @@ if (OSMO_UNLIKELY(res <= 0)) { /* This connection is dead, destroy it. */ + msgb_free(msg); osmo_stream_srv_destroy(conn); } else { if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { @@ -609,6 +610,7 @@ if (OSMO_UNLIKELY(res <= 0)) { /* This connection is dead, destroy it. */ + msgb_free(msg); osmo_stream_srv_destroy(conn); } else { if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36125?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: Ic043f11cdba0df9e0b78cac8db7206800098e0ba Gerrit-Change-Number: 36125 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: osmo_io_uring: Run check of tests/osmo_io with io_uring also
by jolly 29 Feb '24

29 Feb '24
Attention is currently required from: daniel, laforge, pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35984?usp=email ) Change subject: osmo_io_uring: Run check of tests/osmo_io with io_uring also ...................................................................... Patch Set 6: (1 comment) File tests/testsuite.at: https://gerrit.osmocom.org/c/libosmocore/+/35984/comment/18ee800e_c556ea96 PS6, Line 535: AT_SKIP_IF([ test "$ENABLE_URING" != "yes" ]) > shouldn't this be = "yes"? […] AT_SKIP_IF will run the test, if the condition is false. if ENABLE_URING is "yes" this condition is false. i tested that with --disable-uring -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35984?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: I82db9a15bc483a5447d86352512afaafa2bcfbb6 Gerrit-Change-Number: 35984 Gerrit-PatchSet: 6 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Thu, 29 Feb 2024 08:17:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: examples/stream-*: Add options, to set local/remote peer
by jolly 29 Feb '24

29 Feb '24
jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35927?usp=email ) Change subject: examples/stream-*: Add options, to set local/remote peer ...................................................................... Patch Set 5: (1 comment) Commit Message: https://gerrit.osmocom.org/c/libosmo-netif/+/35927/comment/a8e3dc3d_429161df PS2, Line 12: remove > remote Done -- 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: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 29 Feb 2024 08:17:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: osmo_io_uring: Detach msghdr from iofd before calling iofd_handle_sen...
by jolly 29 Feb '24

29 Feb '24
Attention is currently required from: daniel, laforge, pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35982?usp=email ) Change subject: osmo_io_uring: Detach msghdr from iofd before calling iofd_handle_send_completion() ...................................................................... Patch Set 9: (1 comment) File src/core/osmo_io_uring.c: https://gerrit.osmocom.org/c/libosmocore/+/35982/comment/239e58ef_242b6b4b PS6, Line 200: * iofd_handle_send_completion() will free msghdr at the end. the previous callback function may destroy iofd. > Still waiting for this to be clarified. Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35982?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: Ia349f73de2145fa360b20dd40deb73a8ffc71f07 Gerrit-Change-Number: 35982 Gerrit-PatchSet: 9 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Thu, 29 Feb 2024 08:17:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: osmo_io: Assign const name when stealing TX msg from iofd ctx
by jolly 29 Feb '24

29 Feb '24
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/36121?usp=email ) Change subject: osmo_io: Assign const name when stealing TX msg from iofd ctx ...................................................................... osmo_io: Assign const name when stealing TX msg from iofd ctx All TX messages are moved from iofd instance to the user's context. iofd may be destroyed, but the message is still available to the user. To prevent a use-after-free, the context name must be changed from iofd->name to a constant that does not belong to iofd. Change-Id: Ib8dae924fa2d94a7f636136ba7279b965a18cf5b --- M src/core/osmo_io.c 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/21/36121/1 diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c index 7ea959b..89690ae 100644 --- a/src/core/osmo_io.c +++ b/src/core/osmo_io.c @@ -334,7 +334,9 @@ * \param[in] hdr serialized msghdr containing state of completed I/O */ void iofd_handle_recv(struct osmo_io_fd *iofd, struct msgb *msg, int rc, struct iofd_msghdr *hdr) { + /* Steal the msg from iofd. Also assign const name, because iofd->name will be freed when iofd is destroyed. */ talloc_steal(iofd->msgb_alloc.ctx, msg); + talloc_set_name(msg, "osmo_io_rx_msgb"); switch (iofd->mode) { case OSMO_IO_FD_MODE_READ_WRITE: iofd_handle_segmented_read(iofd, msg, rc); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36121?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: Ib8dae924fa2d94a7f636136ba7279b965a18cf5b Gerrit-Change-Number: 36121 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmocore[master]: osmo_io: Use poll/select to notify socket connection at osmo_io_uring.c
by jolly 29 Feb '24

29 Feb '24
Attention is currently required from: daniel, jolly, pespin. Hello Jenkins Builder, daniel, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35910?usp=email to look at the new patch set (#9). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: osmo_io: Use poll/select to notify socket connection at osmo_io_uring.c ...................................................................... osmo_io: Use poll/select to notify socket connection at osmo_io_uring.c In order to receive a connect notification from SCTP socket, poll/select event must be used instead of a write notification via io_uring completion event. Once the connect notification has been received, subsequent write notifications via io_uring are used. Change-Id: I4eca9ea72beb0d6ea4d44cce81ed620033f07270 Related: OS#5751 --- M src/core/osmo_io_internal.h M src/core/osmo_io_uring.c 2 files changed, 93 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/35910/9 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35910?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: I4eca9ea72beb0d6ea4d44cce81ed620033f07270 Gerrit-Change-Number: 35910 Gerrit-PatchSet: 9 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmocore[master]: osmo_io: Move notify_connected function to backend
by jolly 29 Feb '24

29 Feb '24
Attention is currently required from: daniel, laforge. Hello Jenkins Builder, daniel, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/35909?usp=email to look at the new patch set (#6). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder The change is no longer submittable: Verified is unsatisfied now. Change subject: osmo_io: Move notify_connected function to backend ...................................................................... osmo_io: Move notify_connected function to backend This relocation is necessary as the backend (osmo_io_fd or osmo_io_uring) requires a different approach in handling connect notifications. As a result, a function call has been introduced to struct iofd_backend_ops. In a subsequent patch, the process for the osmo_io_uring backend will be modified to handle SCTP connect notifications using poll/select. If connect notification is requested using poll/select, the file descriptior must be registered to osmo_fd, using osmo_fd_register. If read / write notification is requested by application, the file descriptior must be registered also. A flag is used prevent calling osmo_fd_register / osmo_fd_unregister multiple times, which would cause a crash. Change-Id: I905ec85210570aff8addadfc9603335d04eb057a Related: OS#5751 --- M src/core/osmo_io.c M src/core/osmo_io_internal.h M src/core/osmo_io_poll.c M src/core/osmo_io_uring.c 4 files changed, 54 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/09/35909/6 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35909?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: I905ec85210570aff8addadfc9603335d04eb057a Gerrit-Change-Number: 35909 Gerrit-PatchSet: 6 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(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: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ...
  • 175
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.