diff options
author | Andrea Bittau <a.bittau@cs.ucl.ac.uk> | 2006-09-19 16:12:44 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:19:39 -0400 |
commit | 8d424f6ca2d02026dadff409770639d720375afb (patch) | |
tree | 5132c78f1e1aec21b9d264e416c490c4c7a119df /net/dccp | |
parent | 446dec30c7f305ed1bb0092b0a8d9367d842a33f (diff) |
[DCCP] CCID2: Add Kconfig option for CCID2 debug
Allow the user to choose whether or not to enable CCID2 debugging via
Kconfig.
Signed-off-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ccids/Kconfig | 8 | ||||
-rw-r--r-- | net/dccp/ccids/ccid2.c | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/net/dccp/ccids/Kconfig b/net/dccp/ccids/Kconfig index ca00191628f7..32752f750447 100644 --- a/net/dccp/ccids/Kconfig +++ b/net/dccp/ccids/Kconfig | |||
@@ -30,6 +30,14 @@ config IP_DCCP_CCID2 | |||
30 | 30 | ||
31 | If in doubt, say M. | 31 | If in doubt, say M. |
32 | 32 | ||
33 | config IP_DCCP_CCID2_DEBUG | ||
34 | bool "CCID2 debug" | ||
35 | depends on IP_DCCP_CCID2 | ||
36 | ---help--- | ||
37 | Enable CCID2 debug messages. | ||
38 | |||
39 | If in doubt, say N. | ||
40 | |||
33 | config IP_DCCP_CCID3 | 41 | config IP_DCCP_CCID3 |
34 | tristate "CCID3 (TCP-Friendly) (EXPERIMENTAL)" | 42 | tristate "CCID3 (TCP-Friendly) (EXPERIMENTAL)" |
35 | depends on IP_DCCP | 43 | depends on IP_DCCP |
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index e0acd1ba4e88..dbcda7e868b7 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -35,8 +35,7 @@ | |||
35 | 35 | ||
36 | static int ccid2_debug; | 36 | static int ccid2_debug; |
37 | 37 | ||
38 | #undef CCID2_DEBUG | 38 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG |
39 | #ifdef CCID2_DEBUG | ||
40 | #define ccid2_pr_debug(format, a...) \ | 39 | #define ccid2_pr_debug(format, a...) \ |
41 | do { if (ccid2_debug) \ | 40 | do { if (ccid2_debug) \ |
42 | printk(KERN_DEBUG "%s: " format, __FUNCTION__, ##a); \ | 41 | printk(KERN_DEBUG "%s: " format, __FUNCTION__, ##a); \ |
@@ -47,7 +46,7 @@ static int ccid2_debug; | |||
47 | 46 | ||
48 | static const int ccid2_seq_len = 128; | 47 | static const int ccid2_seq_len = 128; |
49 | 48 | ||
50 | #ifdef CCID2_DEBUG | 49 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG |
51 | static void ccid2_hc_tx_check_sanity(const struct ccid2_hc_tx_sock *hctx) | 50 | static void ccid2_hc_tx_check_sanity(const struct ccid2_hc_tx_sock *hctx) |
52 | { | 51 | { |
53 | int len = 0; | 52 | int len = 0; |
@@ -295,7 +294,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, int len) | |||
295 | if (!timer_pending(&hctx->ccid2hctx_rtotimer)) | 294 | if (!timer_pending(&hctx->ccid2hctx_rtotimer)) |
296 | ccid2_start_rto_timer(sk); | 295 | ccid2_start_rto_timer(sk); |
297 | 296 | ||
298 | #ifdef CCID2_DEBUG | 297 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG |
299 | ccid2_pr_debug("pipe=%d\n", hctx->ccid2hctx_pipe); | 298 | ccid2_pr_debug("pipe=%d\n", hctx->ccid2hctx_pipe); |
300 | ccid2_pr_debug("Sent: seq=%llu\n", seq); | 299 | ccid2_pr_debug("Sent: seq=%llu\n", seq); |
301 | do { | 300 | do { |