diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /net/dccp/ccids | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'net/dccp/ccids')
-rw-r--r-- | net/dccp/ccids/ccid2.c | 88 | ||||
-rw-r--r-- | net/dccp/ccids/ccid2.h | 6 | ||||
-rw-r--r-- | net/dccp/ccids/ccid3.c | 26 | ||||
-rw-r--r-- | net/dccp/ccids/lib/loss_interval.c | 1 | ||||
-rw-r--r-- | net/dccp/ccids/lib/packet_history.c | 3 | ||||
-rw-r--r-- | net/dccp/ccids/lib/tfrc.c | 3 | ||||
-rw-r--r-- | net/dccp/ccids/lib/tfrc.h | 2 | ||||
-rw-r--r-- | net/dccp/ccids/lib/tfrc_equation.c | 2 |
8 files changed, 34 insertions, 97 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index f053198e730..0462040fc81 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | 30 | ||
31 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG | 31 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG |
32 | static bool ccid2_debug; | 32 | static int ccid2_debug; |
33 | #define ccid2_pr_debug(format, a...) DCCP_PR_DEBUG(ccid2_debug, format, ##a) | 33 | #define ccid2_pr_debug(format, a...) DCCP_PR_DEBUG(ccid2_debug, format, ##a) |
34 | #else | 34 | #else |
35 | #define ccid2_pr_debug(format, a...) | 35 | #define ccid2_pr_debug(format, a...) |
@@ -85,6 +85,7 @@ static int ccid2_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb) | |||
85 | 85 | ||
86 | static void ccid2_change_l_ack_ratio(struct sock *sk, u32 val) | 86 | static void ccid2_change_l_ack_ratio(struct sock *sk, u32 val) |
87 | { | 87 | { |
88 | struct dccp_sock *dp = dccp_sk(sk); | ||
88 | u32 max_ratio = DIV_ROUND_UP(ccid2_hc_tx_sk(sk)->tx_cwnd, 2); | 89 | u32 max_ratio = DIV_ROUND_UP(ccid2_hc_tx_sk(sk)->tx_cwnd, 2); |
89 | 90 | ||
90 | /* | 91 | /* |
@@ -97,33 +98,14 @@ static void ccid2_change_l_ack_ratio(struct sock *sk, u32 val) | |||
97 | DCCP_WARN("Limiting Ack Ratio (%u) to %u\n", val, max_ratio); | 98 | DCCP_WARN("Limiting Ack Ratio (%u) to %u\n", val, max_ratio); |
98 | val = max_ratio; | 99 | val = max_ratio; |
99 | } | 100 | } |
100 | dccp_feat_signal_nn_change(sk, DCCPF_ACK_RATIO, | 101 | if (val > DCCPF_ACK_RATIO_MAX) |
101 | min_t(u32, val, DCCPF_ACK_RATIO_MAX)); | 102 | val = DCCPF_ACK_RATIO_MAX; |
102 | } | ||
103 | 103 | ||
104 | static void ccid2_check_l_ack_ratio(struct sock *sk) | 104 | if (val == dp->dccps_l_ack_ratio) |
105 | { | 105 | return; |
106 | struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk); | ||
107 | |||
108 | /* | ||
109 | * After a loss, idle period, application limited period, or RTO we | ||
110 | * need to check that the ack ratio is still less than the congestion | ||
111 | * window. Otherwise, we will send an entire congestion window of | ||
112 | * packets and got no response because we haven't sent ack ratio | ||
113 | * packets yet. | ||
114 | * If the ack ratio does need to be reduced, we reduce it to half of | ||
115 | * the congestion window (or 1 if that's zero) instead of to the | ||
116 | * congestion window. This prevents problems if one ack is lost. | ||
117 | */ | ||
118 | if (dccp_feat_nn_get(sk, DCCPF_ACK_RATIO) > hc->tx_cwnd) | ||
119 | ccid2_change_l_ack_ratio(sk, hc->tx_cwnd/2 ? : 1U); | ||
120 | } | ||
121 | 106 | ||
122 | static void ccid2_change_l_seq_window(struct sock *sk, u64 val) | 107 | ccid2_pr_debug("changing local ack ratio to %u\n", val); |
123 | { | 108 | dp->dccps_l_ack_ratio = val; |
124 | dccp_feat_signal_nn_change(sk, DCCPF_SEQUENCE_WINDOW, | ||
125 | clamp_val(val, DCCPF_SEQ_WMIN, | ||
126 | DCCPF_SEQ_WMAX)); | ||
127 | } | 109 | } |
128 | 110 | ||
129 | static void ccid2_hc_tx_rto_expire(unsigned long data) | 111 | static void ccid2_hc_tx_rto_expire(unsigned long data) |
@@ -174,7 +156,7 @@ out: | |||
174 | /* | 156 | /* |
175 | * Congestion window validation (RFC 2861). | 157 | * Congestion window validation (RFC 2861). |
176 | */ | 158 | */ |
177 | static bool ccid2_do_cwv = true; | 159 | static int ccid2_do_cwv = 1; |
178 | module_param(ccid2_do_cwv, bool, 0644); | 160 | module_param(ccid2_do_cwv, bool, 0644); |
179 | MODULE_PARM_DESC(ccid2_do_cwv, "Perform RFC2861 Congestion Window Validation"); | 161 | MODULE_PARM_DESC(ccid2_do_cwv, "Perform RFC2861 Congestion Window Validation"); |
180 | 162 | ||
@@ -205,8 +187,6 @@ static void ccid2_cwnd_application_limited(struct sock *sk, const u32 now) | |||
205 | } | 187 | } |
206 | hc->tx_cwnd_used = 0; | 188 | hc->tx_cwnd_used = 0; |
207 | hc->tx_cwnd_stamp = now; | 189 | hc->tx_cwnd_stamp = now; |
208 | |||
209 | ccid2_check_l_ack_ratio(sk); | ||
210 | } | 190 | } |
211 | 191 | ||
212 | /* This borrows the code of tcp_cwnd_restart() */ | 192 | /* This borrows the code of tcp_cwnd_restart() */ |
@@ -225,8 +205,6 @@ static void ccid2_cwnd_restart(struct sock *sk, const u32 now) | |||
225 | 205 | ||
226 | hc->tx_cwnd_stamp = now; | 206 | hc->tx_cwnd_stamp = now; |
227 | hc->tx_cwnd_used = 0; | 207 | hc->tx_cwnd_used = 0; |
228 | |||
229 | ccid2_check_l_ack_ratio(sk); | ||
230 | } | 208 | } |
231 | 209 | ||
232 | static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len) | 210 | static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len) |
@@ -427,37 +405,17 @@ static void ccid2_new_ack(struct sock *sk, struct ccid2_seq *seqp, | |||
427 | unsigned int *maxincr) | 405 | unsigned int *maxincr) |
428 | { | 406 | { |
429 | struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk); | 407 | struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk); |
430 | struct dccp_sock *dp = dccp_sk(sk); | 408 | |
431 | int r_seq_used = hc->tx_cwnd / dp->dccps_l_ack_ratio; | 409 | if (hc->tx_cwnd < hc->tx_ssthresh) { |
432 | 410 | if (*maxincr > 0 && ++hc->tx_packets_acked == 2) { | |
433 | if (hc->tx_cwnd < dp->dccps_l_seq_win && | ||
434 | r_seq_used < dp->dccps_r_seq_win) { | ||
435 | if (hc->tx_cwnd < hc->tx_ssthresh) { | ||
436 | if (*maxincr > 0 && ++hc->tx_packets_acked >= 2) { | ||
437 | hc->tx_cwnd += 1; | ||
438 | *maxincr -= 1; | ||
439 | hc->tx_packets_acked = 0; | ||
440 | } | ||
441 | } else if (++hc->tx_packets_acked >= hc->tx_cwnd) { | ||
442 | hc->tx_cwnd += 1; | 411 | hc->tx_cwnd += 1; |
412 | *maxincr -= 1; | ||
443 | hc->tx_packets_acked = 0; | 413 | hc->tx_packets_acked = 0; |
444 | } | 414 | } |
415 | } else if (++hc->tx_packets_acked >= hc->tx_cwnd) { | ||
416 | hc->tx_cwnd += 1; | ||
417 | hc->tx_packets_acked = 0; | ||
445 | } | 418 | } |
446 | |||
447 | /* | ||
448 | * Adjust the local sequence window and the ack ratio to allow about | ||
449 | * 5 times the number of packets in the network (RFC 4340 7.5.2) | ||
450 | */ | ||
451 | if (r_seq_used * CCID2_WIN_CHANGE_FACTOR >= dp->dccps_r_seq_win) | ||
452 | ccid2_change_l_ack_ratio(sk, dp->dccps_l_ack_ratio * 2); | ||
453 | else if (r_seq_used * CCID2_WIN_CHANGE_FACTOR < dp->dccps_r_seq_win/2) | ||
454 | ccid2_change_l_ack_ratio(sk, dp->dccps_l_ack_ratio / 2 ? : 1U); | ||
455 | |||
456 | if (hc->tx_cwnd * CCID2_WIN_CHANGE_FACTOR >= dp->dccps_l_seq_win) | ||
457 | ccid2_change_l_seq_window(sk, dp->dccps_l_seq_win * 2); | ||
458 | else if (hc->tx_cwnd * CCID2_WIN_CHANGE_FACTOR < dp->dccps_l_seq_win/2) | ||
459 | ccid2_change_l_seq_window(sk, dp->dccps_l_seq_win / 2); | ||
460 | |||
461 | /* | 419 | /* |
462 | * FIXME: RTT is sampled several times per acknowledgment (for each | 420 | * FIXME: RTT is sampled several times per acknowledgment (for each |
463 | * entry in the Ack Vector), instead of once per Ack (as in TCP SACK). | 421 | * entry in the Ack Vector), instead of once per Ack (as in TCP SACK). |
@@ -483,7 +441,9 @@ static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp) | |||
483 | hc->tx_cwnd = hc->tx_cwnd / 2 ? : 1U; | 441 | hc->tx_cwnd = hc->tx_cwnd / 2 ? : 1U; |
484 | hc->tx_ssthresh = max(hc->tx_cwnd, 2U); | 442 | hc->tx_ssthresh = max(hc->tx_cwnd, 2U); |
485 | 443 | ||
486 | ccid2_check_l_ack_ratio(sk); | 444 | /* Avoid spurious timeouts resulting from Ack Ratio > cwnd */ |
445 | if (dccp_sk(sk)->dccps_l_ack_ratio > hc->tx_cwnd) | ||
446 | ccid2_change_l_ack_ratio(sk, hc->tx_cwnd); | ||
487 | } | 447 | } |
488 | 448 | ||
489 | static int ccid2_hc_tx_parse_options(struct sock *sk, u8 packet_type, | 449 | static int ccid2_hc_tx_parse_options(struct sock *sk, u8 packet_type, |
@@ -534,16 +494,8 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
534 | if (hc->tx_rpdupack >= NUMDUPACK) { | 494 | if (hc->tx_rpdupack >= NUMDUPACK) { |
535 | hc->tx_rpdupack = -1; /* XXX lame */ | 495 | hc->tx_rpdupack = -1; /* XXX lame */ |
536 | hc->tx_rpseq = 0; | 496 | hc->tx_rpseq = 0; |
537 | #ifdef __CCID2_COPES_GRACEFULLY_WITH_ACK_CONGESTION_CONTROL__ | 497 | |
538 | /* | ||
539 | * FIXME: Ack Congestion Control is broken; in | ||
540 | * the current state instabilities occurred with | ||
541 | * Ack Ratios greater than 1; causing hang-ups | ||
542 | * and long RTO timeouts. This needs to be fixed | ||
543 | * before opening up dynamic changes. -- gerrit | ||
544 | */ | ||
545 | ccid2_change_l_ack_ratio(sk, 2 * dp->dccps_l_ack_ratio); | 498 | ccid2_change_l_ack_ratio(sk, 2 * dp->dccps_l_ack_ratio); |
546 | #endif | ||
547 | } | 499 | } |
548 | } | 500 | } |
549 | } | 501 | } |
diff --git a/net/dccp/ccids/ccid2.h b/net/dccp/ccids/ccid2.h index 18c97543e52..f585d330e1e 100644 --- a/net/dccp/ccids/ccid2.h +++ b/net/dccp/ccids/ccid2.h | |||
@@ -43,12 +43,6 @@ struct ccid2_seq { | |||
43 | #define CCID2_SEQBUF_LEN 1024 | 43 | #define CCID2_SEQBUF_LEN 1024 |
44 | #define CCID2_SEQBUF_MAX 128 | 44 | #define CCID2_SEQBUF_MAX 128 |
45 | 45 | ||
46 | /* | ||
47 | * Multiple of congestion window to keep the sequence window at | ||
48 | * (RFC 4340 7.5.2) | ||
49 | */ | ||
50 | #define CCID2_WIN_CHANGE_FACTOR 5 | ||
51 | |||
52 | /** | 46 | /** |
53 | * struct ccid2_hc_tx_sock - CCID2 TX half connection | 47 | * struct ccid2_hc_tx_sock - CCID2 TX half connection |
54 | * @tx_{cwnd,ssthresh,pipe}: as per RFC 4341, section 5 | 48 | * @tx_{cwnd,ssthresh,pipe}: as per RFC 4341, section 5 |
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 119c04317d4..3d604e1349c 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <asm/unaligned.h> | 38 | #include <asm/unaligned.h> |
39 | 39 | ||
40 | #ifdef CONFIG_IP_DCCP_CCID3_DEBUG | 40 | #ifdef CONFIG_IP_DCCP_CCID3_DEBUG |
41 | static bool ccid3_debug; | 41 | static int ccid3_debug; |
42 | #define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a) | 42 | #define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a) |
43 | #else | 43 | #else |
44 | #define ccid3_pr_debug(format, a...) | 44 | #define ccid3_pr_debug(format, a...) |
@@ -98,9 +98,8 @@ static void ccid3_update_send_interval(struct ccid3_hc_tx_sock *hc) | |||
98 | { | 98 | { |
99 | hc->tx_t_ipi = scaled_div32(((u64)hc->tx_s) << 6, hc->tx_x); | 99 | hc->tx_t_ipi = scaled_div32(((u64)hc->tx_s) << 6, hc->tx_x); |
100 | 100 | ||
101 | DCCP_BUG_ON(hc->tx_t_ipi == 0); | ||
102 | ccid3_pr_debug("t_ipi=%u, s=%u, X=%u\n", hc->tx_t_ipi, | 101 | ccid3_pr_debug("t_ipi=%u, s=%u, X=%u\n", hc->tx_t_ipi, |
103 | hc->tx_s, (unsigned int)(hc->tx_x >> 6)); | 102 | hc->tx_s, (unsigned)(hc->tx_x >> 6)); |
104 | } | 103 | } |
105 | 104 | ||
106 | static u32 ccid3_hc_tx_idle_rtt(struct ccid3_hc_tx_sock *hc, ktime_t now) | 105 | static u32 ccid3_hc_tx_idle_rtt(struct ccid3_hc_tx_sock *hc, ktime_t now) |
@@ -113,7 +112,6 @@ static u32 ccid3_hc_tx_idle_rtt(struct ccid3_hc_tx_sock *hc, ktime_t now) | |||
113 | /** | 112 | /** |
114 | * ccid3_hc_tx_update_x - Update allowed sending rate X | 113 | * ccid3_hc_tx_update_x - Update allowed sending rate X |
115 | * @stamp: most recent time if available - can be left NULL. | 114 | * @stamp: most recent time if available - can be left NULL. |
116 | * | ||
117 | * This function tracks draft rfc3448bis, check there for latest details. | 115 | * This function tracks draft rfc3448bis, check there for latest details. |
118 | * | 116 | * |
119 | * Note: X and X_recv are both stored in units of 64 * bytes/second, to support | 117 | * Note: X and X_recv are both stored in units of 64 * bytes/second, to support |
@@ -154,19 +152,17 @@ static void ccid3_hc_tx_update_x(struct sock *sk, ktime_t *stamp) | |||
154 | 152 | ||
155 | if (hc->tx_x != old_x) { | 153 | if (hc->tx_x != old_x) { |
156 | ccid3_pr_debug("X_prev=%u, X_now=%u, X_calc=%u, " | 154 | ccid3_pr_debug("X_prev=%u, X_now=%u, X_calc=%u, " |
157 | "X_recv=%u\n", (unsigned int)(old_x >> 6), | 155 | "X_recv=%u\n", (unsigned)(old_x >> 6), |
158 | (unsigned int)(hc->tx_x >> 6), hc->tx_x_calc, | 156 | (unsigned)(hc->tx_x >> 6), hc->tx_x_calc, |
159 | (unsigned int)(hc->tx_x_recv >> 6)); | 157 | (unsigned)(hc->tx_x_recv >> 6)); |
160 | 158 | ||
161 | ccid3_update_send_interval(hc); | 159 | ccid3_update_send_interval(hc); |
162 | } | 160 | } |
163 | } | 161 | } |
164 | 162 | ||
165 | /** | 163 | /* |
166 | * ccid3_hc_tx_update_s - Track the mean packet size `s' | 164 | * Track the mean packet size `s' (cf. RFC 4342, 5.3 and RFC 3448, 4.1) |
167 | * @len: DCCP packet payload size in bytes | 165 | * @len: DCCP packet payload size in bytes |
168 | * | ||
169 | * cf. RFC 4342, 5.3 and RFC 3448, 4.1 | ||
170 | */ | 166 | */ |
171 | static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hc, int len) | 167 | static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hc, int len) |
172 | { | 168 | { |
@@ -240,6 +236,8 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data) | |||
240 | * | 236 | * |
241 | * Note that X_recv is scaled by 2^6 while X_calc is not | 237 | * Note that X_recv is scaled by 2^6 while X_calc is not |
242 | */ | 238 | */ |
239 | BUG_ON(hc->tx_p && !hc->tx_x_calc); | ||
240 | |||
243 | if (hc->tx_x_calc > (hc->tx_x_recv >> 5)) | 241 | if (hc->tx_x_calc > (hc->tx_x_recv >> 5)) |
244 | hc->tx_x_recv = | 242 | hc->tx_x_recv = |
245 | max(hc->tx_x_recv / 2, | 243 | max(hc->tx_x_recv / 2, |
@@ -273,7 +271,6 @@ out: | |||
273 | /** | 271 | /** |
274 | * ccid3_hc_tx_send_packet - Delay-based dequeueing of TX packets | 272 | * ccid3_hc_tx_send_packet - Delay-based dequeueing of TX packets |
275 | * @skb: next packet candidate to send on @sk | 273 | * @skb: next packet candidate to send on @sk |
276 | * | ||
277 | * This function uses the convention of ccid_packet_dequeue_eval() and | 274 | * This function uses the convention of ccid_packet_dequeue_eval() and |
278 | * returns a millisecond-delay value between 0 and t_mbi = 64000 msec. | 275 | * returns a millisecond-delay value between 0 and t_mbi = 64000 msec. |
279 | */ | 276 | */ |
@@ -429,8 +426,8 @@ done_computing_x: | |||
429 | "p=%u, X_calc=%u, X_recv=%u, X=%u\n", | 426 | "p=%u, X_calc=%u, X_recv=%u, X=%u\n", |
430 | dccp_role(sk), sk, hc->tx_rtt, r_sample, | 427 | dccp_role(sk), sk, hc->tx_rtt, r_sample, |
431 | hc->tx_s, hc->tx_p, hc->tx_x_calc, | 428 | hc->tx_s, hc->tx_p, hc->tx_x_calc, |
432 | (unsigned int)(hc->tx_x_recv >> 6), | 429 | (unsigned)(hc->tx_x_recv >> 6), |
433 | (unsigned int)(hc->tx_x >> 6)); | 430 | (unsigned)(hc->tx_x >> 6)); |
434 | 431 | ||
435 | /* unschedule no feedback timer */ | 432 | /* unschedule no feedback timer */ |
436 | sk_stop_timer(sk, &hc->tx_no_feedback_timer); | 433 | sk_stop_timer(sk, &hc->tx_no_feedback_timer); |
@@ -535,7 +532,6 @@ static int ccid3_hc_tx_getsockopt(struct sock *sk, const int optname, int len, | |||
535 | case DCCP_SOCKOPT_CCID_TX_INFO: | 532 | case DCCP_SOCKOPT_CCID_TX_INFO: |
536 | if (len < sizeof(tfrc)) | 533 | if (len < sizeof(tfrc)) |
537 | return -EINVAL; | 534 | return -EINVAL; |
538 | memset(&tfrc, 0, sizeof(tfrc)); | ||
539 | tfrc.tfrctx_x = hc->tx_x; | 535 | tfrc.tfrctx_x = hc->tx_x; |
540 | tfrc.tfrctx_x_recv = hc->tx_x_recv; | 536 | tfrc.tfrctx_x_recv = hc->tx_x_recv; |
541 | tfrc.tfrctx_x_calc = hc->tx_x_calc; | 537 | tfrc.tfrctx_x_calc = hc->tx_x_calc; |
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c index 57f9fd78c4d..497723c4d4b 100644 --- a/net/dccp/ccids/lib/loss_interval.c +++ b/net/dccp/ccids/lib/loss_interval.c | |||
@@ -133,7 +133,6 @@ static inline u8 tfrc_lh_is_new_loss(struct tfrc_loss_interval *cur, | |||
133 | * @rh: Receive history containing a fresh loss event | 133 | * @rh: Receive history containing a fresh loss event |
134 | * @calc_first_li: Caller-dependent routine to compute length of first interval | 134 | * @calc_first_li: Caller-dependent routine to compute length of first interval |
135 | * @sk: Used by @calc_first_li in caller-specific way (subtyping) | 135 | * @sk: Used by @calc_first_li in caller-specific way (subtyping) |
136 | * | ||
137 | * Updates I_mean and returns 1 if a new interval has in fact been added to @lh. | 136 | * Updates I_mean and returns 1 if a new interval has in fact been added to @lh. |
138 | */ | 137 | */ |
139 | int tfrc_lh_interval_add(struct tfrc_loss_hist *lh, struct tfrc_rx_hist *rh, | 138 | int tfrc_lh_interval_add(struct tfrc_loss_hist *lh, struct tfrc_rx_hist *rh, |
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c index 08df7a3acb3..de8fe294bf0 100644 --- a/net/dccp/ccids/lib/packet_history.c +++ b/net/dccp/ccids/lib/packet_history.c | |||
@@ -315,7 +315,6 @@ static void __three_after_loss(struct tfrc_rx_hist *h) | |||
315 | * @ndp: The NDP count belonging to @skb | 315 | * @ndp: The NDP count belonging to @skb |
316 | * @calc_first_li: Caller-dependent computation of first loss interval in @lh | 316 | * @calc_first_li: Caller-dependent computation of first loss interval in @lh |
317 | * @sk: Used by @calc_first_li (see tfrc_lh_interval_add) | 317 | * @sk: Used by @calc_first_li (see tfrc_lh_interval_add) |
318 | * | ||
319 | * Chooses action according to pending loss, updates LI database when a new | 318 | * Chooses action according to pending loss, updates LI database when a new |
320 | * loss was detected, and does required post-processing. Returns 1 when caller | 319 | * loss was detected, and does required post-processing. Returns 1 when caller |
321 | * should send feedback, 0 otherwise. | 320 | * should send feedback, 0 otherwise. |
@@ -388,7 +387,7 @@ static inline struct tfrc_rx_hist_entry * | |||
388 | } | 387 | } |
389 | 388 | ||
390 | /** | 389 | /** |
391 | * tfrc_rx_hist_rtt_prev_s - previously suitable (wrt rtt_last_s) RTT-sampling entry | 390 | * tfrc_rx_hist_rtt_prev_s: previously suitable (wrt rtt_last_s) RTT-sampling entry |
392 | */ | 391 | */ |
393 | static inline struct tfrc_rx_hist_entry * | 392 | static inline struct tfrc_rx_hist_entry * |
394 | tfrc_rx_hist_rtt_prev_s(const struct tfrc_rx_hist *h) | 393 | tfrc_rx_hist_rtt_prev_s(const struct tfrc_rx_hist *h) |
diff --git a/net/dccp/ccids/lib/tfrc.c b/net/dccp/ccids/lib/tfrc.c index 62b5828acde..4902029854d 100644 --- a/net/dccp/ccids/lib/tfrc.c +++ b/net/dccp/ccids/lib/tfrc.c | |||
@@ -4,11 +4,10 @@ | |||
4 | * Copyright (c) 2007 The University of Aberdeen, Scotland, UK | 4 | * Copyright (c) 2007 The University of Aberdeen, Scotland, UK |
5 | * Copyright (c) 2007 Arnaldo Carvalho de Melo <acme@redhat.com> | 5 | * Copyright (c) 2007 Arnaldo Carvalho de Melo <acme@redhat.com> |
6 | */ | 6 | */ |
7 | #include <linux/moduleparam.h> | ||
8 | #include "tfrc.h" | 7 | #include "tfrc.h" |
9 | 8 | ||
10 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG | 9 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG |
11 | bool tfrc_debug; | 10 | int tfrc_debug; |
12 | module_param(tfrc_debug, bool, 0644); | 11 | module_param(tfrc_debug, bool, 0644); |
13 | MODULE_PARM_DESC(tfrc_debug, "Enable TFRC debug messages"); | 12 | MODULE_PARM_DESC(tfrc_debug, "Enable TFRC debug messages"); |
14 | #endif | 13 | #endif |
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h index ed698c42a5f..f8ee3f54977 100644 --- a/net/dccp/ccids/lib/tfrc.h +++ b/net/dccp/ccids/lib/tfrc.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "packet_history.h" | 21 | #include "packet_history.h" |
22 | 22 | ||
23 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG | 23 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG |
24 | extern bool tfrc_debug; | 24 | extern int tfrc_debug; |
25 | #define tfrc_pr_debug(format, a...) DCCP_PR_DEBUG(tfrc_debug, format, ##a) | 25 | #define tfrc_pr_debug(format, a...) DCCP_PR_DEBUG(tfrc_debug, format, ##a) |
26 | #else | 26 | #else |
27 | #define tfrc_pr_debug(format, a...) | 27 | #define tfrc_pr_debug(format, a...) |
diff --git a/net/dccp/ccids/lib/tfrc_equation.c b/net/dccp/ccids/lib/tfrc_equation.c index 88ef98285be..a052a4377e2 100644 --- a/net/dccp/ccids/lib/tfrc_equation.c +++ b/net/dccp/ccids/lib/tfrc_equation.c | |||
@@ -611,7 +611,6 @@ static inline u32 tfrc_binsearch(u32 fval, u8 small) | |||
611 | * @s: packet size in bytes | 611 | * @s: packet size in bytes |
612 | * @R: RTT scaled by 1000000 (i.e., microseconds) | 612 | * @R: RTT scaled by 1000000 (i.e., microseconds) |
613 | * @p: loss ratio estimate scaled by 1000000 | 613 | * @p: loss ratio estimate scaled by 1000000 |
614 | * | ||
615 | * Returns X_calc in bytes per second (not scaled). | 614 | * Returns X_calc in bytes per second (not scaled). |
616 | */ | 615 | */ |
617 | u32 tfrc_calc_x(u16 s, u32 R, u32 p) | 616 | u32 tfrc_calc_x(u16 s, u32 R, u32 p) |
@@ -660,7 +659,6 @@ u32 tfrc_calc_x(u16 s, u32 R, u32 p) | |||
660 | /** | 659 | /** |
661 | * tfrc_calc_x_reverse_lookup - try to find p given f(p) | 660 | * tfrc_calc_x_reverse_lookup - try to find p given f(p) |
662 | * @fvalue: function value to match, scaled by 1000000 | 661 | * @fvalue: function value to match, scaled by 1000000 |
663 | * | ||
664 | * Returns closest match for p, also scaled by 1000000 | 662 | * Returns closest match for p, also scaled by 1000000 |
665 | */ | 663 | */ |
666 | u32 tfrc_calc_x_reverse_lookup(u32 fvalue) | 664 | u32 tfrc_calc_x_reverse_lookup(u32 fvalue) |