diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2007-12-06 09:26:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:39 -0500 |
commit | c40616c597bf02a2346cbf2f120283734b436245 (patch) | |
tree | 2fb6f82ed8fec01038f4607b489086a8f2a719f9 /net/dccp/ccids/lib/tfrc.h | |
parent | f8b33fdfafea0f909712a55fbb3d83b89f70f3f5 (diff) |
[TFRC]: Provide central source file and debug facility
This patch changes the tfrc_lib module in the following manner:
(1) a dedicated tfrc source file to call the packet history &
loss interval init/exit functions.
(2) a dedicated tfrc_pr_debug macro with toggle switch `tfrc_debug'.
Commiter note: renamed tfrc_module.c to tfrc.c, and made CONFIG_IP_DCCP_CCID3
select IP_DCCP_TFRC_LIB.
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/tfrc.h')
-rw-r--r-- | net/dccp/ccids/lib/tfrc.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h index 5a0ba86df183..ab8848c0f8c9 100644 --- a/net/dccp/ccids/lib/tfrc.h +++ b/net/dccp/ccids/lib/tfrc.h | |||
@@ -3,10 +3,11 @@ | |||
3 | /* | 3 | /* |
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) 2007 The University of Aberdeen, Scotland, UK |
7 | * Copyright (c) 2005 Ian McDonald <ian.mcdonald@jandi.co.nz> | 7 | * Copyright (c) 2005-6 The University of Waikato, Hamilton, New Zealand. |
8 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 8 | * Copyright (c) 2005-6 Ian McDonald <ian.mcdonald@jandi.co.nz> |
9 | * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon | 9 | * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
10 | * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon | ||
10 | * | 11 | * |
11 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 13 | * it under the terms of the GNU General Public License as published by |
@@ -15,6 +16,14 @@ | |||
15 | */ | 16 | */ |
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
17 | #include <asm/div64.h> | 18 | #include <asm/div64.h> |
19 | #include "../../dccp.h" | ||
20 | |||
21 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG | ||
22 | extern int tfrc_debug; | ||
23 | #define tfrc_pr_debug(format, a...) DCCP_PR_DEBUG(tfrc_debug, format, ##a) | ||
24 | #else | ||
25 | #define tfrc_pr_debug(format, a...) | ||
26 | #endif | ||
18 | 27 | ||
19 | /* integer-arithmetic divisions of type (a * 1000000)/b */ | 28 | /* integer-arithmetic divisions of type (a * 1000000)/b */ |
20 | static inline u64 scaled_div(u64 a, u32 b) | 29 | static inline u64 scaled_div(u64 a, u32 b) |