summaryrefslogtreecommitdiff
path: root/net/netfilter/xt_qtaguid_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/netfilter/xt_qtaguid_internal.h')
-rw-r--r--net/netfilter/xt_qtaguid_internal.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/net/netfilter/xt_qtaguid_internal.h b/net/netfilter/xt_qtaguid_internal.h
index d39ee89a9a2c..fdce0d006d30 100644
--- a/net/netfilter/xt_qtaguid_internal.h
+++ b/net/netfilter/xt_qtaguid_internal.h
@@ -15,31 +15,33 @@
#include <linux/spinlock_types.h>
#include <linux/workqueue.h>
-/* Define/comment out these *DEBUG to compile in/out the pr_debug calls. */
/* Iface handling */
-#define IDEBUG
+#define IDEBUG_MASK (1<<0)
/* Iptable Matching. Per packet. */
-#define MDEBUG
+#define MDEBUG_MASK (1<<1)
/* Red-black tree handling. Per packet. */
-#define RDEBUG
+#define RDEBUG_MASK (1<<2)
/* procfs ctrl/stats handling */
-#define CDEBUG
+#define CDEBUG_MASK (1<<3)
/* dev and resource tracking */
-#define DDEBUG
+#define DDEBUG_MASK (1<<4)
/* E.g (IDEBUG_MASK | CDEBUG_MASK | DDEBUG_MASK) */
#define DEFAULT_DEBUG_MASK 0
+/*
+ * (Un)Define these *DEBUG to compile out/in the pr_debug calls.
+ * All undef: text size ~ 0x3030; all def: ~ 0x4404.
+ */
+#define IDEBUG
+#define MDEBUG
+#define RDEBUG
+#define CDEBUG
+#define DDEBUG
-#define IDEBUG_MASK (1<<0)
-#define MDEBUG_MASK (1<<1)
-#define RDEBUG_MASK (1<<2)
-#define CDEBUG_MASK (1<<3)
-#define DDEBUG_MASK (1<<4)
-
-#define MSK_DEBUG(mask, ...) do { \
- if (unlikely(debug_mask & (mask))) \
- pr_debug(__VA_ARGS__); \
+#define MSK_DEBUG(mask, ...) do { \
+ if (unlikely(qtaguid_debug_mask & (mask))) \
+ pr_debug(__VA_ARGS__); \
} while (0)
#ifdef IDEBUG
#define IF_DEBUG(...) MSK_DEBUG(IDEBUG_MASK, __VA_ARGS__)
@@ -67,7 +69,7 @@
#define DR_DEBUG(...) no_printk(__VA_ARGS__)
#endif
-extern uint debug_mask;
+extern uint qtaguid_debug_mask;
/*---------------------------------------------------------------------------*/
/*
@@ -286,6 +288,8 @@ struct uid_tag_data {
* For the uid, how many accounting tags have been set.
*/
int num_active_tags;
+ /* Track the number of proc_qtu_data that reference it */
+ int num_pqd;
struct rb_root tag_ref_tree;
/* No tag_node_tree_lock; use uid_tag_data_tree_lock */
};