pespin has submitted this change. ( 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(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
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: merged
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>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-netif/+/41434?usp=email )
Change subject: stream: Support overwriting tx_queue_max_length per srv conn
......................................................................
Patch Set 1: Code-Review+2
--
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: comment
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>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 19 Nov 2025 17:31:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-upf/+/41453?usp=email )
Change subject: up_peer: Use Node Id as identifier
......................................................................
Patch Set 1: Code-Review-2
(1 comment)
Patchset:
PS1:
I'll abandon this patch and I'm instead splitting up_peer into pfcp_node_peer and pfcp_entity_peer.
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/41453?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Idff2865ff63ad2de5e48cceb99f47e6255b330aa
Gerrit-Change-Number: 41453
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 19 Nov 2025 17:04:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/41467?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: pySim-shell: add command to manually query the Card Key Provider
......................................................................
pySim-shell: add command to manually query the Card Key Provider
The Card Key Provider is a built in mechanism of pySim-shell which
allows the user to read key material from a CSV file in order to
avoid having to lookup and enter the key material himself. The
lookup normally done by the pySim-shell commands automatically.
However, in some cases it may also be useful to be able to query the
CSV file manually in order to get certain fields displayed. Such a
command is in particular helpful to check and diagnose the CSV data
source.
Related: SYS#7725
Change-Id: I76e0f883572a029bdca65a5a6b3eef306db1c221
---
M pySim-shell.py
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/67/41467/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41467?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I76e0f883572a029bdca65a5a6b3eef306db1c221
Gerrit-Change-Number: 41467
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>