aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_veno.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_veno.c')
-rw-r--r--net/ipv4/tcp_veno.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c
index ce57bf302f6c..0b50d0607a0e 100644
--- a/net/ipv4/tcp_veno.c
+++ b/net/ipv4/tcp_veno.c
@@ -69,10 +69,13 @@ static void tcp_veno_init(struct sock *sk)
69} 69}
70 70
71/* Do rtt sampling needed for Veno. */ 71/* Do rtt sampling needed for Veno. */
72static void tcp_veno_rtt_calc(struct sock *sk, u32 usrtt) 72static void tcp_veno_pkts_acked(struct sock *sk, u32 cnt, ktime_t last)
73{ 73{
74 struct veno *veno = inet_csk_ca(sk); 74 struct veno *veno = inet_csk_ca(sk);
75 u32 vrtt = usrtt + 1; /* Never allow zero rtt or basertt */ 75 u32 vrtt;
76
77 /* Never allow zero rtt or baseRTT */
78 vrtt = (ktime_to_ns(net_timedelta(last)) / NSEC_PER_USEC) + 1;
76 79
77 /* Filter to find propagation delay: */ 80 /* Filter to find propagation delay: */
78 if (vrtt < veno->basertt) 81 if (vrtt < veno->basertt)
@@ -199,10 +202,11 @@ static u32 tcp_veno_ssthresh(struct sock *sk)
199} 202}
200 203
201static struct tcp_congestion_ops tcp_veno = { 204static struct tcp_congestion_ops tcp_veno = {
205 .flags = TCP_CONG_RTT_STAMP,
202 .init = tcp_veno_init, 206 .init = tcp_veno_init,
203 .ssthresh = tcp_veno_ssthresh, 207 .ssthresh = tcp_veno_ssthresh,
204 .cong_avoid = tcp_veno_cong_avoid, 208 .cong_avoid = tcp_veno_cong_avoid,
205 .rtt_sample = tcp_veno_rtt_calc, 209 .pkts_acked = tcp_veno_pkts_acked,
206 .set_state = tcp_veno_state, 210 .set_state = tcp_veno_state,
207 .cwnd_event = tcp_veno_cwnd_event, 211 .cwnd_event = tcp_veno_cwnd_event,
208 212