diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2016-07-25 16:09:42 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-25 21:49:20 -0700 |
commit | ec0595cc4495be579309b4bfd5e997af0f2ae6f9 (patch) | |
tree | ec43ad59bbc09fa3ddc8382f33100bd1434fe182 /net/sched/act_police.c | |
parent | a85a970af265f156740977168b542234511b28a8 (diff) | |
download | linux-ec0595cc4495be579309b4bfd5e997af0f2ae6f9.tar.bz2 |
net_sched: get rid of struct tcf_common
After the previous patch, struct tc_action should be enough
to represent the generic tc action, tcf_common is not necessary
any more. This patch gets rid of it to make tc action code
more readable.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/act_police.c')
-rw-r--r-- | net/sched/act_police.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 123794af55c3..b3c7e975fc9e 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -23,7 +23,7 @@ #include <net/netlink.h> struct tcf_police { - struct tcf_common common; + struct tc_action common; int tcfp_result; u32 tcfp_ewma_rate; s64 tcfp_burst; @@ -73,11 +73,11 @@ static int tcf_act_police_walker(struct net *net, struct sk_buff *skb, for (i = 0; i < (POL_TAB_MASK + 1); i++) { struct hlist_head *head; - struct tcf_common *p; + struct tc_action *p; head = &hinfo->htab[tcf_hash(i, POL_TAB_MASK)]; - hlist_for_each_entry_rcu(p, head, tcfc_head) { + hlist_for_each_entry_rcu(p, head, tcfa_head) { index++; if (index < s_i) continue; @@ -85,9 +85,9 @@ static int tcf_act_police_walker(struct net *net, struct sk_buff *skb, if (nest == NULL) goto nla_put_failure; if (type == RTM_DELACTION) - err = tcf_action_dump_1(skb, (struct tc_action *)p, 0, 1); + err = tcf_action_dump_1(skb, p, 0, 1); else - err = tcf_action_dump_1(skb, (struct tc_action *)p, 0, 0); + err = tcf_action_dump_1(skb, p, 0, 0); if (err < 0) { index--; nla_nest_cancel(skb, nest); |