diff options
Diffstat (limited to 'net/dccp/ccids/lib')
| -rw-r--r-- | net/dccp/ccids/lib/loss_interval.c | 37 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/loss_interval.h | 10 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/packet_history.c | 169 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/packet_history.h | 18 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/tfrc.h | 2 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/tfrc_equation.c | 3 |
6 files changed, 63 insertions, 176 deletions
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c index 4c01a54143ad..906c81ab9d4f 100644 --- a/net/dccp/ccids/lib/loss_interval.c +++ b/net/dccp/ccids/lib/loss_interval.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * net/dccp/ccids/lib/loss_interval.c | 2 | * net/dccp/ccids/lib/loss_interval.c |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. |
| 5 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | 5 | * Copyright (c) 2005-6 Ian McDonald <ian.mcdonald@jandi.co.nz> |
| 6 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 6 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
| @@ -11,8 +11,8 @@ | |||
| 11 | * (at your option) any later version. | 11 | * (at your option) any later version. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #include <linux/config.h> | ||
| 15 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <net/sock.h> | ||
| 16 | 16 | ||
| 17 | #include "loss_interval.h" | 17 | #include "loss_interval.h" |
| 18 | 18 | ||
| @@ -91,13 +91,13 @@ u32 dccp_li_hist_calc_i_mean(struct list_head *list) | |||
| 91 | u32 w_tot = 0; | 91 | u32 w_tot = 0; |
| 92 | 92 | ||
| 93 | list_for_each_entry_safe(li_entry, li_next, list, dccplih_node) { | 93 | list_for_each_entry_safe(li_entry, li_next, list, dccplih_node) { |
| 94 | if (i < DCCP_LI_HIST_IVAL_F_LENGTH) { | 94 | if (li_entry->dccplih_interval != ~0) { |
| 95 | i_tot0 += li_entry->dccplih_interval * dccp_li_hist_w[i]; | 95 | i_tot0 += li_entry->dccplih_interval * dccp_li_hist_w[i]; |
| 96 | w_tot += dccp_li_hist_w[i]; | 96 | w_tot += dccp_li_hist_w[i]; |
| 97 | if (i != 0) | ||
| 98 | i_tot1 += li_entry->dccplih_interval * dccp_li_hist_w[i - 1]; | ||
| 97 | } | 99 | } |
| 98 | 100 | ||
| 99 | if (i != 0) | ||
| 100 | i_tot1 += li_entry->dccplih_interval * dccp_li_hist_w[i - 1]; | ||
| 101 | 101 | ||
| 102 | if (++i > DCCP_LI_HIST_IVAL_F_LENGTH) | 102 | if (++i > DCCP_LI_HIST_IVAL_F_LENGTH) |
| 103 | break; | 103 | break; |
| @@ -108,37 +108,36 @@ u32 dccp_li_hist_calc_i_mean(struct list_head *list) | |||
| 108 | 108 | ||
| 109 | i_tot = max(i_tot0, i_tot1); | 109 | i_tot = max(i_tot0, i_tot1); |
| 110 | 110 | ||
| 111 | /* FIXME: Why do we do this? -Ian McDonald */ | 111 | if (!w_tot) { |
| 112 | if (i_tot * 4 < w_tot) | 112 | LIMIT_NETDEBUG(KERN_WARNING "%s: w_tot = 0\n", __FUNCTION__); |
| 113 | i_tot = w_tot * 4; | 113 | return 1; |
| 114 | } | ||
| 114 | 115 | ||
| 115 | return i_tot * 4 / w_tot; | 116 | return i_tot / w_tot; |
| 116 | } | 117 | } |
| 117 | 118 | ||
| 118 | EXPORT_SYMBOL_GPL(dccp_li_hist_calc_i_mean); | 119 | EXPORT_SYMBOL_GPL(dccp_li_hist_calc_i_mean); |
| 119 | 120 | ||
| 120 | struct dccp_li_hist_entry *dccp_li_hist_interval_new(struct dccp_li_hist *hist, | 121 | int dccp_li_hist_interval_new(struct dccp_li_hist *hist, |
| 121 | struct list_head *list, | 122 | struct list_head *list, const u64 seq_loss, const u8 win_loss) |
| 122 | const u64 seq_loss, | ||
| 123 | const u8 win_loss) | ||
| 124 | { | 123 | { |
| 125 | struct dccp_li_hist_entry *tail = NULL, *entry; | 124 | struct dccp_li_hist_entry *entry; |
| 126 | int i; | 125 | int i; |
| 127 | 126 | ||
| 128 | for (i = 0; i <= DCCP_LI_HIST_IVAL_F_LENGTH; ++i) { | 127 | for (i = 0; i < DCCP_LI_HIST_IVAL_F_LENGTH; i++) { |
| 129 | entry = dccp_li_hist_entry_new(hist, SLAB_ATOMIC); | 128 | entry = dccp_li_hist_entry_new(hist, SLAB_ATOMIC); |
| 130 | if (entry == NULL) { | 129 | if (entry == NULL) { |
| 131 | dccp_li_hist_purge(hist, list); | 130 | dccp_li_hist_purge(hist, list); |
| 132 | return NULL; | 131 | dump_stack(); |
| 132 | return 0; | ||
| 133 | } | 133 | } |
| 134 | if (tail == NULL) | 134 | entry->dccplih_interval = ~0; |
| 135 | tail = entry; | ||
| 136 | list_add(&entry->dccplih_node, list); | 135 | list_add(&entry->dccplih_node, list); |
| 137 | } | 136 | } |
| 138 | 137 | ||
| 139 | entry->dccplih_seqno = seq_loss; | 138 | entry->dccplih_seqno = seq_loss; |
| 140 | entry->dccplih_win_count = win_loss; | 139 | entry->dccplih_win_count = win_loss; |
| 141 | return tail; | 140 | return 1; |
| 142 | } | 141 | } |
| 143 | 142 | ||
| 144 | EXPORT_SYMBOL_GPL(dccp_li_hist_interval_new); | 143 | EXPORT_SYMBOL_GPL(dccp_li_hist_interval_new); |
diff --git a/net/dccp/ccids/lib/loss_interval.h b/net/dccp/ccids/lib/loss_interval.h index 417d9d82df3e..0ae85f0340b2 100644 --- a/net/dccp/ccids/lib/loss_interval.h +++ b/net/dccp/ccids/lib/loss_interval.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * net/dccp/ccids/lib/loss_interval.h | 4 | * net/dccp/ccids/lib/loss_interval.h |
| 5 | * | 5 | * |
| 6 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 6 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. |
| 7 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | 7 | * Copyright (c) 2005 Ian McDonald <ian.mcdonald@jandi.co.nz> |
| 8 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 8 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
| 9 | * | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
| @@ -13,7 +13,6 @@ | |||
| 13 | * any later version. | 13 | * any later version. |
| 14 | */ | 14 | */ |
| 15 | 15 | ||
| 16 | #include <linux/config.h> | ||
| 17 | #include <linux/list.h> | 16 | #include <linux/list.h> |
| 18 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 19 | #include <linux/time.h> | 18 | #include <linux/time.h> |
| @@ -53,9 +52,6 @@ extern void dccp_li_hist_purge(struct dccp_li_hist *hist, | |||
| 53 | 52 | ||
| 54 | extern u32 dccp_li_hist_calc_i_mean(struct list_head *list); | 53 | extern u32 dccp_li_hist_calc_i_mean(struct list_head *list); |
| 55 | 54 | ||
| 56 | extern struct dccp_li_hist_entry * | 55 | extern int dccp_li_hist_interval_new(struct dccp_li_hist *hist, |
| 57 | dccp_li_hist_interval_new(struct dccp_li_hist *hist, | 56 | struct list_head *list, const u64 seq_loss, const u8 win_loss); |
| 58 | struct list_head *list, | ||
| 59 | const u64 seq_loss, | ||
| 60 | const u8 win_loss); | ||
| 61 | #endif /* _DCCP_LI_HIST_ */ | 57 | #endif /* _DCCP_LI_HIST_ */ |
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c index d3f9d2053830..b876c9c81c65 100644 --- a/net/dccp/ccids/lib/packet_history.c +++ b/net/dccp/ccids/lib/packet_history.c | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * net/dccp/packet_history.h | 2 | * net/dccp/packet_history.c |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 4 | * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand. |
| 5 | * | 5 | * |
| 6 | * An implementation of the DCCP protocol | 6 | * An implementation of the DCCP protocol |
| 7 | * | 7 | * |
| 8 | * This code has been developed by the University of Waikato WAND | 8 | * This code has been developed by the University of Waikato WAND |
| 9 | * research group. For further information please see http://www.wand.net.nz/ | 9 | * research group. For further information please see http://www.wand.net.nz/ |
| 10 | * or e-mail Ian McDonald - iam4@cs.waikato.ac.nz | 10 | * or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz |
| 11 | * | 11 | * |
| 12 | * This code also uses code from Lulea University, rereleased as GPL by its | 12 | * This code also uses code from Lulea University, rereleased as GPL by its |
| 13 | * authors: | 13 | * authors: |
| @@ -34,7 +34,6 @@ | |||
| 34 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 34 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 35 | */ | 35 | */ |
| 36 | 36 | ||
| 37 | #include <linux/config.h> | ||
| 38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
| 39 | #include <linux/string.h> | 38 | #include <linux/string.h> |
| 40 | 39 | ||
| @@ -113,64 +112,27 @@ struct dccp_rx_hist_entry * | |||
| 113 | 112 | ||
| 114 | EXPORT_SYMBOL_GPL(dccp_rx_hist_find_data_packet); | 113 | EXPORT_SYMBOL_GPL(dccp_rx_hist_find_data_packet); |
| 115 | 114 | ||
| 116 | int dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, | 115 | void dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, |
| 117 | struct list_head *rx_list, | 116 | struct list_head *rx_list, |
| 118 | struct list_head *li_list, | 117 | struct list_head *li_list, |
| 119 | struct dccp_rx_hist_entry *packet) | 118 | struct dccp_rx_hist_entry *packet, |
| 119 | u64 nonloss_seqno) | ||
| 120 | { | 120 | { |
| 121 | struct dccp_rx_hist_entry *entry, *next, *iter; | 121 | struct dccp_rx_hist_entry *entry, *next; |
| 122 | u8 num_later = 0; | 122 | u8 num_later = 0; |
| 123 | 123 | ||
| 124 | iter = dccp_rx_hist_head(rx_list); | 124 | list_add(&packet->dccphrx_node, rx_list); |
| 125 | if (iter == NULL) | ||
| 126 | dccp_rx_hist_add_entry(rx_list, packet); | ||
| 127 | else { | ||
| 128 | const u64 seqno = packet->dccphrx_seqno; | ||
| 129 | |||
| 130 | if (after48(seqno, iter->dccphrx_seqno)) | ||
| 131 | dccp_rx_hist_add_entry(rx_list, packet); | ||
| 132 | else { | ||
| 133 | if (dccp_rx_hist_entry_data_packet(iter)) | ||
| 134 | num_later = 1; | ||
| 135 | |||
| 136 | list_for_each_entry_continue(iter, rx_list, | ||
| 137 | dccphrx_node) { | ||
| 138 | if (after48(seqno, iter->dccphrx_seqno)) { | ||
| 139 | dccp_rx_hist_add_entry(&iter->dccphrx_node, | ||
| 140 | packet); | ||
| 141 | goto trim_history; | ||
| 142 | } | ||
| 143 | |||
| 144 | if (dccp_rx_hist_entry_data_packet(iter)) | ||
| 145 | num_later++; | ||
| 146 | 125 | ||
| 147 | if (num_later == TFRC_RECV_NUM_LATE_LOSS) { | ||
| 148 | dccp_rx_hist_entry_delete(hist, packet); | ||
| 149 | return 1; | ||
| 150 | } | ||
| 151 | } | ||
| 152 | |||
| 153 | if (num_later < TFRC_RECV_NUM_LATE_LOSS) | ||
| 154 | dccp_rx_hist_add_entry(rx_list, packet); | ||
| 155 | /* | ||
| 156 | * FIXME: else what? should we destroy the packet | ||
| 157 | * like above? | ||
| 158 | */ | ||
| 159 | } | ||
| 160 | } | ||
| 161 | |||
| 162 | trim_history: | ||
| 163 | /* | ||
| 164 | * Trim history (remove all packets after the NUM_LATE_LOSS + 1 | ||
| 165 | * data packets) | ||
| 166 | */ | ||
| 167 | num_later = TFRC_RECV_NUM_LATE_LOSS + 1; | 126 | num_later = TFRC_RECV_NUM_LATE_LOSS + 1; |
| 168 | 127 | ||
| 169 | if (!list_empty(li_list)) { | 128 | if (!list_empty(li_list)) { |
| 170 | list_for_each_entry_safe(entry, next, rx_list, dccphrx_node) { | 129 | list_for_each_entry_safe(entry, next, rx_list, dccphrx_node) { |
| 171 | if (num_later == 0) { | 130 | if (num_later == 0) { |
| 172 | list_del_init(&entry->dccphrx_node); | 131 | if (after48(nonloss_seqno, |
| 173 | dccp_rx_hist_entry_delete(hist, entry); | 132 | entry->dccphrx_seqno)) { |
| 133 | list_del_init(&entry->dccphrx_node); | ||
| 134 | dccp_rx_hist_entry_delete(hist, entry); | ||
| 135 | } | ||
| 174 | } else if (dccp_rx_hist_entry_data_packet(entry)) | 136 | } else if (dccp_rx_hist_entry_data_packet(entry)) |
| 175 | --num_later; | 137 | --num_later; |
| 176 | } | 138 | } |
| @@ -218,94 +180,10 @@ trim_history: | |||
| 218 | --num_later; | 180 | --num_later; |
| 219 | } | 181 | } |
| 220 | } | 182 | } |
| 221 | |||
| 222 | return 0; | ||
| 223 | } | 183 | } |
| 224 | 184 | ||
| 225 | EXPORT_SYMBOL_GPL(dccp_rx_hist_add_packet); | 185 | EXPORT_SYMBOL_GPL(dccp_rx_hist_add_packet); |
| 226 | 186 | ||
| 227 | u64 dccp_rx_hist_detect_loss(struct list_head *rx_list, | ||
| 228 | struct list_head *li_list, u8 *win_loss) | ||
| 229 | { | ||
| 230 | struct dccp_rx_hist_entry *entry, *next, *packet; | ||
| 231 | struct dccp_rx_hist_entry *a_loss = NULL; | ||
| 232 | struct dccp_rx_hist_entry *b_loss = NULL; | ||
| 233 | u64 seq_loss = DCCP_MAX_SEQNO + 1; | ||
| 234 | u8 num_later = TFRC_RECV_NUM_LATE_LOSS; | ||
| 235 | |||
| 236 | list_for_each_entry_safe(entry, next, rx_list, dccphrx_node) { | ||
| 237 | if (num_later == 0) { | ||
| 238 | b_loss = entry; | ||
| 239 | break; | ||
| 240 | } else if (dccp_rx_hist_entry_data_packet(entry)) | ||
| 241 | --num_later; | ||
| 242 | } | ||
| 243 | |||
| 244 | if (b_loss == NULL) | ||
| 245 | goto out; | ||
| 246 | |||
| 247 | num_later = 1; | ||
| 248 | list_for_each_entry_safe_continue(entry, next, rx_list, dccphrx_node) { | ||
| 249 | if (num_later == 0) { | ||
| 250 | a_loss = entry; | ||
| 251 | break; | ||
| 252 | } else if (dccp_rx_hist_entry_data_packet(entry)) | ||
| 253 | --num_later; | ||
| 254 | } | ||
| 255 | |||
| 256 | if (a_loss == NULL) { | ||
| 257 | if (list_empty(li_list)) { | ||
| 258 | /* no loss event have occured yet */ | ||
| 259 | LIMIT_NETDEBUG("%s: TODO: find a lost data packet by " | ||
| 260 | "comparing to initial seqno\n", | ||
| 261 | __FUNCTION__); | ||
| 262 | goto out; | ||
| 263 | } else { | ||
| 264 | LIMIT_NETDEBUG("%s: Less than 4 data pkts in history!", | ||
| 265 | __FUNCTION__); | ||
| 266 | goto out; | ||
| 267 | } | ||
| 268 | } | ||
| 269 | |||
| 270 | /* Locate a lost data packet */ | ||
| 271 | entry = packet = b_loss; | ||
| 272 | list_for_each_entry_safe_continue(entry, next, rx_list, dccphrx_node) { | ||
| 273 | u64 delta = dccp_delta_seqno(entry->dccphrx_seqno, | ||
| 274 | packet->dccphrx_seqno); | ||
| 275 | |||
| 276 | if (delta != 0) { | ||
| 277 | if (dccp_rx_hist_entry_data_packet(packet)) | ||
| 278 | --delta; | ||
| 279 | /* | ||
| 280 | * FIXME: check this, probably this % usage is because | ||
| 281 | * in earlier drafts the ndp count was just 8 bits | ||
| 282 | * long, but now it cam be up to 24 bits long. | ||
| 283 | */ | ||
| 284 | #if 0 | ||
| 285 | if (delta % DCCP_NDP_LIMIT != | ||
| 286 | (packet->dccphrx_ndp - | ||
| 287 | entry->dccphrx_ndp) % DCCP_NDP_LIMIT) | ||
| 288 | #endif | ||
| 289 | if (delta != packet->dccphrx_ndp - entry->dccphrx_ndp) { | ||
| 290 | seq_loss = entry->dccphrx_seqno; | ||
| 291 | dccp_inc_seqno(&seq_loss); | ||
| 292 | } | ||
| 293 | } | ||
| 294 | packet = entry; | ||
| 295 | if (packet == a_loss) | ||
| 296 | break; | ||
| 297 | } | ||
| 298 | out: | ||
| 299 | if (seq_loss != DCCP_MAX_SEQNO + 1) | ||
| 300 | *win_loss = a_loss->dccphrx_ccval; | ||
| 301 | else | ||
| 302 | *win_loss = 0; /* Paranoia */ | ||
| 303 | |||
| 304 | return seq_loss; | ||
| 305 | } | ||
| 306 | |||
| 307 | EXPORT_SYMBOL_GPL(dccp_rx_hist_detect_loss); | ||
| 308 | |||
| 309 | struct dccp_tx_hist *dccp_tx_hist_new(const char *name) | 187 | struct dccp_tx_hist *dccp_tx_hist_new(const char *name) |
| 310 | { | 188 | { |
| 311 | struct dccp_tx_hist *hist = kmalloc(sizeof(*hist), GFP_ATOMIC); | 189 | struct dccp_tx_hist *hist = kmalloc(sizeof(*hist), GFP_ATOMIC); |
| @@ -366,6 +244,25 @@ struct dccp_tx_hist_entry * | |||
| 366 | 244 | ||
| 367 | EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry); | 245 | EXPORT_SYMBOL_GPL(dccp_tx_hist_find_entry); |
| 368 | 246 | ||
| 247 | int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, | ||
| 248 | u8 *ccval) | ||
| 249 | { | ||
| 250 | struct dccp_rx_hist_entry *packet = NULL, *entry; | ||
| 251 | |||
| 252 | list_for_each_entry(entry, list, dccphrx_node) | ||
| 253 | if (entry->dccphrx_seqno == seq) { | ||
| 254 | packet = entry; | ||
| 255 | break; | ||
| 256 | } | ||
| 257 | |||
| 258 | if (packet) | ||
| 259 | *ccval = packet->dccphrx_ccval; | ||
| 260 | |||
| 261 | return packet != NULL; | ||
| 262 | } | ||
| 263 | |||
| 264 | EXPORT_SYMBOL_GPL(dccp_rx_hist_find_entry); | ||
| 265 | |||
| 369 | void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist, | 266 | void dccp_tx_hist_purge_older(struct dccp_tx_hist *hist, |
| 370 | struct list_head *list, | 267 | struct list_head *list, |
| 371 | struct dccp_tx_hist_entry *packet) | 268 | struct dccp_tx_hist_entry *packet) |
| @@ -392,7 +289,7 @@ void dccp_tx_hist_purge(struct dccp_tx_hist *hist, struct list_head *list) | |||
| 392 | 289 | ||
| 393 | EXPORT_SYMBOL_GPL(dccp_tx_hist_purge); | 290 | EXPORT_SYMBOL_GPL(dccp_tx_hist_purge); |
| 394 | 291 | ||
| 395 | MODULE_AUTHOR("Ian McDonald <iam4@cs.waikato.ac.nz>, " | 292 | MODULE_AUTHOR("Ian McDonald <ian.mcdonald@jandi.co.nz>, " |
| 396 | "Arnaldo Carvalho de Melo <acme@ghostprotocols.net>"); | 293 | "Arnaldo Carvalho de Melo <acme@ghostprotocols.net>"); |
| 397 | MODULE_DESCRIPTION("DCCP TFRC library"); | 294 | MODULE_DESCRIPTION("DCCP TFRC library"); |
| 398 | MODULE_LICENSE("GPL"); | 295 | MODULE_LICENSE("GPL"); |
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h index 122e96737ff6..067cf1c85a37 100644 --- a/net/dccp/ccids/lib/packet_history.h +++ b/net/dccp/ccids/lib/packet_history.h | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * net/dccp/packet_history.h | 2 | * net/dccp/packet_history.h |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 4 | * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand. |
| 5 | * | 5 | * |
| 6 | * An implementation of the DCCP protocol | 6 | * An implementation of the DCCP protocol |
| 7 | * | 7 | * |
| 8 | * This code has been developed by the University of Waikato WAND | 8 | * This code has been developed by the University of Waikato WAND |
| 9 | * research group. For further information please see http://www.wand.net.nz/ | 9 | * research group. For further information please see http://www.wand.net.nz/ |
| 10 | * or e-mail Ian McDonald - iam4@cs.waikato.ac.nz | 10 | * or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz |
| 11 | * | 11 | * |
| 12 | * This code also uses code from Lulea University, rereleased as GPL by its | 12 | * This code also uses code from Lulea University, rereleased as GPL by its |
| 13 | * authors: | 13 | * authors: |
| @@ -37,7 +37,6 @@ | |||
| 37 | #ifndef _DCCP_PKT_HIST_ | 37 | #ifndef _DCCP_PKT_HIST_ |
| 38 | #define _DCCP_PKT_HIST_ | 38 | #define _DCCP_PKT_HIST_ |
| 39 | 39 | ||
| 40 | #include <linux/config.h> | ||
| 41 | #include <linux/list.h> | 40 | #include <linux/list.h> |
| 42 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
| 43 | #include <linux/time.h> | 42 | #include <linux/time.h> |
| @@ -107,6 +106,8 @@ static inline void dccp_tx_hist_entry_delete(struct dccp_tx_hist *hist, | |||
| 107 | extern struct dccp_tx_hist_entry * | 106 | extern struct dccp_tx_hist_entry * |
| 108 | dccp_tx_hist_find_entry(const struct list_head *list, | 107 | dccp_tx_hist_find_entry(const struct list_head *list, |
| 109 | const u64 seq); | 108 | const u64 seq); |
| 109 | extern int dccp_rx_hist_find_entry(const struct list_head *list, const u64 seq, | ||
| 110 | u8 *ccval); | ||
| 110 | 111 | ||
| 111 | static inline void dccp_tx_hist_add_entry(struct list_head *list, | 112 | static inline void dccp_tx_hist_add_entry(struct list_head *list, |
| 112 | struct dccp_tx_hist_entry *entry) | 113 | struct dccp_tx_hist_entry *entry) |
| @@ -165,12 +166,6 @@ static inline void dccp_rx_hist_entry_delete(struct dccp_rx_hist *hist, | |||
| 165 | extern void dccp_rx_hist_purge(struct dccp_rx_hist *hist, | 166 | extern void dccp_rx_hist_purge(struct dccp_rx_hist *hist, |
| 166 | struct list_head *list); | 167 | struct list_head *list); |
| 167 | 168 | ||
| 168 | static inline void dccp_rx_hist_add_entry(struct list_head *list, | ||
| 169 | struct dccp_rx_hist_entry *entry) | ||
| 170 | { | ||
| 171 | list_add(&entry->dccphrx_node, list); | ||
| 172 | } | ||
| 173 | |||
| 174 | static inline struct dccp_rx_hist_entry * | 169 | static inline struct dccp_rx_hist_entry * |
| 175 | dccp_rx_hist_head(struct list_head *list) | 170 | dccp_rx_hist_head(struct list_head *list) |
| 176 | { | 171 | { |
| @@ -189,10 +184,11 @@ static inline int | |||
| 189 | entry->dccphrx_type == DCCP_PKT_DATAACK; | 184 | entry->dccphrx_type == DCCP_PKT_DATAACK; |
| 190 | } | 185 | } |
| 191 | 186 | ||
| 192 | extern int dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, | 187 | extern void dccp_rx_hist_add_packet(struct dccp_rx_hist *hist, |
| 193 | struct list_head *rx_list, | 188 | struct list_head *rx_list, |
| 194 | struct list_head *li_list, | 189 | struct list_head *li_list, |
| 195 | struct dccp_rx_hist_entry *packet); | 190 | struct dccp_rx_hist_entry *packet, |
| 191 | u64 nonloss_seqno); | ||
| 196 | 192 | ||
| 197 | extern u64 dccp_rx_hist_detect_loss(struct list_head *rx_list, | 193 | extern u64 dccp_rx_hist_detect_loss(struct list_head *rx_list, |
| 198 | struct list_head *li_list, u8 *win_loss); | 194 | struct list_head *li_list, u8 *win_loss); |
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h index 130c4c40cfe3..45f30f59ea2a 100644 --- a/net/dccp/ccids/lib/tfrc.h +++ b/net/dccp/ccids/lib/tfrc.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * net/dccp/ccids/lib/tfrc.h | 4 | * net/dccp/ccids/lib/tfrc.h |
| 5 | * | 5 | * |
| 6 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 6 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. |
| 7 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | 7 | * Copyright (c) 2005 Ian McDonald <ian.mcdonald@jandi.co.nz> |
| 8 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 8 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
| 9 | * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon | 9 | * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon |
| 10 | * | 10 | * |
diff --git a/net/dccp/ccids/lib/tfrc_equation.c b/net/dccp/ccids/lib/tfrc_equation.c index add3cae65e2d..44076e0c6591 100644 --- a/net/dccp/ccids/lib/tfrc_equation.c +++ b/net/dccp/ccids/lib/tfrc_equation.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * net/dccp/ccids/lib/tfrc_equation.c | 2 | * net/dccp/ccids/lib/tfrc_equation.c |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. | 4 | * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. |
| 5 | * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> | 5 | * Copyright (c) 2005 Ian McDonald <ian.mcdonald@jandi.co.nz> |
| 6 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 6 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
| 7 | * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon | 7 | * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon |
| 8 | * | 8 | * |
| @@ -12,7 +12,6 @@ | |||
| 12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #include <linux/config.h> | ||
| 16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 17 | 16 | ||
| 18 | #include <asm/div64.h> | 17 | #include <asm/div64.h> |
