diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-12-09 12:17:25 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-12-09 12:17:25 -0500 |
commit | d834a9dcecae834cd6b2bc5e50e1907738d9cf6a (patch) | |
tree | 0589d753465d3fe359ba451ba6cb7798df03aaa2 /net/ipv4/tcp.c | |
parent | a38c5380ef9f088be9f49b6e4c5d80af8b1b5cd4 (diff) | |
parent | f658bcfb2607bf0808966a69cf74135ce98e5c2d (diff) |
Merge branch 'x86/amd-nb' into x86/apic-cleanups
Reason: apic cleanup series depends on x86/apic, x86/amd-nb x86/platform
Conflicts:
arch/x86/include/asm/io_apic.h
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f115ea68a4ef..081419969485 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -282,7 +282,7 @@ int sysctl_tcp_fin_timeout __read_mostly = TCP_FIN_TIMEOUT; | |||
282 | struct percpu_counter tcp_orphan_count; | 282 | struct percpu_counter tcp_orphan_count; |
283 | EXPORT_SYMBOL_GPL(tcp_orphan_count); | 283 | EXPORT_SYMBOL_GPL(tcp_orphan_count); |
284 | 284 | ||
285 | int sysctl_tcp_mem[3] __read_mostly; | 285 | long sysctl_tcp_mem[3] __read_mostly; |
286 | int sysctl_tcp_wmem[3] __read_mostly; | 286 | int sysctl_tcp_wmem[3] __read_mostly; |
287 | int sysctl_tcp_rmem[3] __read_mostly; | 287 | int sysctl_tcp_rmem[3] __read_mostly; |
288 | 288 | ||
@@ -290,7 +290,7 @@ EXPORT_SYMBOL(sysctl_tcp_mem); | |||
290 | EXPORT_SYMBOL(sysctl_tcp_rmem); | 290 | EXPORT_SYMBOL(sysctl_tcp_rmem); |
291 | EXPORT_SYMBOL(sysctl_tcp_wmem); | 291 | EXPORT_SYMBOL(sysctl_tcp_wmem); |
292 | 292 | ||
293 | atomic_t tcp_memory_allocated; /* Current allocated memory. */ | 293 | atomic_long_t tcp_memory_allocated; /* Current allocated memory. */ |
294 | EXPORT_SYMBOL(tcp_memory_allocated); | 294 | EXPORT_SYMBOL(tcp_memory_allocated); |
295 | 295 | ||
296 | /* | 296 | /* |
@@ -2246,7 +2246,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, | |||
2246 | /* Values greater than interface MTU won't take effect. However | 2246 | /* Values greater than interface MTU won't take effect. However |
2247 | * at the point when this call is done we typically don't yet | 2247 | * at the point when this call is done we typically don't yet |
2248 | * know which interface is going to be used */ | 2248 | * know which interface is going to be used */ |
2249 | if (val < 8 || val > MAX_TCP_WINDOW) { | 2249 | if (val < 64 || val > MAX_TCP_WINDOW) { |
2250 | err = -EINVAL; | 2250 | err = -EINVAL; |
2251 | break; | 2251 | break; |
2252 | } | 2252 | } |
@@ -2392,7 +2392,12 @@ static int do_tcp_setsockopt(struct sock *sk, int level, | |||
2392 | err = tp->af_specific->md5_parse(sk, optval, optlen); | 2392 | err = tp->af_specific->md5_parse(sk, optval, optlen); |
2393 | break; | 2393 | break; |
2394 | #endif | 2394 | #endif |
2395 | 2395 | case TCP_USER_TIMEOUT: | |
2396 | /* Cap the max timeout in ms TCP will retry/retrans | ||
2397 | * before giving up and aborting (ETIMEDOUT) a connection. | ||
2398 | */ | ||
2399 | icsk->icsk_user_timeout = msecs_to_jiffies(val); | ||
2400 | break; | ||
2396 | default: | 2401 | default: |
2397 | err = -ENOPROTOOPT; | 2402 | err = -ENOPROTOOPT; |
2398 | break; | 2403 | break; |
@@ -2611,6 +2616,10 @@ static int do_tcp_getsockopt(struct sock *sk, int level, | |||
2611 | case TCP_THIN_DUPACK: | 2616 | case TCP_THIN_DUPACK: |
2612 | val = tp->thin_dupack; | 2617 | val = tp->thin_dupack; |
2613 | break; | 2618 | break; |
2619 | |||
2620 | case TCP_USER_TIMEOUT: | ||
2621 | val = jiffies_to_msecs(icsk->icsk_user_timeout); | ||
2622 | break; | ||
2614 | default: | 2623 | default: |
2615 | return -ENOPROTOOPT; | 2624 | return -ENOPROTOOPT; |
2616 | } | 2625 | } |