Commit aa0a92f7 authored by Zhengchao Shao's avatar Zhengchao Shao Committed by David S. Miller

net: sched: act_bpf: get rid of tcf_bpf_walker and tcf_bpf_search

tcf_bpf_walker() and tcf_bpf_search() do the same thing as generic
walk/search function, so remove them.
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fae52d93
...@@ -389,23 +389,6 @@ static void tcf_bpf_cleanup(struct tc_action *act) ...@@ -389,23 +389,6 @@ static void tcf_bpf_cleanup(struct tc_action *act)
tcf_bpf_cfg_cleanup(&tmp); tcf_bpf_cfg_cleanup(&tmp);
} }
static int tcf_bpf_walker(struct net *net, struct sk_buff *skb,
struct netlink_callback *cb, int type,
const struct tc_action_ops *ops,
struct netlink_ext_ack *extack)
{
struct tc_action_net *tn = net_generic(net, act_bpf_ops.net_id);
return tcf_generic_walker(tn, skb, cb, type, ops, extack);
}
static int tcf_bpf_search(struct net *net, struct tc_action **a, u32 index)
{
struct tc_action_net *tn = net_generic(net, act_bpf_ops.net_id);
return tcf_idr_search(tn, a, index);
}
static struct tc_action_ops act_bpf_ops __read_mostly = { static struct tc_action_ops act_bpf_ops __read_mostly = {
.kind = "bpf", .kind = "bpf",
.id = TCA_ID_BPF, .id = TCA_ID_BPF,
...@@ -414,8 +397,6 @@ static struct tc_action_ops act_bpf_ops __read_mostly = { ...@@ -414,8 +397,6 @@ static struct tc_action_ops act_bpf_ops __read_mostly = {
.dump = tcf_bpf_dump, .dump = tcf_bpf_dump,
.cleanup = tcf_bpf_cleanup, .cleanup = tcf_bpf_cleanup,
.init = tcf_bpf_init, .init = tcf_bpf_init,
.walk = tcf_bpf_walker,
.lookup = tcf_bpf_search,
.size = sizeof(struct tcf_bpf), .size = sizeof(struct tcf_bpf),
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment