diff options
| author | Lawrence Brakmo <brakmo@fb.com> | 2016-05-11 13:02:13 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-05-11 14:43:19 -0400 |
| commit | 756ee1729b2feb3a45767da29e338f70f2086ba3 (patch) | |
| tree | 9329409e197d2912d3fba7e247a57239996c99e9 /net | |
| parent | cf88585b1d5ce49515aabb381812976e2840a967 (diff) | |
tcp: replace cnt & rtt with struct in pkts_acked()
Replace 2 arguments (cnt and rtt) in the congestion control modules'
pkts_acked() function with a struct. This will allow adding more
information without having to modify existing congestion control
modules (tcp_nv in particular needs bytes in flight when packet
was sent).
As proposed by Neal Cardwell in his comments to the tcp_nv patch.
Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv4/tcp_bic.c | 6 | ||||
| -rw-r--r-- | net/ipv4/tcp_cdg.c | 14 | ||||
| -rw-r--r-- | net/ipv4/tcp_cubic.c | 6 | ||||
| -rw-r--r-- | net/ipv4/tcp_htcp.c | 10 | ||||
| -rw-r--r-- | net/ipv4/tcp_illinois.c | 21 | ||||
| -rw-r--r-- | net/ipv4/tcp_input.c | 8 | ||||
| -rw-r--r-- | net/ipv4/tcp_lp.c | 6 | ||||
| -rw-r--r-- | net/ipv4/tcp_vegas.c | 6 | ||||
| -rw-r--r-- | net/ipv4/tcp_vegas.h | 2 | ||||
| -rw-r--r-- | net/ipv4/tcp_veno.c | 7 | ||||
| -rw-r--r-- | net/ipv4/tcp_westwood.c | 7 | ||||
| -rw-r--r-- | net/ipv4/tcp_yeah.c | 7 |
12 files changed, 54 insertions, 46 deletions
diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index fd1405d37c14..36087bca9f48 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c | |||
| @@ -197,15 +197,15 @@ static void bictcp_state(struct sock *sk, u8 new_state) | |||
| 197 | /* Track delayed acknowledgment ratio using sliding window | 197 | /* Track delayed acknowledgment ratio using sliding window |
| 198 | * ratio = (15*ratio + sample) / 16 | 198 | * ratio = (15*ratio + sample) / 16 |
| 199 | */ | 199 | */ |
| 200 | static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt) | 200 | static void bictcp_acked(struct sock *sk, const struct ack_sample *sample) |
| 201 | { | 201 | { |
| 202 | const struct inet_connection_sock *icsk = inet_csk(sk); | 202 | const struct inet_connection_sock *icsk = inet_csk(sk); |
| 203 | 203 | ||
| 204 | if (icsk->icsk_ca_state == TCP_CA_Open) { | 204 | if (icsk->icsk_ca_state == TCP_CA_Open) { |
| 205 | struct bictcp *ca = inet_csk_ca(sk); | 205 | struct bictcp *ca = inet_csk_ca(sk); |
| 206 | 206 | ||
| 207 | cnt -= ca->delayed_ack >> ACK_RATIO_SHIFT; | 207 | ca->delayed_ack += sample->pkts_acked - |
| 208 | ca->delayed_ack += cnt; | 208 | (ca->delayed_ack >> ACK_RATIO_SHIFT); |
| 209 | } | 209 | } |
| 210 | } | 210 | } |
| 211 | 211 | ||
diff --git a/net/ipv4/tcp_cdg.c b/net/ipv4/tcp_cdg.c index ccce8a55f1e1..03725b294286 100644 --- a/net/ipv4/tcp_cdg.c +++ b/net/ipv4/tcp_cdg.c | |||
| @@ -294,12 +294,12 @@ static void tcp_cdg_cong_avoid(struct sock *sk, u32 ack, u32 acked) | |||
| 294 | ca->shadow_wnd = max(ca->shadow_wnd, ca->shadow_wnd + incr); | 294 | ca->shadow_wnd = max(ca->shadow_wnd, ca->shadow_wnd + incr); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | static void tcp_cdg_acked(struct sock *sk, u32 num_acked, s32 rtt_us) | 297 | static void tcp_cdg_acked(struct sock *sk, const struct ack_sample *sample) |
| 298 | { | 298 | { |
| 299 | struct cdg *ca = inet_csk_ca(sk); | 299 | struct cdg *ca = inet_csk_ca(sk); |
| 300 | struct tcp_sock *tp = tcp_sk(sk); | 300 | struct tcp_sock *tp = tcp_sk(sk); |
| 301 | 301 | ||
| 302 | if (rtt_us <= 0) | 302 | if (sample->rtt_us <= 0) |
| 303 | return; | 303 | return; |
| 304 | 304 | ||
| 305 | /* A heuristic for filtering delayed ACKs, adapted from: | 305 | /* A heuristic for filtering delayed ACKs, adapted from: |
| @@ -307,20 +307,20 @@ static void tcp_cdg_acked(struct sock *sk, u32 num_acked, s32 rtt_us) | |||
| 307 | * delay and rate based TCP mechanisms." TR 100219A. CAIA, 2010. | 307 | * delay and rate based TCP mechanisms." TR 100219A. CAIA, 2010. |
| 308 | */ | 308 | */ |
| 309 | if (tp->sacked_out == 0) { | 309 | if (tp->sacked_out == 0) { |
| 310 | if (num_acked == 1 && ca->delack) { | 310 | if (sample->pkts_acked == 1 && ca->delack) { |
| 311 | /* A delayed ACK is only used for the minimum if it is | 311 | /* A delayed ACK is only used for the minimum if it is |
| 312 | * provenly lower than an existing non-zero minimum. | 312 | * provenly lower than an existing non-zero minimum. |
| 313 | */ | 313 | */ |
| 314 | ca->rtt.min = min(ca->rtt.min, rtt_us); | 314 | ca->rtt.min = min(ca->rtt.min, sample->rtt_us); |
| 315 | ca->delack--; | 315 | ca->delack--; |
| 316 | return; | 316 | return; |
| 317 | } else if (num_acked > 1 && ca->delack < 5) { | 317 | } else if (sample->pkts_acked > 1 && ca->delack < 5) { |
| 318 | ca->delack++; | 318 | ca->delack++; |
| 319 | } | 319 | } |
| 320 | } | 320 | } |
| 321 | 321 | ||
| 322 | ca->rtt.min = min_not_zero(ca->rtt.min, rtt_us); | 322 | ca->rtt.min = min_not_zero(ca->rtt.min, sample->rtt_us); |
| 323 | ca->rtt.max = max(ca->rtt.max, rtt_us); | 323 | ca->rtt.max = max(ca->rtt.max, sample->rtt_us); |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | static u32 tcp_cdg_ssthresh(struct sock *sk) | 326 | static u32 tcp_cdg_ssthresh(struct sock *sk) |
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index 0ce946e395e1..c99230efcd52 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c | |||
| @@ -437,21 +437,21 @@ static void hystart_update(struct sock *sk, u32 delay) | |||
| 437 | /* Track delayed acknowledgment ratio using sliding window | 437 | /* Track delayed acknowledgment ratio using sliding window |
| 438 | * ratio = (15*ratio + sample) / 16 | 438 | * ratio = (15*ratio + sample) / 16 |
| 439 | */ | 439 | */ |
| 440 | static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us) | 440 | static void bictcp_acked(struct sock *sk, const struct ack_sample *sample) |
| 441 | { | 441 | { |
| 442 | const struct tcp_sock *tp = tcp_sk(sk); | 442 | const struct tcp_sock *tp = tcp_sk(sk); |
| 443 | struct bictcp *ca = inet_csk_ca(sk); | 443 | struct bictcp *ca = inet_csk_ca(sk); |
| 444 | u32 delay; | 444 | u32 delay; |
| 445 | 445 | ||
| 446 | /* Some calls are for duplicates without timetamps */ | 446 | /* Some calls are for duplicates without timetamps */ |
| 447 | if (rtt_us < 0) | 447 | if (sample->rtt_us < 0) |
| 448 | return; | 448 | return; |
| 449 | 449 | ||
| 450 | /* Discard delay samples right after fast recovery */ | 450 | /* Discard delay samples right after fast recovery */ |
| 451 | if (ca->epoch_start && (s32)(tcp_time_stamp - ca->epoch_start) < HZ) | 451 | if (ca->epoch_start && (s32)(tcp_time_stamp - ca->epoch_start) < HZ) |
| 452 | return; | 452 | return; |
| 453 | 453 | ||
| 454 | delay = (rtt_us << 3) / USEC_PER_MSEC; | 454 | delay = (sample->rtt_us << 3) / USEC_PER_MSEC; |
| 455 | if (delay == 0) | 455 | if (delay == 0) |
| 456 | delay = 1; | 456 | delay = 1; |
| 457 | 457 | ||
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c index 82f0d9ed60f5..4a4d8e76738f 100644 --- a/net/ipv4/tcp_htcp.c +++ b/net/ipv4/tcp_htcp.c | |||
| @@ -99,7 +99,7 @@ static inline void measure_rtt(struct sock *sk, u32 srtt) | |||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | static void measure_achieved_throughput(struct sock *sk, | 101 | static void measure_achieved_throughput(struct sock *sk, |
| 102 | u32 pkts_acked, s32 rtt) | 102 | const struct ack_sample *sample) |
| 103 | { | 103 | { |
| 104 | const struct inet_connection_sock *icsk = inet_csk(sk); | 104 | const struct inet_connection_sock *icsk = inet_csk(sk); |
| 105 | const struct tcp_sock *tp = tcp_sk(sk); | 105 | const struct tcp_sock *tp = tcp_sk(sk); |
| @@ -107,10 +107,10 @@ static void measure_achieved_throughput(struct sock *sk, | |||
| 107 | u32 now = tcp_time_stamp; | 107 | u32 now = tcp_time_stamp; |
| 108 | 108 | ||
| 109 | if (icsk->icsk_ca_state == TCP_CA_Open) | 109 | if (icsk->icsk_ca_state == TCP_CA_Open) |
| 110 | ca->pkts_acked = pkts_acked; | 110 | ca->pkts_acked = sample->pkts_acked; |
| 111 | 111 | ||
| 112 | if (rtt > 0) | 112 | if (sample->rtt_us > 0) |
| 113 | measure_rtt(sk, usecs_to_jiffies(rtt)); | 113 | measure_rtt(sk, usecs_to_jiffies(sample->rtt_us)); |
| 114 | 114 | ||
| 115 | if (!use_bandwidth_switch) | 115 | if (!use_bandwidth_switch) |
| 116 | return; | 116 | return; |
| @@ -122,7 +122,7 @@ static void measure_achieved_throughput(struct sock *sk, | |||
| 122 | return; | 122 | return; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | ca->packetcount += pkts_acked; | 125 | ca->packetcount += sample->pkts_acked; |
| 126 | 126 | ||
| 127 | if (ca->packetcount >= tp->snd_cwnd - (ca->alpha >> 7 ? : 1) && | 127 | if (ca->packetcount >= tp->snd_cwnd - (ca->alpha >> 7 ? : 1) && |
| 128 | now - ca->lasttime >= ca->minRTT && | 128 | now - ca->lasttime >= ca->minRTT && |
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c index 2ab9bbb6faff..c8e6d86be114 100644 --- a/net/ipv4/tcp_illinois.c +++ b/net/ipv4/tcp_illinois.c | |||
| @@ -82,30 +82,31 @@ static void tcp_illinois_init(struct sock *sk) | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | /* Measure RTT for each ack. */ | 84 | /* Measure RTT for each ack. */ |
| 85 | static void tcp_illinois_acked(struct sock *sk, u32 pkts_acked, s32 rtt) | 85 | static void tcp_illinois_acked(struct sock *sk, const struct ack_sample *sample) |
| 86 | { | 86 | { |
| 87 | struct illinois *ca = inet_csk_ca(sk); | 87 | struct illinois *ca = inet_csk_ca(sk); |
| 88 | s32 rtt_us = sample->rtt_us; | ||
| 88 | 89 | ||
| 89 | ca->acked = pkts_acked; | 90 | ca->acked = sample->pkts_acked; |
| 90 | 91 | ||
| 91 | /* dup ack, no rtt sample */ | 92 | /* dup ack, no rtt sample */ |
| 92 | if (rtt < 0) | 93 | if (rtt_us < 0) |
| 93 | return; | 94 | return; |
| 94 | 95 | ||
| 95 | /* ignore bogus values, this prevents wraparound in alpha math */ | 96 | /* ignore bogus values, this prevents wraparound in alpha math */ |
| 96 | if (rtt > RTT_MAX) | 97 | if (rtt_us > RTT_MAX) |
| 97 | rtt = RTT_MAX; | 98 | rtt_us = RTT_MAX; |
| 98 | 99 | ||
| 99 | /* keep track of minimum RTT seen so far */ | 100 | /* keep track of minimum RTT seen so far */ |
| 100 | if (ca->base_rtt > rtt) | 101 | if (ca->base_rtt > rtt_us) |
| 101 | ca->base_rtt = rtt; | 102 | ca->base_rtt = rtt_us; |
| 102 | 103 | ||
| 103 | /* and max */ | 104 | /* and max */ |
| 104 | if (ca->max_rtt < rtt) | 105 | if (ca->max_rtt < rtt_us) |
| 105 | ca->max_rtt = rtt; | 106 | ca->max_rtt = rtt_us; |
| 106 | 107 | ||
| 107 | ++ca->cnt_rtt; | 108 | ++ca->cnt_rtt; |
| 108 | ca->sum_rtt += rtt; | 109 | ca->sum_rtt += rtt_us; |
| 109 | } | 110 | } |
| 110 | 111 | ||
| 111 | /* Maximum queuing delay */ | 112 | /* Maximum queuing delay */ |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index a914e0607895..d6c8f4cd0800 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
| @@ -3248,8 +3248,12 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, | |||
| 3248 | tcp_rearm_rto(sk); | 3248 | tcp_rearm_rto(sk); |
| 3249 | } | 3249 | } |
| 3250 | 3250 | ||
| 3251 | if (icsk->icsk_ca_ops->pkts_acked) | 3251 | if (icsk->icsk_ca_ops->pkts_acked) { |
| 3252 | icsk->icsk_ca_ops->pkts_acked(sk, pkts_acked, ca_rtt_us); | 3252 | struct ack_sample sample = { .pkts_acked = pkts_acked, |
| 3253 | .rtt_us = ca_rtt_us }; | ||
| 3254 | |||
| 3255 | icsk->icsk_ca_ops->pkts_acked(sk, &sample); | ||
| 3256 | } | ||
| 3253 | 3257 | ||
| 3254 | #if FASTRETRANS_DEBUG > 0 | 3258 | #if FASTRETRANS_DEBUG > 0 |
| 3255 | WARN_ON((int)tp->sacked_out < 0); | 3259 | WARN_ON((int)tp->sacked_out < 0); |
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c index 1e70fa8fa793..c67ece1390c2 100644 --- a/net/ipv4/tcp_lp.c +++ b/net/ipv4/tcp_lp.c | |||
| @@ -260,13 +260,13 @@ static void tcp_lp_rtt_sample(struct sock *sk, u32 rtt) | |||
| 260 | * newReno in increase case. | 260 | * newReno in increase case. |
| 261 | * We work it out by following the idea from TCP-LP's paper directly | 261 | * We work it out by following the idea from TCP-LP's paper directly |
| 262 | */ | 262 | */ |
| 263 | static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked, s32 rtt_us) | 263 | static void tcp_lp_pkts_acked(struct sock *sk, const struct ack_sample *sample) |
| 264 | { | 264 | { |
| 265 | struct tcp_sock *tp = tcp_sk(sk); | 265 | struct tcp_sock *tp = tcp_sk(sk); |
| 266 | struct lp *lp = inet_csk_ca(sk); | 266 | struct lp *lp = inet_csk_ca(sk); |
| 267 | 267 | ||
| 268 | if (rtt_us > 0) | 268 | if (sample->rtt_us > 0) |
| 269 | tcp_lp_rtt_sample(sk, rtt_us); | 269 | tcp_lp_rtt_sample(sk, sample->rtt_us); |
| 270 | 270 | ||
| 271 | /* calc inference */ | 271 | /* calc inference */ |
| 272 | if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) | 272 | if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) |
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c index 13951c4087d4..4c4bac1b5eab 100644 --- a/net/ipv4/tcp_vegas.c +++ b/net/ipv4/tcp_vegas.c | |||
| @@ -107,16 +107,16 @@ EXPORT_SYMBOL_GPL(tcp_vegas_init); | |||
| 107 | * o min-filter RTT samples from a much longer window (forever for now) | 107 | * o min-filter RTT samples from a much longer window (forever for now) |
| 108 | * to find the propagation delay (baseRTT) | 108 | * to find the propagation delay (baseRTT) |
| 109 | */ | 109 | */ |
| 110 | void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us) | 110 | void tcp_vegas_pkts_acked(struct sock *sk, const struct ack_sample *sample) |
| 111 | { | 111 | { |
| 112 | struct vegas *vegas = inet_csk_ca(sk); | 112 | struct vegas *vegas = inet_csk_ca(sk); |
| 113 | u32 vrtt; | 113 | u32 vrtt; |
| 114 | 114 | ||
| 115 | if (rtt_us < 0) | 115 | if (sample->rtt_us < 0) |
| 116 | return; | 116 | return; |
| 117 | 117 | ||
| 118 | /* Never allow zero rtt or baseRTT */ | 118 | /* Never allow zero rtt or baseRTT */ |
| 119 | vrtt = rtt_us + 1; | 119 | vrtt = sample->rtt_us + 1; |
| 120 | 120 | ||
| 121 | /* Filter to find propagation delay: */ | 121 | /* Filter to find propagation delay: */ |
| 122 | if (vrtt < vegas->baseRTT) | 122 | if (vrtt < vegas->baseRTT) |
diff --git a/net/ipv4/tcp_vegas.h b/net/ipv4/tcp_vegas.h index ef9da5306c68..248cfc0ff9ae 100644 --- a/net/ipv4/tcp_vegas.h +++ b/net/ipv4/tcp_vegas.h | |||
| @@ -17,7 +17,7 @@ struct vegas { | |||
| 17 | 17 | ||
| 18 | void tcp_vegas_init(struct sock *sk); | 18 | void tcp_vegas_init(struct sock *sk); |
| 19 | void tcp_vegas_state(struct sock *sk, u8 ca_state); | 19 | void tcp_vegas_state(struct sock *sk, u8 ca_state); |
| 20 | void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us); | 20 | void tcp_vegas_pkts_acked(struct sock *sk, const struct ack_sample *sample); |
| 21 | void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event); | 21 | void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event); |
| 22 | size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr, | 22 | size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr, |
| 23 | union tcp_cc_info *info); | 23 | union tcp_cc_info *info); |
diff --git a/net/ipv4/tcp_veno.c b/net/ipv4/tcp_veno.c index 0d094b995cd9..40171e163cff 100644 --- a/net/ipv4/tcp_veno.c +++ b/net/ipv4/tcp_veno.c | |||
| @@ -69,16 +69,17 @@ 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. */ |
| 72 | static void tcp_veno_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us) | 72 | static void tcp_veno_pkts_acked(struct sock *sk, |
| 73 | const struct ack_sample *sample) | ||
| 73 | { | 74 | { |
| 74 | struct veno *veno = inet_csk_ca(sk); | 75 | struct veno *veno = inet_csk_ca(sk); |
| 75 | u32 vrtt; | 76 | u32 vrtt; |
| 76 | 77 | ||
| 77 | if (rtt_us < 0) | 78 | if (sample->rtt_us < 0) |
| 78 | return; | 79 | return; |
| 79 | 80 | ||
| 80 | /* Never allow zero rtt or baseRTT */ | 81 | /* Never allow zero rtt or baseRTT */ |
| 81 | vrtt = rtt_us + 1; | 82 | vrtt = sample->rtt_us + 1; |
| 82 | 83 | ||
| 83 | /* Filter to find propagation delay: */ | 84 | /* Filter to find propagation delay: */ |
| 84 | if (vrtt < veno->basertt) | 85 | if (vrtt < veno->basertt) |
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c index c10732e39837..4b03a2e2a050 100644 --- a/net/ipv4/tcp_westwood.c +++ b/net/ipv4/tcp_westwood.c | |||
| @@ -99,12 +99,13 @@ static void westwood_filter(struct westwood *w, u32 delta) | |||
| 99 | * Called after processing group of packets. | 99 | * Called after processing group of packets. |
| 100 | * but all westwood needs is the last sample of srtt. | 100 | * but all westwood needs is the last sample of srtt. |
| 101 | */ | 101 | */ |
| 102 | static void tcp_westwood_pkts_acked(struct sock *sk, u32 cnt, s32 rtt) | 102 | static void tcp_westwood_pkts_acked(struct sock *sk, |
| 103 | const struct ack_sample *sample) | ||
| 103 | { | 104 | { |
| 104 | struct westwood *w = inet_csk_ca(sk); | 105 | struct westwood *w = inet_csk_ca(sk); |
| 105 | 106 | ||
| 106 | if (rtt > 0) | 107 | if (sample->rtt_us > 0) |
| 107 | w->rtt = usecs_to_jiffies(rtt); | 108 | w->rtt = usecs_to_jiffies(sample->rtt_us); |
| 108 | } | 109 | } |
| 109 | 110 | ||
| 110 | /* | 111 | /* |
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c index 3e6a472e6b88..028eb046ea40 100644 --- a/net/ipv4/tcp_yeah.c +++ b/net/ipv4/tcp_yeah.c | |||
| @@ -56,15 +56,16 @@ static void tcp_yeah_init(struct sock *sk) | |||
| 56 | tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128); | 56 | tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | static void tcp_yeah_pkts_acked(struct sock *sk, u32 pkts_acked, s32 rtt_us) | 59 | static void tcp_yeah_pkts_acked(struct sock *sk, |
| 60 | const struct ack_sample *sample) | ||
| 60 | { | 61 | { |
| 61 | const struct inet_connection_sock *icsk = inet_csk(sk); | 62 | const struct inet_connection_sock *icsk = inet_csk(sk); |
| 62 | struct yeah *yeah = inet_csk_ca(sk); | 63 | struct yeah *yeah = inet_csk_ca(sk); |
| 63 | 64 | ||
| 64 | if (icsk->icsk_ca_state == TCP_CA_Open) | 65 | if (icsk->icsk_ca_state == TCP_CA_Open) |
| 65 | yeah->pkts_acked = pkts_acked; | 66 | yeah->pkts_acked = sample->pkts_acked; |
| 66 | 67 | ||
| 67 | tcp_vegas_pkts_acked(sk, pkts_acked, rtt_us); | 68 | tcp_vegas_pkts_acked(sk, sample); |
| 68 | } | 69 | } |
| 69 | 70 | ||
| 70 | static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 acked) | 71 | static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 acked) |
