Commit c2e3ddf0 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[PKT_SCHED]: cls_*: use tcf_police_dump_stats to dump via new gnet_stats API

Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 51972072
......@@ -395,11 +395,9 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh,
}
#else /* CONFIG_NET_CLS_ACT */
#ifdef CONFIG_NET_CLS_POLICE
if (f->police) {
if (qdisc_copy_stats(skb, &f->police->stats,
f->police->stats_lock))
if (f->police)
if (tcf_police_dump_stats(skb, f->police) < 0)
goto rtattr_failure;
}
#endif /* CONFIG_NET_CLS_POLICE */
#endif /* CONFIG_NET_CLS_ACT */
return skb->len;
......
......@@ -566,11 +566,9 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh,
rta->rta_len = skb->tail - b;
#ifdef CONFIG_NET_CLS_POLICE
if (f->police) {
if (qdisc_copy_stats(skb, &f->police->stats,
f->police->stats_lock))
if (f->police)
if (tcf_police_dump_stats(skb, f->police) < 0)
goto rtattr_failure;
}
#endif
return skb->len;
......
......@@ -631,11 +631,9 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh,
rta->rta_len = skb->tail - b;
#ifdef CONFIG_NET_CLS_POLICE
if (f->police) {
if (qdisc_copy_stats(skb, &f->police->stats,
f->police->stats_lock))
if (f->police)
if (tcf_police_dump_stats(skb, f->police) < 0)
goto rtattr_failure;
}
#endif
return skb->len;
......
......@@ -775,11 +775,9 @@ static int u32_dump(struct tcf_proto *tp, unsigned long fh,
}
#else
#ifdef CONFIG_NET_CLS_POLICE
if (TC_U32_KEY(n->handle) && n->police) {
if (qdisc_copy_stats(skb, &n->police->stats,
n->police->stats_lock))
if (TC_U32_KEY(n->handle) && n->police)
if (tcf_police_dump_stats(skb, n->police) < 0)
goto rtattr_failure;
}
#endif
#endif
return skb->len;
......
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