Attention is currently required from: pespin.
5 comments:
File src/core/osmo_io_uring.c:
Patch Set #1, 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:
Patch Set #2, Line 66: static int g_io_uring_size = IOFD_URING_INITIAL_SIZE;
size_t
Actually "unsigned int".
Patch Set #2, 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.
Patch Set #2, 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.
Patch Set #2, 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.
To view, visit change 40782. To unsubscribe, or for help writing mail filters, visit settings.