MT#55283 support custom uring buffer size

Change-Id: I020df2427f690d84130ca218c0b24cc8136fc07d
rfuchs/dataport
Richard Fuchs 12 months ago
parent 50e746b6a4
commit 324fc591e9

@ -1187,6 +1187,12 @@ call to inject-DTMF won't be sent to __\-\-dtmf-log-dest=__ or __\-\-listen-tcp-
not actual CPU usage but rather indicates time spent waiting for a network not actual CPU usage but rather indicates time spent waiting for a network
event, and so should be considered the same as idle CPU time._ event, and so should be considered the same as idle CPU time._
- __\-\-io-uring-buffers=__*INT*
Number of `io_uring` entries in the buffer allocated from the kernel per
thread. Defaults to 16384. Must be large enough so that submission entries
and completion entries are always available when needed.
- __\-\-dtls-cert-cipher=prime256v1__\|__RSA__ - __\-\-dtls-cert-cipher=prime256v1__\|__RSA__
Choose the type of key to use for the signature used by the self-signed Choose the type of key to use for the signature used by the self-signed

@ -201,6 +201,7 @@ void config_load(int *argc, char ***argv, GOptionEntry *app_entries, const char
{ "poller-size", 0,0, G_OPTION_ARG_INT, &rtpe_common_config_ptr->poller_size, "Max poller items per iteration", "INT" }, { "poller-size", 0,0, G_OPTION_ARG_INT, &rtpe_common_config_ptr->poller_size, "Max poller items per iteration", "INT" },
#ifdef HAVE_LIBURING #ifdef HAVE_LIBURING
{ "io-uring", 0,0, G_OPTION_ARG_NONE, &rtpe_common_config_ptr->io_uring, "Use io_uring", NULL }, { "io-uring", 0,0, G_OPTION_ARG_NONE, &rtpe_common_config_ptr->io_uring, "Use io_uring", NULL },
{ "io-uring-buffers", 0,0, G_OPTION_ARG_INT, &rtpe_common_config_ptr->io_uring_buffers,"Number of io_uring entries per thread","INT" },
#endif #endif
{ "evs-lib-path", 0,0, G_OPTION_ARG_FILENAME, &rtpe_common_config_ptr->evs_lib_path, "Location of .so for 3GPP EVS codec", "FILE" }, { "evs-lib-path", 0,0, G_OPTION_ARG_FILENAME, &rtpe_common_config_ptr->evs_lib_path, "Location of .so for 3GPP EVS codec", "FILE" },
#ifdef HAVE_CODEC_CHAIN #ifdef HAVE_CODEC_CHAIN
@ -403,6 +404,13 @@ out:
rtpe_common_config_ptr->codec_chain_async = 0; rtpe_common_config_ptr->codec_chain_async = 0;
#endif #endif
#if HAVE_LIBURING
if (rtpe_common_config_ptr->io_uring_buffers == 0)
rtpe_common_config_ptr->io_uring_buffers = 16384;
else if (rtpe_common_config_ptr->io_uring_buffers < 0)
die("Invalid value for --io-uring-buffers");
#endif
return; return;
err: err:

@ -35,6 +35,7 @@ struct rtpengine_common_config {
int thread_stack; int thread_stack;
int poller_size; int poller_size;
gboolean io_uring; gboolean io_uring;
int io_uring_buffers;
int max_log_line_length; int max_log_line_length;
char *evs_lib_path; char *evs_lib_path;
char *codec_chain_lib_path; char *codec_chain_lib_path;

@ -99,7 +99,7 @@ static unsigned int __uring_thread_loop(void) {
void uring_thread_init(void) { void uring_thread_init(void) {
struct io_uring_params params = {0}; struct io_uring_params params = {0};
int ret = io_uring_queue_init_params(4096, &rtpe_uring, &params); int ret = io_uring_queue_init_params(rtpe_common_config_ptr->io_uring_buffers, &rtpe_uring, &params);
if (ret) if (ret)
die("io_uring init failed (%s)", strerror(errno)); die("io_uring init failed (%s)", strerror(errno));

Loading…
Cancel
Save