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?usp=email
 :
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?usp=email
 :
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?usp=email
 :
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?usp=email
 :
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?usp=email
 :
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.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40782?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I55289d9282e13aa1bf82f3931c85c196752f1484
Gerrit-Change-Number: 40782
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andr...@eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-Attention: pespin <pes...@sysmocom.de>
Gerrit-Comment-Date: Fri, 08 Aug 2025 13:57:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pes...@sysmocom.de>

Reply via email to