Skip to content

Commit

Permalink
sched: rename tcf_destroy to tcf_destroy_proto
Browse files Browse the repository at this point in the history
This function destroys TC filter protocol, not TC filter. So name it
accordingly.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Feb 10, 2017
1 parent b4c4ebc commit 79112c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue,
const struct Qdisc_ops *ops, u32 parentid);
void __qdisc_calculate_pkt_len(struct sk_buff *skb,
const struct qdisc_size_table *stab);
bool tcf_destroy(struct tcf_proto *tp, bool force);
bool tcf_proto_destroy(struct tcf_proto *tp, bool force);
void tcf_destroy_chain(struct tcf_proto __rcu **fl);
int skb_do_redirect(struct sk_buff *);

Expand Down
8 changes: 4 additions & 4 deletions net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)

tfilter_notify(net, skb, n, tp, fh,
RTM_DELTFILTER, false);
tcf_destroy(tp, true);
tcf_proto_destroy(tp, true);
err = 0;
goto errout;
}
Expand All @@ -338,7 +338,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)
err = -EEXIST;
if (n->nlmsg_flags & NLM_F_EXCL) {
if (tp_created)
tcf_destroy(tp, true);
tcf_proto_destroy(tp, true);
goto errout;
}
break;
Expand All @@ -350,7 +350,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)
tfilter_notify(net, skb, n, tp,
t->tcm_handle,
RTM_DELTFILTER, false);
if (tcf_destroy(tp, false))
if (tcf_proto_destroy(tp, false))
RCU_INIT_POINTER(*back, next);
}
goto errout;
Expand All @@ -374,7 +374,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)
tfilter_notify(net, skb, n, tp, fh, RTM_NEWTFILTER, false);
} else {
if (tp_created)
tcf_destroy(tp, true);
tcf_proto_destroy(tp, true);
}

errout:
Expand Down
4 changes: 2 additions & 2 deletions net/sched/sch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1900,7 +1900,7 @@ int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp,
}
EXPORT_SYMBOL(tc_classify);

bool tcf_destroy(struct tcf_proto *tp, bool force)
bool tcf_proto_destroy(struct tcf_proto *tp, bool force)
{
if (tp->ops->destroy(tp, force)) {
module_put(tp->ops->owner);
Expand All @@ -1917,7 +1917,7 @@ void tcf_destroy_chain(struct tcf_proto __rcu **fl)

while ((tp = rtnl_dereference(*fl)) != NULL) {
RCU_INIT_POINTER(*fl, tp->next);
tcf_destroy(tp, true);
tcf_proto_destroy(tp, true);
}
}
EXPORT_SYMBOL(tcf_destroy_chain);
Expand Down

0 comments on commit 79112c2

Please sign in to comment.