diff options
-rw-r--r-- | net/dccp/ackvec.c | 29 | ||||
-rw-r--r-- | net/dccp/ccids/ccid3.c | 4 | ||||
-rw-r--r-- | net/dccp/ccids/lib/tfrc.c | 8 | ||||
-rw-r--r-- | net/dccp/ccids/lib/tfrc.h | 11 | ||||
-rw-r--r-- | net/dccp/output.c | 2 | ||||
-rw-r--r-- | net/dccp/probe.c | 2 |
6 files changed, 16 insertions, 40 deletions
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c index 6de4bd195d28..1e8be246ad15 100644 --- a/net/dccp/ackvec.c +++ b/net/dccp/ackvec.c | |||
@@ -290,12 +290,12 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk, | |||
290 | 290 | ||
291 | while (1) { | 291 | while (1) { |
292 | const u8 len = dccp_ackvec_len(av, index); | 292 | const u8 len = dccp_ackvec_len(av, index); |
293 | const u8 state = dccp_ackvec_state(av, index); | 293 | const u8 av_state = dccp_ackvec_state(av, index); |
294 | /* | 294 | /* |
295 | * valid packets not yet in av_buf have a reserved | 295 | * valid packets not yet in av_buf have a reserved |
296 | * entry, with a len equal to 0. | 296 | * entry, with a len equal to 0. |
297 | */ | 297 | */ |
298 | if (state == DCCP_ACKVEC_STATE_NOT_RECEIVED && | 298 | if (av_state == DCCP_ACKVEC_STATE_NOT_RECEIVED && |
299 | len == 0 && delta == 0) { /* Found our | 299 | len == 0 && delta == 0) { /* Found our |
300 | reserved seat! */ | 300 | reserved seat! */ |
301 | dccp_pr_debug("Found %llu reserved seat!\n", | 301 | dccp_pr_debug("Found %llu reserved seat!\n", |
@@ -325,31 +325,6 @@ out_duplicate: | |||
325 | return -EILSEQ; | 325 | return -EILSEQ; |
326 | } | 326 | } |
327 | 327 | ||
328 | #ifdef CONFIG_IP_DCCP_DEBUG | ||
329 | void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len) | ||
330 | { | ||
331 | dccp_pr_debug_cat("ACK vector len=%d, ackno=%llu |", len, | ||
332 | (unsigned long long)ackno); | ||
333 | |||
334 | while (len--) { | ||
335 | const u8 state = (*vector & DCCP_ACKVEC_STATE_MASK) >> 6; | ||
336 | const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK; | ||
337 | |||
338 | dccp_pr_debug_cat("%d,%d|", state, rl); | ||
339 | ++vector; | ||
340 | } | ||
341 | |||
342 | dccp_pr_debug_cat("\n"); | ||
343 | } | ||
344 | |||
345 | void dccp_ackvec_print(const struct dccp_ackvec *av) | ||
346 | { | ||
347 | dccp_ackvector_print(av->av_buf_ackno, | ||
348 | av->av_buf + av->av_buf_head, | ||
349 | av->av_vec_len); | ||
350 | } | ||
351 | #endif | ||
352 | |||
353 | static void dccp_ackvec_throw_record(struct dccp_ackvec *av, | 328 | static void dccp_ackvec_throw_record(struct dccp_ackvec *av, |
354 | struct dccp_ackvec_record *avr) | 329 | struct dccp_ackvec_record *avr) |
355 | { | 330 | { |
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 0474f4c5707a..a1929f33d703 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -159,8 +159,8 @@ static void ccid3_hc_tx_update_x(struct sock *sk, ktime_t *stamp) | |||
159 | } else if (ktime_us_delta(now, hctx->ccid3hctx_t_ld) | 159 | } else if (ktime_us_delta(now, hctx->ccid3hctx_t_ld) |
160 | - (s64)hctx->ccid3hctx_rtt >= 0) { | 160 | - (s64)hctx->ccid3hctx_rtt >= 0) { |
161 | 161 | ||
162 | hctx->ccid3hctx_x = | 162 | hctx->ccid3hctx_x = min(2 * hctx->ccid3hctx_x, min_rate); |
163 | max(min(2 * hctx->ccid3hctx_x, min_rate), | 163 | hctx->ccid3hctx_x = max(hctx->ccid3hctx_x, |
164 | scaled_div(((__u64)hctx->ccid3hctx_s) << 6, | 164 | scaled_div(((__u64)hctx->ccid3hctx_s) << 6, |
165 | hctx->ccid3hctx_rtt)); | 165 | hctx->ccid3hctx_rtt)); |
166 | hctx->ccid3hctx_t_ld = now; | 166 | hctx->ccid3hctx_t_ld = now; |
diff --git a/net/dccp/ccids/lib/tfrc.c b/net/dccp/ccids/lib/tfrc.c index d1dfbb8de64c..97ecec0a8e76 100644 --- a/net/dccp/ccids/lib/tfrc.c +++ b/net/dccp/ccids/lib/tfrc.c | |||
@@ -14,14 +14,6 @@ module_param(tfrc_debug, bool, 0444); | |||
14 | MODULE_PARM_DESC(tfrc_debug, "Enable debug messages"); | 14 | MODULE_PARM_DESC(tfrc_debug, "Enable debug messages"); |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | extern int tfrc_tx_packet_history_init(void); | ||
18 | extern void tfrc_tx_packet_history_exit(void); | ||
19 | extern int tfrc_rx_packet_history_init(void); | ||
20 | extern void tfrc_rx_packet_history_exit(void); | ||
21 | |||
22 | extern int tfrc_li_init(void); | ||
23 | extern void tfrc_li_exit(void); | ||
24 | |||
25 | static int __init tfrc_module_init(void) | 17 | static int __init tfrc_module_init(void) |
26 | { | 18 | { |
27 | int rc = tfrc_li_init(); | 19 | int rc = tfrc_li_init(); |
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h index 1fb1187bbf1c..ddd8107b927f 100644 --- a/net/dccp/ccids/lib/tfrc.h +++ b/net/dccp/ccids/lib/tfrc.h | |||
@@ -58,7 +58,14 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight) | |||
58 | return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; | 58 | return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; |
59 | } | 59 | } |
60 | 60 | ||
61 | extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); | 61 | extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); |
62 | extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); | 62 | extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); |
63 | 63 | ||
64 | extern int tfrc_tx_packet_history_init(void); | ||
65 | extern void tfrc_tx_packet_history_exit(void); | ||
66 | extern int tfrc_rx_packet_history_init(void); | ||
67 | extern void tfrc_rx_packet_history_exit(void); | ||
68 | |||
69 | extern int tfrc_li_init(void); | ||
70 | extern void tfrc_li_exit(void); | ||
64 | #endif /* _TFRC_H_ */ | 71 | #endif /* _TFRC_H_ */ |
diff --git a/net/dccp/output.c b/net/dccp/output.c index 1f8a9b64c083..fe20068c5d8e 100644 --- a/net/dccp/output.c +++ b/net/dccp/output.c | |||
@@ -508,6 +508,7 @@ void dccp_send_ack(struct sock *sk) | |||
508 | 508 | ||
509 | EXPORT_SYMBOL_GPL(dccp_send_ack); | 509 | EXPORT_SYMBOL_GPL(dccp_send_ack); |
510 | 510 | ||
511 | #if 0 | ||
511 | /* FIXME: Is this still necessary (11.3) - currently nowhere used by DCCP. */ | 512 | /* FIXME: Is this still necessary (11.3) - currently nowhere used by DCCP. */ |
512 | void dccp_send_delayed_ack(struct sock *sk) | 513 | void dccp_send_delayed_ack(struct sock *sk) |
513 | { | 514 | { |
@@ -538,6 +539,7 @@ void dccp_send_delayed_ack(struct sock *sk) | |||
538 | icsk->icsk_ack.timeout = timeout; | 539 | icsk->icsk_ack.timeout = timeout; |
539 | sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout); | 540 | sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout); |
540 | } | 541 | } |
542 | #endif | ||
541 | 543 | ||
542 | void dccp_send_sync(struct sock *sk, const u64 ackno, | 544 | void dccp_send_sync(struct sock *sk, const u64 ackno, |
543 | const enum dccp_pkt_type pkt_type) | 545 | const enum dccp_pkt_type pkt_type) |
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index 0bcdc9250279..81368a7f5379 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
@@ -42,7 +42,7 @@ static int bufsize = 64 * 1024; | |||
42 | 42 | ||
43 | static const char procname[] = "dccpprobe"; | 43 | static const char procname[] = "dccpprobe"; |
44 | 44 | ||
45 | struct { | 45 | static struct { |
46 | struct kfifo *fifo; | 46 | struct kfifo *fifo; |
47 | spinlock_t lock; | 47 | spinlock_t lock; |
48 | wait_queue_head_t wait; | 48 | wait_queue_head_t wait; |