aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_illinois.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_illinois.c')
-rw-r--r--net/ipv4/tcp_illinois.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
index ae6298600886..8e3165917f72 100644
--- a/net/ipv4/tcp_illinois.c
+++ b/net/ipv4/tcp_illinois.c
@@ -83,9 +83,14 @@ static void tcp_illinois_init(struct sock *sk)
83} 83}
84 84
85/* Measure RTT for each ack. */ 85/* Measure RTT for each ack. */
86static void tcp_illinois_rtt_sample(struct sock *sk, u32 rtt) 86static void tcp_illinois_acked(struct sock *sk, u32 pkts_acked, ktime_t last)
87{ 87{
88 struct illinois *ca = inet_csk_ca(sk); 88 struct illinois *ca = inet_csk_ca(sk);
89 u32 rtt;
90
91 ca->acked = pkts_acked;
92
93 rtt = ktime_to_ns(net_timedelta(last)) / NSEC_PER_USEC;
89 94
90 /* ignore bogus values, this prevents wraparound in alpha math */ 95 /* ignore bogus values, this prevents wraparound in alpha math */
91 if (rtt > RTT_MAX) 96 if (rtt > RTT_MAX)
@@ -103,13 +108,6 @@ static void tcp_illinois_rtt_sample(struct sock *sk, u32 rtt)
103 ca->sum_rtt += rtt; 108 ca->sum_rtt += rtt;
104} 109}
105 110
106/* Capture count of packets covered by ack, to adjust for delayed acks */
107static void tcp_illinois_acked(struct sock *sk, u32 pkts_acked)
108{
109 struct illinois *ca = inet_csk_ca(sk);
110 ca->acked = pkts_acked;
111}
112
113/* Maximum queuing delay */ 111/* Maximum queuing delay */
114static inline u32 max_delay(const struct illinois *ca) 112static inline u32 max_delay(const struct illinois *ca)
115{ 113{
@@ -325,12 +323,12 @@ static void tcp_illinois_info(struct sock *sk, u32 ext,
325} 323}
326 324
327static struct tcp_congestion_ops tcp_illinois = { 325static struct tcp_congestion_ops tcp_illinois = {
326 .flags = TCP_CONG_RTT_STAMP,
328 .init = tcp_illinois_init, 327 .init = tcp_illinois_init,
329 .ssthresh = tcp_illinois_ssthresh, 328 .ssthresh = tcp_illinois_ssthresh,
330 .min_cwnd = tcp_reno_min_cwnd, 329 .min_cwnd = tcp_reno_min_cwnd,
331 .cong_avoid = tcp_illinois_cong_avoid, 330 .cong_avoid = tcp_illinois_cong_avoid,
332 .set_state = tcp_illinois_state, 331 .set_state = tcp_illinois_state,
333 .rtt_sample = tcp_illinois_rtt_sample,
334 .get_info = tcp_illinois_info, 332 .get_info = tcp_illinois_info,
335 .pkts_acked = tcp_illinois_acked, 333 .pkts_acked = tcp_illinois_acked,
336 334