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?u... : 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?u... : PS3, Line 179: if (idx) why we don't do it for idx=0?
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/3ab43425_5ad741fe?u... : 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?u... : PS3, Line 236: int chunk; msghdr->msg[idx] = NULL;
https://gerrit.osmocom.org/c/libosmocore/+/40492/comment/37a9fd1b_83c6dde5?u... : 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?u... : 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?u... : PS3, Line 256: msgb_free(msghdr->msg[idx]); msghdr->msg[idx] = NULL;