Attention is currently required from: jolly.
8 comments:
File src/core/osmo_io.c:
Patch Set #4, Line 248: lh = iofd->tx_queue.msg_queue.prev;
fyi we have llist_last().
We may also want to add llist_last_entry_or_null() to linuxlist.h, we already have llist_first_entry_or_null().
Patch Set #4, Line 444: /* Re-enqueue remaining buffers. */
Here we should improve it by adding new msg from the tx_queue into the iov if we aren't yet doing it.
Patch Set #4, Line 451: if (rc < chunk)
shouldn't this case be already handled in the if path in line 431?
Patch Set #4, Line 465: iofd->io_ops.write_cb(iofd, (rc < 0) ? rc : chunk, msg);
Again, by incorporation the negative value case into chunk variable, we can simplify all these lines here which now have a ": ?".
Patch Set #4, Line 479: msgb_free(msghdr->msg[idx]);
msghdr->msg[idx] = NULL;
Patch Set #4, Line 517: msghdr = iofd_txqueue_tail(iofd);
why are you picking the tail here? Because the assumption is that the other before it are already filled? Do you mind writing teh rationale in a comment?
you can simply do "idx = msghdr->msg_len - 1;" here, and simplify both branches above.
Patch Set #4, Line 539: rc = iofd_txqueue_enqueue(iofd, msghdr);
are you submitting to io_uring queue inside here? Because then it looks like yoy may be modifying stuff you already submitted to io_uring...
To view, visit change 40493. To unsubscribe, or for help writing mail filters, visit settings.