Attention is currently required from: tnt.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36186?usp=email )
Change subject: icE1usb fw: Ensure alignement of the structure for the usb_data_write
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/36186?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1-hardware
Gerrit-Branch: master
Gerrit-Change-Id: Id80468ef95bb908cf34b6eeca04c83f1285fd2f5
Gerrit-Change-Number: 36186
Gerrit-PatchSet: 2
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: tnt <tnt(a)246tNt.com>
Gerrit-Comment-Date: Thu, 07 Mar 2024 09:56:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel, dexter, jolly, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/35979?usp=email )
Change subject: stream_cli: Correctly setup and free osmo_io client instance
......................................................................
Patch Set 8:
(1 comment)
Patchset:
PS7:
> Done
but why must the iofd be freed? the entire API design is done to facilitate the re-use of an iofd. That's the reason you have a 'fd' argument in osmo_iofd_register(). You can osmo_iofd_unregister an old fd and osmo_iofd_register() with a new fd, *without* having to free and re-allocate the entire iofd.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/35979?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: I91a6a76b9ff96034a7b333edf87af27490202932
Gerrit-Change-Number: 35979
Gerrit-PatchSet: 8
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(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-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 07 Mar 2024 09:54:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36189?usp=email )
Change subject: osmo_iofd_register: Guard against calls from wrong state
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
Patchset:
PS1:
This doesn't work, see https://osmocom.org/issues/6393#note-2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36189?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: I422fc5eded41831663413e7118d4e012013a9ac9
Gerrit-Change-Number: 36189
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 07 Mar 2024 09:51:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36188?usp=email )
Change subject: osmo_io: Guard osmo_iofd_register() with invalid file descriptor
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36188?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: Ie4561cefad82e1bf5d37dd1a4815f4bc805343e6
Gerrit-Change-Number: 36188
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 07 Mar 2024 09:50:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/36193?usp=email )
Change subject: osmo_io: Avoid implementing non-existant situations
......................................................................
osmo_io: Avoid implementing non-existant situations
Both of our back-ends have a register_fd and unregister_fd back-end.
Let's simplify the code by not treating them as optional, which
introduces code paths that we never take, adds small runtime overhead
and makes the code harder to follow.
Should we ever introduce more backends which might not need those
call-backs, we can either have empty functions or think about how to
make them optional.
Change-Id: I0077151eb676f61320b3fa2124448852aa8fd4a9
---
M src/core/osmo_io.c
1 file changed, 23 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/93/36193/1
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 0b639fb..222f728 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -99,6 +99,8 @@
}
OSMO_ASSERT(osmo_iofd_ops.close);
+ OSMO_ASSERT(osmo_iofd_ops.register_fd);
+ OSMO_ASSERT(osmo_iofd_ops.unregister_fd);
OSMO_ASSERT(osmo_iofd_ops.write_enable);
OSMO_ASSERT(osmo_iofd_ops.write_disable);
OSMO_ASSERT(osmo_iofd_ops.read_enable);
@@ -689,8 +691,7 @@
return -EBADF;
}
- if (osmo_iofd_ops.register_fd)
- rc = osmo_iofd_ops.register_fd(iofd);
+ rc = osmo_iofd_ops.register_fd(iofd);
if (rc)
return rc;
@@ -714,11 +715,7 @@
*/
int osmo_iofd_unregister(struct osmo_io_fd *iofd)
{
- if (osmo_iofd_ops.unregister_fd)
- return osmo_iofd_ops.unregister_fd(iofd);
- IOFD_FLAG_SET(iofd, IOFD_FLAG_CLOSED);
-
- return 0;
+ return osmo_iofd_ops.unregister_fd(iofd);
}
/*! Get the number of messages in the tx queue.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36193?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: I0077151eb676f61320b3fa2124448852aa8fd4a9
Gerrit-Change-Number: 36193
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/36192?usp=email )
Change subject: osmo_io: avoid OSMO_ASSERT one each API call
......................................................................
osmo_io: avoid OSMO_ASSERT one each API call
There's only one way to set the osmo_iofd_ops, which is by environment
variable during the constructor time at shared library load time.
There's hence no point in doing OSMO_ASSERT() on each and every call to
osmo_iofd_notify_connected() at runtime. We can move those kind of
asserts to the one-time load-time constructor instead.
At the same time, we can extend those asserts to all the mandatory
call-backs to be provided by the backend.
Change-Id: Id9005ac6bb260236c88670373816bf7ee6a627f1
---
M src/core/osmo_io.c
1 file changed, 26 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/92/36192/1
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index e4807e5..0b639fb 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -98,6 +98,13 @@
exit(1);
}
+ OSMO_ASSERT(osmo_iofd_ops.close);
+ OSMO_ASSERT(osmo_iofd_ops.write_enable);
+ OSMO_ASSERT(osmo_iofd_ops.write_disable);
+ OSMO_ASSERT(osmo_iofd_ops.read_enable);
+ OSMO_ASSERT(osmo_iofd_ops.read_disable);
+ OSMO_ASSERT(osmo_iofd_ops.notify_connected);
+
osmo_iofd_init();
}
@@ -781,7 +788,6 @@
iofd->pending = NULL;
- OSMO_ASSERT(osmo_iofd_ops.close);
rc = osmo_iofd_ops.close(iofd);
iofd->fd = -1;
return rc;
@@ -920,7 +926,6 @@
{
OSMO_ASSERT(iofd->mode == OSMO_IO_FD_MODE_READ_WRITE ||
iofd->mode == OSMO_IO_FD_MODE_RECVMSG_SENDMSG);
- OSMO_ASSERT(osmo_iofd_ops.notify_connected);
osmo_iofd_ops.notify_connected(iofd);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36192?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: Id9005ac6bb260236c88670373816bf7ee6a627f1
Gerrit-Change-Number: 36192
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/36191?usp=email )
Change subject: osmo_io: Don't pretend to support backends without close_cb
......................................................................
osmo_io: Don't pretend to support backends without close_cb
Let's not pretend we support backends without a close_cb. In such
situations nobody would actually close(2) the file descriptor,
but we would set iofd->fd to -1, effectively creating a file descriptor
leak.
Both of our two back-ends provide a close_cb, and we don't need to
consider hypothetical future back-ends that would not like to register
such a call-back.
Related: OS#6393
Change-Id: Id285f1d7b73ae5805aa618897016ae8b73bf892d
---
M src/core/osmo_io.c
1 file changed, 21 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/91/36191/1
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 0e0a468..e4807e5 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -781,8 +781,8 @@
iofd->pending = NULL;
- if (osmo_iofd_ops.close)
- rc = osmo_iofd_ops.close(iofd);
+ OSMO_ASSERT(osmo_iofd_ops.close);
+ rc = osmo_iofd_ops.close(iofd);
iofd->fd = -1;
return rc;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36191?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: Id285f1d7b73ae5805aa618897016ae8b73bf892d
Gerrit-Change-Number: 36191
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange