Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbaacc4e authored by Alexander Aring's avatar Alexander Aring Committed by David S. Miller
Browse files

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: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarAlexander Aring <aring@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 793d81d6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
	}

	/* 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;

+1 −1
Original line number Diff line number Diff line
@@ -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) {
+2 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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;
Loading