mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: sched: cls: add extack support for tcf_exts_validate
The tcf_exts_validate function calls the act api change callback. For preparing extack support for act api, this patch adds the extack as parameter for this function which is common used in cls implementations. Furthermore the tcf_exts_validate will call action init callback which prepares the TC action subsystem for extack support. Cc: David Ahern <dsahern@gmail.com> Signed-off-by: Alexander Aring <aring@mojatatu.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7306db38a6
commit
50a561900e
13 changed files with 50 additions and 32 deletions
|
@ -152,11 +152,12 @@ static const struct nla_policy basic_policy[TCA_BASIC_MAX + 1] = {
|
|||
static int basic_set_parms(struct net *net, struct tcf_proto *tp,
|
||||
struct basic_filter *f, unsigned long base,
|
||||
struct nlattr **tb,
|
||||
struct nlattr *est, bool ovr)
|
||||
struct nlattr *est, bool ovr,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr);
|
||||
err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr, extack);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
@ -222,7 +223,8 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
|
|||
fnew->handle = idr_index;
|
||||
}
|
||||
|
||||
err = basic_set_parms(net, tp, fnew, base, tb, tca[TCA_RATE], ovr);
|
||||
err = basic_set_parms(net, tp, fnew, base, tb, tca[TCA_RATE], ovr,
|
||||
extack);
|
||||
if (err < 0) {
|
||||
if (!fold)
|
||||
idr_remove_ext(&head->handle_idr, fnew->handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue