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

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

net: sched: sch: add extack for graft callback



This patch adds extack support for graft 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 cbaacc4e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -151,7 +151,8 @@ struct Qdisc_class_ops {
	/* Child qdisc manipulation */
	struct netdev_queue *	(*select_queue)(struct Qdisc *, struct tcmsg *);
	int			(*graft)(struct Qdisc *, unsigned long cl,
					struct Qdisc *, struct Qdisc **);
					struct Qdisc *, struct Qdisc **,
					struct netlink_ext_ack *extack);
	struct Qdisc *		(*leaf)(struct Qdisc *, unsigned long cl);
	void			(*qlen_notify)(struct Qdisc *, unsigned long);

+2 −1
Original line number Diff line number Diff line
@@ -977,7 +977,8 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
			unsigned long cl = cops->find(parent, classid);

			if (cl) {
				err = cops->graft(parent, cl, new, &old);
				err = cops->graft(parent, cl, new, &old,
						  extack);
			} else {
				NL_SET_ERR_MSG(extack, "Specified class not found");
				err = -ENOENT;
+2 −1
Original line number Diff line number Diff line
@@ -82,7 +82,8 @@ static inline struct atm_flow_data *lookup_flow(struct Qdisc *sch, u32 classid)
}

static int atm_tc_graft(struct Qdisc *sch, unsigned long arg,
			struct Qdisc *new, struct Qdisc **old)
			struct Qdisc *new, struct Qdisc **old,
			struct netlink_ext_ack *extack)
{
	struct atm_qdisc_data *p = qdisc_priv(sch);
	struct atm_flow_data *flow = (struct atm_flow_data *)arg;
+1 −1
Original line number Diff line number Diff line
@@ -1371,7 +1371,7 @@ cbq_dump_class_stats(struct Qdisc *sch, unsigned long arg,
}

static int cbq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
		     struct Qdisc **old)
		     struct Qdisc **old, struct netlink_ext_ack *extack)
{
	struct cbq_class *cl = (struct cbq_class *)arg;

+2 −1
Original line number Diff line number Diff line
@@ -203,7 +203,8 @@ static void drr_unbind_tcf(struct Qdisc *sch, unsigned long arg)
}

static int drr_graft_class(struct Qdisc *sch, unsigned long arg,
			   struct Qdisc *new, struct Qdisc **old)
			   struct Qdisc *new, struct Qdisc **old,
			   struct netlink_ext_ack *extack)
{
	struct drr_class *cl = (struct drr_class *)arg;

Loading