aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_vegas.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_vegas.c')
-rw-r--r--net/ipv4/tcp_vegas.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 87e72bef6d08..f4104eeb5f26 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -120,10 +120,13 @@ static void tcp_vegas_init(struct sock *sk)
120 * o min-filter RTT samples from a much longer window (forever for now) 120 * o min-filter RTT samples from a much longer window (forever for now)
121 * to find the propagation delay (baseRTT) 121 * to find the propagation delay (baseRTT)
122 */ 122 */
123static void tcp_vegas_rtt_calc(struct sock *sk, u32 usrtt) 123static void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, ktime_t last)
124{ 124{
125 struct vegas *vegas = inet_csk_ca(sk); 125 struct vegas *vegas = inet_csk_ca(sk);
126 u32 vrtt = usrtt + 1; /* Never allow zero rtt or baseRTT */ 126 u32 vrtt;
127
128 /* Never allow zero rtt or baseRTT */
129 vrtt = (ktime_to_ns(net_timedelta(last)) / NSEC_PER_USEC) + 1;
127 130
128 /* Filter to find propagation delay: */ 131 /* Filter to find propagation delay: */
129 if (vrtt < vegas->baseRTT) 132 if (vrtt < vegas->baseRTT)
@@ -353,11 +356,12 @@ static void tcp_vegas_get_info(struct sock *sk, u32 ext,
353} 356}
354 357
355static struct tcp_congestion_ops tcp_vegas = { 358static struct tcp_congestion_ops tcp_vegas = {
359 .flags = TCP_CONG_RTT_STAMP,
356 .init = tcp_vegas_init, 360 .init = tcp_vegas_init,
357 .ssthresh = tcp_reno_ssthresh, 361 .ssthresh = tcp_reno_ssthresh,
358 .cong_avoid = tcp_vegas_cong_avoid, 362 .cong_avoid = tcp_vegas_cong_avoid,
359 .min_cwnd = tcp_reno_min_cwnd, 363 .min_cwnd = tcp_reno_min_cwnd,
360 .rtt_sample = tcp_vegas_rtt_calc, 364 .pkts_acked = tcp_vegas_pkts_acked,
361 .set_state = tcp_vegas_state, 365 .set_state = tcp_vegas_state,
362 .cwnd_event = tcp_vegas_cwnd_event, 366 .cwnd_event = tcp_vegas_cwnd_event,
363 .get_info = tcp_vegas_get_info, 367 .get_info = tcp_vegas_get_info,