Batch pdu read in function iscsi_read_from_socket()

iscsi_read_from_socket can currently only read one PDU in each iscsi_service invocation even
if there is more data available on the socket. This patch reads all PDUs until the socket
would block. It enqueues all complete read PDUs and then processes them in order of arrival.

Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
Peter Lieven
2017-01-02 15:52:19 +01:00
parent e8afafb32d
commit b81e9a28a6
2 changed files with 87 additions and 84 deletions

View File

@@ -119,6 +119,7 @@ struct iscsi_context {
int tcp_keepintvl;
int tcp_keepidle;
int tcp_syncnt;
int tcp_nonblocking;
int current_phase;
int next_phase;