diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/pkt_cls.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index 34fe693ddf9a..50ea07969c09 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
| @@ -65,21 +65,21 @@ struct tcf_exts { | |||
| 65 | __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ | 65 | __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ |
| 66 | struct list_head actions; | 66 | struct list_head actions; |
| 67 | #endif | 67 | #endif |
| 68 | }; | 68 | /* Map to export classifier specific extension TLV types to the |
| 69 | 69 | * generic extensions API. Unsupported extensions must be set to 0. | |
| 70 | /* Map to export classifier specific extension TLV types to the | 70 | */ |
| 71 | * generic extensions API. Unsupported extensions must be set to 0. | ||
| 72 | */ | ||
| 73 | struct tcf_ext_map { | ||
| 74 | int action; | 71 | int action; |
| 75 | int police; | 72 | int police; |
| 76 | }; | 73 | }; |
| 77 | 74 | ||
| 78 | static inline void tcf_exts_init(struct tcf_exts *exts) | 75 | static inline void tcf_exts_init(struct tcf_exts *exts, int action, int police) |
| 79 | { | 76 | { |
| 80 | #ifdef CONFIG_NET_CLS_ACT | 77 | #ifdef CONFIG_NET_CLS_ACT |
| 78 | exts->type = 0; | ||
| 81 | INIT_LIST_HEAD(&exts->actions); | 79 | INIT_LIST_HEAD(&exts->actions); |
| 82 | #endif | 80 | #endif |
| 81 | exts->action = action; | ||
| 82 | exts->police = police; | ||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | /** | 85 | /** |
| @@ -136,15 +136,12 @@ tcf_exts_exec(struct sk_buff *skb, struct tcf_exts *exts, | |||
| 136 | 136 | ||
| 137 | int tcf_exts_validate(struct net *net, struct tcf_proto *tp, | 137 | int tcf_exts_validate(struct net *net, struct tcf_proto *tp, |
| 138 | struct nlattr **tb, struct nlattr *rate_tlv, | 138 | struct nlattr **tb, struct nlattr *rate_tlv, |
| 139 | struct tcf_exts *exts, | 139 | struct tcf_exts *exts); |
| 140 | const struct tcf_ext_map *map); | ||
| 141 | void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts); | 140 | void tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts); |
| 142 | void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, | 141 | void tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, |
| 143 | struct tcf_exts *src); | 142 | struct tcf_exts *src); |
| 144 | int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts, | 143 | int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts); |
| 145 | const struct tcf_ext_map *map); | 144 | int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts); |
| 146 | int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, | ||
| 147 | const struct tcf_ext_map *map); | ||
| 148 | 145 | ||
| 149 | /** | 146 | /** |
| 150 | * struct tcf_pkt_info - packet information | 147 | * struct tcf_pkt_info - packet information |
