diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/crypto.h | 1 | ||||
-rw-r--r-- | include/linux/if_tun.h | 1 | ||||
-rw-r--r-- | include/net/ip_vs.h | 2 | ||||
-rw-r--r-- | include/net/sock.h | 15 | ||||
-rw-r--r-- | include/net/tcp.h | 1 |
5 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 5e2bcc636a02..3c89df6e7768 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -45,6 +45,7 @@ | |||
45 | #define CRYPTO_TFM_MODE_CTR 0x00000008 | 45 | #define CRYPTO_TFM_MODE_CTR 0x00000008 |
46 | 46 | ||
47 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 | 47 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 |
48 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 | ||
48 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 | 49 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 |
49 | #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000 | 50 | #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000 |
50 | #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x00400000 | 51 | #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x00400000 |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 096a85a58ae5..88aef7b86ef4 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -77,6 +77,7 @@ struct tun_struct { | |||
77 | #define TUNSETIFF _IOW('T', 202, int) | 77 | #define TUNSETIFF _IOW('T', 202, int) |
78 | #define TUNSETPERSIST _IOW('T', 203, int) | 78 | #define TUNSETPERSIST _IOW('T', 203, int) |
79 | #define TUNSETOWNER _IOW('T', 204, int) | 79 | #define TUNSETOWNER _IOW('T', 204, int) |
80 | #define TUNSETLINK _IOW('T', 205, int) | ||
80 | 81 | ||
81 | /* TUNSETIFF ifr flags */ | 82 | /* TUNSETIFF ifr flags */ |
82 | #define IFF_TUN 0x0001 | 83 | #define IFF_TUN 0x0001 |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 7a3c43711a17..e426641c519f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -958,7 +958,7 @@ static __inline__ int ip_vs_todrop(void) | |||
958 | */ | 958 | */ |
959 | #define IP_VS_FWD_METHOD(cp) (cp->flags & IP_VS_CONN_F_FWD_MASK) | 959 | #define IP_VS_FWD_METHOD(cp) (cp->flags & IP_VS_CONN_F_FWD_MASK) |
960 | 960 | ||
961 | extern __inline__ char ip_vs_fwd_tag(struct ip_vs_conn *cp) | 961 | static inline char ip_vs_fwd_tag(struct ip_vs_conn *cp) |
962 | { | 962 | { |
963 | char fwd; | 963 | char fwd; |
964 | 964 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 312cb25cbd18..cf628261da52 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -709,6 +709,12 @@ static inline int sk_stream_rmem_schedule(struct sock *sk, struct sk_buff *skb) | |||
709 | sk_stream_mem_schedule(sk, skb->truesize, 1); | 709 | sk_stream_mem_schedule(sk, skb->truesize, 1); |
710 | } | 710 | } |
711 | 711 | ||
712 | static inline int sk_stream_wmem_schedule(struct sock *sk, int size) | ||
713 | { | ||
714 | return size <= sk->sk_forward_alloc || | ||
715 | sk_stream_mem_schedule(sk, size, 0); | ||
716 | } | ||
717 | |||
712 | /* Used by processes to "lock" a socket state, so that | 718 | /* Used by processes to "lock" a socket state, so that |
713 | * interrupts and bottom half handlers won't change it | 719 | * interrupts and bottom half handlers won't change it |
714 | * from under us. It essentially blocks any incoming | 720 | * from under us. It essentially blocks any incoming |
@@ -1203,8 +1209,7 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1203 | skb = alloc_skb_fclone(size + hdr_len, gfp); | 1209 | skb = alloc_skb_fclone(size + hdr_len, gfp); |
1204 | if (skb) { | 1210 | if (skb) { |
1205 | skb->truesize += mem; | 1211 | skb->truesize += mem; |
1206 | if (sk->sk_forward_alloc >= (int)skb->truesize || | 1212 | if (sk_stream_wmem_schedule(sk, skb->truesize)) { |
1207 | sk_stream_mem_schedule(sk, skb->truesize, 0)) { | ||
1208 | skb_reserve(skb, hdr_len); | 1213 | skb_reserve(skb, hdr_len); |
1209 | return skb; | 1214 | return skb; |
1210 | } | 1215 | } |
@@ -1227,10 +1232,8 @@ static inline struct page *sk_stream_alloc_page(struct sock *sk) | |||
1227 | { | 1232 | { |
1228 | struct page *page = NULL; | 1233 | struct page *page = NULL; |
1229 | 1234 | ||
1230 | if (sk->sk_forward_alloc >= (int)PAGE_SIZE || | 1235 | page = alloc_pages(sk->sk_allocation, 0); |
1231 | sk_stream_mem_schedule(sk, PAGE_SIZE, 0)) | 1236 | if (!page) { |
1232 | page = alloc_pages(sk->sk_allocation, 0); | ||
1233 | else { | ||
1234 | sk->sk_prot->enter_memory_pressure(); | 1237 | sk->sk_prot->enter_memory_pressure(); |
1235 | sk_stream_moderate_sndbuf(sk); | 1238 | sk_stream_moderate_sndbuf(sk); |
1236 | } | 1239 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index d6bcf1317a6a..97af77c4d096 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -454,6 +454,7 @@ extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); | |||
454 | extern void tcp_xmit_retransmit_queue(struct sock *); | 454 | extern void tcp_xmit_retransmit_queue(struct sock *); |
455 | extern void tcp_simple_retransmit(struct sock *); | 455 | extern void tcp_simple_retransmit(struct sock *); |
456 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); | 456 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); |
457 | extern int tcp_fragment(struct sock *, struct sk_buff *, u32, unsigned int); | ||
457 | 458 | ||
458 | extern void tcp_send_probe0(struct sock *); | 459 | extern void tcp_send_probe0(struct sock *); |
459 | extern void tcp_send_partial(struct sock *); | 460 | extern void tcp_send_partial(struct sock *); |