diff options
author | Jiri Pirko <jiri@mellanox.com> | 2017-05-17 11:08:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-17 15:22:13 -0400 |
commit | db50514f9a9c7ef1f17e9921b1cc0902746872f3 (patch) | |
tree | e4af45ac3ad3c3c8c24774564873cba0b309b7a2 /include | |
parent | 9fb9f251d229f6cabd9dbe4214eb7f1e6a4e8a9d (diff) | |
download | linux-stable-db50514f9a9c7ef1f17e9921b1cc0902746872f3.tar.gz linux-stable-db50514f9a9c7ef1f17e9921b1cc0902746872f3.tar.bz2 linux-stable-db50514f9a9c7ef1f17e9921b1cc0902746872f3.zip |
net: sched: add termination action to allow goto chain
Introduce new type of termination action called "goto_chain". This allows
user to specify a chain to be processed. This action type is
then processed as a return value in tcf_classify loop in similar
way as "reclassify" is, only it does not reset to the first filter
in chain but rather reset to the first filter of the desired chain.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/act_api.h | 1 | ||||
-rw-r--r-- | include/net/sch_generic.h | 9 | ||||
-rw-r--r-- | include/uapi/linux/pkt_cls.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index b22c6f3d6710..26ffd8333f50 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -42,6 +42,7 @@ struct tc_action { struct gnet_stats_basic_cpu __percpu *cpu_bstats; struct gnet_stats_queue __percpu *cpu_qstats; struct tc_cookie *act_cookie; + struct tcf_chain *goto_chain; }; #define tcf_head common.tcfa_head #define tcf_index common.tcfa_index diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 569b5654c30c..368850194c94 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -193,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 { diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h index d613be3b3239..1b9aa9e6b4fd 100644 --- a/include/uapi/linux/pkt_cls.h +++ b/include/uapi/linux/pkt_cls.h @@ -51,6 +51,7 @@ enum { (((combined) & (~TC_ACT_EXT_VAL_MASK)) == opcode) #define TC_ACT_JUMP __TC_ACT_EXT(1) +#define TC_ACT_GOTO_CHAIN __TC_ACT_EXT(2) /* Action type identifiers*/ enum { |