Attention is currently required from: daniel, laforge, lynxis lazus.
3 comments:
File src/core/osmo_io.c:
Patch Set #1, Line 348: if (rc > 0 && rc < msgb_length(msg)) {
Regarding your comment about rc == 0, maybe one missing failure case is rc == 0 && rc < msgb_length […]
That should fall into the more generic "rc < msgb_length(msg)" condition, I don't think the specific case you mention should be handled differently.
IMO rc == 0 in send means we have successfully "written" 0 bytes to the socket (which also means the […]
ack, makes sense, the special case for rc=0 is in the recv path (socket closed). I doubt we'll ever see rc=0 here, I'd expect it to return -EAGAIN instead.
send(len=0) would probably return an error, or maybe it returns 0 instead to mention it is writable.
File src/core/osmo_io_uring.c:
Patch Set #2, Line 196: iofd_handle_send_completion(iofd, rc, msghdr);
The goto can easily be dropped:
if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED)) {
msgb_free(msghdr->msg);
iofd_msghdr_free(msghdr);
} else {
iofd_handle_send_completion(iofd, rc, msghdr);
}
iofd->u.uring.write_msghdr = NULL;
/* submit the next to-be-transmitted message for this file descriptor */
if (iofd->u.uring.write_enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
iofd_uring_submit_tx(iofd);
You can btw probably ass OSMO_UNLIKELY() to the if condition checking IOFD_FLAG_CLOSED.
To view, visit change 35078. To unsubscribe, or for help writing mail filters, visit settings.