aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-08-09 07:44:16 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:47:57 -0400
commit005903bc3a0e8473fef809e8775db52dcd3cde63 (patch)
tree4fd945740a3615dbd5493fa0ded13f0352e21b2c /include/net
parent83ae40885f33e406c87c86b0bd4b6fd31a741f12 (diff)
[TCP]: Left out sync->verify (the new meaning of it) & definify
Left_out was dropped a while ago, thus leaving verifying consistency of the "left out" as only task for the function in question. Thus make it's name more appropriate. In addition, it is intentionally converted to #define instead of static inline because the location of the invariant failure is the most important thing to have if this ever triggers. I think it would have been helpful e.g. in this case where the location of the failure point had to be based on some quesswork: http://lkml.org/lkml/2007/5/2/464 ...Luckily the guesswork seems to have proved to be correct. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/tcp.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 39d0df6afe47..7042c32085f5 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -758,10 +758,9 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk)
758 (tp->snd_cwnd >> 2))); 758 (tp->snd_cwnd >> 2)));
759} 759}
760 760
761static inline void tcp_sync_left_out(struct tcp_sock *tp) 761/* Use define here intentionally to get BUG_ON location shown at the caller */
762{ 762#define tcp_verify_left_out(tp) \
763 BUG_ON(tp->rx_opt.sack_ok && (tcp_left_out(tp) > tp->packets_out)); 763 BUG_ON(tp->rx_opt.sack_ok && (tcp_left_out(tp) > tp->packets_out))
764}
765 764
766extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh); 765extern void tcp_enter_cwr(struct sock *sk, const int set_ssthresh);
767extern __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst); 766extern __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst);