Skip to content

Commit 4a88648

Browse files
committed
Merge branch 'net-sched-act-add-extack-support'
Alexander Aring says: ==================== net: sched: act: add extack support this patch series adds extack support for the TC action subsystem. As example I for the extack support in a TC action I choosed mirred action. - Alex Cc: David Ahern <dsahern@gmail.com> changes since v3: - adapt recommended changes from Davide Caratti, please check if I catch everything. Thanks. changes since v2: - remove newline in extack of generic walker handling Thanks to Davide Caratti - add kernel@mojatatu.com in cc ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 80c6d2b + 1d4760c commit 4a88648

19 files changed

+215
-129
lines changed

include/net/act_api.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,15 @@ struct tc_action_ops {
8787
struct tcf_result *);
8888
int (*dump)(struct sk_buff *, struct tc_action *, int, int);
8989
void (*cleanup)(struct tc_action *);
90-
int (*lookup)(struct net *, struct tc_action **, u32);
90+
int (*lookup)(struct net *net, struct tc_action **a, u32 index,
91+
struct netlink_ext_ack *extack);
9192
int (*init)(struct net *net, struct nlattr *nla,
9293
struct nlattr *est, struct tc_action **act, int ovr,
93-
int bind);
94+
int bind, struct netlink_ext_ack *extack);
9495
int (*walk)(struct net *, struct sk_buff *,
95-
struct netlink_callback *, int, const struct tc_action_ops *);
96+
struct netlink_callback *, int,
97+
const struct tc_action_ops *,
98+
struct netlink_ext_ack *);
9699
void (*stats_update)(struct tc_action *, u64, u32, u64);
97100
struct net_device *(*get_dev)(const struct tc_action *a);
98101
};
@@ -137,7 +140,8 @@ static inline void tc_action_net_exit(struct list_head *net_list,
137140

138141
int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb,
139142
struct netlink_callback *cb, int type,
140-
const struct tc_action_ops *ops);
143+
const struct tc_action_ops *ops,
144+
struct netlink_ext_ack *extack);
141145
int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index);
142146
bool tcf_idr_check(struct tc_action_net *tn, u32 index, struct tc_action **a,
143147
int bind);
@@ -162,10 +166,11 @@ int tcf_action_exec(struct sk_buff *skb, struct tc_action **actions,
162166
int nr_actions, struct tcf_result *res);
163167
int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla,
164168
struct nlattr *est, char *name, int ovr, int bind,
165-
struct list_head *actions);
169+
struct list_head *actions, struct netlink_ext_ack *extack);
166170
struct tc_action *tcf_action_init_1(struct net *net, struct tcf_proto *tp,
167171
struct nlattr *nla, struct nlattr *est,
168-
char *name, int ovr, int bind);
172+
char *name, int ovr, int bind,
173+
struct netlink_ext_ack *extack);
169174
int tcf_action_dump(struct sk_buff *skb, struct list_head *, int, int);
170175
int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int);
171176
int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int);

0 commit comments

Comments
 (0)