Attention is currently required from: pespin.
jolly has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40782?usp=email )
Change subject: Add environment variable to set io_uring size ......................................................................
Patch Set 3:
(5 comments)
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40782/comment/1151667d_1b343984?u... : PS1, Line 111: g_io_uring_size = atoi(env);
This should be parsed with osmo_str_to_int() to make sure we don't use some weird value as a result […]
Done
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40782/comment/c7a16338_69ba78d6?u... : PS2, Line 66: static int g_io_uring_size = IOFD_URING_INITIAL_SIZE;
size_t
Actually "unsigned int".
https://gerrit.osmocom.org/c/libosmocore/+/40782/comment/a0644196_69463f83?u... : PS2, Line 111: rc = osmo_str_to_int(&g_io_uring_size, env, 10, 1, 32768);
I wonder where 32768 comes from :D
This is the maximum. I added a comment.
https://gerrit.osmocom.org/c/libosmocore/+/40782/comment/35f4b3c6_8164f3c4?u... : PS2, Line 116: if ((g_io_uring_size & (g_io_uring_size - 1))) {
if (g_io_uring_size & 0x01)
This condition hits at an odd value. We need a condition that hits if it is not a power of two.
https://gerrit.osmocom.org/c/libosmocore/+/40782/comment/66a2c722_52ae26fc?u... : PS2, Line 117: fprintf(stderr, "Error: Initial io_uring size must be a positive power of two.\n");
Is this really needed as per io_uring API?
It is not required, because the setup function will round it up to the power of two. Without the check the user would believe that the ring size equals the env settings.