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

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

net: sched: act: add extack for walk callback



This patch adds extack support for act walker callback api. This
prepares to handle extack support inside each specific act
implementation.

Cc: David Ahern <dsahern@gmail.com>
Signed-off-by: default avatarAlexander Aring <aring@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 331a9295
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -94,7 +94,8 @@ struct tc_action_ops {
			int bind, struct netlink_ext_ack *extack);
	int     (*walk)(struct net *, struct sk_buff *,
			struct netlink_callback *, int,
			const struct tc_action_ops *);
			const struct tc_action_ops *,
			struct netlink_ext_ack *);
	void	(*stats_update)(struct tc_action *, u64, u32, u64);
	struct net_device *(*get_dev)(const struct tc_action *a);
};
+2 −2
Original line number Diff line number Diff line
@@ -963,7 +963,7 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
		goto out_module_put;
	}

	err = ops->walk(net, skb, &dcb, RTM_DELACTION, ops);
	err = ops->walk(net, skb, &dcb, RTM_DELACTION, ops, extack);
	if (err <= 0) {
		nla_nest_cancel(skb, nest);
		goto out_module_put;
@@ -1255,7 +1255,7 @@ static int tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
	if (nest == NULL)
		goto out_module_put;

	ret = a_o->walk(net, skb, cb, RTM_GETACTION, a_o);
	ret = a_o->walk(net, skb, cb, RTM_GETACTION, a_o, NULL);
	if (ret < 0)
		goto out_module_put;

+2 −1
Original line number Diff line number Diff line
@@ -367,7 +367,8 @@ static void tcf_bpf_cleanup(struct tc_action *act)

static int tcf_bpf_walker(struct net *net, struct sk_buff *skb,
			  struct netlink_callback *cb, int type,
			  const struct tc_action_ops *ops)
			  const struct tc_action_ops *ops,
			  struct netlink_ext_ack *extack)
{
	struct tc_action_net *tn = net_generic(net, bpf_net_id);

+2 −1
Original line number Diff line number Diff line
@@ -177,7 +177,8 @@ static inline int tcf_connmark_dump(struct sk_buff *skb, struct tc_action *a,

static int tcf_connmark_walker(struct net *net, struct sk_buff *skb,
			       struct netlink_callback *cb, int type,
			       const struct tc_action_ops *ops)
			       const struct tc_action_ops *ops,
			       struct netlink_ext_ack *extack)
{
	struct tc_action_net *tn = net_generic(net, connmark_net_id);

+2 −1
Original line number Diff line number Diff line
@@ -631,7 +631,8 @@ static void tcf_csum_cleanup(struct tc_action *a)

static int tcf_csum_walker(struct net *net, struct sk_buff *skb,
			   struct netlink_callback *cb, int type,
			   const struct tc_action_ops *ops)
			   const struct tc_action_ops *ops,
			   struct netlink_ext_ack *extack)
{
	struct tc_action_net *tn = net_generic(net, csum_net_id);

Loading