Attention is currently required from: daniel, jolly, laforge.
Hello Jenkins Builder, daniel, jolly, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email
to look at the new patch set (#3).
Change subject: osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE
......................................................................
osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE
Trying to use IORING_OP_SENDMSG on local files fails with "Socket
operation on non-socket" errors.
Change-Id: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539
---
M src/core/osmo_io_poll.c
M src/core/osmo_io_uring.c
M tests/osmo_io/osmo_io_test.c
M tests/osmo_io/osmo_io_test.ok
4 files changed, 136 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/39363/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39363?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: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539
Gerrit-Change-Number: 39363
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(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: daniel <dwillmann(a)sysmocom.de>
Attention is currently required from: daniel, jolly, laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email )
Change subject: osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE
......................................................................
Patch Set 2:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39363?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: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539
Gerrit-Change-Number: 39363
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(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: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 17 Jan 2025 15:45:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/meta-telephony/+/39365?usp=email )
Change subject: osmo-pcap: depend on libosmo-netif
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/meta-telephony/+/39365?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: meta-telephony
Gerrit-Branch: laforge/nightly
Gerrit-Change-Id: I79425b22fb9a63bbc82bb2b896788f3f7c173276
Gerrit-Change-Number: 39365
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 17 Jan 2025 14:32:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: neels.
pespin has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39364?usp=email )
Change subject: coverity: vty for AMR start mode: clarify range checks
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
File src/osmo-bsc/bts_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/39364/comment/5b31a029_1a951a15?usp… :
PS1, Line 2785: for (int i = 0; i < ((full) ? 8 : 6); i++) {
afaiu "i" can also be unsigned? which would be saner since it's only used to shift.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39364?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I34ac83e1441a34fcec6b10c34e10ab6dffa37607
Gerrit-Change-Number: 39364
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 17 Jan 2025 13:23:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/39361?usp=email )
Change subject: cosmetic: osmo_io: Improvde documentation of read_cb when segmentation is used
......................................................................
cosmetic: osmo_io: Improvde documentation of read_cb when segmentation is used
Change-Id: I93ac0b3224e17bfd1ecd4244a6dc7a44457c06e8
---
M include/osmocom/core/osmo_io.h
M src/core/osmo_io.c
2 files changed, 8 insertions(+), 1 deletion(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h
index fa1f9c3..f4bfec4 100644
--- a/include/osmocom/core/osmo_io.h
+++ b/include/osmocom/core/osmo_io.h
@@ -98,7 +98,11 @@
* \param[in] iofd osmo_io_fd for which read() has completed.
* \param[in] res return value of the read() call, or -errno in case of error.
* \param[in] msg message buffer containing the read data. Ownership is transferred to the
- * call-back, and it must make sure to msgb_free() it eventually! */
+ * call-back, and it must make sure to msgb_free() it eventually!
+ *
+ * NOTE: If segmentation_cb is in use, the bytes read in res value
+ * may be different than those provided in the msg parameter!
+ */
void (*read_cb)(struct osmo_io_fd *iofd, int res, struct msgb *msg);
/*! completion call-back function when write issued via osmo_iofd_write_msgb() has completed
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 15703cf..65c9b33 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -344,6 +344,9 @@
pending = NULL;
res = iofd_handle_segmentation(iofd, msg, &pending);
if (res != IOFD_SEG_ACT_DEFER) {
+ /* It it expected as per API spec that we return the
+ * return value of read here. The amount of bytes in msg is
+ * available to the user in msg itself. */
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,
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39361?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: I93ac0b3224e17bfd1ecd4244a6dc7a44457c06e8
Gerrit-Change-Number: 39361
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39309?usp=email )
Change subject: api doc: stream.h: hint at how to select modern vs legacy mode
......................................................................
api doc: stream.h: hint at how to select modern vs legacy mode
Change-Id: I651fadb1a00e51f347963418b7a6c5d320580d23
---
M include/osmocom/netif/stream.h
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
neels: Looks good to me, approved
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index a132a27..f63560a 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -32,6 +32,9 @@
* For any new applications, you definitely should use the modern mode, as it provides you with a higher
* layer of abstraction and allows you to perform efficient I/O using the io_uring backend of osmo_io.
*
+ * The modern mode is chosen by invoking osmo_stream_srv_create2().
+ * The legacy mode is chosen by invoking the older osmo_stream_srv_create().
+ *
* The two main objects are osmo_stream_srv_link (main server accept()ing incoming connections) and
* osmo_stream_srv (a single given connection from a remote client).
*
@@ -160,6 +163,9 @@
* For any new applications, you definitely should use the modern mode, as it provides you with a higher
* layer of abstraction and allows you to perform efficient I/O using the io_uring backend of osmo_io.
*
+ * The modern mode is chosen by invoking osmo_stream_cli_set_read_cb2().
+ * The legacy mode is chosen by invoking the older osmo_stream_cli_set_read_cb().
+ *
* A typical usage of osmo_stream_cli would look as follows:
*
* * call osmo_stream_cli_create() to create a new osmo_stream_cli
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39309?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I651fadb1a00e51f347963418b7a6c5d320580d23
Gerrit-Change-Number: 39309
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>