Commit 2bd01197 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c5de0dfd
...@@ -37,14 +37,6 @@ ...@@ -37,14 +37,6 @@
#define NFQNL_QMAX_DEFAULT 1024 #define NFQNL_QMAX_DEFAULT 1024
#if 0
#define QDEBUG(x, args ...) printk(KERN_DEBUG "%s(%d):%s(): " x, \
__FILE__, __LINE__, __FUNCTION__, \
## args)
#else
#define QDEBUG(x, ...)
#endif
struct nfqnl_instance { struct nfqnl_instance {
struct hlist_node hlist; /* global list of queues */ struct hlist_node hlist; /* global list of queues */
struct rcu_head rcu; struct rcu_head rcu;
...@@ -96,17 +88,12 @@ instance_lookup(u_int16_t queue_num) ...@@ -96,17 +88,12 @@ instance_lookup(u_int16_t queue_num)
static struct nfqnl_instance * static struct nfqnl_instance *
instance_create(u_int16_t queue_num, int pid) instance_create(u_int16_t queue_num, int pid)
{ {
struct nfqnl_instance *inst; struct nfqnl_instance *inst = NULL;
unsigned int h; unsigned int h;
QDEBUG("entering for queue_num=%u, pid=%d\n", queue_num, pid);
spin_lock(&instances_lock); spin_lock(&instances_lock);
if (instance_lookup(queue_num)) { if (instance_lookup(queue_num))
inst = NULL;
QDEBUG("aborting, instance already exists\n");
goto out_unlock; goto out_unlock;
}
inst = kzalloc(sizeof(*inst), GFP_ATOMIC); inst = kzalloc(sizeof(*inst), GFP_ATOMIC);
if (!inst) if (!inst)
...@@ -129,8 +116,6 @@ instance_create(u_int16_t queue_num, int pid) ...@@ -129,8 +116,6 @@ instance_create(u_int16_t queue_num, int pid)
spin_unlock(&instances_lock); spin_unlock(&instances_lock);
QDEBUG("successfully created new instance\n");
return inst; return inst;
out_free: out_free:
...@@ -232,8 +217,6 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue, ...@@ -232,8 +217,6 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
struct net_device *outdev; struct net_device *outdev;
__be32 tmp_uint; __be32 tmp_uint;
QDEBUG("entered\n");
size = NLMSG_ALIGN(sizeof(struct nfgenmsg)) size = NLMSG_ALIGN(sizeof(struct nfgenmsg))
+ nla_total_size(sizeof(struct nfqnl_msg_packet_hdr)) + nla_total_size(sizeof(struct nfqnl_msg_packet_hdr))
+ nla_total_size(sizeof(u_int32_t)) /* ifindex */ + nla_total_size(sizeof(u_int32_t)) /* ifindex */
...@@ -422,19 +405,13 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum) ...@@ -422,19 +405,13 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum)
struct sk_buff *nskb; struct sk_buff *nskb;
struct nfqnl_instance *queue; struct nfqnl_instance *queue;
QDEBUG("entered\n");
/* rcu_read_lock()ed by nf_hook_slow() */ /* rcu_read_lock()ed by nf_hook_slow() */
queue = instance_lookup(queuenum); queue = instance_lookup(queuenum);
if (!queue) { if (!queue)
QDEBUG("no queue instance matching\n");
return -EINVAL; return -EINVAL;
}
if (queue->copy_mode == NFQNL_COPY_NONE) { if (queue->copy_mode == NFQNL_COPY_NONE)
QDEBUG("mode COPY_NONE, aborting\n");
return -EAGAIN; return -EAGAIN;
}
nskb = nfqnl_build_packet_message(queue, entry, &status); nskb = nfqnl_build_packet_message(queue, entry, &status);
if (nskb == NULL) if (nskb == NULL)
...@@ -568,8 +545,6 @@ nfqnl_dev_drop(int ifindex) ...@@ -568,8 +545,6 @@ nfqnl_dev_drop(int ifindex)
{ {
int i; int i;
QDEBUG("entering for ifindex %u\n", ifindex);
rcu_read_lock(); rcu_read_lock();
for (i = 0; i < INSTANCE_BUCKETS; i++) { for (i = 0; i < INSTANCE_BUCKETS; i++) {
...@@ -733,8 +708,6 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb, ...@@ -733,8 +708,6 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
struct nfqnl_msg_config_cmd *cmd = NULL; struct nfqnl_msg_config_cmd *cmd = NULL;
int ret = 0; int ret = 0;
QDEBUG("entering for msg %u\n", NFNL_MSG_TYPE(nlh->nlmsg_type));
if (nfqa[NFQA_CFG_CMD]) { if (nfqa[NFQA_CFG_CMD]) {
cmd = nla_data(nfqa[NFQA_CFG_CMD]); cmd = nla_data(nfqa[NFQA_CFG_CMD]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment