Attention is currently required from: jolly.
7 comments:
File src/core/osmo_io_uring.c:
Patch Set #3, Line 176: /* Set IO vectors and allocate additional read buffers (but only for READ). */
why only for READ? please explain in the comment.
Patch Set #3, Line 179: if (idx)
why we don't do it for idx=0?
Can we please clena all the above up by moving the different logic to each of the cases in the switch below?
Patch Set #3, Line 236: int chunk;
msghdr->msg[idx] = NULL;
Patch Set #3, 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);
Patch Set #3, Line 251: idx++;
moving this idx++ after the for loop may also make it simpler.
Patch Set #3, Line 256: msgb_free(msghdr->msg[idx]);
msghdr->msg[idx] = NULL;
To view, visit change 40492. To unsubscribe, or for help writing mail filters, visit settings.