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:

committed by
David S. Miller

parent
7306db38a6
commit
50a561900e
@@ -218,13 +218,15 @@ static const struct nla_policy fw_policy[TCA_FW_MAX + 1] = {
|
||||
|
||||
static int fw_set_parms(struct net *net, struct tcf_proto *tp,
|
||||
struct fw_filter *f, struct nlattr **tb,
|
||||
struct nlattr **tca, unsigned long base, bool ovr)
|
||||
struct nlattr **tca, unsigned long base, bool ovr,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct fw_head *head = rtnl_dereference(tp->root);
|
||||
u32 mask;
|
||||
int err;
|
||||
|
||||
err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &f->exts, ovr);
|
||||
err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &f->exts, ovr,
|
||||
extack);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
@@ -296,7 +298,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
|
||||
return err;
|
||||
}
|
||||
|
||||
err = fw_set_parms(net, tp, fnew, tb, tca, base, ovr);
|
||||
err = fw_set_parms(net, tp, fnew, tb, tca, base, ovr, extack);
|
||||
if (err < 0) {
|
||||
tcf_exts_destroy(&fnew->exts);
|
||||
kfree(fnew);
|
||||
@@ -345,7 +347,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
|
||||
f->id = handle;
|
||||
f->tp = tp;
|
||||
|
||||
err = fw_set_parms(net, tp, f, tb, tca, base, ovr);
|
||||
err = fw_set_parms(net, tp, f, tb, tca, base, ovr, extack);
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
|
Reference in New Issue
Block a user