diff options
Diffstat (limited to 'include/net/pkt_cls.h')
| -rw-r--r-- | include/net/pkt_cls.h | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 20b059574e60..ef727f71336e 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
| @@ -7,12 +7,16 @@ | |||
| 7 | #include <net/sch_generic.h> | 7 | #include <net/sch_generic.h> |
| 8 | #include <net/act_api.h> | 8 | #include <net/act_api.h> |
| 9 | 9 | ||
| 10 | /* TC action not accessible from user space */ | ||
| 11 | #define TC_ACT_REINSERT (TC_ACT_VALUE_MAX + 1) | ||
| 12 | |||
| 10 | /* Basic packet classifier frontend definitions. */ | 13 | /* Basic packet classifier frontend definitions. */ |
| 11 | 14 | ||
| 12 | struct tcf_walker { | 15 | struct tcf_walker { |
| 13 | int stop; | 16 | int stop; |
| 14 | int skip; | 17 | int skip; |
| 15 | int count; | 18 | int count; |
| 19 | unsigned long cookie; | ||
| 16 | int (*fn)(struct tcf_proto *, void *node, struct tcf_walker *); | 20 | int (*fn)(struct tcf_proto *, void *node, struct tcf_walker *); |
| 17 | }; | 21 | }; |
| 18 | 22 | ||
| @@ -36,9 +40,9 @@ struct tcf_block_cb; | |||
| 36 | bool tcf_queue_work(struct rcu_work *rwork, work_func_t func); | 40 | bool tcf_queue_work(struct rcu_work *rwork, work_func_t func); |
| 37 | 41 | ||
| 38 | #ifdef CONFIG_NET_CLS | 42 | #ifdef CONFIG_NET_CLS |
| 39 | struct tcf_chain *tcf_chain_get(struct tcf_block *block, u32 chain_index, | 43 | struct tcf_chain *tcf_chain_get_by_act(struct tcf_block *block, |
| 40 | bool create); | 44 | u32 chain_index); |
| 41 | void tcf_chain_put(struct tcf_chain *chain); | 45 | void tcf_chain_put_by_act(struct tcf_chain *chain); |
| 42 | void tcf_block_netif_keep_dst(struct tcf_block *block); | 46 | void tcf_block_netif_keep_dst(struct tcf_block *block); |
| 43 | int tcf_block_get(struct tcf_block **p_block, | 47 | int tcf_block_get(struct tcf_block **p_block, |
| 44 | struct tcf_proto __rcu **p_filter_chain, struct Qdisc *q, | 48 | struct tcf_proto __rcu **p_filter_chain, struct Qdisc *q, |
| @@ -73,11 +77,13 @@ void tcf_block_cb_incref(struct tcf_block_cb *block_cb); | |||
| 73 | unsigned int tcf_block_cb_decref(struct tcf_block_cb *block_cb); | 77 | unsigned int tcf_block_cb_decref(struct tcf_block_cb *block_cb); |
| 74 | struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block, | 78 | struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block, |
| 75 | tc_setup_cb_t *cb, void *cb_ident, | 79 | tc_setup_cb_t *cb, void *cb_ident, |
| 76 | void *cb_priv); | 80 | void *cb_priv, |
| 81 | struct netlink_ext_ack *extack); | ||
| 77 | int tcf_block_cb_register(struct tcf_block *block, | 82 | int tcf_block_cb_register(struct tcf_block *block, |
| 78 | tc_setup_cb_t *cb, void *cb_ident, | 83 | tc_setup_cb_t *cb, void *cb_ident, |
| 79 | void *cb_priv); | 84 | void *cb_priv, struct netlink_ext_ack *extack); |
| 80 | void __tcf_block_cb_unregister(struct tcf_block_cb *block_cb); | 85 | void __tcf_block_cb_unregister(struct tcf_block *block, |
| 86 | struct tcf_block_cb *block_cb); | ||
| 81 | void tcf_block_cb_unregister(struct tcf_block *block, | 87 | void tcf_block_cb_unregister(struct tcf_block *block, |
| 82 | tc_setup_cb_t *cb, void *cb_ident); | 88 | tc_setup_cb_t *cb, void *cb_ident); |
| 83 | 89 | ||
| @@ -111,11 +117,6 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q, | |||
| 111 | { | 117 | { |
| 112 | } | 118 | } |
| 113 | 119 | ||
| 114 | static inline bool tcf_block_shared(struct tcf_block *block) | ||
| 115 | { | ||
| 116 | return false; | ||
| 117 | } | ||
| 118 | |||
| 119 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) | 120 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) |
| 120 | { | 121 | { |
| 121 | return NULL; | 122 | return NULL; |
| @@ -166,7 +167,8 @@ unsigned int tcf_block_cb_decref(struct tcf_block_cb *block_cb) | |||
| 166 | static inline | 167 | static inline |
| 167 | struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block, | 168 | struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block, |
| 168 | tc_setup_cb_t *cb, void *cb_ident, | 169 | tc_setup_cb_t *cb, void *cb_ident, |
| 169 | void *cb_priv) | 170 | void *cb_priv, |
| 171 | struct netlink_ext_ack *extack) | ||
| 170 | { | 172 | { |
| 171 | return NULL; | 173 | return NULL; |
| 172 | } | 174 | } |
| @@ -174,13 +176,14 @@ struct tcf_block_cb *__tcf_block_cb_register(struct tcf_block *block, | |||
| 174 | static inline | 176 | static inline |
| 175 | int tcf_block_cb_register(struct tcf_block *block, | 177 | int tcf_block_cb_register(struct tcf_block *block, |
| 176 | tc_setup_cb_t *cb, void *cb_ident, | 178 | tc_setup_cb_t *cb, void *cb_ident, |
| 177 | void *cb_priv) | 179 | void *cb_priv, struct netlink_ext_ack *extack) |
| 178 | { | 180 | { |
| 179 | return 0; | 181 | return 0; |
| 180 | } | 182 | } |
| 181 | 183 | ||
| 182 | static inline | 184 | static inline |
| 183 | void __tcf_block_cb_unregister(struct tcf_block_cb *block_cb) | 185 | void __tcf_block_cb_unregister(struct tcf_block *block, |
| 186 | struct tcf_block_cb *block_cb) | ||
| 184 | { | 187 | { |
| 185 | } | 188 | } |
| 186 | 189 | ||
| @@ -601,6 +604,7 @@ struct tc_block_offload { | |||
| 601 | enum tc_block_command command; | 604 | enum tc_block_command command; |
| 602 | enum tcf_block_binder_type binder_type; | 605 | enum tcf_block_binder_type binder_type; |
| 603 | struct tcf_block *block; | 606 | struct tcf_block *block; |
| 607 | struct netlink_ext_ack *extack; | ||
| 604 | }; | 608 | }; |
| 605 | 609 | ||
| 606 | struct tc_cls_common_offload { | 610 | struct tc_cls_common_offload { |
| @@ -720,6 +724,8 @@ enum tc_fl_command { | |||
| 720 | TC_CLSFLOWER_REPLACE, | 724 | TC_CLSFLOWER_REPLACE, |
| 721 | TC_CLSFLOWER_DESTROY, | 725 | TC_CLSFLOWER_DESTROY, |
| 722 | TC_CLSFLOWER_STATS, | 726 | TC_CLSFLOWER_STATS, |
| 727 | TC_CLSFLOWER_TMPLT_CREATE, | ||
| 728 | TC_CLSFLOWER_TMPLT_DESTROY, | ||
| 723 | }; | 729 | }; |
| 724 | 730 | ||
| 725 | struct tc_cls_flower_offload { | 731 | struct tc_cls_flower_offload { |
| @@ -776,6 +782,7 @@ struct tc_mqprio_qopt_offload { | |||
| 776 | struct tc_cookie { | 782 | struct tc_cookie { |
| 777 | u8 *data; | 783 | u8 *data; |
| 778 | u32 len; | 784 | u32 len; |
| 785 | struct rcu_head rcu; | ||
| 779 | }; | 786 | }; |
| 780 | 787 | ||
| 781 | struct tc_qopt_offload_stats { | 788 | struct tc_qopt_offload_stats { |
