]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - include/net/sch_generic.h
net: sched: add termination action to allow goto chain
[mirror_ubuntu-jammy-kernel.git] / include / net / sch_generic.h
index 22e52093bfda7fe651f4c0aafc95d18e22b5f6fd..368850194c94bd751750c40194efd262f10015c0 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/pkt_cls.h>
 #include <linux/percpu.h>
 #include <linux/dynamic_queue_limits.h>
+#include <linux/list.h>
 #include <net/gen_stats.h>
 #include <net/rtnetlink.h>
 
@@ -153,7 +154,7 @@ struct Qdisc_class_ops {
        void                    (*walk)(struct Qdisc *, struct qdisc_walker * arg);
 
        /* Filter manipulation */
-       struct tcf_proto __rcu ** (*tcf_chain)(struct Qdisc *, unsigned long);
+       struct tcf_block *      (*tcf_block)(struct Qdisc *, unsigned long);
        bool                    (*tcf_cl_offload)(u32 classid);
        unsigned long           (*bind_tcf)(struct Qdisc *, unsigned long,
                                        u32 classid);
@@ -192,8 +193,13 @@ struct Qdisc_ops {
 
 
 struct tcf_result {
-       unsigned long   class;
-       u32             classid;
+       union {
+               struct {
+                       unsigned long   class;
+                       u32             classid;
+               };
+               const struct tcf_proto *goto_tp;
+       };
 };
 
 struct tcf_proto_ops {
@@ -236,6 +242,7 @@ struct tcf_proto {
        struct Qdisc            *q;
        void                    *data;
        const struct tcf_proto_ops      *ops;
+       struct tcf_chain        *chain;
        struct rcu_head         rcu;
 };
 
@@ -247,6 +254,19 @@ struct qdisc_skb_cb {
        unsigned char           data[QDISC_CB_PRIV_LEN];
 };
 
+struct tcf_chain {
+       struct tcf_proto __rcu *filter_chain;
+       struct tcf_proto __rcu **p_filter_chain;
+       struct list_head list;
+       struct tcf_block *block;
+       u32 index; /* chain index */
+       unsigned int refcnt;
+};
+
+struct tcf_block {
+       struct list_head chain_list;
+};
+
 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
 {
        struct qdisc_skb_cb *qcb;