aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2005-07-05 18:18:51 -0400
committerDavid S. Miller <davem@davemloft.net>2005-07-05 18:18:51 -0400
commita762a9800752f05fa8768bb0ac35d0e7f1bcfe7f (patch)
tree2e92990b86b5bb5404e2f784f7cbb2579609bd95 /include/net/tcp.h
parentf44b527177d57ed382bfd93e1b55232465f6d058 (diff)
[TCP]: Kill extra cwnd validate in __tcp_push_pending_frames().
The tcp_cwnd_validate() function should only be invoked if we actually send some frames, yet __tcp_push_pending_frames() will always invoke it. tcp_write_xmit() does the call for us, so the call here can simply be removed. Also, tcp_write_xmit() can be marked static. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 4888f9d3f56b..f32e7aed2c75 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -848,7 +848,6 @@ extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb,
848 848
849/* tcp_output.c */ 849/* tcp_output.c */
850 850
851extern int tcp_write_xmit(struct sock *, int nonagle);
852extern void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb); 851extern void __tcp_data_snd_check(struct sock *sk, struct sk_buff *skb);
853extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp, 852extern void __tcp_push_pending_frames(struct sock *sk, struct tcp_sock *tp,
854 unsigned cur_mss, int nonagle); 853 unsigned cur_mss, int nonagle);
@@ -868,6 +867,9 @@ extern void tcp_push_one(struct sock *, unsigned mss_now);
868extern void tcp_send_ack(struct sock *sk); 867extern void tcp_send_ack(struct sock *sk);
869extern void tcp_send_delayed_ack(struct sock *sk); 868extern void tcp_send_delayed_ack(struct sock *sk);
870 869
870/* tcp_input.c */
871extern void tcp_cwnd_application_limited(struct sock *sk);
872
871/* tcp_timer.c */ 873/* tcp_timer.c */
872extern void tcp_init_xmit_timers(struct sock *); 874extern void tcp_init_xmit_timers(struct sock *);
873extern void tcp_clear_xmit_timers(struct sock *); 875extern void tcp_clear_xmit_timers(struct sock *);
@@ -1234,28 +1236,6 @@ static inline void tcp_sync_left_out(struct tcp_sock *tp)
1234 tp->left_out = tp->sacked_out + tp->lost_out; 1236 tp->left_out = tp->sacked_out + tp->lost_out;
1235} 1237}
1236 1238
1237extern void tcp_cwnd_application_limited(struct sock *sk);
1238
1239/* Congestion window validation. (RFC2861) */
1240
1241static inline void tcp_cwnd_validate(struct sock *sk, struct tcp_sock *tp)
1242{
1243 __u32 packets_out = tp->packets_out;
1244
1245 if (packets_out >= tp->snd_cwnd) {
1246 /* Network is feed fully. */
1247 tp->snd_cwnd_used = 0;
1248 tp->snd_cwnd_stamp = tcp_time_stamp;
1249 } else {
1250 /* Network starves. */
1251 if (tp->packets_out > tp->snd_cwnd_used)
1252 tp->snd_cwnd_used = tp->packets_out;
1253
1254 if ((s32)(tcp_time_stamp - tp->snd_cwnd_stamp) >= tp->rto)
1255 tcp_cwnd_application_limited(sk);
1256 }
1257}
1258
1259/* Set slow start threshould and cwnd not falling to slow start */ 1239/* Set slow start threshould and cwnd not falling to slow start */
1260static inline void __tcp_enter_cwr(struct tcp_sock *tp) 1240static inline void __tcp_enter_cwr(struct tcp_sock *tp)
1261{ 1241{