Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. (
https://gerrit.osmocom.org/c/libosmocore/+/40492?usp=email )
Change subject: Add multiple messages buffers to io_uring read operations
......................................................................
Patch Set 3:
(7 comments)
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/1795d0da_4483d815?… :
PS3, Line 176: /* Set IO vectors and allocate additional read buffers (but only for
READ). */
why only for READ? please explain in the comment.
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/54a664cc_9553dfac?… :
PS3, Line 179: if (idx)
why we don't do it for idx=0?
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/3ab43425_5ad741fe?… :
PS3, Line 185:
Can we please clena all the above up by moving the different logic to each of the cases in
the switch below?
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/5841b711_30cdd492?… :
PS3, Line 236: int chunk;
msghdr->msg[idx] = NULL;
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/37a9fd1b_83c6dde5?… :
PS3, Line 238: if (rc >= 0) {
if you keep the chunk being negative you can remove the extra logic in 246 which imho
makes it clearer:
if (rc > 0) {
if (rc > msghdr->iov[idx].iov_len)
chunk = msghdr->iov[idx].iov_len;
else
chunk = rc;
msgb_put(msg, chunk);
rc -= chunk;
} else {
chunk = rc;
}
....
if (...)
iofd_handle_recv(iofd, msg, chunk, msghdr);
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/f6554de5_19045744?… :
PS3, Line 251: idx++;
moving this idx++ after the for loop may also make it simpler.
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/61e7154d_ea124144?… :
PS3, Line 256: msgb_free(msghdr->msg[idx]);
msghdr->msg[idx] = NULL;
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/40492?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: Ic4544b8fcbad5a266db748d6864d3ae93ee06bce
Gerrit-Change-Number: 40492
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 04 Jul 2025 14:14:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No