diff options
| author | 2012-02-28 12:42:14 +0000 | |
|---|---|---|
| committer | 2012-02-28 12:42:21 +0000 | |
| commit | fb0b82b32ce17564bc64cede50bf4a3204eecc60 (patch) | |
| tree | 00b5e466074c6fb373d64c493b3341186024acc7 /include/net/tcp.h | |
| parent | Merge branch 'kirkwood/board' into next/boards (diff) | |
| parent | ARM: pxa: add dummy clock for pxa25x and pxa27x (diff) | |
| download | wireguard-linux-fb0b82b32ce17564bc64cede50bf4a3204eecc60.tar.xz wireguard-linux-fb0b82b32ce17564bc64cede50bf4a3204eecc60.zip | |
Merge branch 'board-specific' of git://github.com/hzhuang1/linux into next/boards
* 'board-specific' of git://github.com/hzhuang1/linux: (5 commits)
  ARM: pxa: add dummy clock for pxa25x and pxa27x
  ARM: mmp: append irq name of gpio device
  pxa/hx4700: Fix PXA_GPIO_IRQ_BASE/IRQ_NUM values
  pxa/hx4700: Add ASIC3 LED support
  pxa/hx4700: Correct StrataFlash block size discovery
(update to v3.3-rc5)
Diffstat (limited to 'include/net/tcp.h')
| -rw-r--r-- | include/net/tcp.h | 14 | 
1 files changed, 10 insertions, 4 deletions
| diff --git a/include/net/tcp.h b/include/net/tcp.h index d49db0113a06..42c29bfbcee3 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -273,6 +273,14 @@ static inline int between(__u32 seq1, __u32 seq2, __u32 seq3)  	return seq3 - seq2 >= seq1 - seq2;  } +static inline bool tcp_out_of_memory(struct sock *sk) +{ +	if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && +	    sk_memory_allocated(sk) > sk_prot_mem_limits(sk, 2)) +		return true; +	return false; +} +  static inline bool tcp_too_many_orphans(struct sock *sk, int shift)  {  	struct percpu_counter *ocp = sk->sk_prot->orphan_count; @@ -283,13 +291,11 @@ static inline bool tcp_too_many_orphans(struct sock *sk, int shift)  		if (orphans << shift > sysctl_tcp_max_orphans)  			return true;  	} - -	if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && -	    sk_memory_allocated(sk) > sk_prot_mem_limits(sk, 2)) -		return true;  	return false;  } +extern bool tcp_check_oom(struct sock *sk, int shift); +  /* syncookies: remember time of last synqueue overflow */  static inline void tcp_synq_overflow(struct sock *sk)  { | 
