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, ...@@ -395,11 +395,9 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh,
} }
#else /* CONFIG_NET_CLS_ACT */ #else /* CONFIG_NET_CLS_ACT */
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
if (f->police) { if (f->police)
if (qdisc_copy_stats(skb, &f->police->stats, if (tcf_police_dump_stats(skb, f->police) < 0)
f->police->stats_lock))
goto rtattr_failure; goto rtattr_failure;
}
#endif /* CONFIG_NET_CLS_POLICE */ #endif /* CONFIG_NET_CLS_POLICE */
#endif /* CONFIG_NET_CLS_ACT */ #endif /* CONFIG_NET_CLS_ACT */
return skb->len; return skb->len;
......
...@@ -566,11 +566,9 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh, ...@@ -566,11 +566,9 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh,
rta->rta_len = skb->tail - b; rta->rta_len = skb->tail - b;
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
if (f->police) { if (f->police)
if (qdisc_copy_stats(skb, &f->police->stats, if (tcf_police_dump_stats(skb, f->police) < 0)
f->police->stats_lock))
goto rtattr_failure; goto rtattr_failure;
}
#endif #endif
return skb->len; return skb->len;
......
...@@ -631,11 +631,9 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, ...@@ -631,11 +631,9 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh,
rta->rta_len = skb->tail - b; rta->rta_len = skb->tail - b;
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
if (f->police) { if (f->police)
if (qdisc_copy_stats(skb, &f->police->stats, if (tcf_police_dump_stats(skb, f->police) < 0)
f->police->stats_lock))
goto rtattr_failure; goto rtattr_failure;
}
#endif #endif
return skb->len; return skb->len;
......
...@@ -775,11 +775,9 @@ static int u32_dump(struct tcf_proto *tp, unsigned long fh, ...@@ -775,11 +775,9 @@ static int u32_dump(struct tcf_proto *tp, unsigned long fh,
} }
#else #else
#ifdef CONFIG_NET_CLS_POLICE #ifdef CONFIG_NET_CLS_POLICE
if (TC_U32_KEY(n->handle) && n->police) { if (TC_U32_KEY(n->handle) && n->police)
if (qdisc_copy_stats(skb, &n->police->stats, if (tcf_police_dump_stats(skb, n->police) < 0)
n->police->stats_lock))
goto rtattr_failure; goto rtattr_failure;
}
#endif #endif
#endif #endif
return skb->len; 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