Add iscsi_set_tcp_syncnt function

This patch adds support for setting TCP_SYNCNT to overwrite
the system default values. This allows indirect support
for a configurable connect timeout.

Linux uses a exponential backoff for SYN retries starting
with 1 second.

This means for a value n for TCP_SYNCNT, the connect will
effectively timeout after 2^(n+1)-1 seconds.
This commit is contained in:
Peter Lieven
2012-10-20 18:43:48 +02:00
parent d1110b7515
commit 78a31ad4a1
6 changed files with 52 additions and 4 deletions

View File

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