diff options
Diffstat (limited to 'net/ipv4/tcp_lp.c')
-rw-r--r-- | net/ipv4/tcp_lp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c index f0ebaf0e21cb..43294ad9f63e 100644 --- a/net/ipv4/tcp_lp.c +++ b/net/ipv4/tcp_lp.c | |||
@@ -218,7 +218,7 @@ static u32 tcp_lp_owd_calculator(struct sock *sk) | |||
218 | * 3. calc smoothed OWD (SOWD). | 218 | * 3. calc smoothed OWD (SOWD). |
219 | * Most ideas come from the original TCP-LP implementation. | 219 | * Most ideas come from the original TCP-LP implementation. |
220 | */ | 220 | */ |
221 | static void tcp_lp_rtt_sample(struct sock *sk, u32 usrtt) | 221 | static void tcp_lp_rtt_sample(struct sock *sk, u32 rtt) |
222 | { | 222 | { |
223 | struct lp *lp = inet_csk_ca(sk); | 223 | struct lp *lp = inet_csk_ca(sk); |
224 | s64 mowd = tcp_lp_owd_calculator(sk); | 224 | s64 mowd = tcp_lp_owd_calculator(sk); |
@@ -261,11 +261,13 @@ static void tcp_lp_rtt_sample(struct sock *sk, u32 usrtt) | |||
261 | * newReno in increase case. | 261 | * newReno in increase case. |
262 | * We work it out by following the idea from TCP-LP's paper directly | 262 | * We work it out by following the idea from TCP-LP's paper directly |
263 | */ | 263 | */ |
264 | static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked) | 264 | static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked, ktime_t last) |
265 | { | 265 | { |
266 | struct tcp_sock *tp = tcp_sk(sk); | 266 | struct tcp_sock *tp = tcp_sk(sk); |
267 | struct lp *lp = inet_csk_ca(sk); | 267 | struct lp *lp = inet_csk_ca(sk); |
268 | 268 | ||
269 | tcp_lp_rtt_sample(sk, ktime_to_us(net_timedelta(last))); | ||
270 | |||
269 | /* calc inference */ | 271 | /* calc inference */ |
270 | if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) | 272 | if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) |
271 | lp->inference = 3 * (tcp_time_stamp - tp->rx_opt.rcv_tsecr); | 273 | lp->inference = 3 * (tcp_time_stamp - tp->rx_opt.rcv_tsecr); |
@@ -312,11 +314,11 @@ static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked) | |||
312 | } | 314 | } |
313 | 315 | ||
314 | static struct tcp_congestion_ops tcp_lp = { | 316 | static struct tcp_congestion_ops tcp_lp = { |
317 | .flags = TCP_CONG_RTT_STAMP, | ||
315 | .init = tcp_lp_init, | 318 | .init = tcp_lp_init, |
316 | .ssthresh = tcp_reno_ssthresh, | 319 | .ssthresh = tcp_reno_ssthresh, |
317 | .cong_avoid = tcp_lp_cong_avoid, | 320 | .cong_avoid = tcp_lp_cong_avoid, |
318 | .min_cwnd = tcp_reno_min_cwnd, | 321 | .min_cwnd = tcp_reno_min_cwnd, |
319 | .rtt_sample = tcp_lp_rtt_sample, | ||
320 | .pkts_acked = tcp_lp_pkts_acked, | 322 | .pkts_acked = tcp_lp_pkts_acked, |
321 | 323 | ||
322 | .owner = THIS_MODULE, | 324 | .owner = THIS_MODULE, |