daniel has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmocore/+/33686 )
Change subject: osmo_io: Add function to change the tx_queue size
......................................................................
osmo_io: Add function to change the tx_queue size
Change-Id: If3d1de8bffe1123002515878655ea9e02b482888
---
M include/osmocom/core/osmo_io.h
M src/core/libosmocore.map
M src/core/osmo_io.c
3 files changed, 20 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/33686/1
diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h
index 81f13f2..6416cf5 100644
--- a/include/osmocom/core/osmo_io.h
+++ b/include/osmocom/core/osmo_io.h
@@ -85,6 +85,7 @@
const struct osmo_sockaddr *dest);
void osmo_iofd_set_alloc_info(struct osmo_io_fd *iofd, unsigned int size, unsigned int
headroom);
+void osmo_iofd_set_txqueue_size(struct osmo_io_fd *iofd, unsigned int size);
void *osmo_iofd_get_data(const struct osmo_io_fd *iofd);
void osmo_iofd_set_data(struct osmo_io_fd *iofd, void *data);
diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map
index 50be67c..d9b3697 100644
--- a/src/core/libosmocore.map
+++ b/src/core/libosmocore.map
@@ -268,6 +268,7 @@
osmo_iofd_set_data;
osmo_iofd_set_ioops;
osmo_iofd_set_priv_nr;
+osmo_iofd_set_txqueue_size;
osmo_iofd_setup;
osmo_iofd_txqueue_clear;
osmo_iofd_txqueue_len;
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c
index 8217316..cab3457 100644
--- a/src/core/osmo_io.c
+++ b/src/core/osmo_io.c
@@ -542,6 +542,15 @@
iofd->msgb_alloc.size = size;
}
+/*! Set the maximum number of messages enqueued for sending
+ * \param[in] iofd the file descriptor
+ * \param[in] size the maximum size of the transmit queue
+ */
+void osmo_iofd_set_txqueue_size(struct osmo_io_fd *iofd, unsigned int size)
+{
+ iofd->tx_queue.max_length = size;
+}
+
/*! Get the associated user-data from an iofd
* \param[in] iofd the file descriptor
* \returns the data that was previously set with \ref osmo_iofd_setup()
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/33686
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If3d1de8bffe1123002515878655ea9e02b482888
Gerrit-Change-Number: 33686
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newchange