aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_yeah.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-04-24 01:26:16 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:29:45 -0400
commit164891aadf1721fca4dce473bb0e0998181537c6 (patch)
tree991393ec7306da475cb306fcc7cb084f737ebadc /net/ipv4/tcp_yeah.c
parent65d1b4a7e73fe0e1f5275ad7d2d3547981480886 (diff)
[TCP]: Congestion control API update.
Do some simple changes to make congestion control API faster/cleaner. * use ktime_t rather than timeval * merge rtt sampling into existing ack callback this means one indirect call versus two per ack. * use flags bits to store options/settings Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_yeah.c')
-rw-r--r--net/ipv4/tcp_yeah.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c
index 46dd1bee583a..81ef02c1649a 100644
--- a/net/ipv4/tcp_yeah.c
+++ b/net/ipv4/tcp_yeah.c
@@ -64,13 +64,15 @@ static void tcp_yeah_init(struct sock *sk)
64} 64}
65 65
66 66
67static void tcp_yeah_pkts_acked(struct sock *sk, u32 pkts_acked) 67static void tcp_yeah_pkts_acked(struct sock *sk, u32 pkts_acked, ktime_t last)
68{ 68{
69 const struct inet_connection_sock *icsk = inet_csk(sk); 69 const struct inet_connection_sock *icsk = inet_csk(sk);
70 struct yeah *yeah = inet_csk_ca(sk); 70 struct yeah *yeah = inet_csk_ca(sk);
71 71
72 if (icsk->icsk_ca_state == TCP_CA_Open) 72 if (icsk->icsk_ca_state == TCP_CA_Open)
73 yeah->pkts_acked = pkts_acked; 73 yeah->pkts_acked = pkts_acked;
74
75 tcp_vegas_pkts_acked(sk, pkts_acked, last);
74} 76}
75 77
76static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, 78static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack,
@@ -237,11 +239,11 @@ static u32 tcp_yeah_ssthresh(struct sock *sk) {
237} 239}
238 240
239static struct tcp_congestion_ops tcp_yeah = { 241static struct tcp_congestion_ops tcp_yeah = {
242 .flags = TCP_CONG_RTT_STAMP,
240 .init = tcp_yeah_init, 243 .init = tcp_yeah_init,
241 .ssthresh = tcp_yeah_ssthresh, 244 .ssthresh = tcp_yeah_ssthresh,
242 .cong_avoid = tcp_yeah_cong_avoid, 245 .cong_avoid = tcp_yeah_cong_avoid,
243 .min_cwnd = tcp_reno_min_cwnd, 246 .min_cwnd = tcp_reno_min_cwnd,
244 .rtt_sample = tcp_vegas_rtt_calc,
245 .set_state = tcp_vegas_state, 247 .set_state = tcp_vegas_state,
246 .cwnd_event = tcp_vegas_cwnd_event, 248 .cwnd_event = tcp_vegas_cwnd_event,
247 .get_info = tcp_vegas_get_info, 249 .get_info = tcp_vegas_get_info,