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

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

net: sched: cls: add extack support for delete callback



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: default avatarAlexander Aring <aring@mojatatu.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 50a56190
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);

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

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