diff options
-rw-r--r-- | include/net/tcp.h | 1 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 10 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 10 |
3 files changed, 11 insertions, 10 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index f2b104532de1..4888f9d3f56b 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -849,6 +849,7 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, | |||
849 | /* tcp_output.c */ | 849 | /* tcp_output.c */ |
850 | 850 | ||
851 | extern int tcp_write_xmit(struct sock *, int nonagle); | 851 | extern int tcp_write_xmit(struct sock *, int nonagle); |
852 | extern void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb); | ||
852 | extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp, | 853 | extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp, |
853 | unsigned cur_mss, int nonagle); | 854 | unsigned cur_mss, int nonagle); |
854 | extern int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp); | 855 | extern int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp); |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7bbbbc33eb4b..577424323d59 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3346,16 +3346,6 @@ static inline void tcp_check_space(struct sock *sk) | |||
3346 | } | 3346 | } |
3347 | } | 3347 | } |
3348 | 3348 | ||
3349 | static void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb) | ||
3350 | { | ||
3351 | struct tcp_sock *tp = tcp_sk(sk); | ||
3352 | |||
3353 | if (after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) || | ||
3354 | tcp_packets_in_flight(tp) >= tp->snd_cwnd || | ||
3355 | tcp_write_xmit(sk, tp->nonagle)) | ||
3356 | tcp_check_probe_timer(sk, tp); | ||
3357 | } | ||
3358 | |||
3359 | static __inline__ void tcp_data_snd_check(struct sock *sk) | 3349 | static __inline__ void tcp_data_snd_check(struct sock *sk) |
3360 | { | 3350 | { |
3361 | struct sk_buff *skb = sk->sk_send_head; | 3351 | struct sk_buff *skb = sk->sk_send_head; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 2cbe879ee16a..362b811a2460 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -530,6 +530,16 @@ void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp, | |||
530 | tcp_cwnd_validate(sk, tp); | 530 | tcp_cwnd_validate(sk, tp); |
531 | } | 531 | } |
532 | 532 | ||
533 | void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb) | ||
534 | { | ||
535 | struct tcp_sock *tp = tcp_sk(sk); | ||
536 | |||
537 | if (after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) || | ||
538 | tcp_packets_in_flight(tp) >= tp->snd_cwnd || | ||
539 | tcp_write_xmit(sk, tp->nonagle)) | ||
540 | tcp_check_probe_timer(sk, tp); | ||
541 | } | ||
542 | |||
533 | int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp) | 543 | int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp) |
534 | { | 544 | { |
535 | struct sk_buff *skb = sk->sk_send_head; | 545 | struct sk_buff *skb = sk->sk_send_head; |