If the length of iscsi->waitpdu and iscsi->inqueue are the same then except for any target initiated NOPs or async messages we should have received any and all possible pdus from this socket and can abort early. This avoids running the loop one more time just to fail with EAGAIN at the recs/readv. Just avoiding that recv/readv syscall will shave at least 10us off this function and thus the latency. Suggested-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Peter Lieven <pl@kamp.de>
28 KiB
28 KiB