]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: sched: cls: add extack support for delete callback
authorAlexander Aring <aring@mojatatu.com>
Thu, 18 Jan 2018 16:20:53 +0000 (11:20 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jan 2018 20:52:51 +0000 (15:52 -0500)
This patch adds extack support for classifier delete callback api. This
prepares to handle extack support inside each specific classifier
implementation.

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>
13 files changed:
include/net/sch_generic.h
net/sched/cls_api.c
net/sched/cls_basic.c
net/sched/cls_bpf.c
net/sched/cls_cgroup.c
net/sched/cls_flow.c
net/sched/cls_flower.c
net/sched/cls_fw.c
net/sched/cls_matchall.c
net/sched/cls_route.c
net/sched/cls_rsvp.h
net/sched/cls_tcindex.c
net/sched/cls_u32.c

index ee398bcd46e7b9ceb8f6d596360639bc5691e4cd..cd1be1f25c36a89667943784e012cb119b2a9bfc 100644 (file)
@@ -242,7 +242,8 @@ struct tcf_proto_ops {
                                        void **, bool,
                                        struct netlink_ext_ack *);
        int                     (*delete)(struct tcf_proto *tp, void *arg,
-                                         bool *last);
+                                         bool *last,
+                                         struct netlink_ext_ack *);
        void                    (*walk)(struct tcf_proto*, struct tcf_walker *arg);
        void                    (*bind_class)(void *, u32, unsigned long);
 
index f365970dc68c47c2a8b8e303fa835329cbdc1b62..f5d293416f46ac485e81365886619670ca7267ed 100644 (file)
@@ -955,7 +955,7 @@ static int tfilter_del_notify(struct net *net, struct sk_buff *oskb,
                return -EINVAL;
        }
 
-       err = tp->ops->delete(tp, fh, last);
+       err = tp->ops->delete(tp, fh, last, extack);
        if (err) {
                kfree_skb(skb);
                return err;
index b7bcf67641bf2c86975c8b0d6d3f0707cd7727af..6088be65d1676475ab44313b3e77a4d1e882dc61 100644 (file)
@@ -130,7 +130,8 @@ static void basic_destroy(struct tcf_proto *tp)
        kfree_rcu(head, rcu);
 }
 
-static int basic_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int basic_delete(struct tcf_proto *tp, void *arg, bool *last,
+                       struct netlink_ext_ack *extack)
 {
        struct basic_head *head = rtnl_dereference(tp->root);
        struct basic_filter *f = arg;
index c86072779b0a53b7a48572aa43926887ebaecebd..fc024fc3ec2fa5de8cf7d84eab5f0bd9fbd9800b 100644 (file)
@@ -295,7 +295,8 @@ static void __cls_bpf_delete(struct tcf_proto *tp, struct cls_bpf_prog *prog)
                __cls_bpf_delete_prog(prog);
 }
 
-static int cls_bpf_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int cls_bpf_delete(struct tcf_proto *tp, void *arg, bool *last,
+                         struct netlink_ext_ack *extack)
 {
        struct cls_bpf_head *head = rtnl_dereference(tp->root);
 
index aaafcf6965f7006350090f7b995e7b2d39f02074..1b54fbfca414fe50bacd47a91eba6f97a7706f34 100644 (file)
@@ -156,7 +156,8 @@ static void cls_cgroup_destroy(struct tcf_proto *tp)
        }
 }
 
-static int cls_cgroup_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int cls_cgroup_delete(struct tcf_proto *tp, void *arg, bool *last,
+                            struct netlink_ext_ack *extack)
 {
        return -EOPNOTSUPP;
 }
index 07816133cbb9efaa0d948ea77fc7eec11aa786c2..64c24b4880581b653db60fcaf9f195e18796008c 100644 (file)
@@ -575,7 +575,8 @@ err1:
        return err;
 }
 
-static int flow_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int flow_delete(struct tcf_proto *tp, void *arg, bool *last,
+                      struct netlink_ext_ack *extack)
 {
        struct flow_head *head = rtnl_dereference(tp->root);
        struct flow_filter *f = arg;
index 8235ed9143c4e28b0fafad8c1128ca1875ccc649..50145b873ff149addcb5755a5a9412f52b6135bf 100644 (file)
@@ -985,7 +985,8 @@ errout_tb:
        return err;
 }
 
-static int fl_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int fl_delete(struct tcf_proto *tp, void *arg, bool *last,
+                    struct netlink_ext_ack *extack)
 {
        struct cls_fl_head *head = rtnl_dereference(tp->root);
        struct cls_fl_filter *f = arg;
index 72a924a38753df3a3532b705189365e335245256..bd21ed83eb07a68a3ddf7a970c4cb71552348f6a 100644 (file)
@@ -172,7 +172,8 @@ static void fw_destroy(struct tcf_proto *tp)
        kfree_rcu(head, rcu);
 }
 
-static int fw_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int fw_delete(struct tcf_proto *tp, void *arg, bool *last,
+                    struct netlink_ext_ack *extack)
 {
        struct fw_head *head = rtnl_dereference(tp->root);
        struct fw_filter *f = arg;
index 9a0901ee6b741dc619a54ce456e3d61d92a91412..f67d3d7fcf40bb8a3ea04b6df3d93357a2a3bdd7 100644 (file)
@@ -225,7 +225,8 @@ err_exts_init:
        return err;
 }
 
-static int mall_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int mall_delete(struct tcf_proto *tp, void *arg, bool *last,
+                      struct netlink_ext_ack *extack)
 {
        return -EOPNOTSUPP;
 }
index 92d683851cb08852d13673f3348f26e5b7c632e6..55467c30d5245342e695b1080d93e036af59b353 100644 (file)
@@ -316,7 +316,8 @@ static void route4_destroy(struct tcf_proto *tp)
        kfree_rcu(head, rcu);
 }
 
-static int route4_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int route4_delete(struct tcf_proto *tp, void *arg, bool *last,
+                        struct netlink_ext_ack *extack)
 {
        struct route4_head *head = rtnl_dereference(tp->root);
        struct route4_filter *f = arg;
index c27d23694002f21a6bb82008cc3152c50ff20283..5cc0df690cff6b98a43089e36b62a0d1284369f5 100644 (file)
@@ -350,7 +350,8 @@ static void rsvp_destroy(struct tcf_proto *tp)
        kfree_rcu(data, rcu);
 }
 
-static int rsvp_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int rsvp_delete(struct tcf_proto *tp, void *arg, bool *last,
+                      struct netlink_ext_ack *extack)
 {
        struct rsvp_head *head = rtnl_dereference(tp->root);
        struct rsvp_filter *nfp, *f = arg;
index 9d6621caa92fb9da8ab2b7d370bfb2ea2dc71775..01a163e0b6aa2c3445f3705ff8eab999b55bb717 100644 (file)
@@ -193,7 +193,8 @@ static void tcindex_destroy_fexts(struct rcu_head *head)
        tcf_queue_work(&f->work);
 }
 
-static int tcindex_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int tcindex_delete(struct tcf_proto *tp, void *arg, bool *last,
+                         struct netlink_ext_ack *extack)
 {
        struct tcindex_data *p = rtnl_dereference(tp->root);
        struct tcindex_filter_result *r = arg;
@@ -246,7 +247,7 @@ static int tcindex_destroy_element(struct tcf_proto *tp,
 {
        bool last;
 
-       return tcindex_delete(tp, arg, &last);
+       return tcindex_delete(tp, arg, &last, NULL);
 }
 
 static void __tcindex_destroy(struct rcu_head *head)
index 933058bbd0a9e9ab5a66bde452eea7bd7cd46f2c..7f772da8e6272277fa4c579fde4fb5c227122e12 100644 (file)
@@ -672,7 +672,8 @@ static void u32_destroy(struct tcf_proto *tp)
        tp->data = NULL;
 }
 
-static int u32_delete(struct tcf_proto *tp, void *arg, bool *last)
+static int u32_delete(struct tcf_proto *tp, void *arg, bool *last,
+                     struct netlink_ext_ack *extack)
 {
        struct tc_u_hnode *ht = arg;
        struct tc_u_hnode *root_ht = rtnl_dereference(tp->root);