pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/41433?usp=email )
Change subject: cosmetic: Fix typo in doc of osmo_stream_srv_get_sockname()
......................................................................
cosmetic: Fix typo in doc of osmo_stream_srv_get_sockname()
Change-Id: I7655b6cf0f734c07cc5d985dc834f45a97a425bb
---
M src/stream_srv.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/33/41433/1
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 2e80909..cc32dc7 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -1235,7 +1235,7 @@
/*! Retrieve the stream server socket description.
* The returned name is stored in a static buffer; it is hence not re-entrant or thread-safe!
- * \param[in] cli Stream Server to examine
+ * \param[in] conn Stream Server to examine
* \returns Socket description or NULL in case of error */
const char *osmo_stream_srv_get_sockname(const struct osmo_stream_srv *conn)
{
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/41433?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I7655b6cf0f734c07cc5d985dc834f45a97a425bb
Gerrit-Change-Number: 41433
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/41434?usp=email )
Change subject: stream: Support overwriting tx_queue_max_length per srv conn
......................................................................
stream: Support overwriting tx_queue_max_length per srv conn
This allows setting different tx_queue_max_length per server connection.
This is useful where known clients (eg. matching specific addresses) may
have totally different link properties among them towards the server.
Related: SYS#7693
Change-Id: Ibc68612bd8dee4f9b8031ce2c3f5c7ff6bb639e3
---
M TODO-RELEASE
M include/osmocom/netif/stream.h
M src/stream_srv.c
3 files changed, 23 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/34/41434/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 6340cdf..87e1b95 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -9,3 +9,4 @@
#library what description / commit summary line
stream add OSMO_STREAM_{CLI,SRV,SRV_LINK}_TCP_SOCKOPT_KEEP*, osmo_stream_srv_set_param()
stream add OSMO_STREAM_{CLI,SRV,SRV_LINK}_TCP_SOCKOPT_USER_TIMEOUT
+stream add osmo_stream_srv_set_tx_queue_max_length()
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 8c3fad5..b04ebb9 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -137,6 +137,7 @@
void osmo_stream_srv_set_read_cb(struct osmo_stream_srv *conn, osmo_stream_srv_read_cb2_t read_cb);
void osmo_stream_srv_set_closed_cb(struct osmo_stream_srv *conn, osmo_stream_srv_closed_cb_t close_cb);
void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn);
+int osmo_stream_srv_set_tx_queue_max_length(struct osmo_stream_srv *conn, unsigned int size);
struct osmo_stream_srv_link *osmo_stream_srv_get_master(struct osmo_stream_srv *conn);
const char *osmo_stream_srv_get_sockname(const struct osmo_stream_srv *conn);
struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv);
diff --git a/src/stream_srv.c b/src/stream_srv.c
index cc32dc7..695a46f 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -743,6 +743,7 @@
};
struct llist_head tx_queue; /* osmo_ofd mode (only): Queue of msgbs */
unsigned int tx_queue_count; /* osmo_ofd mode (only): Current amount of msgbs queued */
+ unsigned int tx_queue_max_length; /* Max amount of msgbs which can be enqueued */
osmo_stream_srv_closed_cb_t closed_cb;
osmo_stream_srv_read_cb_t read_cb;
osmo_stream_srv_read_cb2_t iofd_read_cb;
@@ -996,6 +997,8 @@
osmo_sock_get_name_buf(conn->sockname, sizeof(conn->sockname), fd);
+ conn->tx_queue_max_length = conn->srv->tx_queue_max_length;
+
if (osmo_fd_register(&conn->ofd) < 0) {
LOGSSRV(conn, LOGL_ERROR, "could not register FD\n");
talloc_free(conn);
@@ -1049,7 +1052,8 @@
return NULL;
}
- osmo_iofd_set_txqueue_max_length(conn->iofd, conn->srv->tx_queue_max_length);
+ conn->tx_queue_max_length = conn->srv->tx_queue_max_length;
+ osmo_iofd_set_txqueue_max_length(conn->iofd, conn->tx_queue_max_length);
if (conn->srv->msgb_alloc.set_by_user)
osmo_iofd_set_alloc_info(conn->iofd, conn->srv->msgb_alloc.size, conn->srv->msgb_alloc.headroom);
@@ -1233,6 +1237,21 @@
return conn->data;
}
+/*! Set the maximum length queue of the stream server connection.
+ * \param[in] conn Stream Server to modify
+ * \param[in] size maximum amount of msgbs which can be queued in the internal tx queue.
+ * \returns 0 on success, negative on error.
+ *
+ * The default queue size of a osmo_stream_srv is inherited during creation time from
+ * osmo_stream_srv_link. */
+int osmo_stream_srv_set_tx_queue_max_length(struct osmo_stream_srv *conn, unsigned int size)
+{
+ conn->tx_queue_max_length = size;
+ if (conn->mode == OSMO_STREAM_MODE_OSMO_IO && conn->iofd)
+ osmo_iofd_set_txqueue_max_length(conn->iofd, conn->tx_queue_max_length);
+ return 0;
+}
+
/*! Retrieve the stream server socket description.
* The returned name is stored in a static buffer; it is hence not re-entrant or thread-safe!
* \param[in] conn Stream Server to examine
@@ -1341,7 +1360,7 @@
switch (conn->mode) {
case OSMO_STREAM_MODE_OSMO_FD:
- if (conn->tx_queue_count >= conn->srv->tx_queue_max_length) {
+ if (conn->tx_queue_count >= conn->tx_queue_max_length) {
LOGSSRV(conn, LOGL_ERROR, "send: tx queue full, dropping msg!\n");
msgb_free(msg);
return;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/41434?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ibc68612bd8dee4f9b8031ce2c3f5c7ff6bb639e3
Gerrit-Change-Number: 41434
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41410?usp=email )
Change subject: mtp: Support MTP-TRANSFER.req/ind of raw IPA messages
......................................................................
Patch Set 6:
(1 comment)
File include/osmocom/sigtran/protocol/mtp.h:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/41410/comment/cae8f2f5_5e4d9… :
PS5, Line 30: *
> Note we could also decide to set up a different SI for each IPA protocol we handle, similar to the e […]
See how osmo-bsc (SCCPlite) uses it here:
https://gerrit.osmocom.org/c/osmo-bsc/+/41400
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41410?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I9fedb26ccd3434fc7f272feb3c45cf4bdb80c7ae
Gerrit-Change-Number: 41410
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 14 Nov 2025 18:48:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/41400?usp=email )
Change subject: sccplite: Handle MGCP/CTRL over SCCPLite multiplex using MTP-TRANSFER.req/ind
......................................................................
Patch Set 4:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/41400?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: I567ed206eab1add21836bfd937f3790d3d7a00d7
Gerrit-Change-Number: 41400
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 14 Nov 2025 18:47:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No