aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_basic.c
diff options
context:
space:
mode:
authorAlexander Aring <aring@mojatatu.com>2018-01-18 11:20:52 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-19 15:52:51 -0500
commit50a561900e66a03f5127edac57487079bc0b8201 (patch)
tree03678bb2e24ab39c1ea14c8722427012eb172c7d /net/sched/cls_basic.c
parent7306db38a67cf6b8e1ca354b1d0c0117b7b880d5 (diff)
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>
Diffstat (limited to 'net/sched/cls_basic.c')
-rw-r--r--net/sched/cls_basic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index 2cc38cd71938..b7bcf67641bf 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -152,11 +152,12 @@ static const struct nla_policy basic_policy[TCA_BASIC_MAX + 1] = {
152static int basic_set_parms(struct net *net, struct tcf_proto *tp, 152static int basic_set_parms(struct net *net, struct tcf_proto *tp,
153 struct basic_filter *f, unsigned long base, 153 struct basic_filter *f, unsigned long base,
154 struct nlattr **tb, 154 struct nlattr **tb,
155 struct nlattr *est, bool ovr) 155 struct nlattr *est, bool ovr,
156 struct netlink_ext_ack *extack)
156{ 157{
157 int err; 158 int err;
158 159
159 err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr); 160 err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr, extack);
160 if (err < 0) 161 if (err < 0)
161 return err; 162 return err;
162 163
@@ -222,7 +223,8 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
222 fnew->handle = idr_index; 223 fnew->handle = idr_index;
223 } 224 }
224 225
225 err = basic_set_parms(net, tp, fnew, base, tb, tca[TCA_RATE], ovr); 226 err = basic_set_parms(net, tp, fnew, base, tb, tca[TCA_RATE], ovr,
227 extack);
226 if (err < 0) { 228 if (err < 0) {
227 if (!fold) 229 if (!fold)
228 idr_remove_ext(&head->handle_idr, fnew->handle); 230 idr_remove_ext(&head->handle_idr, fnew->handle);