diff options
author | Patrick McHardy <kaber@trash.net> | 2007-12-05 04:29:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:20 -0500 |
commit | 2bd0119729cb4eac88c6161b3e1a3c3ebbb4768e (patch) | |
tree | 5be8e84b7f0951e29e66e97a57246ccb2aa176ad /net | |
parent | c5de0dfde8b0c5ea3d8b3040db1967f9c1d9748e (diff) |
[NETFILTER]: nfnetlink_queue: remove useless debugging
Originally I wanted to just remove the QDEBUG macro and use pr_debug, but
none of the messages seems worth keeping.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nfnetlink_queue.c | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 37b7655df910..c3aba1e8c5c4 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -37,14 +37,6 @@ | |||
37 | 37 | ||
38 | #define NFQNL_QMAX_DEFAULT 1024 | 38 | #define NFQNL_QMAX_DEFAULT 1024 |
39 | 39 | ||
40 | #if 0 | ||
41 | #define QDEBUG(x, args ...) printk(KERN_DEBUG "%s(%d):%s(): " x, \ | ||
42 | __FILE__, __LINE__, __FUNCTION__, \ | ||
43 | ## args) | ||
44 | #else | ||
45 | #define QDEBUG(x, ...) | ||
46 | #endif | ||
47 | |||
48 | struct nfqnl_instance { | 40 | struct nfqnl_instance { |
49 | struct hlist_node hlist; /* global list of queues */ | 41 | struct hlist_node hlist; /* global list of queues */ |
50 | struct rcu_head rcu; | 42 | struct rcu_head rcu; |
@@ -96,17 +88,12 @@ instance_lookup(u_int16_t queue_num) | |||
96 | static struct nfqnl_instance * | 88 | static struct nfqnl_instance * |
97 | instance_create(u_int16_t queue_num, int pid) | 89 | instance_create(u_int16_t queue_num, int pid) |
98 | { | 90 | { |
99 | struct nfqnl_instance *inst; | 91 | struct nfqnl_instance *inst = NULL; |
100 | unsigned int h; | 92 | unsigned int h; |
101 | 93 | ||
102 | QDEBUG("entering for queue_num=%u, pid=%d\n", queue_num, pid); | ||
103 | |||
104 | spin_lock(&instances_lock); | 94 | spin_lock(&instances_lock); |
105 | if (instance_lookup(queue_num)) { | 95 | if (instance_lookup(queue_num)) |
106 | inst = NULL; | ||
107 | QDEBUG("aborting, instance already exists\n"); | ||
108 | goto out_unlock; | 96 | goto out_unlock; |
109 | } | ||
110 | 97 | ||
111 | inst = kzalloc(sizeof(*inst), GFP_ATOMIC); | 98 | inst = kzalloc(sizeof(*inst), GFP_ATOMIC); |
112 | if (!inst) | 99 | if (!inst) |
@@ -129,8 +116,6 @@ instance_create(u_int16_t queue_num, int pid) | |||
129 | 116 | ||
130 | spin_unlock(&instances_lock); | 117 | spin_unlock(&instances_lock); |
131 | 118 | ||
132 | QDEBUG("successfully created new instance\n"); | ||
133 | |||
134 | return inst; | 119 | return inst; |
135 | 120 | ||
136 | out_free: | 121 | out_free: |
@@ -232,8 +217,6 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue, | |||
232 | struct net_device *outdev; | 217 | struct net_device *outdev; |
233 | __be32 tmp_uint; | 218 | __be32 tmp_uint; |
234 | 219 | ||
235 | QDEBUG("entered\n"); | ||
236 | |||
237 | size = NLMSG_ALIGN(sizeof(struct nfgenmsg)) | 220 | size = NLMSG_ALIGN(sizeof(struct nfgenmsg)) |
238 | + nla_total_size(sizeof(struct nfqnl_msg_packet_hdr)) | 221 | + nla_total_size(sizeof(struct nfqnl_msg_packet_hdr)) |
239 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ | 222 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ |
@@ -422,19 +405,13 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum) | |||
422 | struct sk_buff *nskb; | 405 | struct sk_buff *nskb; |
423 | struct nfqnl_instance *queue; | 406 | struct nfqnl_instance *queue; |
424 | 407 | ||
425 | QDEBUG("entered\n"); | ||
426 | |||
427 | /* rcu_read_lock()ed by nf_hook_slow() */ | 408 | /* rcu_read_lock()ed by nf_hook_slow() */ |
428 | queue = instance_lookup(queuenum); | 409 | queue = instance_lookup(queuenum); |
429 | if (!queue) { | 410 | if (!queue) |
430 | QDEBUG("no queue instance matching\n"); | ||
431 | return -EINVAL; | 411 | return -EINVAL; |
432 | } | ||
433 | 412 | ||
434 | if (queue->copy_mode == NFQNL_COPY_NONE) { | 413 | if (queue->copy_mode == NFQNL_COPY_NONE) |
435 | QDEBUG("mode COPY_NONE, aborting\n"); | ||
436 | return -EAGAIN; | 414 | return -EAGAIN; |
437 | } | ||
438 | 415 | ||
439 | nskb = nfqnl_build_packet_message(queue, entry, &status); | 416 | nskb = nfqnl_build_packet_message(queue, entry, &status); |
440 | if (nskb == NULL) | 417 | if (nskb == NULL) |
@@ -568,8 +545,6 @@ nfqnl_dev_drop(int ifindex) | |||
568 | { | 545 | { |
569 | int i; | 546 | int i; |
570 | 547 | ||
571 | QDEBUG("entering for ifindex %u\n", ifindex); | ||
572 | |||
573 | rcu_read_lock(); | 548 | rcu_read_lock(); |
574 | 549 | ||
575 | for (i = 0; i < INSTANCE_BUCKETS; i++) { | 550 | for (i = 0; i < INSTANCE_BUCKETS; i++) { |
@@ -733,8 +708,6 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb, | |||
733 | struct nfqnl_msg_config_cmd *cmd = NULL; | 708 | struct nfqnl_msg_config_cmd *cmd = NULL; |
734 | int ret = 0; | 709 | int ret = 0; |
735 | 710 | ||
736 | QDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type)); | ||
737 | |||
738 | if (nfqa[NFQA_CFG_CMD]) { | 711 | if (nfqa[NFQA_CFG_CMD]) { |
739 | cmd = nla_data(nfqa[NFQA_CFG_CMD]); | 712 | cmd = nla_data(nfqa[NFQA_CFG_CMD]); |
740 | 713 | ||