Attention is currently required from: fixeria, lynxis lazus.
Hello Jenkins Builder, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39063?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Code-Review-1 by fixeria, Verified+1 by Jenkins Builder
Change subject: RAW_NS: SNS Add: handle IPv4/IPv6 element in SNS Ack
......................................................................
RAW_NS: SNS Add: handle IPv4/IPv6 element in SNS Ack
When adding a new NS-VC via SNS Add, the SNS Ack should
only contains the IEs "List of IP4/6 elements" if the cause code is
Unknown IP endpoint.
However the libosmocore/ns2 code isn't following this behavior yet.
Change-Id: I18c659e43db79400c1b428ed745267a5e6e59102
---
M library/RAW_NS.ttcnpp
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/63/39063/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39063?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I18c659e43db79400c1b428ed745267a5e6e59102
Gerrit-Change-Number: 39063
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: lynxis lazus.
Hello Jenkins Builder, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39064?usp=email
to look at the new patch set (#4).
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: RAW_NS: SNS Changeweight: remove IPv4/IPv6 element in SNS Ack
......................................................................
RAW_NS: SNS Changeweight: remove IPv4/IPv6 element in SNS Ack
When changweights of a NS-VC via SNS, the SNS Ack should
only contains the IEs "List of IP4/6 elements" if the cause code is
Unknown IP endpoint.
However the libosmocore/ns2 code isn't following this behavior yet.
Change-Id: Ibf00cbab0c6691cdb72fe592ee30e122dd8f4783
---
M library/RAW_NS.ttcnpp
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/64/39064/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39064?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibf00cbab0c6691cdb72fe592ee30e122dd8f4783
Gerrit-Change-Number: 39064
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: pespin.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39076?usp=email )
Change subject: s1gw: make f_ConnHdlr_rx_session_modify_req() more flexible
......................................................................
Patch Set 1:
(1 comment)
File s1gw/S1GW_ConnHdlr.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39076/comment/b3b76dfc_9a05… :
PS1, Line 739: far_id := 1);
> isn't far ids being 1 and 2 just an implementation detail on how the node works? It could be any num […]
See https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39079. I think I am starting to understand what you mean, and in general I think it can be done (store FAR IDs during the session creation and then use them). Let's move the discussion there.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39076?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I52317e79ac02cb4e321b49c2cd824de28e25a1c6
Gerrit-Change-Number: 39076
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: Tue, 10 Dec 2024 11:23:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39072?usp=email )
Change subject: osmo_io: segmented_read: Avoid triggering read events if user unregisters
......................................................................
osmo_io: segmented_read: Avoid triggering read events if user unregisters
The user code doesn't expect to receive any more read cb events after
unregistering the FD. Avoid keep calling the read cb if several entire
messages were received at once in a single tcp chunk.
Related: SYS#7063
Change-Id: Id2199b9aa805cc7e7793c1a8aecd10b61f2b4c90
---
M src/core/osmo_io.c
1 file changed, 9 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index c61c8e9..d1767d2 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -340,8 +340,16 @@
do {
pending = NULL;
res = iofd_handle_segmentation(iofd, msg, &pending);
- if (res != IOFD_SEG_ACT_DEFER || rc < 0)
+ if (res != IOFD_SEG_ACT_DEFER || rc < 0) {
iofd->io_ops.read_cb(iofd, rc, msg);
+ /* The user could unregister/close the iofd during read_cb() above.
+ * Once that's done, it doesn't expect to receive any more events,
+ * so discard it: */
+ if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED)) {
+ msgb_free(pending);
+ return;
+ }
+ }
if (res == IOFD_SEG_ACT_HANDLE_MORE)
msg = pending;
} while (res == IOFD_SEG_ACT_HANDLE_MORE);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39072?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id2199b9aa805cc7e7793c1a8aecd10b61f2b4c90
Gerrit-Change-Number: 39072
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39067?usp=email )
Change subject: osmo_io: Use early return to simplify code
......................................................................
osmo_io: Use early return to simplify code
Change-Id: Idd4c4f2da7f15b86ddd4765c60680130af08b22d
---
M src/core/osmo_io_uring.c
1 file changed, 19 insertions(+), 17 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index 569f150..1b1f997 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -498,24 +498,26 @@
static void iofd_uring_notify_connected(struct osmo_io_fd *iofd)
{
- if (iofd->mode == OSMO_IO_FD_MODE_RECVMSG_SENDMSG) {
- /* Don't call this function after enabling read or write. */
- OSMO_ASSERT(!iofd->u.uring.write_enabled && !iofd->u.uring.read_enabled);
-
- /* Use a temporary osmo_fd which we can use to notify us once the connection is established
- * or failed (indicated by FD becoming writable).
- * This is needed as (at least for SCTP sockets) one cannot submit a zero-length writev/sendmsg
- * in order to get notification when the socekt is writable.*/
- if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_NOTIFY_CONNECTED)) {
- osmo_fd_setup(&iofd->u.uring.connect_ofd, iofd->fd, OSMO_FD_WRITE,
- iofd_uring_connected_cb, iofd, 0);
- if (osmo_fd_register(&iofd->u.uring.connect_ofd) < 0)
- LOGPIO(iofd, LOGL_ERROR, "Failed to register FD for connect event.\n");
- else
- IOFD_FLAG_SET(iofd, IOFD_FLAG_NOTIFY_CONNECTED);
- }
- } else
+ if (iofd->mode != OSMO_IO_FD_MODE_RECVMSG_SENDMSG) {
iofd_uring_write_enable(iofd);
+ return;
+ }
+
+ /* OSMO_IO_FD_MODE_RECVMSG_SENDMSG: Don't call this function after enabling read or write. */
+ OSMO_ASSERT(!iofd->u.uring.write_enabled && !iofd->u.uring.read_enabled);
+
+ /* Use a temporary osmo_fd which we can use to notify us once the connection is established
+ * or failed (indicated by FD becoming writable).
+ * This is needed as (at least for SCTP sockets) one cannot submit a zero-length writev/sendmsg
+ * in order to get notification when the socekt is writable.*/
+ if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_NOTIFY_CONNECTED)) {
+ osmo_fd_setup(&iofd->u.uring.connect_ofd, iofd->fd, OSMO_FD_WRITE,
+ iofd_uring_connected_cb, iofd, 0);
+ if (osmo_fd_register(&iofd->u.uring.connect_ofd) < 0)
+ LOGPIO(iofd, LOGL_ERROR, "Failed to register FD for connect event.\n");
+ else
+ IOFD_FLAG_SET(iofd, IOFD_FLAG_NOTIFY_CONNECTED);
+ }
}
const struct iofd_backend_ops iofd_uring_ops = {
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39067?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Idd4c4f2da7f15b86ddd4765c60680130af08b22d
Gerrit-Change-Number: 39067
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39068?usp=email )
Change subject: osmo_io: uring: Setup connect_notify internal ofd during register() op
......................................................................
osmo_io: uring: Setup connect_notify internal ofd during register() op
osmo_fd used internally should only be registered during
osmo_iofd_register() time, not before.
Unregistering was already placed at the proper place.
Change-Id: Ifac374170736a9fe922362e95059a18c2a3ccaac
---
M src/core/osmo_io_uring.c
1 file changed, 59 insertions(+), 52 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index 1b1f997..be7e1d8 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -324,8 +324,65 @@
static void iofd_uring_write_enable(struct osmo_io_fd *iofd);
static void iofd_uring_read_enable(struct osmo_io_fd *iofd);
+
+/* called via osmocom poll/select main handling once outbound non-blocking connect() completes */
+static int iofd_uring_connected_cb(struct osmo_fd *ofd, unsigned int what)
+{
+ struct osmo_io_fd *iofd = ofd->data;
+
+ LOGPIO(iofd, LOGL_DEBUG, "Socket connected or failed.\n");
+
+ if (!(what & OSMO_FD_WRITE))
+ return 0;
+
+ /* Unregister from poll/select handling. */
+ osmo_fd_unregister(ofd);
+ IOFD_FLAG_UNSET(iofd, IOFD_FLAG_NOTIFY_CONNECTED);
+
+ /* Notify the application about this via a zero-length write completion call-back. */
+ IOFD_FLAG_SET(iofd, IOFD_FLAG_IN_CALLBACK);
+ switch (iofd->mode) {
+ case OSMO_IO_FD_MODE_READ_WRITE:
+ iofd->io_ops.write_cb(iofd, 0, NULL);
+ break;
+ case OSMO_IO_FD_MODE_RECVFROM_SENDTO:
+ iofd->io_ops.sendto_cb(iofd, 0, NULL, NULL);
+ break;
+ case OSMO_IO_FD_MODE_RECVMSG_SENDMSG:
+ iofd->io_ops.sendmsg_cb(iofd, 0, NULL);
+ break;
+ }
+ IOFD_FLAG_UNSET(iofd, IOFD_FLAG_IN_CALLBACK);
+
+ /* If write/read notifications are pending, enable it now. */
+ if (iofd->u.uring.write_enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ iofd_uring_write_enable(iofd);
+ if (iofd->u.uring.read_enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ iofd_uring_read_enable(iofd);
+
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_TO_FREE) && !iofd->u.uring.read_msghdr && !iofd->u.uring.write_msghdr)
+ talloc_free(iofd);
+ return 0;
+}
+
static int iofd_uring_register(struct osmo_io_fd *iofd)
{
+ if (iofd->mode != OSMO_IO_FD_MODE_RECVMSG_SENDMSG)
+ return 0; /* Nothing to be done */
+
+ /* OSMO_IO_FD_MODE_RECVMSG_SENDMSG:
+ * Use a temporary osmo_fd which we can use to notify us once the connection is established
+ * or failed (indicated by FD becoming writable). This is needed as (at least for SCTP sockets)
+ * one cannot submit a zero-length writev/sendmsg in order to get notification when the socekt
+ * is writable.*/
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_NOTIFY_CONNECTED)) {
+ osmo_fd_setup(&iofd->u.uring.connect_ofd, iofd->fd, OSMO_FD_WRITE,
+ iofd_uring_connected_cb, iofd, 0);
+ if (osmo_fd_register(&iofd->u.uring.connect_ofd) < 0) {
+ LOGPIO(iofd, LOGL_ERROR, "Failed to register FD for connect event.\n");
+ return -EBADFD;
+ }
+ }
return 0;
}
@@ -456,46 +513,6 @@
return close(iofd->fd);
}
-/* called via osmocom poll/select main handling once outbound non-blocking connect() completes */
-static int iofd_uring_connected_cb(struct osmo_fd *ofd, unsigned int what)
-{
- struct osmo_io_fd *iofd = ofd->data;
-
- LOGPIO(iofd, LOGL_DEBUG, "Socket connected or failed.\n");
-
- if (!(what & OSMO_FD_WRITE))
- return 0;
-
- /* Unregister from poll/select handling. */
- osmo_fd_unregister(ofd);
- IOFD_FLAG_UNSET(iofd, IOFD_FLAG_NOTIFY_CONNECTED);
-
- /* Notify the application about this via a zero-length write completion call-back. */
- IOFD_FLAG_SET(iofd, IOFD_FLAG_IN_CALLBACK);
- switch (iofd->mode) {
- case OSMO_IO_FD_MODE_READ_WRITE:
- iofd->io_ops.write_cb(iofd, 0, NULL);
- break;
- case OSMO_IO_FD_MODE_RECVFROM_SENDTO:
- iofd->io_ops.sendto_cb(iofd, 0, NULL, NULL);
- break;
- case OSMO_IO_FD_MODE_RECVMSG_SENDMSG:
- iofd->io_ops.sendmsg_cb(iofd, 0, NULL);
- break;
- }
- IOFD_FLAG_UNSET(iofd, IOFD_FLAG_IN_CALLBACK);
-
- /* If write/read notifications are pending, enable it now. */
- if (iofd->u.uring.write_enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
- iofd_uring_write_enable(iofd);
- if (iofd->u.uring.read_enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
- iofd_uring_read_enable(iofd);
-
- if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_TO_FREE) && !iofd->u.uring.read_msghdr && !iofd->u.uring.write_msghdr)
- talloc_free(iofd);
- return 0;
-}
-
static void iofd_uring_notify_connected(struct osmo_io_fd *iofd)
{
if (iofd->mode != OSMO_IO_FD_MODE_RECVMSG_SENDMSG) {
@@ -506,18 +523,8 @@
/* OSMO_IO_FD_MODE_RECVMSG_SENDMSG: Don't call this function after enabling read or write. */
OSMO_ASSERT(!iofd->u.uring.write_enabled && !iofd->u.uring.read_enabled);
- /* Use a temporary osmo_fd which we can use to notify us once the connection is established
- * or failed (indicated by FD becoming writable).
- * This is needed as (at least for SCTP sockets) one cannot submit a zero-length writev/sendmsg
- * in order to get notification when the socekt is writable.*/
- if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_NOTIFY_CONNECTED)) {
- osmo_fd_setup(&iofd->u.uring.connect_ofd, iofd->fd, OSMO_FD_WRITE,
- iofd_uring_connected_cb, iofd, 0);
- if (osmo_fd_register(&iofd->u.uring.connect_ofd) < 0)
- LOGPIO(iofd, LOGL_ERROR, "Failed to register FD for connect event.\n");
- else
- IOFD_FLAG_SET(iofd, IOFD_FLAG_NOTIFY_CONNECTED);
- }
+ /* Set flag to enable temporary osmo_fd during register() time: */
+ IOFD_FLAG_SET(iofd, IOFD_FLAG_NOTIFY_CONNECTED);
}
const struct iofd_backend_ops iofd_uring_ops = {
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39068?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ifac374170736a9fe922362e95059a18c2a3ccaac
Gerrit-Change-Number: 39068
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39070?usp=email )
Change subject: osmo_io: close() op in backend only takes care of closing
......................................................................
osmo_io: close() op in backend only takes care of closing
Move dependent steps such as unregister to be done at the common path,
and leave the close() op on each backend to implement only the specific
close operations.
Change-Id: I0150afcc0b83ea8b2d00d108658ed688ce487f7f
---
M src/core/osmo_io.c
M src/core/osmo_io_poll.c
M src/core/osmo_io_uring.c
3 files changed, 4 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index cef9bec..387cefb 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -845,6 +845,10 @@
iofd->pending = NULL;
+ osmo_iofd_ops.read_disable(iofd);
+ osmo_iofd_ops.write_disable(iofd);
+ osmo_iofd_unregister(iofd);
+
rc = osmo_iofd_ops.close(iofd);
iofd->fd = -1;
return rc;
diff --git a/src/core/osmo_io_poll.c b/src/core/osmo_io_poll.c
index 89ff466..92f03f8 100644
--- a/src/core/osmo_io_poll.c
+++ b/src/core/osmo_io_poll.c
@@ -156,9 +156,7 @@
static int iofd_poll_close(struct osmo_io_fd *iofd)
{
- iofd_poll_unregister(iofd);
osmo_fd_close(&iofd->u.poll.ofd);
-
return 0;
}
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index be7e1d8..72a465e 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -507,9 +507,6 @@
static int iofd_uring_close(struct osmo_io_fd *iofd)
{
- iofd_uring_read_disable(iofd);
- iofd_uring_write_disable(iofd);
- iofd_uring_unregister(iofd);
return close(iofd->fd);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39070?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0150afcc0b83ea8b2d00d108658ed688ce487f7f
Gerrit-Change-Number: 39070
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>