net: sched: sch: add extack for block callback
authorAlexander Aring <aring@mojatatu.com>
Wed, 20 Dec 2017 17:35:16 +0000 (12:35 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Dec 2017 17:32:50 +0000 (12:32 -0500)
This patch adds extack support for block callback to prepare per-qdisc
specific changes for extack.

Cc: David Ahern <dsahern@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Alexander Aring <aring@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 files changed:
include/net/sch_generic.h
net/sched/cls_api.c
net/sched/sch_api.c
net/sched/sch_atm.c
net/sched/sch_cbq.c
net/sched/sch_drr.c
net/sched/sch_dsmark.c
net/sched/sch_fq_codel.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_ingress.c
net/sched/sch_multiq.c
net/sched/sch_prio.c
net/sched/sch_qfq.c
net/sched/sch_sfb.c
net/sched/sch_sfq.c

index b4660a3ea99cd101380de4580fa4ef51c7454551..f65dd2837142210c56775e00be3503830c54059b 100644 (file)
@@ -165,7 +165,8 @@ struct Qdisc_class_ops {
 
        /* Filter manipulation */
        struct tcf_block *      (*tcf_block)(struct Qdisc *sch,
-                                            unsigned long arg);
+                                            unsigned long arg,
+                                            struct netlink_ext_ack *extack);
        unsigned long           (*bind_tcf)(struct Qdisc *, unsigned long,
                                        u32 classid);
        void                    (*unbind_tcf)(struct Qdisc *, unsigned long);
index 32b1ea7cf863444586bba3eafcafc9a06b5993f7..22b977d40e1db09726909cc8a76fe8240aaa1d66 100644 (file)
@@ -793,7 +793,7 @@ replay:
        }
 
        /* And the last stroke */
-       block = cops->tcf_block(q, cl);
+       block = cops->tcf_block(q, cl, extack);
        if (!block) {
                err = -EINVAL;
                goto errout;
@@ -1040,7 +1040,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
                if (cl == 0)
                        goto out;
        }
-       block = cops->tcf_block(q, cl);
+       block = cops->tcf_block(q, cl, NULL);
        if (!block)
                goto out;
 
index 6cf2f7dadbdbd3043bde24a53104616581697620..8c8c15b4da3bd8f516f77caf071505986fde805e 100644 (file)
@@ -1760,7 +1760,7 @@ static void tc_bind_tclass(struct Qdisc *q, u32 portid, u32 clid,
        cl = cops->find(q, portid);
        if (!cl)
                return;
-       block = cops->tcf_block(q, cl);
+       block = cops->tcf_block(q, cl, NULL);
        if (!block)
                return;
        list_for_each_entry(chain, &block->chain_list, list) {
index 80ada9affe816a73e8a63fcfb2094715729040b2..b606a75af3333e91851c206924056977ae332dd5 100644 (file)
@@ -357,7 +357,8 @@ static void atm_tc_walk(struct Qdisc *sch, struct qdisc_walker *walker)
        }
 }
 
-static struct tcf_block *atm_tc_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *atm_tc_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                         struct netlink_ext_ack *extack)
 {
        struct atm_qdisc_data *p = qdisc_priv(sch);
        struct atm_flow_data *flow = (struct atm_flow_data *)cl;
index 8f1832df8b4f9187325d9fdeb2327afb5cb2806c..d46048a439a65d85b912c93ad3d17e47bae2feef 100644 (file)
@@ -1679,7 +1679,8 @@ static int cbq_delete(struct Qdisc *sch, unsigned long arg)
        return 0;
 }
 
-static struct tcf_block *cbq_tcf_block(struct Qdisc *sch, unsigned long arg)
+static struct tcf_block *cbq_tcf_block(struct Qdisc *sch, unsigned long arg,
+                                      struct netlink_ext_ack *extack)
 {
        struct cbq_sched_data *q = qdisc_priv(sch);
        struct cbq_class *cl = (struct cbq_class *)arg;
index 73b914bc47a4ccebdd3145c2b6d69dd2f0139151..44a2870f6f104d23b974c07eaf4f5ce186310d96 100644 (file)
@@ -173,7 +173,8 @@ static unsigned long drr_search_class(struct Qdisc *sch, u32 classid)
        return (unsigned long)drr_find_class(sch, classid);
 }
 
-static struct tcf_block *drr_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *drr_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                      struct netlink_ext_ack *extack)
 {
        struct drr_sched *q = qdisc_priv(sch);
 
index 89e433bbd590d01334b93426311c17622b27871c..5dc5d5216fbb51f1d6c448878f2f18a971ee0759 100644 (file)
@@ -185,7 +185,8 @@ ignore:
        }
 }
 
-static struct tcf_block *dsmark_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *dsmark_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                         struct netlink_ext_ack *extack)
 {
        struct dsmark_qdisc_data *p = qdisc_priv(sch);
 
index b4ca46aafb5af303db5072207e1313a6b4d041e0..06e5360c54d8fb0e60c515bb9e7f92b5805a7d68 100644 (file)
@@ -597,7 +597,8 @@ static void fq_codel_unbind(struct Qdisc *q, unsigned long cl)
 {
 }
 
-static struct tcf_block *fq_codel_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *fq_codel_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                           struct netlink_ext_ack *extack)
 {
        struct fq_codel_sched_data *q = qdisc_priv(sch);
 
index 11410b0e40681911ee55162f6c938d1d916fa9fd..961668d657a087bdf79aef5b7e0be07da40a65ef 100644 (file)
@@ -1247,7 +1247,8 @@ hfsc_unbind_tcf(struct Qdisc *sch, unsigned long arg)
        cl->filter_cnt--;
 }
 
-static struct tcf_block *hfsc_tcf_block(struct Qdisc *sch, unsigned long arg)
+static struct tcf_block *hfsc_tcf_block(struct Qdisc *sch, unsigned long arg,
+                                       struct netlink_ext_ack *extack)
 {
        struct hfsc_sched *q = qdisc_priv(sch);
        struct hfsc_class *cl = (struct hfsc_class *)arg;
index eb535a23a69bd6cc01bffbc45cce18c4fc077120..79cf24468a3813ae9dcca168344c51c0b19d3736 100644 (file)
@@ -1525,7 +1525,8 @@ failure:
        return err;
 }
 
-static struct tcf_block *htb_tcf_block(struct Qdisc *sch, unsigned long arg)
+static struct tcf_block *htb_tcf_block(struct Qdisc *sch, unsigned long arg,
+                                      struct netlink_ext_ack *extack)
 {
        struct htb_sched *q = qdisc_priv(sch);
        struct htb_class *cl = (struct htb_class *)arg;
index a6f175e6401681b83a5d846a0e7674af8f99ec05..b9de7be531dde7e6a43ef9da9a4276d27e21fcfe 100644 (file)
@@ -48,7 +48,8 @@ static void ingress_walk(struct Qdisc *sch, struct qdisc_walker *walker)
 {
 }
 
-static struct tcf_block *ingress_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *ingress_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                          struct netlink_ext_ack *extack)
 {
        struct ingress_sched_data *q = qdisc_priv(sch);
 
@@ -154,7 +155,8 @@ static unsigned long clsact_bind_filter(struct Qdisc *sch,
        return clsact_find(sch, classid);
 }
 
-static struct tcf_block *clsact_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *clsact_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                         struct netlink_ext_ack *extack)
 {
        struct clsact_sched_data *q = qdisc_priv(sch);
 
index a8db1dbeb04fb5cf9c2e11e0487cb124e555de40..4bcbd3636606797e9b23d66bdcdbd811ded78835 100644 (file)
@@ -371,7 +371,8 @@ static void multiq_walk(struct Qdisc *sch, struct qdisc_walker *arg)
        }
 }
 
-static struct tcf_block *multiq_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *multiq_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                         struct netlink_ext_ack *extack)
 {
        struct multiq_sched_data *q = qdisc_priv(sch);
 
index 5f8ecbaa2610f8604644fc03ff1943c1a0378ce7..077af47307495a98fc45aa3db27febdd1c2242a6 100644 (file)
@@ -329,7 +329,8 @@ static void prio_walk(struct Qdisc *sch, struct qdisc_walker *arg)
        }
 }
 
-static struct tcf_block *prio_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *prio_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                       struct netlink_ext_ack *extack)
 {
        struct prio_sched_data *q = qdisc_priv(sch);
 
index 1f4a84b687d2f6ae69367f420bd289c61a030918..e77e7131e620a48d087448728c21f375c5a71f31 100644 (file)
@@ -565,7 +565,8 @@ static unsigned long qfq_search_class(struct Qdisc *sch, u32 classid)
        return (unsigned long)qfq_find_class(sch, classid);
 }
 
-static struct tcf_block *qfq_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *qfq_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                      struct netlink_ext_ack *extack)
 {
        struct qfq_sched *q = qdisc_priv(sch);
 
index d70d470361be76a338ad439a5bd4892c25c10676..9e01b80edfe7738265519ed029bf8da05a11959f 100644 (file)
@@ -668,7 +668,8 @@ static void sfb_walk(struct Qdisc *sch, struct qdisc_walker *walker)
        }
 }
 
-static struct tcf_block *sfb_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *sfb_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                      struct netlink_ext_ack *extack)
 {
        struct sfb_sched_data *q = qdisc_priv(sch);
 
index 3b5869c7b3f327123d02f044ef2ad3af14570fce..7a217be39f2a5a05ed32a96847a4137d11ada186 100644 (file)
@@ -837,7 +837,8 @@ static void sfq_unbind(struct Qdisc *q, unsigned long cl)
 {
 }
 
-static struct tcf_block *sfq_tcf_block(struct Qdisc *sch, unsigned long cl)
+static struct tcf_block *sfq_tcf_block(struct Qdisc *sch, unsigned long cl,
+                                      struct netlink_ext_ack *extack)
 {
        struct sfq_sched_data *q = qdisc_priv(sch);