diff options
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 5f4eb5c7968..7a093d0aa0f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -569,13 +569,13 @@ struct tcp_skb_cb { | |||
569 | */ | 569 | */ |
570 | static inline int tcp_skb_pcount(const struct sk_buff *skb) | 570 | static inline int tcp_skb_pcount(const struct sk_buff *skb) |
571 | { | 571 | { |
572 | return skb_shinfo(skb)->tso_segs; | 572 | return skb_shinfo(skb)->gso_segs; |
573 | } | 573 | } |
574 | 574 | ||
575 | /* This is valid iff tcp_skb_pcount() > 1. */ | 575 | /* This is valid iff tcp_skb_pcount() > 1. */ |
576 | static inline int tcp_skb_mss(const struct sk_buff *skb) | 576 | static inline int tcp_skb_mss(const struct sk_buff *skb) |
577 | { | 577 | { |
578 | return skb_shinfo(skb)->tso_size; | 578 | return skb_shinfo(skb)->gso_size; |
579 | } | 579 | } |
580 | 580 | ||
581 | static inline void tcp_dec_pcount_approx(__u32 *count, | 581 | static inline void tcp_dec_pcount_approx(__u32 *count, |
@@ -751,7 +751,7 @@ static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight) | |||
751 | if (in_flight >= tp->snd_cwnd) | 751 | if (in_flight >= tp->snd_cwnd) |
752 | return 1; | 752 | return 1; |
753 | 753 | ||
754 | if (!(sk->sk_route_caps & NETIF_F_TSO)) | 754 | if (!sk_can_gso(sk)) |
755 | return 0; | 755 | return 0; |
756 | 756 | ||
757 | left = tp->snd_cwnd - in_flight; | 757 | left = tp->snd_cwnd - in_flight; |
@@ -914,6 +914,9 @@ static inline void tcp_set_state(struct sock *sk, int state) | |||
914 | 914 | ||
915 | static inline void tcp_done(struct sock *sk) | 915 | static inline void tcp_done(struct sock *sk) |
916 | { | 916 | { |
917 | if(sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) | ||
918 | TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); | ||
919 | |||
917 | tcp_set_state(sk, TCP_CLOSE); | 920 | tcp_set_state(sk, TCP_CLOSE); |
918 | tcp_clear_xmit_timers(sk); | 921 | tcp_clear_xmit_timers(sk); |
919 | 922 | ||
@@ -1086,6 +1089,9 @@ extern struct request_sock_ops tcp_request_sock_ops; | |||
1086 | 1089 | ||
1087 | extern int tcp_v4_destroy_sock(struct sock *sk); | 1090 | extern int tcp_v4_destroy_sock(struct sock *sk); |
1088 | 1091 | ||
1092 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | ||
1093 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); | ||
1094 | |||
1089 | #ifdef CONFIG_PROC_FS | 1095 | #ifdef CONFIG_PROC_FS |
1090 | extern int tcp4_proc_init(void); | 1096 | extern int tcp4_proc_init(void); |
1091 | extern void tcp4_proc_exit(void); | 1097 | extern void tcp4_proc_exit(void); |