]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[TCP]: Move __tcp_data_snd_check into tcp_output.c
authorDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2005 22:18:18 +0000 (15:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2005 22:18:18 +0000 (15:18 -0700)
It reimplements portions of tcp_snd_check(), so it
we move it to tcp_output.c we can consolidate it's
logic much easier in a later change.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c

index f2b104532de10cbade6f530aea25b127b743400b..4888f9d3f56b04b75171de93461de35d9927a5e1 100644 (file)
@@ -849,6 +849,7 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb,
 /* tcp_output.c */
 
 extern int tcp_write_xmit(struct sock *, int nonagle);
+extern void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb);
 extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp,
                                      unsigned cur_mss, int nonagle);
 extern int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp);
index 7bbbbc33eb4bf91527a8685d327b62009938c00f..577424323d5993df11e2e97c6ab3bf29d8b595c6 100644 (file)
@@ -3346,16 +3346,6 @@ static inline void tcp_check_space(struct sock *sk)
        }
 }
 
-static void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb)
-{
-       struct tcp_sock *tp = tcp_sk(sk);
-
-       if (after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) ||
-           tcp_packets_in_flight(tp) >= tp->snd_cwnd ||
-           tcp_write_xmit(sk, tp->nonagle))
-               tcp_check_probe_timer(sk, tp);
-}
-
 static __inline__ void tcp_data_snd_check(struct sock *sk)
 {
        struct sk_buff *skb = sk->sk_send_head;
index 2cbe879ee16a58a272eb1498acf949ae3b58b48c..362b811a2460c9e5ac85c696bdec5625d0eb15f3 100644 (file)
@@ -530,6 +530,16 @@ void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp,
        tcp_cwnd_validate(sk, tp);
 }
 
+void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb)
+{
+       struct tcp_sock *tp = tcp_sk(sk);
+
+       if (after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) ||
+           tcp_packets_in_flight(tp) >= tp->snd_cwnd ||
+           tcp_write_xmit(sk, tp->nonagle))
+               tcp_check_probe_timer(sk, tp);
+}
+
 int tcp_may_send_now(struct sock *sk, struct tcp_sock *tp)
 {
        struct sk_buff *skb = sk->sk_send_head;