Skip to content

Commit cbaacc4

Browse files
Alexander Aringdavem330
authored andcommitted
net: sched: sch: add extack for block callback
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>
1 parent 793d81d commit cbaacc4

File tree

16 files changed

+33
-18
lines changed

16 files changed

+33
-18
lines changed

include/net/sch_generic.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ struct Qdisc_class_ops {
165165

166166
/* Filter manipulation */
167167
struct tcf_block * (*tcf_block)(struct Qdisc *sch,
168-
unsigned long arg);
168+
unsigned long arg,
169+
struct netlink_ext_ack *extack);
169170
unsigned long (*bind_tcf)(struct Qdisc *, unsigned long,
170171
u32 classid);
171172
void (*unbind_tcf)(struct Qdisc *, unsigned long);

net/sched/cls_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
793793
}
794794

795795
/* And the last stroke */
796-
block = cops->tcf_block(q, cl);
796+
block = cops->tcf_block(q, cl, extack);
797797
if (!block) {
798798
err = -EINVAL;
799799
goto errout;
@@ -1040,7 +1040,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
10401040
if (cl == 0)
10411041
goto out;
10421042
}
1043-
block = cops->tcf_block(q, cl);
1043+
block = cops->tcf_block(q, cl, NULL);
10441044
if (!block)
10451045
goto out;
10461046

net/sched/sch_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,7 @@ static void tc_bind_tclass(struct Qdisc *q, u32 portid, u32 clid,
17601760
cl = cops->find(q, portid);
17611761
if (!cl)
17621762
return;
1763-
block = cops->tcf_block(q, cl);
1763+
block = cops->tcf_block(q, cl, NULL);
17641764
if (!block)
17651765
return;
17661766
list_for_each_entry(chain, &block->chain_list, list) {

net/sched/sch_atm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ static void atm_tc_walk(struct Qdisc *sch, struct qdisc_walker *walker)
357357
}
358358
}
359359

360-
static struct tcf_block *atm_tc_tcf_block(struct Qdisc *sch, unsigned long cl)
360+
static struct tcf_block *atm_tc_tcf_block(struct Qdisc *sch, unsigned long cl,
361+
struct netlink_ext_ack *extack)
361362
{
362363
struct atm_qdisc_data *p = qdisc_priv(sch);
363364
struct atm_flow_data *flow = (struct atm_flow_data *)cl;

net/sched/sch_cbq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,8 @@ static int cbq_delete(struct Qdisc *sch, unsigned long arg)
16791679
return 0;
16801680
}
16811681

1682-
static struct tcf_block *cbq_tcf_block(struct Qdisc *sch, unsigned long arg)
1682+
static struct tcf_block *cbq_tcf_block(struct Qdisc *sch, unsigned long arg,
1683+
struct netlink_ext_ack *extack)
16831684
{
16841685
struct cbq_sched_data *q = qdisc_priv(sch);
16851686
struct cbq_class *cl = (struct cbq_class *)arg;

net/sched/sch_drr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ static unsigned long drr_search_class(struct Qdisc *sch, u32 classid)
173173
return (unsigned long)drr_find_class(sch, classid);
174174
}
175175

176-
static struct tcf_block *drr_tcf_block(struct Qdisc *sch, unsigned long cl)
176+
static struct tcf_block *drr_tcf_block(struct Qdisc *sch, unsigned long cl,
177+
struct netlink_ext_ack *extack)
177178
{
178179
struct drr_sched *q = qdisc_priv(sch);
179180

net/sched/sch_dsmark.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ static void dsmark_walk(struct Qdisc *sch, struct qdisc_walker *walker)
185185
}
186186
}
187187

188-
static struct tcf_block *dsmark_tcf_block(struct Qdisc *sch, unsigned long cl)
188+
static struct tcf_block *dsmark_tcf_block(struct Qdisc *sch, unsigned long cl,
189+
struct netlink_ext_ack *extack)
189190
{
190191
struct dsmark_qdisc_data *p = qdisc_priv(sch);
191192

net/sched/sch_fq_codel.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,8 @@ static void fq_codel_unbind(struct Qdisc *q, unsigned long cl)
597597
{
598598
}
599599

600-
static struct tcf_block *fq_codel_tcf_block(struct Qdisc *sch, unsigned long cl)
600+
static struct tcf_block *fq_codel_tcf_block(struct Qdisc *sch, unsigned long cl,
601+
struct netlink_ext_ack *extack)
601602
{
602603
struct fq_codel_sched_data *q = qdisc_priv(sch);
603604

net/sched/sch_hfsc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,8 @@ hfsc_unbind_tcf(struct Qdisc *sch, unsigned long arg)
12471247
cl->filter_cnt--;
12481248
}
12491249

1250-
static struct tcf_block *hfsc_tcf_block(struct Qdisc *sch, unsigned long arg)
1250+
static struct tcf_block *hfsc_tcf_block(struct Qdisc *sch, unsigned long arg,
1251+
struct netlink_ext_ack *extack)
12511252
{
12521253
struct hfsc_sched *q = qdisc_priv(sch);
12531254
struct hfsc_class *cl = (struct hfsc_class *)arg;

net/sched/sch_htb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
15251525
return err;
15261526
}
15271527

1528-
static struct tcf_block *htb_tcf_block(struct Qdisc *sch, unsigned long arg)
1528+
static struct tcf_block *htb_tcf_block(struct Qdisc *sch, unsigned long arg,
1529+
struct netlink_ext_ack *extack)
15291530
{
15301531
struct htb_sched *q = qdisc_priv(sch);
15311532
struct htb_class *cl = (struct htb_class *)arg;

0 commit comments

Comments
 (0)