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

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

net: sched: act: add extack for lookup callback



This patch adds extack support for act lookup 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 589dad6d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -87,7 +87,8 @@ struct tc_action_ops {
		       struct tcf_result *);
	int     (*dump)(struct sk_buff *, struct tc_action *, int, int);
	void	(*cleanup)(struct tc_action *);
	int     (*lookup)(struct net *net, struct tc_action **a, u32 index);
	int     (*lookup)(struct net *net, struct tc_action **a, u32 index,
			  struct netlink_ext_ack *extack);
	int     (*init)(struct net *net, struct nlattr *nla,
			struct nlattr *est, struct tc_action **act, int ovr,
			int bind, struct netlink_ext_ack *extack);
+1 −1
Original line number Diff line number Diff line
@@ -901,7 +901,7 @@ static struct tc_action *tcf_action_get_1(struct net *net, struct nlattr *nla,
		goto err_out;
	}
	err = -ENOENT;
	if (ops->lookup(net, &a, index) == 0)
	if (ops->lookup(net, &a, index, extack) == 0)
		goto err_mod;

	module_put(ops->owner);
+2 −1
Original line number Diff line number Diff line
@@ -374,7 +374,8 @@ static int tcf_bpf_walker(struct net *net, struct sk_buff *skb,
	return tcf_generic_walker(tn, skb, cb, type, ops);
}

static int tcf_bpf_search(struct net *net, struct tc_action **a, u32 index)
static int tcf_bpf_search(struct net *net, struct tc_action **a, u32 index,
			  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
@@ -184,7 +184,8 @@ static int tcf_connmark_walker(struct net *net, struct sk_buff *skb,
	return tcf_generic_walker(tn, skb, cb, type, ops);
}

static int tcf_connmark_search(struct net *net, struct tc_action **a, u32 index)
static int tcf_connmark_search(struct net *net, struct tc_action **a, u32 index,
			       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
@@ -638,7 +638,8 @@ static int tcf_csum_walker(struct net *net, struct sk_buff *skb,
	return tcf_generic_walker(tn, skb, cb, type, ops);
}

static int tcf_csum_search(struct net *net, struct tc_action **a, u32 index)
static int tcf_csum_search(struct net *net, struct tc_action **a, u32 index,
			   struct netlink_ext_ack *extack)
{
	struct tc_action_net *tn = net_generic(net, csum_net_id);

Loading