Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new API param
......................................................................
ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new API param
libosmo-netif (not yet released) stream_{cli,srv} osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss7_asp)
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.
This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io osmo_stream backend.
Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
M src/ss7_internal.h
2 files changed, 79 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/36575/6
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36581?usp=email )
Change subject: stream: Define types for each API callback
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36581?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: Ib0c4a9713fa4c755e457b8c2cbde6a7724d36e28
Gerrit-Change-Number: 36581
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 17 Apr 2024 14:08:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new API param
......................................................................
ss7_asp: Update osmo_stream read_cb2 functions to accommodate for new API param
libosmo-netif (not yet released) stream_{cli,srv} osmo_io read_cb API was
updated to provide read result status. Hence, now API users (ss7_asp)
can account for lower layer errors and act properly, like it used to
do with the previous ofd backend.
This commit partially reverts some error code paths removed in
9257cd896e255403822bee6f87f5487a92fd3c11 when converting code to use
osmo_io osmo_stream backend.
Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
---
M src/osmo_ss7_asp.c
M src/ss7_internal.h
2 files changed, 77 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/75/36575/5
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36575?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I579f4101a9e2874e310ff78e4571f38cfe8dfab0
Gerrit-Change-Number: 36575
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/36582?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: osmo_io: Add iofd param to segmentation_cb
......................................................................
osmo_io: Add iofd param to segmentation_cb
See related ticket for full rant and historical facts about this
callback.
Since anyway we are still developing osmo_io stuff and there will be ABI
breaks when releasing new version, let's udpate the callback signature
too.
Related: OS#6437
Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
---
M include/osmocom/core/osmo_io.h
M include/osmocom/gsm/cbsp.h
M src/core/osmo_io.c
M src/gsm/cbsp.c
4 files changed, 32 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/36582/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36582?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: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
Gerrit-Change-Number: 36582
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/36582?usp=email )
Change subject: osmo_io: Add iofd param to segmentation_cb
......................................................................
osmo_io: Add iofd param to segmentation_cb
See related ticket for full rant and historical facts about this
callback.
Since anyway we are still developing osmo_io stuff and there will be ABI
breaks when releasing new version, let's udpate the callback signature
too.
Related: OS#6437
Change-Id: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
---
M include/osmocom/core/osmo_io.h
M include/osmocom/gsm/cbsp.h
M src/core/osmo_io.c
M src/gsm/cbsp.c
4 files changed, 30 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/36582/1
diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h
index 8c931dd..f86e968 100644
--- a/include/osmocom/core/osmo_io.h
+++ b/include/osmocom/core/osmo_io.h
@@ -100,6 +100,7 @@
* \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! */
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
* on fd. Only valid in OSMO_IO_FD_MODE_READ_WRITE.
* \param[in] iofd on which a write() has completed.
@@ -108,9 +109,15 @@
* call-back; it is automatically freed after the call-back terminates! */
void (*write_cb)(struct osmo_io_fd *iofd, int res,
struct msgb *msg);
- /*! optional call-back function to segment the data at message boundaries. This is useful when
- * message boundaries are to be preserved over a SOCK_STREAM transport socket like TCP. Can
- * be NULL for any application not requiring de-segmentation of received data.
+
+ /*! optional call-back function to segment the data at message boundaries.
+ * \param[in] iofd handling msg
+ * \param[in] msg message buffer whose data is to be segmented
+ * \returns See full function description.
+ *
+ * This is useful when message boundaries are to be preserved over a SOCK_STREAM transport
+ * socket like TCP. Can be NULL for any application not requiring de-segmentation of
+ * received data.
*
* The call-back needs to return the size of the next message. If it returns
* -EAGAIN or a value larger than msgb_length() (message is incomplete)
@@ -120,7 +127,7 @@
* the msgb will be trimmed to size by osmo_io and forwarded to the read call-back. Any
* parsing done to the msgb by segmentation_cb() will be preserved for the read_cb()
* (e.g. setting lxh or msgb->cb). */
- int (*segmentation_cb)(struct msgb *msg);
+ int (*segmentation_cb)(struct osmo_io_fd *iofd, struct msgb *msg);
};
/* mode OSMO_IO_FD_MODE_RECVFROM_SENDTO: */
diff --git a/include/osmocom/gsm/cbsp.h b/include/osmocom/gsm/cbsp.h
index efa4ce6..d15e6f8 100644
--- a/include/osmocom/gsm/cbsp.h
+++ b/include/osmocom/gsm/cbsp.h
@@ -312,4 +312,4 @@
struct osmo_cbsp_decoded *osmo_cbsp_decoded_alloc(void *ctx, enum cbsp_msg_type msg_type);
int osmo_cbsp_recv_buffered(void *ctx, int fd, struct msgb **rmsg, struct msgb **tmp_msg);
-int osmo_cbsp_segmentation_cb(struct msgb *msg);
+int osmo_cbsp_segmentation_cb(struct osmo_io_fd *iofd, struct msgb *msg);
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index b589cb7..f908e80 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -280,7 +280,7 @@
return IOFD_SEG_ACT_HANDLE_ONE;
}
- int expected_len = iofd->io_ops.segmentation_cb(msg);
+ int expected_len = iofd->io_ops.segmentation_cb(iofd, msg);
if (expected_len == -EAGAIN) {
goto defer;
} else if (expected_len < 0) {
diff --git a/src/gsm/cbsp.c b/src/gsm/cbsp.c
index a5e58f4..dbc3830 100644
--- a/src/gsm/cbsp.c
+++ b/src/gsm/cbsp.c
@@ -1570,7 +1570,7 @@
/*! call-back function to segment the data at message boundaries.
* Returns the size of the next message. If it returns -EAGAIN or a value larger than msgb_length() (message
* is incomplete), the caller (e.g. osmo_io) has to wait for more data to be read. */
-int osmo_cbsp_segmentation_cb(struct msgb *msg)
+int osmo_cbsp_segmentation_cb(struct osmo_io_fd *iofd, struct msgb *msg)
{
const struct cbsp_header *h;
int len;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36582?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: Ib8d77e30b1ea759ee5ac2a69d704e81ea71e3079
Gerrit-Change-Number: 36582
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange