Attention is currently required from: jolly, pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/41300?usp=email )
Change subject: io_uring: Avoid extra reads if iofd becomes unregistered by user
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41300?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I231d5a16768b730f67089090c244bcc10dc69c3a
Gerrit-Change-Number: 41300
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 05 Nov 2025 11:01:44 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
laforge has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/41299?usp=email )
Change subject: tests/osmo_io_test: test_segmentation: Use osmo_iofd_close() API
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41299?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id910bfb4e0965700e2d378a513a9bf889b929d44
Gerrit-Change-Number: 41299
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 05 Nov 2025 11:00:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/41300?usp=email )
Change subject: io_uring: Avoid extra reads if iofd becomes unregistered by user
......................................................................
io_uring: Avoid extra reads if iofd becomes unregistered by user
The user callback (read_cb, segmentation_cb, etc.) may decide to
unregister the iofd instead of closing it. In this scenario, we should
avoid calling the callback further until the iofd is registered again.
Change-Id: I231d5a16768b730f67089090c244bcc10dc69c3a
---
M src/core/osmo_io_uring.c
M tests/osmo_io/osmo_io_test.c
2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/00/41300/1
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index 01b8063..e4a87ad 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -359,7 +359,7 @@
}
/* Check for every iteration, because iofd might get unregistered/closed during receive function. */
- if (iofd->u.uring.read.enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED) && iofd->u.uring.read.enabled)
iofd_handle_recv(iofd, msg, chunk, msghdr);
else
msgb_free(msg);
@@ -372,7 +372,7 @@
msghdr->msg[idx] = NULL;
}
- if (iofd->u.uring.read.enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED) && iofd->u.uring.read.enabled)
iofd_uring_submit_recv(iofd, msghdr->action);
iofd_msghdr_free(msghdr);
diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c
index 0812ea8..06491a7 100644
--- a/tests/osmo_io/osmo_io_test.c
+++ b/tests/osmo_io/osmo_io_test.c
@@ -280,7 +280,7 @@
} else {
OSMO_ASSERT(rc == 0);
file_eof_read = true;
- osmo_iofd_close(iofd);
+ osmo_iofd_unregister(iofd);
}
talloc_free(msg);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41300?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I231d5a16768b730f67089090c244bcc10dc69c3a
Gerrit-Change-Number: 41300
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, jolly, laforge.
Hello Jenkins Builder, fixeria, jolly, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41297?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: tests/osmo_io_test (io_uring): test_segmentation: Fix infinite loop in read_cb rc=0
......................................................................
tests/osmo_io_test (io_uring): test_segmentation: Fix infinite loop in read_cb rc=0
Under linux 6.17.6-arch1-1 & liburing 2.12-1, once we finish reading
from the pipe (rc=0) because the write peer was closed and data has been
consumed, we end up in some sort of infinite loop in the uring due to
re-adding a sqe in iofd_uring_handle_recv()->iofd_uring_submit_recv()
path and immediatelly consuming a cqe from the uring, without going
through the poll() loop.
The user is expected to close the fd once rc=0 is received anyway, which
was not being done in this test. Doing so successfully unregisters the
iofd and fixes the infinite loop.
Fixes: 086ee51de416ae5276b4b185c055831e16c0ef85
Change-Id: I47b5fff04c601cd08ab2d46b88336247b2193808
---
M tests/osmo_io/osmo_io_test.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/41297/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41297?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I47b5fff04c601cd08ab2d46b88336247b2193808
Gerrit-Change-Number: 41297
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(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-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41298?usp=email )
Change subject: [REST] OpenAPI: fix regexp to permit IPv6 addr in EnbId
......................................................................
Patch Set 1:
(1 comment)
File contrib/openapi.yaml:
https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41298/comment/b14734d3_ea8a… :
PS1, Line 195: pattern: '^enb-conn:[0-9a-f:.]+-[0-9]+$'
> I'm not a regexp by any means, but apparently matching a n IP address is a bit more complex? […]
Yes, a proper/complete regexp for IPv4v6 would be huge. But we don't really need this level of complexity here: we don't care if the address is 100% correct. We simply match the prefix and enforce basic data format (`addr-port`) for this variant of `EnbId`.
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41298?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: erlang/osmo-s1gw
Gerrit-Branch: master
Gerrit-Change-Id: I112283b140a070924d59935a3bdd6fd63fc8c7ea
Gerrit-Change-Number: 41298
Gerrit-PatchSet: 1
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-Comment-Date: Wed, 05 Nov 2025 09:25:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>