Merge tag 'firewire-update2' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee139...
[deliverable/linux.git] / include / net / act_api.h
index 342be6c5ab5c391eace6b9a0a0d776780afd283c..2a19fe111c78836629bd914086b17a48f96c472c 100644 (file)
@@ -78,11 +78,6 @@ static inline void tcf_lastuse_update(struct tcf_t *tm)
                tm->lastuse = now;
 }
 
-#ifdef CONFIG_NET_CLS_ACT
-
-#define ACT_P_CREATED 1
-#define ACT_P_DELETED 1
-
 struct tc_action {
        void                    *priv;
        const struct tc_action_ops      *ops;
@@ -92,6 +87,11 @@ struct tc_action {
        struct tcf_hashinfo     *hinfo;
 };
 
+#ifdef CONFIG_NET_CLS_ACT
+
+#define ACT_P_CREATED 1
+#define ACT_P_DELETED 1
+
 struct tc_action_ops {
        struct list_head head;
        char    kind[IFNAMSIZ];
@@ -171,5 +171,16 @@ int tcf_action_dump(struct sk_buff *skb, struct list_head *, int, int);
 int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int);
 int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int);
 int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int);
+
+#define tc_no_actions(_exts) \
+       (list_empty(&(_exts)->actions))
+
+#define tc_for_each_action(_a, _exts) \
+       list_for_each_entry(a, &(_exts)->actions, list)
+#else /* CONFIG_NET_CLS_ACT */
+
+#define tc_no_actions(_exts) true
+#define tc_for_each_action(_a, _exts) while (0)
+
 #endif /* CONFIG_NET_CLS_ACT */
 #endif
This page took 0.025642 seconds and 5 git commands to generate.