diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-06-05 20:30:08 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-18 00:29:29 -0400 |
commit | 72dc5b9225c53310c010b68a70ea97c8c8e24bdf (patch) | |
tree | ebd23e7cbe9846414b6fa8f8327f37043447e019 /include/net | |
parent | a4ed25849532728effaa0665c92e08e029e41407 (diff) |
[TCP]: Minimum congestion window consolidation.
Many of the TCP congestion methods all just use ssthresh
as the minimum congestion window on decrease. Rather than
duplicating the code, just have that be the default if that
handle in the ops structure is not set.
Minor behaviour change to TCP compound. It probably wants
to use this (ssthresh) as lower bound, rather than ssthresh/2
because the latter causes undershoot on loss.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/tcp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index f1f472746e6c..de88c5472bfc 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -632,7 +632,7 @@ struct tcp_congestion_ops { | |||
632 | /* return slow start threshold (required) */ | 632 | /* return slow start threshold (required) */ |
633 | u32 (*ssthresh)(struct sock *sk); | 633 | u32 (*ssthresh)(struct sock *sk); |
634 | /* lower bound for congestion window (optional) */ | 634 | /* lower bound for congestion window (optional) */ |
635 | u32 (*min_cwnd)(struct sock *sk); | 635 | u32 (*min_cwnd)(const struct sock *sk); |
636 | /* do new cwnd calculation (required) */ | 636 | /* do new cwnd calculation (required) */ |
637 | void (*cong_avoid)(struct sock *sk, u32 ack, | 637 | void (*cong_avoid)(struct sock *sk, u32 ack, |
638 | u32 rtt, u32 in_flight, int good_ack); | 638 | u32 rtt, u32 in_flight, int good_ack); |
@@ -667,7 +667,7 @@ extern struct tcp_congestion_ops tcp_init_congestion_ops; | |||
667 | extern u32 tcp_reno_ssthresh(struct sock *sk); | 667 | extern u32 tcp_reno_ssthresh(struct sock *sk); |
668 | extern void tcp_reno_cong_avoid(struct sock *sk, u32 ack, | 668 | extern void tcp_reno_cong_avoid(struct sock *sk, u32 ack, |
669 | u32 rtt, u32 in_flight, int flag); | 669 | u32 rtt, u32 in_flight, int flag); |
670 | extern u32 tcp_reno_min_cwnd(struct sock *sk); | 670 | extern u32 tcp_reno_min_cwnd(const struct sock *sk); |
671 | extern struct tcp_congestion_ops tcp_reno; | 671 | extern struct tcp_congestion_ops tcp_reno; |
672 | 672 | ||
673 | static inline void tcp_set_ca_state(struct sock *sk, const u8 ca_state) | 673 | static inline void tcp_set_ca_state(struct sock *sk, const u8 ca_state) |