diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2007-12-12 11:06:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:57:20 -0500 |
commit | 954c2db868ce896325dced91d5fba5e2226897a4 (patch) | |
tree | d74b480530878c25eb770293d786f2e78ace90e7 /net/dccp/ccids/lib | |
parent | de0d411cb8ea51175f52d935faead5c542b6e007 (diff) |
[CCID3]: Interface CCID3 code with newer Loss Intervals Database
This hooks up the TFRC Loss Interval database with CCID 3 packet reception.
In addition, it makes the CCID-specific computation of the first loss
interval (which requires access to all the guts of CCID3) local to ccid3.c.
The patch also fixes an omission in the DCCP code, that of a default /
fallback RTT value (defined in section 3.4 of RFC 4340 as 0.2 sec); while
at it, the upper bound of 4 seconds for an RTT sample has been reduced to
match the initial TCP RTO value of 3 seconds from[RFC 1122, 4.2.3.1].
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ccids/lib')
-rw-r--r-- | net/dccp/ccids/lib/loss_interval.c | 18 | ||||
-rw-r--r-- | net/dccp/ccids/lib/tfrc.c | 10 |
2 files changed, 14 insertions, 14 deletions
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c index 39980d1f5352..8b962c1f14b8 100644 --- a/net/dccp/ccids/lib/loss_interval.c +++ b/net/dccp/ccids/lib/loss_interval.c | |||
@@ -435,18 +435,18 @@ int tfrc_lh_interval_add(struct tfrc_loss_hist *lh, struct tfrc_rx_hist *rh, | |||
435 | } | 435 | } |
436 | EXPORT_SYMBOL_GPL(tfrc_lh_interval_add); | 436 | EXPORT_SYMBOL_GPL(tfrc_lh_interval_add); |
437 | 437 | ||
438 | int __init dccp_li_init(void) | 438 | int __init tfrc_li_init(void) |
439 | { | 439 | { |
440 | dccp_li_cachep = kmem_cache_create("dccp_li_hist", | 440 | tfrc_lh_slab = kmem_cache_create("tfrc_li_hist", |
441 | sizeof(struct dccp_li_hist_entry), | 441 | sizeof(struct tfrc_loss_interval), 0, |
442 | 0, SLAB_HWCACHE_ALIGN, NULL); | 442 | SLAB_HWCACHE_ALIGN, NULL); |
443 | return dccp_li_cachep == NULL ? -ENOBUFS : 0; | 443 | return tfrc_lh_slab == NULL ? -ENOBUFS : 0; |
444 | } | 444 | } |
445 | 445 | ||
446 | void dccp_li_exit(void) | 446 | void tfrc_li_exit(void) |
447 | { | 447 | { |
448 | if (dccp_li_cachep != NULL) { | 448 | if (tfrc_lh_slab != NULL) { |
449 | kmem_cache_destroy(dccp_li_cachep); | 449 | kmem_cache_destroy(tfrc_lh_slab); |
450 | dccp_li_cachep = NULL; | 450 | tfrc_lh_slab = NULL; |
451 | } | 451 | } |
452 | } | 452 | } |
diff --git a/net/dccp/ccids/lib/tfrc.c b/net/dccp/ccids/lib/tfrc.c index 20763fa75d44..d1dfbb8de64c 100644 --- a/net/dccp/ccids/lib/tfrc.c +++ b/net/dccp/ccids/lib/tfrc.c | |||
@@ -19,12 +19,12 @@ extern void tfrc_tx_packet_history_exit(void); | |||
19 | extern int tfrc_rx_packet_history_init(void); | 19 | extern int tfrc_rx_packet_history_init(void); |
20 | extern void tfrc_rx_packet_history_exit(void); | 20 | extern void tfrc_rx_packet_history_exit(void); |
21 | 21 | ||
22 | extern int dccp_li_init(void); | 22 | extern int tfrc_li_init(void); |
23 | extern void dccp_li_exit(void); | 23 | extern void tfrc_li_exit(void); |
24 | 24 | ||
25 | static int __init tfrc_module_init(void) | 25 | static int __init tfrc_module_init(void) |
26 | { | 26 | { |
27 | int rc = dccp_li_init(); | 27 | int rc = tfrc_li_init(); |
28 | 28 | ||
29 | if (rc) | 29 | if (rc) |
30 | goto out; | 30 | goto out; |
@@ -41,7 +41,7 @@ static int __init tfrc_module_init(void) | |||
41 | out_free_tx_history: | 41 | out_free_tx_history: |
42 | tfrc_tx_packet_history_exit(); | 42 | tfrc_tx_packet_history_exit(); |
43 | out_free_loss_intervals: | 43 | out_free_loss_intervals: |
44 | dccp_li_exit(); | 44 | tfrc_li_exit(); |
45 | out: | 45 | out: |
46 | return rc; | 46 | return rc; |
47 | } | 47 | } |
@@ -50,7 +50,7 @@ static void __exit tfrc_module_exit(void) | |||
50 | { | 50 | { |
51 | tfrc_rx_packet_history_exit(); | 51 | tfrc_rx_packet_history_exit(); |
52 | tfrc_tx_packet_history_exit(); | 52 | tfrc_tx_packet_history_exit(); |
53 | dccp_li_exit(); | 53 | tfrc_li_exit(); |
54 | } | 54 | } |
55 | 55 | ||
56 | module_init(tfrc_module_init); | 56 | module_init(tfrc_module_init); |