Commit 805c1f4a authored by Jamal Hadi Salim's avatar Jamal Hadi Salim Committed by David S. Miller

net_sched: act: action flushing missaccounting

action flushing missaccounting
Account only for deleted actions
Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63acd680
...@@ -126,11 +126,12 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a, ...@@ -126,11 +126,12 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
for (i = 0; i < (hinfo->hmask + 1); i++) { for (i = 0; i < (hinfo->hmask + 1); i++) {
head = &hinfo->htab[tcf_hash(i, hinfo->hmask)]; head = &hinfo->htab[tcf_hash(i, hinfo->hmask)];
hlist_for_each_entry_safe(p, n, head, tcfc_head) { hlist_for_each_entry_safe(p, n, head, tcfc_head) {
if (ACT_P_DELETED == tcf_hash_release(p, 0, hinfo)) if (ACT_P_DELETED == tcf_hash_release(p, 0, hinfo)) {
module_put(a->ops->owner); module_put(a->ops->owner);
n_i++; n_i++;
} }
} }
}
if (nla_put_u32(skb, TCA_FCNT, n_i)) if (nla_put_u32(skb, TCA_FCNT, n_i))
goto nla_put_failure; goto nla_put_failure;
nla_nest_end(skb, nest); nla_nest_end(skb, nest);
......
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