mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net_sched: remove unnecessary ops->delete()
All ops->delete() wants is getting the tn->idrinfo, but we already
have tc_action before calling ops->delete(), and tc_action has
a pointer ->idrinfo.
More importantly, each type of action does the same thing, that is,
just calling tcf_idr_delete_index().
So it can be just removed.
Fixes: b409074e66
("net: sched: add 'delete' function to action ops")
Cc: Jiri Pirko <jiri@mellanox.com>
Cc: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
edfaf94fa7
commit
97a3f84f2c
18 changed files with 7 additions and 146 deletions
|
@ -337,13 +337,6 @@ static int tcf_ipt_search(struct net *net, struct tc_action **a, u32 index,
|
|||
return tcf_idr_search(tn, a, index);
|
||||
}
|
||||
|
||||
static int tcf_ipt_delete(struct net *net, u32 index)
|
||||
{
|
||||
struct tc_action_net *tn = net_generic(net, ipt_net_id);
|
||||
|
||||
return tcf_idr_delete_index(tn, index);
|
||||
}
|
||||
|
||||
static struct tc_action_ops act_ipt_ops = {
|
||||
.kind = "ipt",
|
||||
.type = TCA_ACT_IPT,
|
||||
|
@ -354,7 +347,6 @@ static struct tc_action_ops act_ipt_ops = {
|
|||
.init = tcf_ipt_init,
|
||||
.walk = tcf_ipt_walker,
|
||||
.lookup = tcf_ipt_search,
|
||||
.delete = tcf_ipt_delete,
|
||||
.size = sizeof(struct tcf_ipt),
|
||||
};
|
||||
|
||||
|
@ -395,13 +387,6 @@ static int tcf_xt_search(struct net *net, struct tc_action **a, u32 index,
|
|||
return tcf_idr_search(tn, a, index);
|
||||
}
|
||||
|
||||
static int tcf_xt_delete(struct net *net, u32 index)
|
||||
{
|
||||
struct tc_action_net *tn = net_generic(net, xt_net_id);
|
||||
|
||||
return tcf_idr_delete_index(tn, index);
|
||||
}
|
||||
|
||||
static struct tc_action_ops act_xt_ops = {
|
||||
.kind = "xt",
|
||||
.type = TCA_ACT_XT,
|
||||
|
@ -412,7 +397,6 @@ static struct tc_action_ops act_xt_ops = {
|
|||
.init = tcf_xt_init,
|
||||
.walk = tcf_xt_walker,
|
||||
.lookup = tcf_xt_search,
|
||||
.delete = tcf_xt_delete,
|
||||
.size = sizeof(struct tcf_ipt),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue